/* 
 * File: sections.css
 * Author: BIGSOFT, LDA
 * Description: Styles for content sections (Benefits, Steps, Proof, Pricing, Forms, Modals).
 */
/* --- SECTION STYLES (BENEFITS, STEPS, PROOF, PRICING, FORM) --- */

/* Base setup for transitions */
.section {
    position: relative;
    overflow: hidden; /* Ensure pseudo-elements stay within bounds */
}

/* Gradient Transitions between sections */
/* Dark (#000000) -> Dark Light (#0C0C0C) */
.transition-dark-to-light::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 80px; 
    pointer-events: none;
    /* Blend from the next background color (light) to transparent on the current background (dark) */
    background: linear-gradient(to top, var(--color-background-light) 0%, rgba(0, 0, 0, 0) 100%);
    z-index: 1;
}

/* Dark Light (#0C0C0C) -> Dark (#000000) */
.transition-light-to-dark::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 80px;
    pointer-events: none;
    /* Blend from the next background color (dark) to transparent on the current background (light) */
    background: linear-gradient(to top, var(--color-background-dark) 0%, rgba(12, 12, 12, 0) 100%);
    z-index: 1; 
}


/* 2. BENEFITS SECTION */
.benefits-section {
    background-color: var(--color-background-dark);
}

.benefits-section h2 {
    color: var(--color-text); /* Section title in white */
}

.benefits-section p:first-of-type {
    margin-bottom: var(--spacing-md);
}

.benefits-visual {
    margin: var(--spacing-lg) auto var(--spacing-xl);
    max-width: 800px;
    padding: 20px;
    background: var(--color-background-dark);
    border-radius: 12px;
    box-shadow: 0 0 30px rgba(255, 68, 68, 0.15);
}

.optometry-visual {
    width: 100%;
    height: auto;
    object-fit: contain;
    /* Add a subtle animation to the image itself */
    animation: float-image 4s ease-in-out infinite;
}

@keyframes float-image {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.benefits-grid {
    display: grid;
    gap: var(--spacing-md);
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); /* Adjusted slightly for mobile flexibility */
    margin-top: var(--spacing-lg);
}

.benefit-card {
    background: var(--color-background-light); /* Dark card background */
    padding: var(--spacing-md);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5); /* Prominent shadow on dark background */
    border: 1px solid rgba(255, 68, 68, 0.2); /* Subtle red border */
    height: 100%;
    transition: transform 0.3s;
    text-align: left; /* Adjust text alignment for benefit cards */
}

.benefit-card:hover {
    transform: translateY(-5px);
}

.benefit-icon {
    width: 70px; /* Slightly larger icon */
    height: 70px;
    margin-bottom: var(--spacing-sm);
    display: none; /* Hide icons designed for light background */
}

.benefit-card h3 {
    color: var(--color-primary); /* Red titles */
    margin-bottom: 5px;
}

.benefit-card p {
    color: rgba(230, 241, 255, 0.8);
    margin-bottom: 0;
}

/* 3. HOW IT WORKS / STEPS */
.steps-section {
    background-color: var(--color-background-light); /* Changed background to Dark Light */
    color: var(--color-text);
}

.steps-section h2 {
    color: var(--color-text);
}

.steps-grid {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
}

.step {
    text-align: left;
    display: flex;
    gap: var(--spacing-md);
    background: var(--color-background-dark); /* Darker background for steps */
    padding: var(--spacing-md);
    border-radius: 8px;
    border: 1px solid var(--color-secondary);
    box-shadow: 0 0 15px rgba(255, 68, 68, 0.4); /* Highlight the steps */
    transition: transform 0.3s, box-shadow 0.3s;
}

.step:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(255, 68, 68, 0.6);
}

.step-number {
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--color-primary); /* Red numbers */
    width: 50px;
    flex-shrink: 0;
    text-align: center;
}

.step-content {
    flex-grow: 1;
}

.step-content h3 {
    text-align: left;
    margin-top: 0;
    color: var(--color-primary);
}

.step-content p {
    text-align: left;
    margin-bottom: 0;
    color: rgba(230, 241, 255, 0.8);
}

/* 4. SOCIAL PROOF */
.proof-section {
    background-color: var(--color-background-dark);
    padding-bottom: var(--spacing-xl);
}

/* 5. PRICING SECTION - New Hero Background Styling */
.pricing-hero-bg {
    background: url('/ifoaa_hero_background.png') center center/cover no-repeat;
    background-color: var(--color-background-dark); 
    position: relative;
    color: var(--color-text); 
    padding: calc(var(--spacing-xl) * 1.5) 0; /* Extra vertical padding for impact */
}

.pricing-hero-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.85); /* Stronger dark overlay */
    z-index: 1;
}

.pricing-hero-bg .container {
    position: relative;
    z-index: 2;
}

