/* =======================================================
   ADS-SECTION — Google Ads "Live Results" Dashboard
   Uses brand tokens from style.css — no new fonts/colours
   ======================================================= */

/* ── Outer section wrapper ────────────────────────────── */
.sem-section {
    background: var(--dark-primary, #0f1419);
    padding: var(--spacing-4xl) 1.5rem;
    position: relative;
    overflow: hidden;
}

/* Subtle radial glow behind the whole section */
.sem-section::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 320px;
    background: radial-gradient(ellipse at center,
            rgba(102, 187, 106, 0.07) 0%,
            transparent 70%);
    pointer-events: none;
    z-index: 0;
}

/* ── Inner container card ─────────────────────────────── */
.ads-card {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    display: block;
    /* Layout moved to individual slides */
}

/* ── Crossfading Slides ───────────────────────────────── */
.js-slider-container {
    padding-bottom: 2.5rem;
    /* Space for dots at bottom */
    display: grid;
    grid-template-areas: "stack";
}

.ads-slide {
    grid-area: stack;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 4rem;
    align-items: center;
}

.ads-slide.active {
    opacity: 1;
    pointer-events: auto;
    z-index: 2;
}

/* ── Slider Navigation ────────────────────────────────── */
.ads-slider-nav {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: flex-start;
    gap: 0.75rem;
    z-index: 10;
}

.ads-nav-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(102, 187, 106, 0.2);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.ads-nav-dot:hover {
    background: rgba(102, 187, 106, 0.5);
}

