/* ============================================================
   ALLYCE BLOG THEME — CSS Principal
   Baseado no design de https://www.allyce.live/blog/
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Sora:wght@300;400;500;600;700&family=Inter:wght@300;400;500;600&display=swap');
@import url('https://fonts.googleapis.com/icon?family=Material+Icons+Round');

:root {
  --bg-primary:    #0a0a0f;
  --bg-secondary:  #111118;
  --bg-card:       #16161f;
  --bg-card-hover: #1c1c28;
  --border:        rgba(255,255,255,0.07);
  --border-hover:  rgba(99,102,241,0.4);

  --accent:        #6366f1;
  --accent-light:  #818cf8;
  --accent-glow:   rgba(99,102,241,0.15);
  --green:         #10b981;
  --orange:        #f59e0b;
  --pink:          #ec4899;

  --text-primary:  #f1f5f9;
  --text-secondary:#94a3b8;
  --text-muted:    #64748b;

  --radius-sm:  6px;
  --radius-md:  12px;
  --radius-lg:  20px;
  --radius-xl:  28px;

  --font-heading: 'Sora', sans-serif;
  --font-body:    'Inter', sans-serif;

  --transition: all 0.25s cubic-bezier(0.4,0,0.2,1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

/* ── SCROLLBAR ─────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 3px; }

/* ============================================================
   HEADER / NAV
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10,10,15,0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-logo {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}
.site-logo span { color: var(--accent); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
}

.nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}
.nav-links a:hover,
.nav-links a.current {
  color: var(--text-primary);
  background: rgba(255,255,255,0.06);
}

.nav-cta {
  background: var(--accent) !important;
  color: #fff !important;
  padding: 8px 18px !important;
  border-radius: var(--radius-sm) !important;
  font-weight: 600 !important;
  white-space: nowrap !important;
}
.nav-cta:hover {
  background: var(--accent-light) !important;
  transform: translateY(-1px);
}

.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
}
.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-secondary);
  border-radius: 2px;
  transition: var(--transition);
}

/* ============================================================
   HERO DO BLOG
   ============================================================ */
.blog-hero {
  background: linear-gradient(135deg, var(--bg-primary) 0%, #0f0f1a 100%);
  padding: 72px 24px 56px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.blog-hero::before {
  content: '';
  position: absolute;
  top: -80px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 300px;
  background: radial-gradient(ellipse, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
}

.blog-hero-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-light);
  background: rgba(99,102,241,0.12);
  border: 1px solid rgba(99,102,241,0.25);
  border-radius: 100px;
  padding: 4px 14px;
  margin-bottom: 20px;
}

.blog-hero h1 {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.blog-hero p {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 520px;
  margin: 0 auto;
}

/* ============================================================
   FILTROS / CATEGORIAS
   ============================================================ */
.blog-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  padding: 0 24px;
  margin: 32px auto 0;
  max-width: 800px;
}

.filter-btn {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 7px 18px;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  display: inline-block;
}
.filter-btn:hover,
.filter-btn.active {
  color: var(--text-primary);
  border-color: var(--accent);
  background: rgba(99,102,241,0.1);
}

/* ============================================================
   LAYOUT PRINCIPAL
   ============================================================ */
.blog-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 56px 24px 80px;
}

/* ── POST DESTAQUE ─────────────────────────────────────────── */
.post-featured {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 40px;
  margin-bottom: 48px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.post-featured::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(99,102,241,0.05) 0%, transparent 60%);
  pointer-events: none;
}

.post-featured:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.4), 0 0 0 1px rgba(99,102,241,0.15);
}

.post-featured-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-light);
  margin-bottom: 16px;
}
.post-featured-badge::before {
  content: '';
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(1.3); }
}

.post-featured .post-category {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-light);
  background: rgba(99,102,241,0.12);
  border: 1px solid rgba(99,102,241,0.2);
  border-radius: var(--radius-sm);
  padding: 3px 10px;
  margin-bottom: 14px;
}

