/* NowDigital Brasil - main.css */
:root {
  --primary: #b71c1c;
  --accent: #0288d1;
  --bg: #f9f9f9;
  --surface: #ffffff;
  --text: #1a1a1a;
  --text-muted: #555555;
  --border: #dde1e7;
  --radius: 8px;
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
  --font-sans: 'Segoe UI', Arial, sans-serif;
  --font-heading: Georgia, 'Times New Roman', serif;
  --max-w: 1200px;
  --nav-h: 64px;
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; color: var(--accent); }

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

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--primary);
  line-height: 1.25;
  margin-bottom: 0.5em;
}

h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.4rem); }

p { margin-bottom: 1em; }

ul, ol { padding-left: 1.5em; margin-bottom: 1em; }
li { margin-bottom: 0.3em; }

/* ---- LAYOUT ---- */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 1.25rem; }

main { flex: 1; }

/* ---- HEADER / NAV ---- */
.site-header {
  background: var(--primary);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-h);
  gap: 1rem;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: #fff;
  font-size: 1.4rem;
  font-family: var(--font-heading);
  font-weight: 700;
  text-decoration: none;
}
.site-logo img { width: 36px; height: 36px; }

.main-nav { display: flex; gap: 0.25rem; align-items: center; }
.main-nav a {
  color: rgba(255,255,255,0.88);
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius);
  font-size: 0.92rem;
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
}
.main-nav a:hover, .main-nav a.active {
  background: var(--accent);
  color: #fff;
  text-decoration: none;
}

.nav-toggle {
  display: none;
  background: none;
  border: 2px solid rgba(255,255,255,0.6);
  color: #fff;
  padding: 0.35rem 0.7rem;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 1.2rem;
}

/* Mega nav dropdown */
.mega-nav { position: relative; }
.mega-nav .mega-drop {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem;
  min-width: 480px;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  z-index: 200;
}
.mega-nav:hover .mega-drop { display: grid; }
.mega-drop a {
  color: var(--text);
  padding: 0.4rem 0.6rem;
  border-radius: 4px;
  font-size: 0.88rem;
}
.mega-drop a:hover { background: var(--bg); color: var(--primary); }

/* ---- COOKIE BANNER ---- */
#cookie-banner {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: #222;
  color: #eee;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  z-index: 9999;
  flex-wrap: wrap;
}
#cookie-banner p { margin: 0; font-size: 0.9rem; }
#cookie-accept {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 0.5rem 1.2rem;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 0.9rem;
  white-space: nowrap;
}

