/*!
 * CSEC Design System v2.0
 * Copyright (c) 2026 Civil and Structural Engineering Consultants (Pvt) Ltd.
 * All Rights Reserved.
 */

/* --- CONTACT HERO BANNER WITH VIDEO UNDERLAY --- */
.contact-hero-section {
    position: relative;
    width: 100%;
    height: 42vh;
    min-height: 320px;
    display: flex;
    align-items: center;
    padding: 7rem 4rem 3rem 4rem;
    overflow: hidden;
    margin: 0;
    background-color: var(--fern-deep-forest);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.hero-video-underlay {
    position: absolute;
    top: -2px;
    left: -2px;
    width: calc(100% + 4px);
    height: calc(100% + 4px);
    z-index: 1;
    overflow: hidden;
    background-color: var(--fern-deep-forest);
}

.hero-video-underlay video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.65);
    display: block;
}

/* Darkening Overlay into Taupe Target Color */
.contact-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--fern-taupe);
    opacity: 0;
    transition: opacity 0.1s linear;
    z-index: 2;
}

.contact-hero-container {
    position: relative;
    z-index: 3;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

.contact-hero-title {
    font-family: var(--font-primary);
    font-size: 3.8rem;
    font-weight: 300;
    letter-spacing: -0.02em;
    color: var(--text-warm-white);
    line-height: 1.1;
}

/* Contact Hero Play/Pause Button */
.contact-hero-section .play-pause-btn {
    position: absolute;
    bottom: 2rem;
    left: 4rem;
    z-index: 10;
}

/* --- MAIN CONTACT SECTION (TAUPE BACKGROUND & DARKER BAY CARDS) --- */
.contact-main-section {
    position: relative;
    width: 100%;
    padding: 4rem 4rem 6rem 4rem;
    background-color: var(--fern-taupe);
    color: var(--fern-dark-green);
    z-index: 20;
    box-sizing: border-box;
}

.contact-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    box-sizing: border-box;
}

/* TOP GRID: Form Left + Map Right */
.contact-top-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 2.5rem;
    align-items: stretch;
    width: 100%;
    box-sizing: border-box;
}

/* Contact Form Card (Dark Warm Brown) */
.contact-form-card {
    background-color: var(--card-dark-brown);
    border-radius: 16px;
    padding: 2.8rem;
    color: var(--text-warm-white);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    gap: 1.8rem;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.contact-form-card:hover {
    transform: scale(1.01) translateY(-4px);
}

.contact-card-title {
    font-family: var(--font-primary);
    font-size: 2.2rem;
    font-weight: 300;
    letter-spacing: -0.01em;
    color: var(--text-warm-white);
}

/* Status Alert Messages */
.form-alert-box {
    padding: 1rem 1.4rem;
    border-radius: 8px;
    font-size: 0.95rem;
    line-height: 1.5;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 0.5rem;
}

.alert-success {
    background: rgba(164, 214, 94, 0.15);
    border: 1px solid var(--lime-green);
    color: var(--lime-green);
}

.alert-error {
    background: rgba(255, 77, 77, 0.15);
    border: 1px solid var(--danger-red);
    color: #ff8080;
}

/* Honeypot Field */
.honeypot-field {
    display: none !important;
    visibility: hidden !important;
    position: absolute !important;
    left: -9999px !important;
}

/* Form Groups & Inputs */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.3rem;
    width: 100%;
    box-sizing: border-box;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    width: 100%;
    box-sizing: border-box;
}

.form-group label {
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-warm-taupe);
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    padding: 0.85rem 1.1rem;
    font-size: 0.98rem;
    color: var(--text-warm-white);
    font-family: var(--font-primary);
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.35);
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--lime-green);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 0 10px var(--lime-neon-glow);
}

/* Cloudflare Turnstile Wrapper */
.turnstile-wrapper {
    margin: 0.5rem 0;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

/* Submit Button */
.contact-submit-btn {
    align-self: flex-start;
    margin-top: 0.5rem;
    background: transparent;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 1.2rem;
    cursor: pointer;
    transition: transform 0.4s cubic-bezier(0.65, 0, 0.35, 1);
}

.submit-text {
    font-size: 1.05rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-weight: 600;
    color: var(--lime-green);
}

.submit-arrow-circle {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    background-color: var(--lime-green);
    box-shadow: 0 0 12px rgba(164, 214, 94, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--fern-dark-green);
    font-size: 1.3rem;
    transition: transform 0.4s cubic-bezier(0.65, 0, 0.35, 1), box-shadow 0.4s ease;
}

.contact-submit-btn:hover {
    transform: scale(1.05);
}

.contact-submit-btn:hover .submit-arrow-circle {
    transform: scale(1.12);
    box-shadow: 0 0 20px rgba(164, 214, 94, 0.7);
}

.contact-submit-btn:hover .submit-arrow-circle i {
    transform: translateX(4px);
}

/* Mini-Map Card (Right) */
.map-card {
    width: 100%;
    height: 100%;
    min-height: 480px;
    border-radius: 16px;
    overflow: hidden;
    border: 2px solid rgba(164, 214, 94, 0.3);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12);
    box-sizing: border-box;
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), border-color 0.4s ease, box-shadow 0.4s ease;
}