.post-featured h2 {
  font-family: var(--font-heading);
  font-size: clamp(1.4rem, 2.5vw, 1.85rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.25;
  color: var(--text-primary);
  margin-bottom: 14px;
}
.post-featured h2 a { transition: var(--transition); }
.post-featured h2 a:hover { color: var(--accent-light); }

.post-featured .post-excerpt {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.65;
  margin-bottom: 24px;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.8rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}
.post-meta .dot { opacity: 0.4; }
.post-meta .author { color: var(--text-secondary); font-weight: 500; }

.post-featured-image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 16/10;
  background: linear-gradient(135deg, #1a1a2e, #16213e);
  display: flex;
  align-items: center;
  justify-content: center;
}

.post-featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ── SEÇÃO ARTIGOS RECENTES ───────────────────────────────── */
.section-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 24px;
  letter-spacing: -0.02em;
}

/* ── GRID DE POSTS ─────────────────────────────────────────── */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
  align-items: stretch;
}

.post-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 0;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.post-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0;
  transition: var(--transition);
}

.post-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.35);
}
.post-card:hover::after { opacity: 1; }

/* ── PLACEHOLDER SEM IMAGEM — CARDS ───────────────────────── */
.post-card-thumb-link {
  display: block;
  overflow: hidden;
  flex-shrink: 0;
  line-height: 0;
}

.post-no-thumb-card-img {
  width: 100%;
  height: 200px;
  overflow: hidden;
  display: block;
  transition: transform 0.4s ease;
  line-height: 0;
}
.post-no-thumb-card-img svg {
  width: 100%;
  height: 100%;
  display: block;
}
.post-card:hover .post-no-thumb-card-img { transform: scale(1.03); }

/* ── PLACEHOLDER SEM IMAGEM — FEATURED ────────────────────── */
.post-no-thumb-featured {
  width: 100%;
  height: 100%;
  min-height: 300px;
  overflow: hidden;
  display: block;
  line-height: 0;
}
.post-no-thumb-featured svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Corpo do card com padding */
.post-card-body {
  padding: 20px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.post-card .post-category {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--accent-light);
}

.post-card h3 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.4;
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.8em;
}
.post-card h3 a { transition: var(--transition); }
.post-card h3 a:hover { color: var(--accent-light); }

.post-card .post-excerpt {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card .post-meta {
  font-size: 0.775rem;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

/* ── THUMBNAIL NO CARD ─────────────────────────────────────── */
.post-card-thumb {
  overflow: hidden;
  flex-shrink: 0;
  height: 200px;
  display: block;
}
.post-card-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
  display: block;
}
.post-card:hover .post-card-thumb img { transform: scale(1.04); }

/* ── PAGINAÇÃO ─────────────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 56px;
}

.pagination a,
.pagination span {
  width: 40px; height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  transition: var(--transition);
}
.pagination a:hover {
  border-color: var(--accent);
  color: var(--text-primary);
  background: rgba(99,102,241,0.1);
}
.pagination .current {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* ============================================================
   SINGLE POST
   ============================================================ */
.single-post {
  max-width: 760px;
  margin: 0 auto;
  padding: 56px 24px 80px;
}

.single-post .post-category {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-light);
  background: rgba(99,102,241,0.12);
  border: 1px solid rgba(99,102,241,0.2);
  border-radius: var(--radius-sm);
  padding: 4px 12px;
  margin-bottom: 20px;
}

.single-post h1 {
  font-family: var(--font-heading);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
  color: var(--text-primary);
  margin-bottom: 20px;
}

.single-post .post-meta {
  margin-bottom: 36px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
}

.post-thumbnail {
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 40px;
}
.post-thumbnail img { width: 100%; }

.entry-content {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text-secondary);
}

.entry-content h2 {
  font-family: var(--font-heading);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.025em;
  margin: 40px 0 16px;
}

