/* ==========================================================================
   CONVERTA.ONLINE — DESIGN SYSTEM & CORE STYLES
   Agency-Grade Typography, Micro-Interactions & Responsive Architecture
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400;1,600&display=swap');

:root {
  /* Colors - Light Theme */
  --bg-primary: #f8fafc;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #ffffff;
  --bg-subtle: #f1f5f9;
  --bg-muted: #e2e8f0;
  
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-inverse: #ffffff;
  
  --brand-primary: #2563eb;
  --brand-primary-hover: #1d4ed8;
  --brand-light: #eff6ff;
  --brand-accent: #059669;
  --brand-accent-light: #ecfdf5;
  --brand-gradient: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%);
  --brand-glow: rgba(37, 99, 235, 0.15);
  
  --border-subtle: rgba(15, 23, 42, 0.08);
  --border-strong: rgba(15, 23, 42, 0.16);
  --border-hover: rgba(37, 99, 235, 0.3);
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px -2px rgba(15, 23, 42, 0.08), 0 2px 6px -1px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 20px 25px -5px rgba(15, 23, 42, 0.07), 0 10px 10px -5px rgba(15, 23, 42, 0.04);
  --shadow-glow: 0 0 30px rgba(37, 99, 235, 0.2);
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;
  
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  
  --transition-smooth: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-bounce: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  
  --max-w-content: 1240px;
  --max-w-article: 820px;
}

[data-theme="dark"] {
  --bg-primary: #090d16;
  --bg-surface: #0f172a;
  --bg-surface-elevated: #1e293b;
  --bg-subtle: #131d31;
  --bg-muted: #1e293b;
  
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-inverse: #0f172a;
  
  --brand-primary: #3b82f6;
  --brand-primary-hover: #60a5fa;
  --brand-light: rgba(59, 130, 246, 0.12);
  --brand-accent: #10b981;
  --brand-accent-light: rgba(16, 185, 129, 0.12);
  --brand-gradient: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%);
  --brand-glow: rgba(59, 130, 246, 0.25);
  
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.15);
  --border-hover: rgba(59, 130, 246, 0.4);
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.4);
  --shadow-md: 0 6px 18px -2px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 25px 35px -5px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 35px rgba(59, 130, 246, 0.25);
}

/* CSS Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition-smooth);
}

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

button, input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  border: none;
  outline: none;
}

/* Layout Utilities */
.container {
  width: 100%;
  max-width: var(--max-w-content);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.section {
  padding-top: 5rem;
  padding-bottom: 5rem;
}

@media (max-width: 768px) {
  .section {
    padding-top: 3.5rem;
    padding-bottom: 3.5rem;
  }
}

/* Header & Floating Navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(248, 250, 252, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  transition: var(--transition-smooth);
}

[data-theme="dark"] .site-header {
  background-color: rgba(9, 13, 22, 0.85);
}

.nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4.75rem;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.45rem;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.logo-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: var(--brand-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
  font-weight: 900;
  font-size: 1.15rem;
}

.logo-text span {
  color: var(--brand-primary);
}

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

.nav-link {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-secondary);
  position: relative;
  padding: 0.4rem 0;
}

.nav-link:hover, .nav-link.active {
  color: var(--brand-primary);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--brand-primary);
  border-radius: var(--radius-full);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.btn-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  background: var(--bg-subtle);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 1px solid var(--border-subtle);
  transition: var(--transition-smooth);
}

.btn-icon:hover {
  background: var(--bg-muted);
  color: var(--text-primary);
  transform: translateY(-1px);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.4rem;
  background: var(--brand-gradient);
  color: white;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--radius-full);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-primary:hover {
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.45);
  transform: translateY(-2px);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.4rem;
  background: var(--bg-surface);
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-strong);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-secondary:hover {
  background: var(--bg-subtle);
  border-color: var(--brand-primary);
  color: var(--brand-primary);
  transform: translateY(-2px);
}

.mobile-toggle {
  display: none;
}

@media (max-width: 960px) {
  .nav-links {
    display: none;
  }
  .mobile-toggle {
    display: flex;
  }
}

/* Mobile Navigation Drawer */
.mobile-nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition-smooth);
}

