/* =========================================
   AGGRESSIVE MELTDOWNS LANDING PAGE
   /free/aggressive-meltdowns/
   ========================================= */

/* Page-specific variables */
:root {
    --hero-bg: var(--delft-blue);
    --hero-text: var(--white);
    --section-padding: 80px 0;
    --section-padding-mobile: 48px 0;
    --cta-bg: #FDBD0D;
    --cta-text: #1e293b;
    --cta-hover: #e5aa00;
}

/* ─────────────────────────────────────
   LAYOUT
   ───────────────────────────────────── */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ─────────────────────────────────────
   HERO SECTION
   ───────────────────────────────────── */
.hero {
    background-image: url('https://calmthechaos.co/wp-content/uploads/2025/12/family-calm-connection-aggressive-meltdowns-plan.png');
    background-size: cover;
    background-position: left center;
    background-repeat: repeat;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 24px;
}

.hero-content-box {
    background: rgba(34, 55, 89, 0.94);
    color: var(--white);
    padding: 60px 80px;
    max-width: 700px;
    text-align: center;
    border-radius: var(--radius-md);
}

.hero h1 {
    font-family: 'IvyPresto Display', Georgia, serif;
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 24px;
    color: var(--white);
}

.hero-subhead {
    font-family: 'Europa', sans-serif;
    font-size: clamp(1rem, 2vw, 1.2rem);
    line-height: 1.6;
    margin-bottom: 40px;
    opacity: 0.95;
    color: var(--white);
}