.ads-nav-dot.active {
    background: var(--text-accent-green, #66bb6a);
    box-shadow: 0 0 0 4px rgba(102, 187, 106, 0.15);
}

/* ── LEFT — copy panel ────────────────────────────────── */
.ads-copy {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.ads-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-family, 'Inter', sans-serif);
    font-size: var(--text-xs, 0.75rem);
    font-weight: var(--font-weight-semibold, 600);
    letter-spacing: var(--tracking-widest, 0.1em);
    text-transform: uppercase;
    color: var(--text-accent-green, #66bb6a);
}

.ads-eyebrow svg {
    flex-shrink: 0;
}

.ads-heading {
    font-family: var(--heading-font-family, 'Poppins', sans-serif);
    font-size: clamp(1.875rem, 5vw, 3rem);
    font-weight: var(--font-weight-semibold, 600);
    line-height: var(--leading-tight, 1.1);
    letter-spacing: var(--tracking-tight, -0.025em);
    color: var(--color-heading, #ffffff);
    margin: 0;
    background: none;
    -webkit-text-fill-color: var(--color-heading-fill, #ffffff);
}

.ads-heading em {
    font-style: normal;
    color: var(--text-accent-green, #66bb6a);
    -webkit-text-fill-color: var(--text-accent-green, #66bb6a);
}

.ads-subtext {
    font-family: var(--font-family, 'Inter', sans-serif);
    font-size: var(--text-base, 1rem);
    line-height: var(--leading-relaxed, 1.7);
    color: var(--text-secondary, #8a94a0);
    margin: 0;
    max-width: 440px;
}

/* CTA Button */
.ads-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 1.75rem;
    background: var(--primary-green, #2e7d32);
    color: var(--white, #ffffff);
    font-family: var(--font-family, 'Inter', sans-serif);
    font-size: var(--text-sm, 0.875rem);
    font-weight: var(--font-weight-medium, 500);
    border-radius: var(--radius-md, 8px);
    text-decoration: none;
    transition: background 0.25s ease, transform 0.2s ease, box-shadow 0.25s ease;
    align-self: flex-start;
    -webkit-text-fill-color: var(--white, #ffffff);
}

.ads-cta:hover {
    background: var(--primary-green-hover, #1b5e20);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(46, 125, 50, 0.22);
    color: var(--white, #ffffff);
    -webkit-text-fill-color: var(--white, #ffffff);
}

/* Stat pills */
.ads-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.ads-stat-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.9rem;
    background: rgba(102, 187, 106, 0.08);
    border: 1px solid rgba(102, 187, 106, 0.25);
    border-radius: 999px;
    font-family: var(--font-family, 'Inter', sans-serif);
    font-size: var(--text-sm, 0.875rem);
    font-weight: var(--font-weight-medium, 500);
    color: var(--text-accent-green, #66bb6a);
}

.ads-stat-pill .pill-value {
    font-weight: var(--font-weight-semibold, 600);
    font-variant-numeric: tabular-nums;
    display: inline-block;
    min-width: 3.8ch;
    text-align: right;
}

/* ── RIGHT — dashboard mockup ─────────────────────────── */
.ads-mockup {
    position: relative;
}

.ads-browser-card {
    background: var(--dark-secondary, #1c2127);
    border-radius: var(--radius-xl, 20px);
    border: 1px solid rgba(102, 187, 106, 0.15);
    overflow: hidden;
    box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.3),
        0 0 24px rgba(102, 187, 106, 0.08);
}

/* Browser chrome bar */
.ads-browser-bar {
    background: var(--dark-tertiary, #252d36);
    padding: 0.7rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.ads-browser-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.ads-browser-dot:nth-child(1) {
    background: #ff5f57;
}

.ads-browser-dot:nth-child(2) {
    background: #febc2e;
}

.ads-browser-dot:nth-child(3) {
    background: #28c840;
}

.ads-browser-url {
    margin-left: 0.75rem;
    flex: 1;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 6px;
    padding: 0.25rem 0.75rem;
    font-family: var(--font-family, 'Inter', sans-serif);
    font-size: 0.7rem;
    color: var(--text-muted, #6e7a8a);
    text-align: center;
}

/* Dashboard body */
.ads-dashboard-body {
    padding: 1.25rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Metric cards row */
.ads-metrics {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.6rem;
}

.ads-metric {
    background: var(--dark-primary, #0f1419);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-md, 8px);
    padding: 0.75rem 0.6rem;
    text-align: center;
}

.ads-metric-value {
    display: block;
    font-family: var(--heading-font-family, 'Poppins', sans-serif);
    font-size: 1.1rem;
    font-weight: var(--font-weight-semibold, 600);
    color: var(--text-accent-green, #66bb6a);
    line-height: 1;
    margin-bottom: 0.25rem;
    /* Animated counter: starts at 0, no JS needed — uses CSS with custom props */
}

.ads-metric-label {
    font-family: var(--font-family, 'Inter', sans-serif);
    font-size: 0.6rem;
    color: var(--text-muted, #6e7a8a);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.ads-metric-delta {
    display: inline-block;
    font-size: 0.6rem;
    font-weight: 600;
    color: #66bb6a;
    margin-top: 0.2rem;
}

/* Make SEO deltas match the blue chart */
.seo-variant .ads-metric-delta {
    color: #42a5f5;
}

/* Make Google Ads deltas match the orange chart */
.google-variant .ads-metric-delta {
    color: #42a5f5;
}

/* Chart area */
.ads-chart-wrap {
    position: relative;
    background: var(--dark-primary, #0f1419);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-md, 8px);
    padding: 0.75rem 1rem;
}

.ads-chart-title {
    font-family: var(--font-family, 'Inter', sans-serif);
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-secondary, #8a94a0);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.5rem;
}

.ads-chart-svg {
    width: 100%;
    height: 120px;
    display: block;
}

/* Animated chart line draw-in */
/* ── Dashboard Animations ──────────────────────────────
   Managed entirely by ads-section.js via GSAP.
   ─────────────────────────────────────────────────────── */

/* Metrics and copy start visible — GSAP will handle initial fade/slide */
.ads-metric {
    opacity: 1;
    transform: none;
}

/* Copy also fades in */
.ads-copy>* {
    opacity: 1;
    transform: none;
}

.sem-section.in-view .ads-copy>*:nth-child(3) {
    transition-delay: 0.25s;
}

.sem-section.in-view .ads-copy>*:nth-child(4) {
    transition-delay: 0.35s;
}

.sem-section.in-view .ads-copy>*:nth-child(5) {
    transition-delay: 0.45s;
}

/* ── Responsive ───────────────────────────────────────── */
@media (max-width: 900px) {
    .ads-slide {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

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

}

@media (max-width: 480px) {
    .sem-section {
        padding: 3rem 1rem;
    }

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

    .ads-stats {
        display: none;
    }
}