.mobile-nav-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.mobile-drawer {
  position: fixed;
  top: 0;
  right: -320px;
  width: 300px;
  height: 100%;
  background: var(--bg-surface);
  z-index: 1001;
  padding: 2rem 1.5rem;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-nav-overlay.active .mobile-drawer {
  transform: translateX(-320px);
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-subtle);
}

.drawer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.drawer-link {
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--text-secondary);
  display: block;
}

.drawer-link:hover, .drawer-link.active {
  color: var(--brand-primary);
}

/* Hero Section */
.hero-section {
  padding-top: 4.5rem;
  padding-bottom: 3.5rem;
  position: relative;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  top: -150px;
  left: 50%;
  transform: translateX(-50%);
  width: 700px;
  height: 350px;
  background: radial-gradient(circle, var(--brand-glow) 0%, rgba(37, 99, 235, 0) 70%);
  filter: blur(60px);
  pointer-events: none;
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 850px;
  margin: 0 auto;
}

.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  border-radius: var(--radius-full);
  background: var(--brand-light);
  color: var(--brand-primary);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 1.5rem;
  border: 1px solid var(--border-hover);
}

.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(2.3rem, 5vw, 3.75rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 1.25rem;
  color: var(--text-primary);
}

.hero-title .gradient-text {
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 680px;
  margin: 0 auto 2.5rem;
}

/* Search Bar Component */
.search-container {
  max-width: 580px;
  margin: 0 auto;
  position: relative;
}

.search-bar {
  display: flex;
  align-items: center;
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-full);
  padding: 0.5rem 0.6rem 0.5rem 1.4rem;
  box-shadow: var(--shadow-md);
  transition: var(--transition-smooth);
}

.search-bar:focus-within {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px var(--brand-glow), var(--shadow-md);
}

.search-bar input {
  flex: 1;
  background: transparent;
  color: var(--text-primary);
  font-size: 0.95rem;
}

.search-bar input::placeholder {
  color: var(--text-muted);
}

/* Category Filter Bar */
.category-filter-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  flex-wrap: wrap;
  margin-top: 2.5rem;
}

.filter-pill {
  padding: 0.5rem 1.15rem;
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.filter-pill:hover, .filter-pill.active {
  background: var(--brand-primary);
  color: white;
  border-color: var(--brand-primary);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
  transform: translateY(-1px);
}

/* DOUBLE BEZEL & BENTO GRID ARCHITECTURE */
.double-bezel {
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 0.5rem;
  transition: var(--transition-smooth);
}

.double-bezel-inner {
  background: var(--bg-surface);
  border-radius: calc(var(--radius-xl) - 0.4rem);
  height: 100%;
  border: 1px solid var(--border-subtle);
  overflow: hidden;
}

.bento-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}

.bento-col-8 {
  grid-column: span 8;
}

.bento-col-4 {
  grid-column: span 4;
}

.bento-col-6 {
  grid-column: span 6;
}

.bento-col-12 {
  grid-column: span 12;
}

@media (max-width: 992px) {
  .bento-col-8, .bento-col-4, .bento-col-6 {
    grid-column: span 12;
  }
}

/* Article Cards */
.article-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: var(--transition-smooth);
}

.article-card:hover .card-img {
  transform: scale(1.04);
}

.article-card:hover .card-title {
  color: var(--brand-primary);
}

.card-media-wrapper {
  position: relative;
  width: 100%;
  height: 230px;
  overflow: hidden;
  border-radius: calc(var(--radius-xl) - 0.4rem) calc(var(--radius-xl) - 0.4rem) 0 0;
  background: var(--bg-muted);
}

.card-media-wrapper.featured {
  height: 320px;
}