/* ---- HERO ---- */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, color-mix(in srgb, var(--primary) 70%, #000) 100%);
  color: #fff;
  padding: 4rem 0 3rem;
  text-align: center;
}
.hero h1 { color: #fff; margin-bottom: 1rem; }
.hero p { font-size: 1.15rem; opacity: 0.9; max-width: 680px; margin: 0 auto 1.5rem; }
.hero-img { margin: 2rem auto 0; max-width: 600px; border-radius: var(--radius); overflow: hidden; }

/* ---- BUTTONS ---- */
.btn {
  display: inline-block;
  padding: 0.65rem 1.5rem;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s;
  border: none;
  text-decoration: none;
}
.btn:hover { opacity: 0.88; transform: translateY(-1px); text-decoration: none; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-outline { background: transparent; border: 2px solid var(--accent); color: var(--accent); }

/* ---- SECTIONS ---- */
.section { padding: 3.5rem 0; }
.section-alt { background: var(--surface); }
.section-title { text-align: center; margin-bottom: 2rem; }
.section-title p { color: var(--text-muted); max-width: 600px; margin: 0.5rem auto 0; }

/* ---- CARDS ---- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.5rem; }
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  transition: transform 0.2s;
}
.card:hover { transform: translateY(-3px); }
.card img { margin-bottom: 1rem; border-radius: 4px; }
.card h3 { margin-bottom: 0.5rem; }

/* ---- TABLE ---- */
.data-table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: 0.93rem; }
.data-table th, .data-table td { border: 1px solid var(--border); padding: 0.65rem 0.9rem; text-align: left; }
.data-table th { background: var(--primary); color: #fff; font-weight: 600; }
.data-table tr:nth-child(even) { background: #f4f6f9; }
.data-table td:first-child { font-weight: 500; }

/* ---- DETAILS / FAQ ---- */
details {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 0.75rem;
  background: var(--surface);
}
details summary {
  padding: 0.85rem 1rem;
  cursor: pointer;
  font-weight: 600;
  color: var(--primary);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
details summary::after { content: '+'; font-size: 1.2rem; }
details[open] summary::after { content: '−'; }
details > div { padding: 0.75rem 1rem 1rem; border-top: 1px solid var(--border); }

/* ---- ASIDE / ALERT ---- */
aside.info-box {
  background: color-mix(in srgb, var(--accent) 10%, white);
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
}
aside.info-box p { margin: 0; }

.alert {
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  margin: 1rem 0;
  font-size: 0.93rem;
}
.alert-info { background: #e3f2fd; border-left: 4px solid #1565c0; }
.alert-warn { background: #fff8e1; border-left: 4px solid #f9a825; }

/* ---- CHECKLIST ---- */
.checklist { list-style: none; padding: 0; }
.checklist li {
  padding: 0.4rem 0 0.4rem 2rem;
  position: relative;
  border-bottom: 1px solid var(--border);
}
.checklist li::before {
  content: '✓';
  position: absolute;
  left: 0.4rem;
  color: var(--accent);
  font-weight: 700;
}

/* ---- REVIEWS ---- */
.reviews-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; }
.review-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}
.review-card .reviewer {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.review-card .reviewer img { width: 56px; height: 56px; border-radius: 50%; }
.review-card .reviewer-info strong { display: block; color: var(--primary); }
.review-card .reviewer-info span { font-size: 0.85rem; color: var(--text-muted); }
.review-card blockquote { font-style: italic; color: var(--text-muted); border: none; padding: 0; }
.stars { color: var(--accent); font-size: 1.1rem; margin-bottom: 0.5rem; }

/* ---- PRICING ---- */
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.5rem; }
.pricing-card {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
  text-align: center;
  box-shadow: var(--shadow);
  transition: border-color 0.2s;
}
.pricing-card.featured { border-color: var(--accent); }
.pricing-card .price { font-size: 2.2rem; font-weight: 700; color: var(--primary); margin: 0.5rem 0; }
.pricing-card .price span { font-size: 1rem; color: var(--text-muted); }
.pricing-card ul { list-style: none; padding: 0; margin: 1rem 0; text-align: left; }
.pricing-card ul li { padding: 0.3rem 0; border-bottom: 1px solid var(--border); font-size: 0.9rem; }

/* ---- BREADCRUMB ---- */
.breadcrumb {
  font-size: 0.85rem;
  color: var(--text-muted);
  padding: 0.75rem 0;
  display: flex;
  gap: 0.4rem;
  align-items: center;
  flex-wrap: wrap;
}
.breadcrumb a { color: var(--text-muted); }
.breadcrumb span { color: var(--text); }

/* ---- SEQUENTIAL NAV ---- */
.seq-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 0;
  border-top: 2px solid var(--border);
  margin-top: 2rem;
  gap: 1rem;
  flex-wrap: wrap;
}
.seq-nav a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
  color: var(--primary);
}

/* ---- FOOTER ---- */
.site-footer {
  background: var(--primary);
  color: rgba(255,255,255,0.85);
  padding: 3rem 0 1.5rem;
  margin-top: auto;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}
.footer-col h4 { color: #fff; margin-bottom: 0.75rem; font-size: 1rem; }
.footer-col a { color: rgba(255,255,255,0.75); display: block; margin-bottom: 0.3rem; font-size: 0.9rem; }
.footer-col a:hover { color: var(--accent); text-decoration: none; }
.footer-col p { font-size: 0.88rem; line-height: 1.6; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.15);
  padding-top: 1rem;
  text-align: center;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.55);
}

/* ---- FORM ---- */
.contact-form { max-width: 640px; }
.form-group { margin-bottom: 1.25rem; }
.form-group label { display: block; font-weight: 600; margin-bottom: 0.35rem; font-size: 0.93rem; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%;
  padding: 0.65rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  background: var(--surface);
  color: var(--text);
  transition: border-color 0.2s;
}
.form-group input:focus, .form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 15%, transparent);
}
.form-group textarea { min-height: 130px; resize: vertical; }
.form-error { color: #c62828; font-size: 0.85rem; margin-top: 0.25rem; display: none; }
.form-success {
  background: #e8f5e9;
  border: 1px solid #43a047;
  border-radius: var(--radius);
  padding: 1rem;
  color: #1b5e20;
  display: none;
}

/* ---- TWO-COL LAYOUT ---- */
.two-col { display: grid; grid-template-columns: 2fr 1fr; gap: 2rem; align-items: start; }
@media (max-width: 768px) {
  .two-col { grid-template-columns: 1fr; }
}

/* ---- DL GLOSSARY ---- */
dl.glossary dt {
  font-weight: 700;
  color: var(--primary);
  margin-top: 1rem;
  font-size: 1rem;
}
dl.glossary dd {
  margin-left: 1.5rem;
  color: var(--text-muted);
  font-size: 0.93rem;
}

/* ---- FIGURE ---- */
figure {
  margin: 1.5rem 0;
  text-align: center;
}
figcaption {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
  font-style: italic;
}

/* ---- TIMELINE ---- */
ol.timeline { list-style: none; padding: 0; position: relative; }
ol.timeline::before {
  content: '';
  position: absolute;
  left: 20px;
  top: 0; bottom: 0;
  width: 3px;
  background: var(--border);
}
ol.timeline li {
  padding: 0.75rem 0 0.75rem 3.5rem;
  position: relative;
  border-bottom: none;
}
ol.timeline li::before {
  content: counter(step);
  counter-increment: step;
  position: absolute;
  left: 8px;
  top: 0.75rem;
  width: 26px;
  height: 26px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
}
ol.timeline { counter-reset: step; }

/* ---- RESPONSIVE ---- */
@media (max-width: 900px) {
  .main-nav { display: none; }
  .nav-toggle { display: block; }
  .main-nav.open { display: flex; flex-direction: column; position: absolute; top: var(--nav-h); left: 0; right: 0; background: var(--primary); padding: 1rem; gap: 0.25rem; }
  .mega-nav .mega-drop { min-width: 280px; grid-template-columns: 1fr 1fr; }
}

@media (max-width: 600px) {
  .hero { padding: 2.5rem 0 2rem; }
  .section { padding: 2rem 0; }
  .pricing-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

/* ---- UTILITY ---- */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.gap-2 { gap: 1rem; }
.flex { display: flex; align-items: center; }
.badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  background: var(--accent);
  color: #fff;
}
.divider { border: none; border-top: 1px solid var(--border); margin: 2rem 0; }

/* ---- SKIP LINK ---- */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--accent);
  color: #fff;
  padding: 0.5rem 1rem;
  z-index: 10000;
  border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { top: 0; }

/* ---- COMPARE TABLE ---- */
.compare-table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; }
.compare-table th, .compare-table td {
  border: 1px solid var(--border);
  padding: 0.6rem 0.85rem;
  font-size: 0.9rem;
}
.compare-table th { background: var(--primary); color: #fff; }
.compare-table .yes { color: #2e7d32; font-weight: 700; }
.compare-table .no { color: #c62828; }
.compare-table tr:nth-child(even) { background: #f4f6f9; }

/* ---- STAT BOXES ---- */
.stats { display: flex; gap: 1.5rem; flex-wrap: wrap; margin: 1.5rem 0; }
.stat-box {
  flex: 1;
  min-width: 140px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-align: center;
  box-shadow: var(--shadow);
}
.stat-box .stat-num {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
  display: block;
}
.stat-box .stat-label { font-size: 0.85rem; color: var(--text-muted); }