.btn-hero {
    display: inline-block;
    background: #B80077;
    color: var(--white);
    font-family: 'Europa', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    padding: 18px 40px;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    transition: all var(--transition-smooth);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-hero:hover {
    background: #9a0064;
    transform: translateY(-2px);
}

/* ─────────────────────────────────────
   CTA BUTTONS
   ───────────────────────────────────── */
.btn-primary {
    display: inline-block;
    background: var(--cta-bg);
    color: var(--cta-text);
    font-family: 'Europa', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    padding: 18px 40px;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    transition: all var(--transition-smooth);
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.btn-primary:hover {
    background: var(--cta-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.btn-large {
    font-size: 1.25rem;
    padding: 22px 50px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cta-subtext {
    margin-top: 16px;
    font-size: 0.95rem;
    color: var(--paynes-gray);
    font-style: italic;
}

/* ─────────────────────────────────────
   SOCIAL PROOF LOGOS
   ───────────────────────────────────── */
.social-proof {
    background: #306373;
    padding: 30px 0;
}

.featured-in {
    text-align: center;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--white);
    margin-bottom: 20px;
    opacity: 0.8;
}

.logo-row {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 24px 32px;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo-row img {
    height: 80px;
    width: auto;
    opacity: 0.85;
    filter: brightness(0) invert(1);
    transition: opacity 0.2s ease;
}

.logo-row img:hover {
    opacity: 1;
}

/* ─────────────────────────────────────
   EMPATHY SECTION
   ───────────────────────────────────── */
.empathy {
    background: var(--white);
    padding: var(--section-padding);
}

.empathy h2 {
    font-family: 'IvyPresto Display', Georgia, serif;
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    color: var(--charcoal);
    text-align: left;
    margin-bottom: 40px;
}

.empathy-content {
    max-width: 700px;
    text-align: left;
}

.empathy-content p {
    font-family: 'Europa', sans-serif;
    font-size: 1.15rem;
    line-height: 1.8;
    color: var(--charcoal);
    margin-bottom: 20px;
}

.empathy-content .highlight {
    font-size: 1.3rem;
    color: var(--charcoal);
    margin: 32px 0;
}

/* ─────────────────────────────────────
   WHAT'S INSIDE SECTION
   ───────────────────────────────────── */
.whats-inside {
    background: var(--white);
    padding: var(--section-padding);
    text-align: left;
}

.whats-inside h2 {
    font-family: 'IvyPresto Display', Georgia, serif;
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    color: var(--charcoal);
    margin-bottom: 50px;
    text-align: center;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-bottom: 50px;
}

.feature-card {
    background: #f0f4f8;
    padding: 30px;
    border-radius: var(--radius-md);
    text-align: left;
}

.feature-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    display: block;
}

.feature-card h3 {
    font-family: 'Europa', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--charcoal);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
}

.feature-card p {
    font-family: 'Europa', sans-serif;
    font-size: 1rem;
    line-height: 1.7;
    color: var(--charcoal);
}

.whats-inside .btn-primary {
    background: #B80077;
    color: var(--white);
    display: block;
    margin: 0 auto;
    text-align: center;
}

.whats-inside .btn-primary:hover {
    background: #9a0064;
}

/* ─────────────────────────────────────
   TESTIMONIALS SECTIONS
   ───────────────────────────────────── */
.testimonials {
    background: var(--cream);
    padding: var(--section-padding);
    text-align: center;
}

.testimonials-dark {
    background: var(--white);
}

.testimonials-dark h2 {
    color: var(--delft-blue);
}

.testimonials h2 {
    font-family: 'IvyPresto Display', Georgia, serif;
    font-size: clamp(1.6rem, 3.5vw, 2.2rem);
    color: var(--delft-blue);
    margin-bottom: 40px;
}

.testimonial-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

.testimonial-img {
    max-width: 600px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
}

.testimonial-img-large {
    max-width: 600px;
    width: 100%;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

/* ─────────────────────────────────────
   HOW IT WORKS SECTION
   ───────────────────────────────────── */
.how-it-works {
    background: var(--white);
    padding: var(--section-padding);
}

.how-it-works h2 {
    font-family: 'IvyPresto Display', Georgia, serif;
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    color: var(--delft-blue);
    text-align: center;
    margin-bottom: 50px;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.step {
    display: flex;
    flex-direction: column;
    padding: 30px;
    border-radius: 15px;
}

.step:nth-child(1) {
    background: #d6e6f0;
}

.step:nth-child(2) {
    background: #fcf5d6;
}

.step:nth-child(3) {
    background: #e8e8e8;
}

.step-icon {
    width: 120px;
    height: 120px;
    margin: 0 auto 20px;
    display: block;
}

.step-content {
    text-align: left;
}

.step-label {
    font-family: 'Europa', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--delft-blue);
    text-align: center;
    display: block;
}

.step-content h3 {
    font-family: 'Europa', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--delft-blue);
    margin: 0 0 16px;
    text-align: center;
}

.step-content p {
    font-family: 'Europa', sans-serif;
    font-size: 1rem;
    line-height: 1.7;
    color: var(--charcoal);
    text-align: left;
}

/* ─────────────────────────────────────
   TRANSFORMATION SECTION
   ───────────────────────────────────── */
.transformation {
    background: linear-gradient(135deg, #f8f6f2 0%, var(--cream) 100%);
    padding: var(--section-padding);
}

.transform-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.transformation h2 {
    font-family: 'IvyPresto Display', Georgia, serif;
    font-size: clamp(1.6rem, 3.5vw, 2.2rem);
    color: var(--delft-blue);
    margin-bottom: 24px;
}

.transform-intro {
    font-family: 'Europa', sans-serif;
    font-size: 1.1rem;
    color: var(--charcoal);
    margin-bottom: 20px;
}

.transform-list {
    list-style: none;
    padding: 0;
    margin: 0 0 30px 0;
}

.transform-list li {
    font-family: 'Europa', sans-serif;
    font-size: 1.2rem;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.transform-list .before {
    color: var(--paynes-gray);
    text-decoration: line-through;
    opacity: 0.7;
}

.transform-list .arrow {
    color: var(--moonstone);
    font-weight: bold;
}

.transform-list .after {
    color: var(--delft-blue);
    font-weight: 700;
}

.transform-content p {
    font-family: 'Europa', sans-serif;
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--charcoal);
    margin-bottom: 16px;
}

.transform-image img {
    width: 100%;
    border-radius: 15px;
    box-shadow: var(--shadow-card);
}

/* ─────────────────────────────────────
   IMAGINE THIS SECTION
   ───────────────────────────────────── */
.imagine {
    background: var(--white);
    padding: var(--section-padding);
    text-align: center;
}

.imagine h2 {
    font-family: 'IvyPresto Display', Georgia, serif;
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    color: var(--delft-blue);
    margin-bottom: 30px;
}

.imagine-content {
    max-width: 700px;
    margin: 0 auto 40px;
}

.imagine-content p {
    font-family: 'Europa', sans-serif;
    font-size: 1.15rem;
    line-height: 1.8;
    color: var(--charcoal);
    margin-bottom: 16px;
}

.imagine-content .highlight {
    font-size: 1.3rem;
    color: var(--delft-blue);
    font-weight: 600;
    margin-top: 30px;
}

.imagine-image {
    max-width: 500px;
    margin: 0 auto 40px;
}

.imagine-image img {
    width: 100%;
    border-radius: 15px;
    box-shadow: var(--shadow-card);
}

.imagine .btn-primary {
    background: #B80077;
    color: var(--white);
}

.imagine .btn-primary:hover {
    background: #9a0064;
}

/* ─────────────────────────────────────
   FINAL TESTIMONIAL
   ───────────────────────────────────── */
.final-testimonial {
    background: var(--white);
    padding: 60px 0;
    text-align: center;
}

.final-testimonial .container {
    display: flex;
    justify-content: center;
}

/* ─────────────────────────────────────
   FOOTER
   ───────────────────────────────────── */
.footer {
    background: var(--white);
    padding: 40px 0;
    text-align: center;
    border-top: 1px solid var(--platinum);
}

.footer p {
    font-family: 'Europa', sans-serif;
    font-size: 0.9rem;
    color: var(--paynes-gray);
}

/* ─────────────────────────────────────
   RESPONSIVE
   ───────────────────────────────────── */
@media (max-width: 768px) {
    /* Hero */
    .hero {
        min-height: auto;
        padding: 40px 16px;
        background-position: center center;
    }

    .hero-content-box {
        padding: 32px 20px;
        max-width: 100%;
    }

    .hero h1 {
        font-size: 1.6rem;
    }

    .hero-subhead {
        font-size: 1rem;
        margin-bottom: 24px;
    }

    .hero-subhead br {
        display: none;
    }

    .btn-hero {
        padding: 14px 28px;
        font-size: 0.95rem;
        width: 100%;
    }

    /* Social Proof - 3x2 grid on mobile */
    .social-proof {
        padding: 24px 0;
    }

    .logo-row {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 16px 12px;
        max-width: 320px;
        padding: 0 16px;
    }

    .logo-row img {
        height: 50px;
        width: auto;
        justify-self: center;
    }

    /* Features Grid - Stack to 1 column */
    .features-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .feature-card {
        padding: 24px 20px;
    }

    .feature-icon {
        width: 60px;
        height: 60px;
    }

    /* Steps Grid - Stack to 1 column */
    .steps-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .step {
        padding: 24px 20px;
    }

    .step-icon {
        width: 80px;
        height: 80px;
    }

    /* Transformation */
    .transform-layout {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .transform-image {
        order: -1;
    }

    .transform-image img {
        max-width: 300px;
        margin: 0 auto;
        display: block;
    }

    /* Testimonials - Responsive images */
    .testimonial-img,
    .testimonial-img-large {
        max-width: 100%;
        width: 100%;
    }

    /* Imagine section */
    .imagine-image {
        max-width: 280px;
        margin: 0 auto 30px;
    }

    /* Buttons */
    .btn-primary {
        padding: 14px 28px;
        font-size: 0.95rem;
    }

    .btn-large {
        padding: 16px 32px;
        font-size: 1rem;
        width: 100%;
    }

    /* Section padding */
    section {
        padding: var(--section-padding-mobile);
    }

    /* Empathy */
    .empathy h2 {
        text-align: center;
    }

    .empathy-content {
        text-align: center;
    }
}

/* ─────────────────────────────────────
   QUIZ MODAL
   ───────────────────────────────────── */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.ctc-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s, visibility 0.3s;
}

.ctc-modal[aria-hidden="true"] {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.ctc-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
}

.ctc-modal-content {
    position: relative;
    background: var(--white);
    border-radius: 16px;
    width: 90%;
    max-width: 650px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.ctc-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    max-width: 32px;
    max-height: 32px;
    padding: 0;
    border: none;
    background: rgba(255, 255, 255, 0.9) !important;
    border-radius: 50% !important;
    font-size: 20px;
    line-height: 32px;
    text-align: center;
    cursor: pointer;
    color: #223759 !important;
    z-index: 100;
    transition: background 0.2s, transform 0.2s;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1;
}

.ctc-modal-close:hover {
    background: #fff !important;
    transform: scale(1.05);
}

#ctc-quiz-container {
    padding: 0;
}

/* Override quiz widget styles for modal */
#ctc-quiz-container .ctc-quiz-widget {
    box-shadow: none !important;
    border-radius: 16px !important;
    overflow: hidden;
    margin: 0 !important;
    max-width: none !important;
}

/* ── Header: Navy CTC branded ── */
#ctc-quiz-modal #ctc-quiz-container .ctc-quiz-header,
.ctc-modal-content #ctc-quiz-container .ctc-quiz-header,
#ctc-quiz-container .ctc-quiz-header,
.ctc-quiz-header {
    padding: 24px 48px 20px 24px !important;
    border-radius: 16px 16px 0 0 !important;
    margin: -24px -24px 24px !important;
    background-color: #223759 !important;
    background: #223759 !important;
}

/* Hide quiz name — question h3 replaces it */
#ctc-quiz-modal #ctc-quiz-container .ctc-quiz-header h2,
.ctc-modal-content #ctc-quiz-container .ctc-quiz-header h2,
#ctc-quiz-container .ctc-quiz-header h2,
.ctc-quiz-header h2,
.ctc-quiz-header .quiz-title,
#ctc-quiz-container h2 {
    display: none !important;
}

[style*="background"] .ctc-quiz-header {
    background: #223759 !important;
}

/* Progress bar — teal, inside navy header */
#ctc-quiz-container .ctc-quiz-progress {
    height: 4px !important;
    background: rgba(255,255,255,0.3) !important;
    border-radius: 2px !important;
    margin: 16px 0 0 !important;
}