.card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.card-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(8px);
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.card-body {
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.meta-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--text-muted);
}

.card-title {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
  transition: var(--transition-smooth);
}

.featured .card-title {
  font-size: 1.75rem;
}

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

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
}

.author-mini {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.author-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--brand-light);
}

.author-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
}

.read-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--brand-primary);
}

.read-more-btn svg {
  transition: transform 0.3s ease;
}

.read-more-btn:hover svg {
  transform: translateX(3px);
}

/* ADSENSE AD SLOTS (High Compliance & Professional Look) */
.ad-slot-wrapper {
  background: var(--bg-subtle);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin: 3rem auto;
  text-align: center;
  position: relative;
  max-width: 100%;
}

.ad-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  display: block;
}

.ad-placeholder-box {
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
}

/* Newsletter Section */
.newsletter-card {
  background: var(--brand-gradient);
  border-radius: var(--radius-xl);
  padding: 3.5rem 2rem;
  color: white;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.newsletter-title {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  font-weight: 800;
  margin-bottom: 0.75rem;
}

.newsletter-desc {
  font-size: 1.1rem;
  opacity: 0.9;
  max-width: 580px;
  margin: 0 auto 2rem;
}

.newsletter-form {
  display: flex;
  align-items: center;
  max-width: 520px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(12px);
  border-radius: var(--radius-full);
  padding: 0.4rem 0.5rem 0.4rem 1.4rem;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.newsletter-form input {
  flex: 1;
  background: transparent;
  color: white;
  font-size: 0.95rem;
}

.newsletter-form input::placeholder {
  color: rgba(255, 255, 255, 0.75);
}

.newsletter-form button {
  background: white;
  color: var(--brand-primary);
  font-weight: 700;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.newsletter-form button:hover {
  background: #f1f5f9;
  transform: scale(1.02);
}

/* Site Footer */
.site-footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  padding-top: 4.5rem;
  padding-bottom: 2.5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3.5rem;
}

@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 600px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

.footer-about p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-top: 1rem;
  line-height: 1.6;
  max-width: 320px;
}

.footer-heading {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
}

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

.footer-link {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.footer-link:hover {
  color: var(--brand-primary);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 2rem;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.85rem;
  color: var(--text-muted);
  flex-wrap: wrap;
  gap: 1rem;
}

/* LGPD Cookie Consent Banner */
.cookie-banner {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  max-width: 440px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-lg);
  z-index: 999;
  display: none;
  animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

@keyframes slideUp {
  from {
    transform: translateY(30px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.cookie-title {
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.cookie-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 1.25rem;
}

.cookie-actions {
  display: flex;
  gap: 0.75rem;
}

.cookie-btn-accept {
  flex: 1;
  padding: 0.6rem 1rem;
  background: var(--brand-primary);
  color: white;
  font-weight: 600;
  font-size: 0.85rem;
  border-radius: var(--radius-full);
  cursor: pointer;
}

.cookie-btn-decline {
  padding: 0.6rem 1rem;
  background: var(--bg-subtle);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.85rem;
  border-radius: var(--radius-full);
  cursor: pointer;
}

/* Live Search Modal */
.search-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  z-index: 1050;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding-top: 10vh;
}

.search-modal.active {
  display: flex;
}

.search-modal-box {
  width: 90%;
  max-width: 650px;
  background: var(--bg-surface);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.search-modal-input-wrapper {
  display: flex;
  align-items: center;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
  gap: 1rem;
}

.search-modal-input {
  flex: 1;
  background: transparent;
  font-size: 1.15rem;
  color: var(--text-primary);
}

.search-results-list {
  max-height: 380px;
  overflow-y: auto;
  padding: 1rem 1.5rem;
  list-style: none;
}

.search-result-item {
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md);
  margin-bottom: 0.5rem;
  transition: var(--transition-smooth);
}

.search-result-item:hover {
  background: var(--bg-subtle);
}

.search-result-title {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.search-result-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
}
