/**
 * Mailing List Page Styles
 * Sustainable Practice Website - Mailing List Page
 * 
 * Nature-inspired design with glass-morphism effects
 * Preserves background image while ensuring readability
 * 
 * @version 0.1.0 - Initial mailing list page styles
 */

/* ========================================
   PAGE BACKGROUND
   ======================================== */

.mailing-list-page {
    background-image: url('/img/background-mailing.jpg') !important;
    background-size: cover !important;
    background-position: center !important;
    background-attachment: fixed !important;
    background-repeat: no-repeat !important;
    min-height: 100vh;
    /* DIAGNOSTIC: Ensure mailing list background takes precedence */
    z-index: 0;
    position: relative;
}


/* ========================================
   HERO SECTION
   ======================================== */

.mailing-list-page .hero-section {
    position: relative;
    width: 100%;
    height: fit-content;
    z-index: 1;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    /* DIAGNOSTIC: Ensure no background inheritance from base hero-section class */
    background: none !important;
    background-image: none !important;
    padding-top: 80px; /* Account for fixed header */
    padding-bottom: 2rem; /* Add bottom padding to ensure content is visible */
}

.mailing-list-page .hero-container {
    position: relative;
    width: 100%;
    max-width: 1200px;
    overflow-y: visible; /* Allow scrolling */
    overflow-x: hidden; /* Prevent horizontal overflow */
    padding: 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 0; /* Remove margin since we added padding-top to hero-section */
    box-sizing: border-box; /* Include padding in width calculation */
}

.mailing-list-page .hero-content {
    text-align: center;
    color: white;
    z-index: 2;
    position: relative;
    width: 100%;
    max-width: none; /* Override base hero-content max-width of 800px */
}

.mailing-list-page .hero-content h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 2rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
    color: white;
}

.mailing-list-page .hero-actions {
    margin: 2rem 0;
    display: flex;
    justify-content: center;
}

.join-now-btn {
    padding: 1rem 2rem;
    font-size: 1.2rem;
    font-weight: 600;
    border-radius: 50px;
    background: var(--forest-green);
    color: white;
    border: 3px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    cursor: pointer;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.join-now-btn:hover {
    background: var(--forest-green-light);
    border-color: rgba(255, 255, 255, 0.6);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.mailing-list-page .hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.1);
    z-index: -1;
}

/* ========================================
   MAILING LIST FORM IFRAME (Consolidated Styles)
   ======================================== */

.google-form-iframe {
    border: none;
    border-radius: var(--border-radius-large);
    width: 100%;
    height: 160vh !important;
    max-width: 800px; /* Match the max-width from contact-card */
    box-sizing: border-box;
    
    /* Consolidated styles from contact-card and form-container */
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(255, 255, 255, 0.2);
    padding: 3rem;
    border: 2px solid var(--forest-green);
    position: relative;
    margin: 2rem auto;
    overflow: hidden;
    
    /* Gradient border effect from contact-card::before */
    background-clip: padding-box;
}

/* ========================================
   TRUST SECTION (Now in Hero)
   ======================================== */

.mailing-list-page .hero-content .trust-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin: 2rem 0;
    max-width: 1600px;
    margin-left: auto;
    margin-right: auto;
}

.mailing-list-page .hero-content .trust-card {
    text-align: center;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius-medium);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.mailing-list-page .hero-content .trust-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    background: rgba(255, 255, 255, 0.2);
}

.mailing-list-page .hero-content .trust-icon {
    width: 64px;
    height: 64px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    margin: 0 auto 1rem auto;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.mailing-list-page .hero-content .trust-card h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: white;
    margin-bottom: 1rem;
    font-family: 'Crimson Text', serif;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.mailing-list-page .hero-content .trust-card p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

/* ========================================
   FORM SECTION
   ======================================== */

.form-section {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
    margin: 2rem 0;
    border-radius: var(--border-radius-large);
    border: 1px solid rgba(58, 90, 64, 0.1);
}

.form-section h2 {
    text-align: center;
    font-size: 2rem;
    font-weight: 600;
    color: var(--forest-green);
    margin-bottom: 2rem;
    font-family: 'Crimson Text', serif;
}

.mailing-list-page .form-section .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}


/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 1024px) {
    .mailing-list-page .hero-content .trust-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .mailing-list-page .hero-container {
        padding: 0 1rem;
    }
    
    .mailing-list-page .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .mailing-list-page .hero-content .trust-card {
        padding: 1.5rem;
    }
    
    .google-form-iframe {
        height: 1200px;
        padding: 2rem;
        margin: 1rem;
    }
}

@media (max-width: 480px) {
    .mailing-list-page .hero-content h1 {
        font-size: 2rem;
    }
    
    .join-now-btn {
        padding: 0.875rem 1.5rem;
        font-size: 1.1rem;
    }
    
    .google-form-iframe {
        height: 1200px;
        padding: 1.5rem;
        margin: 0.5rem;
    }
}

/* ========================================
   ACCESSIBILITY
   ======================================== */

/* Focus states for keyboard navigation */
.google-form-iframe:focus {
    outline: 2px solid var(--forest-green);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .google-form-iframe {
        background: rgba(255, 255, 255, 0.98);
        border: 3px solid var(--forest-green);
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .google-form-iframe {
        transition: none;
    }
    
    .trust-card {
        transition: none;
    }
    
    .trust-card:hover {
        transform: none;
    }
}

/* ========================================
   HERO SPACER
   ======================================== */

.mailing-list-page .hero-spacer {
    display: none; /* Remove hero-spacer since hero is no longer fixed */
}

/* ========================================
   MAIN CONTENT POSITIONING
   ======================================== */

.mailing-list-page main {
    position: relative;
    z-index: 1;
    margin-top: 0;
    padding-bottom: 0;
}

.mailing-list-page .content-section {
    position: relative;
    z-index: 1;
}

/* ========================================
   HEADER POSITIONING
   ======================================== */

.mailing-list-page #main-header {
    top: 0; /* Header stays at top */
}

/* ========================================
   PAGE-SPECIFIC OVERRIDES
   ======================================== */

.mailing-list-page .google-form-iframe {
    /* Ensure iframe doesn't inherit background */
    background-image: none !important;
}

.mailing-list-page .trust-section {
    border-radius: 0; /* Square corners */
    margin-bottom: 0; /* No gap before footer */
}

/* ========================================
   PRINT STYLES
   ======================================== */

@media print {
    .mailing-list-page {
        background: white;
    }
    
    .google-form-iframe {
        background: white;
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .hero-overlay {
        display: none;
    }
    
    .google-form-wrapper {
        display: none;
    }
}
