/* ============================================================
   DailyLifeAdvisor — Health Insurance LP
   Modelled on portal.ns-alerts.com aesthetic:
   clean white + slate, blue primary, orange CTA, vertical
   video testimonials, sticky header, countdown urgency.
   ============================================================ */

:root {
    --primary:      #2563eb;   /* blue */
    --primary-dark: #1d4ed8;
    --primary-10:   rgba(37, 99, 235, .08);
    --primary-20:   rgba(37, 99, 235, .2);

    --cta:          #f97316;   /* orange */
    --cta-dark:     #ea580c;

    --destructive:  #dc2626;   /* red (urgency) */
    --success:      #16a34a;   /* green (money) */

    --ink:          #0f172a;
    --muted:        #64748b;
    --border:       #e2e8f0;
    --slate:        #f8fafc;
    --slate-2:      #f1f5f9;

    --radius:       10px;
    --shadow-sm:    0 1px 3px rgba(0,0,0,.06);
    --shadow-md:    0 6px 18px rgba(0,0,0,.08);
    --shadow-lg:    0 12px 28px rgba(0,0,0,.12);
}

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

html { scroll-behavior: smooth; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI',
                 Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--ink);
    background: #fff;
    font-size: 16px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

.container {
    width: 100%;
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ── Sticky header ─────────────────────────────────────── */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: #fff;
    border-bottom: 1px solid var(--border);
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 12px;
    padding-bottom: 12px;
    gap: 16px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.brand-icon {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    color: var(--primary);
}

.brand-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--ink);
    line-height: 1.15;
}

.brand-sub {
    font-size: 11.5px;
    color: var(--muted);
    line-height: 1.2;
}

.header-cta {
    background: var(--cta);
    color: #fff;
    padding: 10px 18px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
    white-space: nowrap;
    transition: background .15s ease;
}
.header-cta:hover { background: var(--cta-dark); }
.header-cta::after { content: " →"; }

@media (max-width: 520px) {
    .brand-title { font-size: 15px; }
    .brand-sub { display: none; }
    .header-cta { padding: 9px 14px; font-size: 13px; }
}

/* ── Hero ──────────────────────────────────────────────── */
.hero {
    background: linear-gradient(180deg, var(--primary-10) 0%, rgba(37,99,235,.03) 40%, #fff 100%);
    padding: 28px 0 56px;
    text-align: center;
}

.countdown-card {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 10px;
    padding: 10px 16px;
    margin-bottom: 24px;
    text-align: left;
}
.countdown-card svg { color: var(--destructive); width: 22px; height: 22px; flex-shrink: 0; }
.countdown-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--ink);
}
.countdown-value {
    font-size: 22px;
    font-weight: 800;
    color: var(--destructive);
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    letter-spacing: .02em;
    margin-top: 2px;
}

.hero h1 {
    font-size: clamp(32px, 5.5vw, 56px);
    line-height: 1.08;
    font-weight: 800;
    color: var(--ink);
    margin: 0 auto 20px;
    max-width: 900px;
    letter-spacing: -.01em;
}
.hero h1 .accent { color: var(--primary); display: block; }

.hero-sub {
    font-size: clamp(16px, 2.2vw, 20px);
    color: var(--muted);
    max-width: 720px;
    margin: 0 auto 28px;
}

.hero-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: var(--cta);
    color: #fff;
    font-size: 19px;
    font-weight: 700;
    padding: 18px 40px;
    border: none;
    border-radius: 10px;
    text-decoration: none;
    box-shadow: var(--shadow-lg);
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
    cursor: pointer;
}
.hero-cta:hover {
    background: var(--cta-dark);
    transform: translateY(-1px);
    box-shadow: 0 16px 32px rgba(249,115,22,.35);
}
.hero-cta::after { content: " →"; }

.hero-free-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
    background: var(--primary-10);
    color: var(--primary);
    font-size: 14px;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 999px;
}

.hero-trust-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 24px;
    margin-top: 20px;
    font-size: 14px;
    color: var(--muted);
}
.hero-trust-row .trust-item { display: inline-flex; align-items: center; gap: 6px; }
.hero-trust-row svg { color: var(--success); width: 16px; height: 16px; }

