/* Peep Smart Blog AI — Frontend Styles */

:root {
  --peep-primary: #7C3AED;
  --peep-secondary: #10B981;
  --peep-text: #1E293B;
  --peep-text-light: #64748B;
  --peep-bg: #F8FAFC;
  --peep-surface: #FFFFFF;
  --peep-border: #E2E8F0;
  --peep-radius: 16px;
  --peep-radius-sm: 10px;
  --peep-shadow: 0 4px 24px rgba(0,0,0,0.08);
  --peep-shadow-hover: 0 8px 40px rgba(0,0,0,0.14);
  --peep-transition: all 0.25s cubic-bezier(0.4,0,0.2,1);
}

/* ===== BASE ===== */
.peep-blog * { box-sizing: border-box; }
.peep-blog a { color: var(--peep-primary); text-decoration: none; }
.peep-blog a:hover { text-decoration: underline; }

/* ===== CONTAINER ===== */
.peep-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== CARDS ===== */
.peep-post-card {
  background: var(--peep-surface);
  border-radius: var(--peep-radius);
  overflow: hidden;
  border: 1px solid var(--peep-border);
  box-shadow: var(--peep-shadow);
  transition: var(--peep-transition);
  display: flex;
  flex-direction: column;
}
.peep-post-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--peep-shadow-hover);
  border-color: var(--peep-primary);
}

.peep-card-thumb {
  aspect-ratio: 16/9;
  overflow: hidden;
  position: relative;
}
.peep-card-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.peep-post-card:hover .peep-card-thumb img {
  transform: scale(1.04);
}
.peep-card-no-thumb {
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, var(--peep-primary), var(--peep-secondary));
  display: flex; align-items: center; justify-content: center;
  font-size: 48px;
}