#ctc-quiz-container .ctc-quiz-progress-bar {
    background: #5BA4A4 !important;
    border-radius: 2px !important;
}

/* ── Question title: white, inside navy header visually ── */
#ctc-quiz-container .ctc-quiz-question h3 {
    text-align: center !important;
    background: #223759 !important;
    color: #ffffff !important;
    margin: -24px -24px 0 !important;
    padding: 20px 24px 8px !important;
    font-size: 20px !important;
    line-height: 1.3 !important;
    font-weight: 600 !important;
}

/* Subtitle container spans navy + white */
#ctc-quiz-container .ctc-quiz-question .subtitle {
    text-align: center !important;
    margin: 0 -24px 24px !important;
    padding: 0 !important;
    white-space: normal !important;
}

/* First line: in the navy header */
#ctc-quiz-container .ctc-quiz-question .subtitle .subtitle-header {
    display: block;
    background: #223759;
    color: rgba(255,255,255,0.85);
    padding: 0 24px 20px;
    font-size: 14px;
}

/* Second part: in the white section */
#ctc-quiz-container .ctc-quiz-question .subtitle .subtitle-body {
    display: block;
    padding: 24px 24px 0;
    color: #1a202c;
    font-size: 15px;
}

#ctc-quiz-container .ctc-quiz-question .subtitle .subtitle-body strong {
    font-size: 18px;
    color: #1a202c;
}