/* ── Stats bar ─────────────────────────────────────────── */
.stats-bar {
    background: var(--slate);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 26px 0;
}
.stats-bar .container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 32px;
}
.stat {
    text-align: center;
    min-width: 150px;
    position: relative;
}
.stat-value {
    font-size: clamp(26px, 3.2vw, 36px);
    font-weight: 800;
    color: var(--ink);
    line-height: 1;
    font-variant-numeric: tabular-nums;
}
.stat-value .prefix { color: var(--success); margin-right: 4px; }

/* Live savings ticker note (fades in above the big number) */
.stat-ticker-note {
    position: absolute;
    top: -22px;
    left: 50%;
    transform: translateX(-50%) translateY(6px);
    font-size: 13px;
    font-weight: 700;
    color: var(--success);
    background: rgba(22, 163, 74, 0.10);
    border: 1px solid rgba(22, 163, 74, 0.25);
    padding: 3px 10px;
    border-radius: 999px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.45s ease, transform 0.45s ease;
}
.stat-ticker-note.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
#savings-counter {
    transition: color 0.25s ease;
}
#savings-counter.bump {
    color: var(--success);
}

/* Rotating "saver" carousel (slides sideways between entries) */
.stat-carousel {
    min-width: 240px;
    min-height: 48px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
}
.carousel-value,
.carousel-label {
    transition: transform 0.38s ease, opacity 0.38s ease;
    opacity: 1;
    transform: translateX(0);
    will-change: transform, opacity;
}
/* Phase 1: slide current entry OUT to the left */
.stat-carousel.slide-out .carousel-value,
.stat-carousel.slide-out .carousel-label {
    opacity: 0;
    transform: translateX(-36px);
}
/* Phase 2: snap new entry to the right (no transition) */
.stat-carousel.slide-in .carousel-value,
.stat-carousel.slide-in .carousel-label {
    opacity: 0;
    transform: translateX(36px);
    transition: none;
}
.stat-label {
    font-size: 13px;
    color: var(--muted);
    margin-top: 6px;
}
.stat-divider {
    width: 1px;
    height: 44px;
    background: var(--border);
}
@media (max-width: 760px) { .stat-divider { display: none; } }

.stat-stars { color: #facc15; letter-spacing: 2px; font-size: 16px; }

/* ── Video sections ────────────────────────────────────── */
.video-section {
    padding: 56px 0 48px;
}
.video-section.slate { background: var(--slate); }

.section-title {
    font-size: clamp(24px, 3vw, 32px);
    font-weight: 700;
    text-align: center;
    margin-bottom: 10px;
    color: var(--ink);
}
.section-sub {
    text-align: center;
    color: var(--muted);
    font-size: 16px;
    max-width: 600px;
    margin: 0 auto 36px;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 28px;
    max-width: 960px;
    margin: 0 auto;
}
.video-grid.single {
    grid-template-columns: 1fr;
    max-width: 340px;
}

.video-card {
    text-align: center;
    cursor: pointer;
}

.video-frame {
    position: relative;
    width: 100%;
    aspect-ratio: 9 / 16;
    background: var(--slate-2);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: border-color .2s ease, transform .2s ease;
}
.video-card:hover .video-frame {
    border-color: var(--primary-20);
    transform: translateY(-2px);
}

.video-frame video,
.video-frame img.poster {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.video-frame .placeholder {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: rgba(255,255,255,.6);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    text-align: center;
}
.video-frame .placeholder .ph-title {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255,255,255,.8);
    margin-bottom: 8px;
    line-height: 1.4;
}
.video-frame .placeholder .ph-sub {
    font-size: 11px;
    color: rgba(255,255,255,.45);
    font-style: italic;
    border: 1px dashed rgba(255,255,255,.2);
    padding: 4px 10px;
    border-radius: 4px;
    margin-top: 8px;
}

.video-frame .play-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .2);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    transition: opacity .2s ease;
}
.video-card.playing .play-overlay { opacity: 0; }