.entry-content h3 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  margin: 30px 0 12px;
}

.entry-content p { margin-bottom: 20px; }

.entry-content a {
  color: var(--accent-light);
  text-decoration: underline;
  text-decoration-color: rgba(99,102,241,0.35);
  text-underline-offset: 3px;
  transition: var(--transition);
}
.entry-content a:hover {
  color: var(--accent);
  text-decoration-color: var(--accent);
}

.entry-content ul,
.entry-content ol {
  padding-left: 24px;
  margin-bottom: 20px;
}
.entry-content li { margin-bottom: 8px; }

.entry-content blockquote {
  border-left: 3px solid var(--accent);
  padding: 16px 24px;
  background: rgba(99,102,241,0.06);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 28px 0;
  font-style: italic;
  color: var(--text-primary);
}

.entry-content code {
  background: rgba(255,255,255,0.07);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 7px;
  font-size: 0.875em;
  font-family: 'Fira Code', 'Cascadia Code', monospace;
  color: var(--accent-light);
}

.entry-content pre {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  overflow-x: auto;
  margin-bottom: 24px;
}
.entry-content pre code {
  background: none;
  border: none;
  padding: 0;
}

.entry-content img {
  border-radius: var(--radius-md);
  margin: 28px 0;
}

/* ── VOLTA AO BLOG ─────────────────────────────────────────── */
.back-to-blog {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 40px;
  transition: var(--transition);
}
.back-to-blog:hover {
  color: var(--accent-light);
  gap: 12px;
}

/* ============================================================
   CTA SECTION
   ============================================================ */
.blog-cta {
  background: linear-gradient(135deg, rgba(99,102,241,0.1) 0%, rgba(16,185,129,0.05) 100%);
  border: 1px solid rgba(99,102,241,0.2);
  border-radius: var(--radius-xl);
  padding: 60px 40px;
  text-align: center;
  margin-top: 64px;
  position: relative;
  overflow: hidden;
}

.blog-cta::before {
  content: '';
  position: absolute;
  top: -60px; left: 50%;
  transform: translateX(-50%);
  width: 300px; height: 200px;
  background: radial-gradient(ellipse, rgba(99,102,241,0.15) 0%, transparent 70%);
  pointer-events: none;
}

.blog-cta h2 {
  font-family: var(--font-heading);
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.blog-cta p {
  color: var(--text-secondary);
  font-size: 1rem;
  margin-bottom: 28px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 14px 28px;
  border-radius: var(--radius-md);
  transition: var(--transition);
  border: none;
  cursor: pointer;
}
.btn-primary:hover {
  background: var(--accent-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(99,102,241,0.35);
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 56px 24px 32px;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}

.footer-brand p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-top: 12px;
  max-width: 280px;
}

.footer-col h5 {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a {
  font-size: 0.875rem;
  color: var(--text-secondary);
  transition: var(--transition);
}
.footer-col ul li a:hover { color: var(--accent-light); }

.footer-col .footer-contact-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 10px;
}
.footer-col .footer-contact-item .material-icons-round {
  font-size: 1rem;
  color: var(--text-muted);
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-bottom p,
.footer-bottom a {
  font-size: 0.8rem;
  color: var(--text-muted);
}
.footer-bottom a:hover { color: var(--text-secondary); }
.footer-bottom .footer-links { display: flex; gap: 20px; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .post-featured {
    grid-template-columns: 1fr;
    padding: 28px;
  }
  .post-featured-image { order: -1; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    inset: 68px 0 0 0;
    background: var(--bg-primary);
    padding: 24px;
    gap: 4px;
    z-index: 99;
  }
  .nav-links.open a { padding: 12px 16px; font-size: 1rem; }
  .nav-hamburger { display: flex; }
  .posts-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .blog-hero { padding: 48px 24px 40px; }
  .blog-cta { padding: 40px 24px; }
}