/* ── Option buttons ── */

/* Normal weight on body text, bold only on <strong> prefix */
#ctc-quiz-container .ctc-quiz-option {
    font-weight: 400 !important;
    position: relative;
    padding-left: 44px !important;
    text-align: left !important;
}

/* Radio circle indicator */
#ctc-quiz-container .ctc-quiz-option::before {
    content: '';
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    border: 2px solid #cbd5e0;
    border-radius: 50%;
    background: white;
    transition: all 0.2s ease;
}

/* Selected radio — filled circle */
#ctc-quiz-container .ctc-quiz-option.selected::before {
    border-color: #5BA4A4;
    background: #5BA4A4;
    box-shadow: inset 0 0 0 3px white;
}

/* ── Email capture step styling ── */

/* Trust text below submit button */
#ctc-quiz-container .ctc-quiz-email-form::after {
    content: "No credit card required. We\2019ll also send you helpful strategies for handling aggressive moments. Unsubscribe anytime.";
    display: block;
    margin-top: 12px;
    font-size: 12px;
    font-style: italic;
    color: #718096;
    line-height: 1.5;
    text-align: center;
}

/* Hide prev/next nav buttons (auto-advance handles navigation) */
#ctc-quiz-container .ctc-quiz-nav {
    display: none !important;
}

@media (max-width: 480px) {
    .hero-content-box {
        padding: 24px 16px;
    }

    .hero h1 {
        font-size: 1.4rem;
    }

    .container {
        padding: 0 16px;
    }

    .feature-card h3,
    .step-content h3 {
        font-size: 1.1rem;
    }

    .transform-list li {
        font-size: 1rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    /* Modal responsive */
    .ctc-modal-content {
        width: 95%;
        max-height: 95vh;
        border-radius: 12px;
    }

    .ctc-modal-close {
        top: 8px;
        right: 8px;
    }
}