.play-btn {
    width: 64px;
    height: 64px;
    background: var(--cta);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 20px rgba(249,115,22,.55);
}
.play-btn svg { color: #fff; width: 24px; height: 24px; margin-left: 2px; }

.video-caption {
    margin-top: 12px;
    font-size: 15px;
    font-weight: 600;
    color: var(--ink);
}
.video-caption .amount {
    color: var(--success);
    font-weight: 800;
    margin-left: 6px;
}
.video-meta {
    font-size: 13px;
    color: var(--muted);
    margin-top: 2px;
}

/* ── What's Covered (benefit cards) ────────────────────── */
.benefits-section { padding: 64px 0; }

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 22px;
    max-width: 960px;
    margin: 0 auto;
}
.benefit-card {
    background: #fff;
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 28px 22px;
    text-align: center;
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.benefit-card:hover {
    border-color: var(--primary-20);
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}
.benefit-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
}
.benefit-icon svg { width: 28px; height: 28px; }
.benefit-icon.green { background: #dcfce7; color: var(--success); }
.benefit-icon.blue  { background: #dbeafe; color: var(--primary); }
.benefit-icon.orange{ background: #ffedd5; color: var(--cta); }

.benefit-card h4 {
    font-size: 19px;
    font-weight: 700;
    margin-bottom: 8px;
}
.benefit-card p { color: var(--muted); font-size: 15px; }

.section-cta-row { text-align: center; margin-top: 44px; }
.section-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--primary);
    color: #fff;
    padding: 14px 28px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 16px;
    text-decoration: none;
    transition: background .15s ease;
}
.section-cta:hover { background: var(--primary-dark); }

/* ── How it works ──────────────────────────────────────── */
.how-section {
    background: var(--slate);
    padding: 64px 0;
}
.how-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 36px;
    max-width: 900px;
    margin: 0 auto;
}
.how-step { text-align: center; }
.how-number {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    font-size: 20px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
}
.how-step h4 { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.how-step p { color: var(--muted); font-size: 15px; }

/* ── Testimonial card ──────────────────────────────────── */
.testimonial-section { padding: 64px 0; }
.testimonial-card {
    background: var(--primary-10);
    border: 1px solid var(--primary-20);
    border-radius: 14px;
    padding: 40px 32px;
    text-align: center;
    max-width: 780px;
    margin: 0 auto;
}
.testimonial-stars { color: #facc15; letter-spacing: 3px; font-size: 20px; margin-bottom: 14px; }
.testimonial-quote {
    font-size: clamp(17px, 2vw, 21px);
    font-style: italic;
    color: var(--ink);
    line-height: 1.5;
    margin-bottom: 14px;
}
.testimonial-author { color: var(--muted); font-size: 15px; }

/* ── Final CTA ─────────────────────────────────────────── */
.final-cta-section {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    padding: 64px 0;
    text-align: center;
}
.final-cta-section h3 {
    font-size: clamp(26px, 3.2vw, 36px);
    font-weight: 800;
    margin-bottom: 16px;
    color: #fff;
}
.final-cta-section p {
    font-size: 17px;
    opacity: .92;
    max-width: 600px;
    margin: 0 auto 26px;
}
.final-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--cta);
    color: #fff;
    font-size: 19px;
    font-weight: 800;
    padding: 18px 44px;
    border-radius: 10px;
    text-decoration: none;
    box-shadow: 0 8px 24px rgba(0,0,0,.25);
    transition: transform .15s ease, background .15s ease;
}
.final-cta-btn:hover { background: var(--cta-dark); transform: translateY(-1px); }
.final-cta-btn::after { content: " →"; }