.map-card:hover {
    transform: scale(1.015);
    border-color: var(--lime-green);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.18);
}

/* BOTTOM ROW: Get In Touch Card */
.contact-info-card {
    width: 100%;
    background-color: var(--card-dark-brown);
    border-radius: 16px;
    padding: 2.8rem;
    color: var(--text-warm-white);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    gap: 1.8rem;
    box-sizing: border-box;
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.contact-info-card:hover {
    transform: scale(1.01) translateY(-2px);
}

.info-card-title {
    font-family: var(--font-primary);
    font-size: 2.2rem;
    font-weight: 300;
    color: var(--text-warm-white);
}

.info-intro-text {
    font-size: 1.05rem;
    line-height: 1.75;
    color: var(--text-warm-muted);
    font-weight: 300;
    max-width: 900px;
}

/* Stretched 4-Column Info Grid */
.info-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-top: 0.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.info-icon-box {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(164, 214, 94, 0.12);
    border: 1px solid rgba(164, 214, 94, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--lime-green);
    font-size: 1.15rem;
    flex-shrink: 0;
}

.info-text h4 {
    font-family: var(--font-primary);
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-warm-white);
    margin-bottom: 0.3rem;
}

.info-text p, 
.info-text a {
    font-size: 0.9rem;
    color: var(--text-warm-taupe);
    text-decoration: none;
    line-height: 1.5;
    transition: color 0.3s ease;
}

.info-text a:hover {
    color: var(--lime-green);
}

/* --- TABLET RESPONSIVE BREAKPOINT --- */
@media (max-width: 1200px) {
    .contact-hero-section { padding: 6rem 2.5rem 3rem 2.5rem; }
    .contact-hero-title { font-size: 3rem; }
    .contact-main-section { padding: 3.5rem 2.5rem 5rem 2.5rem; }
    .contact-top-grid { grid-template-columns: 1fr; gap: 2.5rem; }
    .map-card { min-height: 400px; height: 400px; }
    .info-grid { grid-template-columns: repeat(2, 1fr); gap: 2rem; }
}

/* --- MOBILE SPECIFIC RESPONSIVENESS (PERFECT SYMMETRY FOR S20 FE / 360px SCREENS) --- */
@media (max-width: 600px) {
    .contact-hero-section { 
        padding: 6.5rem 1rem 2rem 1rem; 
        height: auto;
        min-height: 240px;
        box-sizing: border-box;
    }
    
    .contact-hero-container { 
        width: 100%;
        padding: 0;
    }
    
    .contact-hero-title { 
        font-size: clamp(1.75rem, 6.5vw, 2.1rem); 
        line-height: 1.15;
    }
    
    .contact-hero-section .play-pause-btn {
        bottom: 1rem;
        left: 1rem;
    }

    /* Fixed: Strict 16px symmetrical padding on left and right */
    .contact-main-section { 
        padding: 2rem 1rem 4rem 1rem; 
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        overflow-x: hidden;
    }

    .contact-container {
        width: 100%;
        max-width: 100%;
        margin: 0 auto;
        gap: 1.5rem;
        box-sizing: border-box;
    }

    .contact-top-grid {
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    /* Form Card Symmetrical Alignment */
    .contact-form-card { 
        padding: 1.8rem 1.2rem; 
        width: 100%;
        max-width: 100%;
        border-radius: 14px;
        box-sizing: border-box;
    }

    .contact-card-title {
        font-size: 1.6rem;
        line-height: 1.2;
    }

    .form-group input,
    .form-group textarea {
        padding: 0.75rem 0.9rem;
        font-size: 0.92rem;
        box-sizing: border-box;
    }

    /* Fixed: Scale Turnstile widget so it never bursts past 280px container width */
    .turnstile-wrapper {
        width: 100%;
        max-width: 100%;
        overflow: hidden;
        display: flex;
        justify-content: flex-start;
        margin: 0.4rem 0;
        box-sizing: border-box;
    }

    .cf-turnstile {
        transform: scale(0.86); /* Scales 300px down to 258px */
        transform-origin: 0 0;
        margin-bottom: -10px;
    }

    /* Map Card */
    .map-card { 
        width: 100%;
        max-width: 100%;
        height: 280px; 
        min-height: 280px;
        border-radius: 14px;
        box-sizing: border-box;
    }

    /* Get In Touch Card */
    .contact-info-card { 
        padding: 1.8rem 1.2rem; 
        width: 100%;
        max-width: 100%;
        border-radius: 14px;
        box-sizing: border-box;
    }

    .info-card-title {
        font-size: 1.6rem;
        line-height: 1.2;
    }

    .info-intro-text {
        font-size: 0.92rem;
        line-height: 1.65;
    }

    .info-grid { 
        grid-template-columns: 1fr; 
        gap: 1.3rem; 
        padding-top: 1rem;
    }

    .info-item {
        gap: 0.8rem;
    }

    .info-icon-box {
        width: 38px;
        height: 38px;
        font-size: 1rem;
    }

    .info-text h4 {
        font-size: 0.9rem;
    }

    .info-text p,
    .info-text a {
        font-size: 0.85rem;
    }
}