.pricing-hero-bg h2, 
.pricing-hero-bg .pricing-intro {
    color: var(--color-text);
}

.proof-header {
    max-width: 700px;
    margin: 0 auto var(--spacing-lg);
    text-align: left; /* Aligns header text to the left */
}

.proof-header h2 {
    font-size: clamp(1.8rem, 5vw, 3rem);
    margin-bottom: 5px;
}

.proof-header span {
    color: var(--color-primary);
}

.proof-subtext {
    font-size: 1rem;
    color: rgba(230, 241, 255, 0.7);
    margin-bottom: 0;
}

/* 5. PRICING SECTION */
.pricing-section {
    /* Base pricing section styles - background is defined by pricing-hero-bg when used */
}

.pricing-intro {
    margin-bottom: var(--spacing-xl);
    font-size: 1.1rem;
}

.pricing-grid {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.plan-card {
    background: #FFFFFF; /* White background for non-featured cards */
    color: #000000;
    padding: var(--spacing-lg) var(--spacing-md);
    border-radius: 18px; /* Rounded corners */
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    text-align: center;
    transition: transform 0.3s;
    border: 3px solid transparent; /* Contour effect base */
}

.plan-card h3 {
    color: #333; /* Dark title */
    text-transform: uppercase;
    font-size: 1.5rem;
    margin-bottom: 0;
}

.plan-card .card-subtitle {
    display: block;
    font-size: 0.9rem;
    font-weight: 400;
    margin-top: 5px;
    color: #777;
}

.plan-card.featured {
    /* Mimicking the gradient/contour effect using Red/Yellow */
    background: linear-gradient(145deg, var(--color-primary), #CC0000); /* Deep Red Gradient */
    border: 3px solid var(--color-secondary); /* Yellow contour */
    color: var(--color-text);
    transform: scale(1.05);
    z-index: 10;
    box-shadow: 0 15px 30px rgba(255, 68, 68, 0.6);
    
    /* Optimization for smaller cards */
    padding-bottom: calc(var(--spacing-lg) + 10px);
}

.plan-card.featured h3, 
.plan-card.featured .card-subtitle {
    color: var(--color-text);
}

.price {
    font-size: 2.5rem; /* Reduced price size for smaller card */
    font-weight: 900;
    color: var(--color-primary); /* Red price for normal cards */
    margin: var(--spacing-sm) 0 5px; /* Reduced margin */
    line-height: 1.2;
}

.plan-card.featured .price {
    color: var(--color-secondary); /* Yellow price for featured card */
}

.price .currency {
    font-size: 1.2rem;
    font-weight: 600;
    margin-right: 5px;
    color: inherit; /* Inherit from .price or .plan-card */
}

.price .period {
    display: block;
    font-size: 0.8rem;
    font-weight: normal;
    color: #777; 
    margin-top: 5px;
}

.plan-card.featured .period {
    color: rgba(255, 255, 255, 0.8);
}

/* New style for additional price note on PRO card */
.price-note {
    font-size: 0.9rem;
    font-weight: 500;
    margin: 5px 0 var(--spacing-md);
    color: #555;
}

.plan-card.featured .price-note {
    color: rgba(255, 255, 255, 0.7);
}


.plan-card ul {
    list-style: none;
    text-align: center;
    margin: 0;
    padding: 0;
    min-height: 0; /* Ensures removal works visually */
}

.plan-card li {
    padding: 8px 0;
    border-bottom: 1px solid #EEE; 
    color: #333;
    font-weight: 500;
}

.plan-card.featured li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--color-text);
}

.plan-card li.faded {
    color: #AAA; /* Dim features not included */
    opacity: 0.6;
}

.plan-card.featured li.faded {
    color: var(--color-text);
    opacity: 0.4;
}

.btn-pricing {
    min-width: 250px;
    margin-top: 10px;
    /* Primary pricing CTA inherits pulse-cta from .btn */
}

.plan-card.start .btn-pricing,
.plan-card.expert .btn-pricing {
    /* Secondary buttons using Yellow/Gold accent */
    background-color: var(--color-secondary); 
    color: #000;
    border: none;
    animation: pulse-cta-secondary 3s infinite ease-in-out; /* Apply subtle secondary animation */
    box-shadow: 0 8px 15px rgba(255, 196, 0, 0.4);
}

.plan-card.start .btn-pricing:hover,
.plan-card.expert .btn-pricing:hover {
    background-color: #FFD433;
    color: #000;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(255, 196, 0, 0.6);
    animation: none; /* Stop pulse on hover */
}

/* 6. FORM SECTION */
.form-section {
    background-color: var(--color-background-dark);
    padding-top: var(--spacing-xl);
}

.lead-form {
    max-width: 600px;
    margin: var(--spacing-lg) auto;
    padding: var(--spacing-lg);
    border: 2px solid var(--color-primary); 
    border-radius: 12px;
    background: var(--color-background-light); /* Darker form background */
    text-align: left;
}

