/* === ADSPY GUIDE — SaaS Dark Dashboard Theme === */
:root {
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-card: #1e293b;
  --bg-card-hover: #334155;
  --bg-input: #334155;
  --bg-elevated: #0f172a;
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --accent: #6366f1;
  --accent-hover: #4f46e5;
  --accent-light: rgba(99, 102, 241, 0.1);
  --accent-glow: rgba(99, 102, 241, 0.25);
  --success: #10b981;
  --success-light: rgba(16, 185, 129, 0.1);
  --warning: #f59e0b;
  --danger: #ef4444;
  --border: #334155;
  --border-light: #475569;
  --radius: 10px;
  --radius-lg: 14px;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.4);
  --max-width: 1200px;
  --nav-height: 64px;
}

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

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

body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.65;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
.breadcrumbs { padding: 16px 0 0; color: var(--text-muted); font-size: .86rem; }
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.breadcrumbs li:not(:last-child)::after { content: "/"; margin-left: 8px; color: var(--border); }
.breadcrumbs a { color: var(--text-secondary); }
.breadcrumbs [aria-current="page"] { color: var(--text-primary); }
a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent-hover); }

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 20px; }

/* === NAV === */
.navbar {
  position: sticky; top: 0; z-index: 1000;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  height: var(--nav-height);
}
.navbar .container { display: flex; align-items: center; justify-content: space-between; height: 100%; }
.nav-logo { font-size: 1.2rem; font-weight: 700; color: var(--text-primary); display: flex; align-items: center; gap: 8px; }
.nav-logo .logo-icon { color: var(--accent); font-size: 1.4rem; }
.nav-links { display: flex; align-items: center; gap: 20px; list-style: none; }
.nav-links a { color: var(--text-secondary); font-size: 0.88rem; transition: color 0.2s; }
.nav-links a:hover { color: var(--accent); }
.nav-cta { background: var(--accent); color: #fff !important; padding: 8px 18px; border-radius: var(--radius); font-weight: 600; font-size: 0.85rem; }
.nav-cta:hover { background: var(--accent-hover); color: #fff !important; }
.nav-toggle { display: none; background: none; border: none; color: var(--text-primary); font-size: 1.5rem; cursor: pointer; }

/* === HERO === */
.hero {
  padding: 80px 0 60px; text-align: center;
  background: linear-gradient(180deg, #1a1f3a 0%, var(--bg-primary) 100%);
  border-bottom: 2px solid var(--accent);
}
.hero.home-visual {
  position: relative;
  overflow: hidden;
  background: linear-gradient(110deg, rgba(15,23,42,.98) 0%, rgba(30,41,59,.90) 48%, rgba(30,27,75,.74) 100%),
    url('/assets/img/hero-ad-intelligence-v2.jpg') center/cover no-repeat;
  border-bottom: 1px solid rgba(129,140,248,.32);
}
.hero.home-visual::after { content: ""; position: absolute; inset: auto -8% -55% 42%; height: 360px; background: radial-gradient(circle, rgba(99,102,241,.28), transparent 68%); pointer-events: none; }
.hero.home-visual .container { position: relative; z-index: 1; }
.visual-strip { display:grid; grid-template-columns:repeat(3,1fr); gap:18px; margin:28px 0; }
.visual-card { overflow:hidden; background:var(--bg-card); border:1px solid var(--border); border-radius:var(--radius-lg); }
.visual-card img { width:100%; aspect-ratio:16/10; object-fit:cover; }
.visual-card div { padding:16px 18px 18px; }
.visual-card h3 { margin-bottom:6px; font-size:1rem; }
.visual-card p { color:var(--text-secondary); font-size:.88rem; margin:0; }
.page-visual { margin: 26px 0 34px; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--bg-card); box-shadow: var(--shadow); }
.page-visual img { width: 100%; aspect-ratio: 16/7; object-fit: cover; }
.page-visual figcaption { padding: 10px 16px 13px; color: var(--text-muted); font-size: .82rem; }
.hero h1 { font-size: 2.8rem; font-weight: 800; margin-bottom: 18px; line-height: 1.15; }
.hero h1 span { color: var(--accent); }
.hero-subtitle { font-size: 1.15rem; color: var(--text-secondary); max-width: 700px; margin: 0 auto 32px; line-height: 1.7; }
.hero-cta-group { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* === BUTTONS === */
.cta-btn { display: inline-block; background: var(--accent); color: #fff; padding: 14px 32px; border-radius: var(--radius); font-weight: 700; font-size: 1rem; transition: all 0.25s; }
.cta-btn:hover { background: var(--accent-hover); color: #fff; transform: translateY(-2px); box-shadow: 0 8px 25px var(--accent-glow); }
.cta-btn-secondary { background: transparent; color: var(--accent); border: 2px solid var(--accent); padding: 12px 30px; border-radius: var(--radius); font-weight: 600; font-size: 1rem; }
.cta-btn-secondary:hover { background: var(--accent-light); color: var(--accent); }
.cta-btn-success { background: var(--success); color: #fff; padding: 14px 32px; border-radius: var(--radius); font-weight: 700; font-size: 1rem; transition: all 0.25s; }
.cta-btn-success:hover { background: #059669; color: #fff; transform: translateY(-2px); }

/* === TRUST BAR === */
.trust-bar { padding: 20px 0; border-bottom: 1px solid var(--border); }
.trust-items { display: flex; justify-content: center; gap: 36px; flex-wrap: wrap; }
.trust-item { display: flex; align-items: center; gap: 8px; color: var(--text-secondary); font-size: 0.88rem; }
.trust-icon { font-size: 1.3rem; color: var(--accent); }

/* === SECTION === */
.section { padding: 60px 0; }
.section-title { font-size: 1.9rem; font-weight: 700; margin-bottom: 12px; text-align: center; }
.section-subtitle { font-size: 1rem; color: var(--text-secondary); text-align: center; max-width: 600px; margin: 0 auto 40px; }
.section-divider { width: 50px; height: 3px; background: var(--accent); margin: 0 auto 14px; border-radius: 2px; }

/* === CARDS === */
.cards-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-bottom: 36px; }
.card {
  background: var(--bg-card); border-radius: var(--radius-lg); padding: 26px;
  border: 1px solid var(--border); transition: all 0.25s;
}
.card:hover { background: var(--bg-card-hover); border-color: var(--accent); transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.card-icon { font-size: 2rem; margin-bottom: 14px; }
.card h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 10px; }
.card p { color: var(--text-secondary); font-size: 0.9rem; line-height: 1.6; }
.card-link { display: inline-block; margin-top: 10px; color: var(--accent); font-weight: 600; font-size: 0.88rem; }
.cards-grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.cards-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }

/* === PRICING TABLE === */
.pricing-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; max-width: 800px; margin: 0 auto 36px; }
.pricing-card {
  background: var(--bg-card); border-radius: var(--radius-lg); padding: 32px;
  border: 1px solid var(--border); text-align: center; transition: all 0.25s;
}
.pricing-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.pricing-card.featured { border-color: var(--accent); position: relative; }
.pricing-badge {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--accent); color: #fff; font-size: 0.75rem; font-weight: 700;
  padding: 4px 16px; border-radius: 20px;
}
.pricing-name { font-size: 1.3rem; font-weight: 700; margin-bottom: 8px; }
.pricing-price { font-size: 2.5rem; font-weight: 800; color: var(--accent); margin-bottom: 4px; }
.pricing-price span { font-size: 0.9rem; color: var(--text-muted); font-weight: 400; }
.pricing-features { list-style: none; margin: 20px 0; }
.pricing-features li { padding: 6px 0; color: var(--text-secondary); font-size: 0.9rem; }
.pricing-features li::before { content: '✓ '; color: var(--success); font-weight: 700; }

/* === CONTENT === */
.content-area { padding: 60px 0; }
.content-layout { display: grid; grid-template-columns: 1fr 300px; gap: 36px; }
.content-main { min-width: 0; }
.content-sidebar { position: sticky; top: calc(var(--nav-height) + 20px); align-self: start; }
.sidebar-block { background: var(--bg-card); border-radius: var(--radius-lg); padding: 20px; margin-bottom: 18px; border: 1px solid var(--border); }
.sidebar-block h4 { font-size: 0.95rem; margin-bottom: 12px; color: var(--accent); }

/* === BREADCRUMBS === */
.breadcrumbs { padding: 14px 0; font-size: 0.82rem; }
.breadcrumbs a { color: var(--text-muted); }
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs span { color: var(--text-muted); margin: 0 6px; }
.breadcrumbs .current { color: var(--text-secondary); }

/* === TOC === */
.toc { background: var(--bg-card); border-radius: var(--radius-lg); padding: 22px; margin-bottom: 28px; border: 1px solid var(--border); }
.toc h4 { font-size: 0.95rem; margin-bottom: 10px; color: var(--accent); }
.toc ul { list-style: none; }
.toc li { margin-bottom: 5px; }
.toc a { color: var(--text-secondary); font-size: 0.88rem; padding: 3px 0; display: block; border-left: 2px solid transparent; padding-left: 10px; transition: all 0.2s; }
.toc a:hover, .toc a.active { color: var(--accent); border-left-color: var(--accent); }
.toc .toc-h3 { padding-left: 22px; }

/* === ARTICLE === */
.article h2 { font-size: 1.5rem; font-weight: 700; margin: 36px 0 14px; padding-bottom: 8px; border-bottom: 2px solid var(--border); }
.article h3 { font-size: 1.2rem; font-weight: 600; margin: 24px 0 10px; }
.article p { margin-bottom: 14px; color: var(--text-secondary); line-height: 1.7; }
.article ul, .article ol { margin: 14px 0; padding-left: 22px; }
.article li { margin-bottom: 7px; color: var(--text-secondary); line-height: 1.6; }
.article strong { color: var(--text-primary); }

/* === TABLES === */
.table-responsive { overflow-x: auto; margin: 20px 0; }
.styled-table { width: 100%; border-collapse: collapse; background: var(--bg-card); border-radius: var(--radius); overflow: hidden; }
.styled-table thead { background: var(--accent); }
.styled-table th { padding: 11px 14px; text-align: left; font-weight: 600; color: #fff; font-size: 0.88rem; }
.styled-table td { padding: 11px 14px; border-bottom: 1px solid var(--border); color: var(--text-secondary); font-size: 0.88rem; }
.styled-table tbody tr:hover { background: var(--bg-card-hover); }
.styled-table tbody tr:last-child td { border-bottom: none; }

/* === FAQ === */
.faq-section { padding: 60px 0; }
.faq-list { max-width: 800px; margin: 0 auto; }
.faq-item { background: var(--bg-card); border-radius: var(--radius); margin-bottom: 10px; border: 1px solid var(--border); overflow: hidden; }
.faq-item summary { padding: 14px 18px; font-weight: 600; cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; transition: background 0.2s; color: var(--text-primary); }
.faq-item summary:hover { background: var(--bg-card-hover); }
.faq-item summary::after { content: '+'; font-size: 1.2rem; color: var(--accent); transition: transform 0.2s; }
.faq-item details[open] summary::after { content: '−'; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-answer { padding: 0 18px 14px 18px; color: var(--text-secondary); line-height: 1.7; }

/* === CTA BANNER === */
.cta-banner { background: linear-gradient(135deg, #1e1b4b, #1e293b); border: 2px solid var(--accent); border-radius: var(--radius-lg); padding: 36px; text-align: center; margin: 36px 0; }
.cta-banner h3 { font-size: 1.4rem; margin-bottom: 10px; }
.cta-banner p { color: var(--text-secondary); margin-bottom: 18px; max-width: 500px; margin-left: auto; margin-right: auto; }

/* Banner wrapper */
.banner-wrapper { text-align: center; margin: 28px 0; padding: 14px; background: var(--bg-card); border-radius: var(--radius); border: 1px solid var(--border); }
.banner-wrapper img { margin: 0 auto; max-width: 100%; height: auto; }

/* === STEPS === */
.steps-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; margin: 36px 0; }
.step-item { text-align: center; padding: 22px; }
.step-number { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 700; font-size: 1.1rem; margin-bottom: 14px; }
.step-item h4 { font-size: 0.95rem; margin-bottom: 6px; }
.step-item p { color: var(--text-secondary); font-size: 0.85rem; }

/* === COMPARISON === */
.comparison-block { display: grid; grid-template-columns: 1fr auto 1fr; gap: 18px; margin: 28px 0; align-items: start; }
.comparison-col { background: var(--bg-card); border-radius: var(--radius-lg); padding: 22px; border: 1px solid var(--border); }
.comparison-col h4 { font-size: 1.05rem; margin-bottom: 10px; padding-bottom: 6px; border-bottom: 1px solid var(--border); }
.comparison-vs { display: flex; align-items: center; justify-content: center; font-weight: 700; color: var(--accent); font-size: 1.1rem; }
.check-list { list-style: none; padding: 0; }
.check-list li { padding: 5px 0; color: var(--text-secondary); font-size: 0.88rem; display: flex; align-items: center; gap: 6px; }
.check-list li::before { content: '✓'; color: var(--success); font-weight: 700; }
.cross-list li::before { content: '✗'; color: var(--danger); }

/* === EVIDENCE NOTES === */
.evidence-notes { background: var(--bg-card); border-left: 4px solid var(--accent); border-radius: var(--radius); padding: 18px 22px; margin: 28px 0; font-size: 0.88rem; }
.evidence-notes h4 { font-size: 0.95rem; color: var(--accent); margin-bottom: 10px; }
.evidence-notes p { margin-bottom: 6px; color: var(--text-secondary); }
.evidence-notes strong { color: var(--text-primary); }

/* === FEATURE HIGHLIGHT === */
.feature-highlight { background: var(--bg-card); border-radius: var(--radius-lg); padding: 28px; margin: 24px 0; border: 1px solid var(--border); }
.feature-highlight h3 { font-size: 1.15rem; color: var(--accent); margin-bottom: 10px; }
.feature-highlight p { color: var(--text-secondary); }

/* === RELATED === */
.related-pages { padding: 36px 0; border-top: 1px solid var(--border); }
.related-pages h3 { font-size: 1.2rem; margin-bottom: 18px; }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.related-card { background: var(--bg-card); border-radius: var(--radius); padding: 18px; border: 1px solid var(--border); transition: all 0.2s; }
.related-card:hover { border-color: var(--accent); background: var(--bg-card-hover); }
.related-card h4 { font-size: 0.92rem; margin-bottom: 6px; }
.related-card p { color: var(--text-secondary); font-size: 0.82rem; margin-bottom: 8px; }

/* === PUBLISH INFO === */
.publish-info { font-size: 0.82rem; color: var(--text-muted); margin-bottom: 20px; display: flex; gap: 14px; flex-wrap: wrap; }

/* === FOOTER === */
.footer { background: #0a0f1f; padding: 56px 0 28px; border-top: 1px solid var(--border); }
.footer-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px; margin-bottom: 36px; }
.footer-col h4 { font-size: 0.95rem; color: var(--accent); margin-bottom: 14px; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 7px; }
.footer-col a { color: var(--text-muted); font-size: 0.88rem; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom { text-align: center; padding-top: 22px; border-top: 1px solid var(--border); color: var(--text-muted); font-size: 0.82rem; }
.footer-disclaimer { margin-top: 10px; font-size: 0.78rem; color: var(--text-muted); max-width: 600px; margin-left: auto; margin-right: auto; line-height: 1.5; }

/* === RESPONSIVE === */
@media (max-width: 900px) {
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
  .visual-strip { grid-template-columns:1fr; }
  .cards-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .steps-grid { grid-template-columns: repeat(2, 1fr); }
  .pricing-grid { grid-template-columns: 1fr; max-width: 400px; }
  .content-layout { grid-template-columns: 1fr; }
  .content-sidebar { position: static; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .hero h1 { font-size: 2rem; }
  .nav-links { display: none; position: absolute; top: var(--nav-height); left: 0; right: 0; background: rgba(15,23,42,0.98); flex-direction: column; padding: 18px; border-bottom: 1px solid var(--border); }
  .nav-links.active { display: flex; }
  .nav-toggle { display: block; }
  .comparison-block { grid-template-columns: 1fr; }
  .comparison-vs { padding: 10px 0; }
}

@media (max-width: 600px) {
  .cards-grid, .cards-grid-2, .cards-grid-4 { grid-template-columns: 1fr; }
  .steps-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 22px; }
  .related-grid { grid-template-columns: 1fr; }
  .hero { padding: 44px 0 36px; }
  .hero h1 { font-size: 1.6rem; }
  .hero-subtitle { font-size: 1rem; }
  .cta-btn, .cta-btn-secondary { padding: 11px 22px; font-size: 0.9rem; }
  .trust-items { flex-direction: column; align-items: center; gap: 12px; }
  .section { padding: 36px 0; }
  .article h2 { font-size: 1.25rem; }
  .cta-banner { padding: 22px; }
}

/* === PRINT === */
@media print {
  .navbar, .nav-toggle, .footer, .cta-btn, .cta-btn-secondary, .cta-btn-success, .cta-banner, .banner-wrapper, .content-sidebar, .toc, .trust-bar { display: none !important; }
  body { background: #fff; color: #000; font-family: 'Times New Roman', serif; font-size: 12pt; line-height: 1.5; }
  .hero { background: #f5f5f5; border-bottom: 2px solid #333; padding: 20px 0; }
  .hero h1, .hero h1 span { color: #000; font-size: 18pt; }
  .hero-subtitle { color: #333; }
  .article h2 { color: #000; border-bottom: 1px solid #999; }
  .article h3 { color: #333; }
  .article p, .article li { color: #000; }
  .section { padding: 18px 0; }
  .card { background: #f9f9f9; border: 1px solid #ddd; break-inside: avoid; }
  .card h3, .card p { color: #000; }
  .faq-item { background: #f9f9f9; border: 1px solid #ccc; break-inside: avoid; }
  .faq-item summary { color: #000; }
  .faq-answer { color: #333; }
  .styled-table thead { background: #e0e0e0; }
  .styled-table th { color: #000; }
  .styled-table td { color: #333; border-bottom: 1px solid #ccc; }
  .evidence-notes { background: #f5f5f5; border-left: 3px solid #999; }
  .evidence-notes h4 { color: #666; }
  .breadcrumbs { color: #666; }
  a[href]::after { content: " (" attr(href) ")"; font-size: 0.8em; color: #666; }
  a[href^="#"]::after { content: ""; }
}


/* SEO recovery additions */
.hero-visual .hero-grid{display:grid;grid-template-columns:minmax(0,1.05fr) minmax(280px,.95fr);gap:36px;align-items:center}
.hero-copy{min-width:0}
.hero-actions{display:flex;flex-wrap:wrap;gap:12px;margin-top:22px}
.hero-media{border:1px solid rgba(255,255,255,.14);border-radius:8px;overflow:hidden;background:#111827;box-shadow:0 24px 60px rgba(0,0,0,.28)}
.hero-media img{display:block;width:100%;height:auto;aspect-ratio:16/10;object-fit:cover}
.article-layout{display:grid;grid-template-columns:minmax(0,820px);padding:48px 20px}
.article-content{min-width:0}
.article-section{margin-bottom:34px}
.article-section h2,.faq-section h2{font-size:clamp(1.45rem,2vw,2rem);margin-bottom:12px}
.related-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:14px}
.related-card{display:block;padding:16px;border:1px solid rgba(255,255,255,.12);border-radius:8px;background:rgba(255,255,255,.04);text-decoration:none}
.faq-item{border:1px solid rgba(255,255,255,.12);border-radius:8px;padding:14px 16px;margin:10px 0;background:rgba(255,255,255,.04)}
.faq-item summary{cursor:pointer;font-weight:700}
.not-found{padding:86px 20px 120px}
@media (max-width: 820px){.hero-visual .hero-grid{grid-template-columns:1fr}.hero-media{order:-1}.article-layout{padding-top:32px}}