.peep-card-body { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.peep-card-cat {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.8px; color: var(--peep-primary); margin-bottom: 8px;
}
.peep-card-title {
  font-size: 17px; font-weight: 700; line-height: 1.35;
  color: var(--peep-text); margin: 0 0 10px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.peep-card-summary {
  font-size: 13.5px; color: var(--peep-text-light); line-height: 1.6;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
  margin-bottom: 14px; flex: 1;
}
.peep-card-meta {
  display: flex; gap: 12px; font-size: 12px; color: var(--peep-text-light);
  align-items: center; flex-wrap: wrap;
  padding-top: 12px; border-top: 1px solid var(--peep-border);
}
.peep-card-meta span { display: flex; align-items: center; gap: 4px; }

/* ===== GRID HOME ===== */
.peep-home { padding: 48px 0; }

.peep-hero {
  background: linear-gradient(135deg, var(--peep-primary) 0%, #5B21B6 100%);
  color: #fff; border-radius: var(--peep-radius);
  padding: 60px; margin-bottom: 48px;
  position: relative; overflow: hidden;
}
.peep-hero::after {
  content: '';
  position: absolute; top: -50%; right: -20%;
  width: 500px; height: 500px;
  background: rgba(255,255,255,0.05);
  border-radius: 50%;
}
.peep-hero-label {
  font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1px; color: rgba(255,255,255,0.7); margin-bottom: 12px;
}
.peep-hero-title {
  font-size: clamp(28px, 4vw, 48px); font-weight: 800;
  line-height: 1.15; margin: 0 0 16px; max-width: 700px;
}
.peep-hero-desc {
  font-size: 17px; color: rgba(255,255,255,0.85); max-width: 600px; margin: 0 0 28px;
  line-height: 1.6;
}
.peep-hero-meta {
  display: flex; gap: 16px; font-size: 13px;
  color: rgba(255,255,255,0.7); flex-wrap: wrap;
}
.peep-hero-link {
  display: inline-block; margin-top: 24px;
  background: rgba(255,255,255,0.2);
  color: #fff !important; padding: 12px 28px;
  border-radius: 99px; font-weight: 600; font-size: 14px;
  backdrop-filter: blur(8px);
  transition: background 0.2s;
}
.peep-hero-link:hover { background: rgba(255,255,255,0.35); text-decoration: none; }

.peep-section-title {
  font-size: 22px; font-weight: 800; color: var(--peep-text);
  margin: 0 0 24px; display: flex; align-items: center; gap: 10px;
}
.peep-section-title::after {
  content: ''; flex: 1; height: 2px;
  background: linear-gradient(90deg, var(--peep-primary), transparent);
}

.peep-grid {
  display: grid;
  grid-template-columns: repeat(var(--peep-cols, 3), 1fr);
  gap: 24px;
}

/* ===== SINGLE POST ===== */
.peep-single { padding: 40px 0 80px; }

.peep-single-hero {
  border-radius: var(--peep-radius); overflow: hidden;
  margin-bottom: 40px; max-height: 500px;
}
.peep-single-hero img { width: 100%; height: 100%; object-fit: cover; display: block; }

.peep-single-header { margin-bottom: 32px; }
.peep-single-cat {
  font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1px; color: var(--peep-primary); margin-bottom: 12px;
}
.peep-single-title {
  font-size: clamp(26px, 3.5vw, 42px); font-weight: 800;
  line-height: 1.2; margin: 0 0 20px; color: var(--peep-text);
}
.peep-single-subtitle {
  font-size: 18px; color: var(--peep-text-light); line-height: 1.5; margin-bottom: 20px;
}
.peep-single-meta {
  display: flex; gap: 16px; font-size: 13px; color: var(--peep-text-light);
  flex-wrap: wrap; align-items: center;
  padding: 16px 0; border-top: 1px solid var(--peep-border); border-bottom: 1px solid var(--peep-border);
  margin-bottom: 32px;
}

/* Barra de progresso de leitura */
.peep-reading-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 3px;
  background: rgba(124,58,237,0.15); z-index: 9999;
}
.peep-reading-progress-fill {
  height: 100%; background: var(--peep-primary);
  transition: width 0.1s linear; width: 0%;
}

/* Índice do conteúdo */
.peep-toc {
  background: var(--peep-bg); border: 1px solid var(--peep-border);
  border-radius: var(--peep-radius-sm); padding: 20px 24px;
  margin-bottom: 32px;
}
.peep-toc-title {
  font-size: 14px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.5px; color: var(--peep-text-light); margin-bottom: 12px;
}
.peep-toc ol { margin: 0; padding: 0 0 0 18px; }
.peep-toc li { margin-bottom: 6px; font-size: 14px; }
.peep-toc a { color: var(--peep-primary); }

/* Conteúdo do post */
.peep-content {
  font-size: 17px; line-height: 1.8; color: var(--peep-text);
  max-width: 760px; margin: 0 auto;
}
.peep-content h2 { font-size: 26px; font-weight: 800; margin: 36px 0 16px; }
.peep-content h3 { font-size: 20px; font-weight: 700; margin: 28px 0 12px; }
.peep-content p { margin-bottom: 20px; }
.peep-content img { max-width: 100%; border-radius: var(--peep-radius-sm); }
.peep-content blockquote {
  border-left: 4px solid var(--peep-primary);
  margin: 24px 0; padding: 16px 20px;
  background: rgba(124,58,237,0.05); border-radius: 0 var(--peep-radius-sm) var(--peep-radius-sm) 0;
  font-style: italic; color: var(--peep-text-light);
}

/* Share Social */
.peep-share {
  margin: 40px 0; padding: 24px; background: var(--peep-bg);
  border-radius: var(--peep-radius); border: 1px solid var(--peep-border);
  text-align: center;
}
.peep-share-title { font-size: 14px; font-weight: 600; color: var(--peep-text-light); margin-bottom: 14px; }
.peep-share-buttons { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.peep-share-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 20px; border-radius: 99px;
  font-size: 13px; font-weight: 600; color: #fff;
  transition: opacity 0.2s; text-decoration: none !important;
}
.peep-share-btn:hover { opacity: 0.85; }
.peep-share-twitter { background: #1DA1F2; }
.peep-share-whatsapp { background: #25D366; }
.peep-share-linkedin { background: #0A66C2; }
.peep-share-copy { background: var(--peep-primary); cursor: pointer; border: none; }

/* FAQ */
.peep-faq-block { margin: 40px 0; }
.peep-faq-title { font-size: 22px; font-weight: 800; margin-bottom: 20px; }
.peep-faq-item {
  border: 1px solid var(--peep-border); border-radius: var(--peep-radius-sm);
  margin-bottom: 10px; overflow: hidden;
}
.peep-faq-question {
  width: 100%; text-align: left; background: none; border: none;
  padding: 16px 20px; font-size: 15px; font-weight: 600;
  color: var(--peep-text); cursor: pointer;
  display: flex; justify-content: space-between; align-items: center;
  transition: background 0.2s;
}
.peep-faq-question::after { content: '+'; font-size: 20px; color: var(--peep-primary); }
.peep-faq-question.open::after { content: '−'; }
.peep-faq-question:hover { background: var(--peep-bg); }
.peep-faq-answer {
  max-height: 0; overflow: hidden;
  transition: max-height 0.3s ease, padding 0.2s;
  padding: 0 20px; font-size: 15px; line-height: 1.7; color: var(--peep-text-light);
}
.peep-faq-answer.open { max-height: 400px; padding: 0 20px 16px; }

/* Relacionados */
.peep-related { margin-top: 60px; }
.peep-related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }

/* Breadcrumbs */
.peep-breadcrumbs {
  font-size: 13px; color: var(--peep-text-light); margin-bottom: 24px;
  display: flex; gap: 8px; flex-wrap: wrap;
}
.peep-breadcrumbs span { display: flex; align-items: center; gap: 8px; }
.peep-breadcrumbs span:not(:last-child)::after { content: '›'; color: var(--peep-border); }

/* Autor */
.peep-author-box {
  display: flex; gap: 20px; align-items: center;
  background: var(--peep-bg); border-radius: var(--peep-radius);
  padding: 24px; margin-top: 40px;
  border: 1px solid var(--peep-border);
}
.peep-author-avatar { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.peep-author-name { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.peep-author-bio { font-size: 13px; color: var(--peep-text-light); line-height: 1.5; }

/* Animações scroll reveal */
@keyframes peep-fade-up {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
.peep-reveal { animation: peep-fade-up 0.5s ease forwards; }
.peep-reveal-delayed { animation-delay: 0.15s; }

/* Responsive */
@media (max-width: 1024px) {
  .peep-grid { --peep-cols: 2; }
  .peep-related-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .peep-grid { --peep-cols: 1; }
  .peep-related-grid { grid-template-columns: 1fr; }
  .peep-hero { padding: 32px 20px; }
  .peep-single-title { font-size: 24px; }
  .peep-content { font-size: 16px; }
}