.form-group {
    margin-bottom: var(--spacing-md);
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
    color: var(--color-text); 
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group textarea,
.form-group input[type="tel"] { /* Added tel input */
    width: 100%;
    padding: 12px;
    border: 1px solid #334;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s;
    background-color: var(--color-background-dark); /* Inputs are darker */
    color: var(--color-text);
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--color-primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 68, 68, 0.2);
}

.checkbox-group {
    display: flex;
    align-items: flex-start;
    margin-top: 5px; /* Adjust spacing */
}

.checkbox-group input[type="checkbox"] {
    width: auto;
    margin-right: 10px;
    height: 18px;
    min-width: 18px; /* Ensure input size for touch targets */
    accent-color: var(--color-primary); /* Style the checkbox itself */
    flex-shrink: 0;
    margin-top: 4px; /* Align with text baseline */
}

.checkbox-group label {
    margin-bottom: 0;
    font-weight: 400;
    font-size: 0.95rem;
    line-height: 1.4;
    cursor: pointer;
}

.btn-submit {
    width: 100%;
}

/* --- MODAL STYLES (INSCRIPTION FORM) --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--color-background-light);
    color: var(--color-text);
    padding: var(--spacing-lg);
    border-radius: 12px;
    max-width: 90%;
    width: 500px;
    position: relative;
    box-shadow: 0 5px 25px rgba(255, 68, 68, 0.4);
    transform: translateY(-50px);
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    max-height: 90vh;
    overflow-y: auto;
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-content h2 {
    color: var(--color-primary);
    margin-bottom: var(--spacing-sm);
}

.modal-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--color-text);
    cursor: pointer;
    line-height: 1;
    opacity: 0.7;
    padding: 10px;
    transition: opacity 0.2s;
}

.modal-close-btn:hover {
    opacity: 1;
}

.modal-form {
    padding: 0; /* Override padding from lead-form inside modal */
    border: none;
    background: transparent;
}


/* DESKTOP/TABLET SECTION OPTIMIZATION (min-width: 768px) */
@media (min-width: 768px) {

    /* Social Proof Desktop Adjustments */
    .proof-section .container {
        display: grid;
        grid-template-columns: 1fr 1fr;
        align-items: center;
        text-align: left;
        gap: var(--spacing-lg);
    }
    
    /* Benefits Grid - Desktop */
    .benefits-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--spacing-lg);
    }

    /* Steps Grid - Desktop */
    .steps-grid {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: var(--spacing-lg);
    }
    .step {
        display: block;
        flex: 1;
        text-align: center;
        padding: var(--spacing-md);
    }
    .step-number {
        font-size: 3.5rem;
        width: auto;
        margin-bottom: var(--spacing-sm);
    }
    .step h3, .step p {
        text-align: center;
    }

    /* Pricing Grid - Desktop */
    .pricing-grid {
        flex-direction: row;
        justify-content: center;
        align-items: stretch; /* Ensures cards are the same height */
    }

    .plan-card {
        flex: 1;
        max-width: 320px;
        margin: 0 var(--spacing-sm);
        padding: var(--spacing-lg) var(--spacing-md);
    }

    .plan-card.featured {
        margin-top: -20px;
        margin-bottom: -20px;
        padding-top: calc(var(--spacing-lg) + 20px);
        padding-bottom: calc(var(--spacing-lg) + 20px);
    }

    .btn-submit {
        max-width: 100%; /* Full width within form container */
        display: block;
        margin: 0 auto;
    }

    /* Desktop optimization for modal positioning */
    .modal-overlay {
        top: calc(50vh - 250px);
        left: calc(50vw - 250px);
        width: 500px;
        height: 500px;
    }
}

/* --- NOTIFICATION AREA (Toast/Banner) --- */
.notification-area {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 15px 20px;
    color: #000;
    z-index: 3000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transform: translateY(-100%);
    transition: transform 0.4s ease-out;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.notification-area.active {
    transform: translateY(0);
}

.notification-area.success {
    background-color: var(--color-secondary); /* Yellow/Gold for success */
}

.notification-area.error {
    background-color: var(--color-primary); /* Red for error */
}

.notification-area p {
    margin: 0;
    font-weight: 700;
    font-size: 1rem;
}

.notification-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #000;
    cursor: pointer;
    line-height: 1;
    opacity: 0.8;
    transition: opacity 0.2s;
    padding: 0 5px;
}

.notification-close:hover {
    opacity: 1;
}

/* Mobile: Ensure good spacing */
@media (max-width: 767px) {
    .notification-area {
        padding: 15px 10px;
        text-align: left;
    }
    .notification-area p {
        flex-grow: 1;
        padding-right: 10px;
    }
}