/* Céu de Histórias - Design System */
:root {
  --sky-50: #f0f9ff;
  --sky-100: #e0f2fe;
  --sky-200: #bae6fd;
  --sky-400: #38bdf8;
  --sky-500: #0ea5e9;
  --sky-600: #0284c7;
  --sky-700: #0369a1;
  
  --teal-50: #f0fdfa;
  --teal-100: #ccfbf1;
  --teal-500: #14b8a6;
  --teal-600: #0d9488;
  
  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-300: #cbd5e1;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1e293b;
  --slate-900: #0f172a;
  
  --bg-primary: linear-gradient(180deg, var(--sky-50) 0%, #ffffff 100%);
  --bg-card: #ffffff;
  --text-primary: var(--slate-800);
  --text-secondary: var(--slate-500);
  --text-muted: var(--slate-400);
  --accent: var(--sky-500);
  --accent-hover: var(--sky-600);
  --accent-soft: var(--sky-100);
  --border: var(--slate-200);
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.06);
  --shadow-lg: 0 12px 32px rgba(0,0,0,0.08);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--accent-hover);
}

img {
  max-width: 100%;
  display: block;
}

/* Container */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.container-narrow {
  max-width: 720px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--sky-400) 0%, var(--teal-500) 100%);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-icon svg {
  width: 24px;
  height: 24px;
  color: white;
}

.logo-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.logo-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.3px;
}

.logo-tagline {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 400;
}

.logo:hover {
  text-decoration: none;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  padding: 10px 16px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}

.nav-link:hover {
  background: var(--slate-100);
  color: var(--text-primary);
  text-decoration: none;
}

.mobile-menu-btn {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: var(--radius-sm);
}

.mobile-menu-btn:hover {
  background: var(--slate-100);
}

.mobile-menu-btn svg {
  width: 24px;
  height: 24px;
  color: var(--text-primary);
}

/* Hero Section */
.hero {
  padding: 80px 0 60px;
  text-align: center;
  background: linear-gradient(180deg, var(--sky-50) 0%, var(--sky-100) 50%, #ffffff 100%);
  border-bottom: 1px solid var(--border);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--accent-soft);
  color: var(--sky-700);
  font-size: 13px;
  font-weight: 600;
  border-radius: 50px;
  margin-bottom: 24px;
}