/* ── Footer ────────────────────────────────────────────── */
.site-footer {
    background: #0f172a;
    color: #94a3b8;
    padding: 36px 0 28px;
    font-size: 13px;
    line-height: 1.65;
}
.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 18px;
    margin-bottom: 16px;
}
.footer-links a { color: #cbd5e1; text-decoration: none; }
.footer-links a:hover { color: #fff; }
.footer-copy, .footer-disclaimer {
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}
.footer-disclaimer { font-size: 11px; color: #64748b; margin-top: 14px; }
.footer-disclaimer strong { color: #94a3b8; }

/* ── Responsive tweaks ─────────────────────────────────── */
@media (max-width: 640px) {
    .hero { padding: 22px 0 44px; }
    .countdown-card { flex-direction: row; padding: 10px 14px; }
    .countdown-value { font-size: 18px; }
    .hero-cta { width: 100%; padding: 16px 20px; font-size: 17px; }
    .stats-bar .container {
        gap: 18px;
        flex-direction: column;        /* stack vertically on mobile */
        align-items: stretch;
    }
    .stats-bar .stat { width: 100%; min-width: 0; }
    .stats-bar .stat-divider { display: none; }
    /* Explicit mobile order: counter → carousel → surveys → stars.
       Container children (in DOM): counter, divider, carousel, divider, 52k, divider, stars */
    .stats-bar .container > :nth-child(1) { order: 1; }  /* counter */
    .stats-bar .container > :nth-child(3) { order: 2; }  /* saver carousel */
    .stats-bar .container > :nth-child(5) { order: 3; }  /* 52,000+ */
    .stats-bar .container > :nth-child(7) { order: 4; }  /* stars */
    .stat { min-width: 130px; }
    .video-section, .benefits-section, .how-section,
    .testimonial-section, .final-cta-section { padding: 44px 0; }
    .testimonial-card { padding: 28px 22px; }
    .final-cta-btn { width: 100%; justify-content: center; }
}

/* ============================================================
   Legal pages (Terms, Privacy) — shared styles
   ============================================================ */
.legal-hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    padding: 60px 0 48px;
    text-align: center;
}
.legal-hero h1 {
    font-size: clamp(30px, 4vw, 44px);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin-bottom: 10px;
}
.legal-hero .last-updated {
    font-size: 14px;
    opacity: 0.9;
    font-weight: 500;
}
.legal-hero .last-updated strong { font-weight: 700; }

.legal-container {
    max-width: 820px;
    margin: 0 auto;
    padding: 48px 24px 72px;
    color: var(--ink);
    font-size: 16px;
    line-height: 1.7;
}
.legal-container .intro {
    background: var(--slate);
    border-left: 4px solid var(--primary);
    padding: 18px 20px;
    border-radius: 0 10px 10px 0;
    margin-bottom: 36px;
    color: var(--muted);
    font-size: 15px;
}
.legal-section {
    margin-bottom: 36px;
}
.legal-section h2 {
    font-size: 22px;
    font-weight: 800;
    color: var(--ink);
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-10);
    letter-spacing: -0.01em;
}
.legal-section h3 {
    font-size: 17px;
    font-weight: 700;
    color: var(--primary-dark);
    margin: 20px 0 8px;
}
.legal-section p {
    margin-bottom: 12px;
    color: #334155;
}
.legal-section ul {
    margin: 10px 0 14px 20px;
    padding-left: 6px;
}
.legal-section li {
    margin-bottom: 8px;
    color: #334155;
}
.legal-section li strong { color: var(--ink); }
.legal-container a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    border-bottom: 1px dotted var(--primary-20);
    transition: color 0.2s ease, border-color 0.2s ease;
}
.legal-container a:hover {
    color: var(--primary-dark);
    border-bottom-color: var(--primary);
}
.legal-container .contact-card {
    background: var(--slate);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 22px 24px;
    margin-top: 16px;
}
.legal-container .contact-card p { margin-bottom: 6px; }
.legal-container .contact-card strong { color: var(--ink); }

.legal-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
    margin-bottom: 20px;
    font-size: 15px;
}
.legal-back-link:hover { color: var(--primary-dark); }

@media (max-width: 640px) {
    .legal-hero { padding: 44px 20px 36px; }
    .legal-container { padding: 32px 20px 56px; font-size: 15px; }
    .legal-section h2 { font-size: 20px; }
    .legal-section h3 { font-size: 16px; }
}