.hero-title {
  font-size: 48px;
  font-weight: 800;
  line-height: 1.1;
  color: var(--text-primary);
  margin-bottom: 20px;
  letter-spacing: -1px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.hero-subtitle {
  font-size: 19px;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.7;
}

/* Section Styles */
.section {
  padding: 64px 0;
}

.section-header {
  margin-bottom: 40px;
}

.section-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

.section-desc {
  font-size: 16px;
  color: var(--text-secondary);
}

/* Card Grid */
.card-grid {
  display: grid;
  gap: 24px;
}

.card-grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.card-grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

/* Article Card */
.article-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.article-card:hover {
  border-color: var(--sky-200);
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.card-icon {
  width: 48px;
  height: 48px;
  background: var(--accent-soft);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.card-icon svg {
  width: 24px;
  height: 24px;
  color: var(--accent);
}

.card-category {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.card-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
  line-height: 1.4;
}

.card-excerpt {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 20px;
  flex-grow: 1;
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
}

.card-link svg {
  width: 16px;
  height: 16px;
  transition: transform 0.2s ease;
}

.card-link:hover svg {
  transform: translateX(4px);
}

/* Featured Card (larger) */
.featured-card {
  grid-column: span 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  padding: 36px;
}

.featured-card .card-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.featured-card .card-visual {
  background: linear-gradient(135deg, var(--sky-100) 0%, var(--teal-100) 100%);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
}

.featured-card .card-visual svg {
  width: 80px;
  height: 80px;
  color: var(--accent);
  opacity: 0.6;
}

/* Breadcrumb */
.breadcrumb {
  padding: 20px 0;
  font-size: 14px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.breadcrumb a {
  color: var(--text-muted);
}

.breadcrumb a:hover {
  color: var(--accent);
}

.breadcrumb-sep {
  color: var(--slate-300);
}

/* Article Page */
.article-hero {
  padding: 48px 0 40px;
  background: linear-gradient(180deg, var(--sky-50) 0%, #ffffff 100%);
  border-bottom: 1px solid var(--border);
}

.article-category {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
}

.article-title {
  font-size: 40px;
  font-weight: 800;
  line-height: 1.2;
  color: var(--text-primary);
  margin-bottom: 20px;
  letter-spacing: -0.5px;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 24px;
  color: var(--text-muted);
  font-size: 14px;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.meta-item svg {
  width: 16px;
  height: 16px;
}

/* Article Content */
.article-content {
  padding: 48px 0;
}

.article-body {
  font-size: 17px;
  line-height: 1.85;
  color: var(--slate-600);
}

.article-body p {
  margin-bottom: 24px;
}

.article-body h2 {
  font-size: 26px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 48px 0 20px;
  letter-spacing: -0.3px;
}

.article-body h3 {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 36px 0 16px;
}

.article-body ul,
.article-body ol {
  margin-bottom: 24px;
  padding-left: 24px;
}

.article-body li {
  margin-bottom: 12px;
}

.article-body strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* Callout Box */
.callout {
  background: var(--sky-50);
  border-left: 4px solid var(--accent);
  padding: 24px 28px;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin: 32px 0;
}

.callout p {
  margin: 0;
  color: var(--slate-700);
  font-size: 16px;
}

.callout strong {
  color: var(--sky-700);
}

.callout-warning {
  background: #fef3c7;
  border-left-color: #f59e0b;
}

.callout-warning strong {
  color: #92400e;
}

/* Related Articles */
.related-section {
  padding: 56px 0;
  background: var(--slate-50);
  border-top: 1px solid var(--border);
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.related-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  transition: all 0.2s ease;
}

.related-card:hover {
  border-color: var(--sky-200);
  box-shadow: var(--shadow-md);
  text-decoration: none;
}

.related-card-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.related-card-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Footer */
.site-footer {
  background: var(--slate-900);
  color: var(--slate-300);
  margin-top: auto;
}

.footer-main {
  padding: 56px 0;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.footer-brand-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--sky-400) 0%, var(--teal-500) 100%);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

.footer-brand-icon svg {
  width: 20px;
  height: 20px;
  color: white;
}

.footer-brand-name {
  font-size: 18px;
  font-weight: 700;
  color: white;
}

.footer-desc {
  font-size: 14px;
  line-height: 1.7;
  color: var(--slate-400);
  max-width: 280px;
}

.footer-col h4 {
  font-size: 13px;
  font-weight: 600;
  color: white;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 20px;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-links a {
  font-size: 14px;
  color: var(--slate-400);
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: white;
}

.footer-bottom {
  border-top: 1px solid var(--slate-800);
  padding: 24px 0;
  text-align: center;
  font-size: 14px;
  color: var(--slate-500);
}

/* Back to Top */
.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 48px;
  height: 48px;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-lg);
  z-index: 90;
}

.back-to-top svg {
  width: 20px;
  height: 20px;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background: var(--accent-hover);
  transform: translateY(-3px);
}

/* Cookie Banner */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--slate-900);
  color: white;
  padding: 20px 0;
  z-index: 1000;
  display: none;
  box-shadow: 0 -4px 24px rgba(0,0,0,0.15);
}

.cookie-banner.show {
  display: block;
}

.cookie-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.cookie-text {
  font-size: 14px;
  color: var(--slate-300);
}

.cookie-text a {
  color: var(--sky-400);
  text-decoration: underline;
}

.cookie-buttons {
  display: flex;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-primary {
  background: var(--accent);
  color: white;
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-secondary {
  background: transparent;
  color: white;
  border: 1px solid var(--slate-600);
}

.btn-secondary:hover {
  background: var(--slate-800);
}

/* Legal Pages */
.legal-page {
  padding: 48px 0 64px;
}

.legal-page h1 {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.legal-meta {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 40px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.legal-content {
  font-size: 16px;
  line-height: 1.8;
  color: var(--slate-600);
}

.legal-content h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 40px 0 16px;
}

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

.legal-content ul {
  margin-bottom: 20px;
  padding-left: 24px;
}

.legal-content li {
  margin-bottom: 10px;
}

/* Mobile Menu */
.mobile-nav {
  display: none;
  position: fixed;
  top: 80px;
  left: 0;
  right: 0;
  background: white;
  border-bottom: 1px solid var(--border);
  padding: 16px 24px;
  box-shadow: var(--shadow-lg);
  z-index: 99;
}

.mobile-nav.show {
  display: block;
}

.mobile-nav a {
  display: block;
  padding: 12px 0;
  font-size: 16px;
  font-weight: 500;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border);
}

.mobile-nav a:last-child {
  border-bottom: none;
}

/* Responsive */
@media (max-width: 1024px) {
  .card-grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .featured-card {
    grid-column: span 2;
  }
  
  .footer-main {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
}

@media (max-width: 768px) {
  .main-nav {
    display: none;
  }
  
  .mobile-menu-btn {
    display: flex;
  }
  
  .hero {
    padding: 56px 0 48px;
  }
  
  .hero-title {
    font-size: 32px;
  }
  
  .hero-subtitle {
    font-size: 16px;
  }
  
  .card-grid-2,
  .card-grid-3 {
    grid-template-columns: 1fr;
  }
  
  .featured-card {
    grid-column: span 1;
    grid-template-columns: 1fr;
  }
  
  .featured-card .card-visual {
    display: none;
  }
  
  .related-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-main {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  
  .article-title {
    font-size: 28px;
  }
  
  .article-meta {
    flex-wrap: wrap;
    gap: 12px;
  }
  
  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
  }
}
