/* CONTACT PAGE SPECIFIC STYLES */

main {
    padding-top: 180px;
}

#contact-hero {
    padding: 80px 8% 20px;
}

#contact-hero h1 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(40px, 6vw, 75px);
    background: linear-gradient(180deg, #fff, #94a3b8, #38bdf8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -3px;
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 40px;
    padding: 40px 8% 100px;
}

/* LEFT SIDE: INFO CARDS */
.contact-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.info-card {
    display: flex;
    align-items: center;
    gap: 25px;
    padding: 30px;
    border-radius: 24px;
    transition: 0.3s;
}

.info-card:hover {
    border-color: #38bdf8;
    background: rgba(56, 189, 248, 0.05);
}

.info-card .icon {
    font-size: 24px;
    color: #38bdf8;
    width: 50px;
    height: 50px;
    background: rgba(56, 189, 248, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
}

.info-card h3 {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--muted);
    margin-bottom: 5px;
}

.info-card p {
    font-size: 18px;
    color: #fff;
    font-weight: 600;
}

.location-box {
    margin-top: 10px;
    padding: 40px;
    border-radius: 24px;
    border-left: 4px solid #38bdf8;
    background: rgba(255, 255, 255, 0.02);
}

.location-box h3 { 
    margin-bottom: 15px; 
    color: #fff;
    font-family: 'Space Grotesk';
}

.location-box p { 
    color: var(--muted); 
    line-height: 1.8; 
}

/* RIGHT SIDE: FORM */
.contact-form-container {
    padding: 50px;
    border-radius: 32px;
}

.form-group {
    margin-bottom: 25px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

label {
    font-size: 13px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

input, select, textarea {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 15px 20px;
    border-radius: 12px;
    color: #fff;
    font-family: inherit;
    transition: 0.3s;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #38bdf8;
    background: rgba(255, 255, 255, 0.07);
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.1);
}

/* GLOBAL REUSE */
.glass {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Responsiveness for small screens */
@media (max-width: 900px) {
    .contact-wrapper {
        grid-template-columns: 1fr;
    }
}

/* =====================================================
   CONTACT PAGE MOBILE OPTIMIZATION (Max-width: 768px)
===================================================== */

@media (max-width: 768px) {
    
    /* 1. CENTER LOGO BEFORE SCROLL */
    .top-logo-bar {
        justify-content: center; /* Center the logo holder */
        height: 120px;
    }

    .logo-holder {
        margin-left: 0; /* Remove PC side margin */
        padding: 10px 30px;
    }

    .line-segment {
        display: none; /* Hide lines to prevent screen overflow */
    }

    /* 2. MOBILE DOCKING NAVBAR (iOS Style) */
    #main-nav-container {
        width: 92%;
        top: 130px;
    }

    .navbar-pill {
        padding: 10px 15px;
        gap: 15px;
        justify-content: center;
    }

    .nav-menu {
        gap: 15px;
    }

    .nav-menu a {
        font-size: 10px;
        letter-spacing: 0.5px;
    }

    /* 3. HERO SECTION */
    main {
        padding-top: 200px;
    }

    #contact-hero {
        padding: 40px 8%;
        text-align: center;
    }

    #contact-hero h1 {
        font-size: clamp(32px, 10vw, 48px);
        letter-spacing: -1.5px;
    }

    /* 4. CONTACT CONTENT WRAPPER */
    .contact-wrapper {
        grid-template-columns: 1fr; /* Stack Info Cards and Form */
        padding: 20px 5% 80px;
        gap: 30px;
    }

    /* 5. INFO CARDS & LOCATION */
    .info-card {
        padding: 20px;
        gap: 15px;
    }

    .info-card .icon {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    .info-card p {
        font-size: 16px; /* Slightly smaller for mobile fit */
    }

    .location-box {
        padding: 30px 20px;
        text-align: center;
        border-left: none;
        border-top: 3px solid #38bdf8; /* Change side border to top border for vertical flow */
    }

    /* 6. CONTACT FORM */
    .contact-form-container {
        padding: 35px 20px;
        border-radius: 24px;
    }

    .form-row {
        grid-template-columns: 1fr; /* Stack First Name / Member ID on top of each other */
        gap: 0;
    }

    input, select, textarea {
        font-size: 16px; /* Prevents iOS from auto-zooming on focus */
    }

    .btn-primary {
        width: 100%; /* Full width button for easier thumb tapping */
    }
}

/* =====================================================
   MOBILE ANIMATIONS
===================================================== */

@keyframes contactEntry {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.info-card, .contact-form-container, .location-box {
    animation: contactEntry 0.8s ease forwards;
}

/* =====================================================
   IPAD / TABLET "FIT-TO-SCREEN" FIX (769px - 1100px)
   Keeps the side-by-side layout but prevents overflow
===================================================== */

@media (min-width: 769px) and (max-width: 1150px) {

    /* 1. Reduce outer page padding to get more width */
    .contact-wrapper {
        padding: 40px 3% 60px !important; 
        gap: 20px !important; /* Tighten gap between info and form */
        grid-template-columns: 300px 1fr !important; /* Lock left side, give rest to form */
        max-width: 100% !important;
    }

    /* 2. Shrink the form padding (The biggest space saver) */
    .contact-form-container {
        padding: 30px 20px !important; /* Reclaims nearly 60px of width */
        margin-right: 10px;
    }

    /* 3. Adjust Form fields for tablet fingers */
    .form-row {
        grid-template-columns: 1fr 1fr !important; /* Keep side-by-side emails/ID */
        gap: 15px !important;
    }

    input, select, textarea {
        padding: 12px 15px !important;
        font-size: 14px !important;
    }

    /* 4. Shrink Info Cards slightly */
    .info-card {
        padding: 20px 15px !important;
        gap: 15px !important;
    }

    .info-card p {
        font-size: 14px !important; /* Prevents long emails from breaking the box */
        word-break: break-all;
    }

    .location-box {
        padding: 25px 20px !important;
    }

    /* 5. Header scaling */
    #contact-hero h1 {
        font-size: 55px !important;
    }
}
/* =====================================================
   IPAD AIR CONTACT FIX (820px Width)
===================================================== */

@media (min-width: 769px) and (max-width: 900px) {

    /* 1. Reclaim space on the sides */
    .contact-wrapper {
        padding: 40px 3% 60px !important;
        grid-template-columns: 280px 1fr !important; /* Slimmer left column */
        gap: 20px !important;
        width: 100% !important;
        overflow: hidden;
    }

    /* 2. Form Container Visibility */
    .contact-form-container {
        padding: 30px 20px !important; /* Tighter internal padding */
        margin-right: 0 !important;
        width: 100% !important;
        box-sizing: border-box;
    }

    /* 3. Form Field Adjustments */
    .form-row {
        grid-template-columns: 1fr !important; /* Stack Email/ID for space */
        gap: 0 !important;
    }

    input, select, textarea {
        font-size: 16px !important; /* Prevent iOS zoom issue */
        width: 100%;
    }

    /* 4. Info Cards - Slimmer for 280px column */
    .info-card {
        padding: 15px !important;
        gap: 12px !important;
    }

    .info-card p {
        font-size: 13px !important;
        word-break: break-all; /* Ensures secretary email doesn't overflow */
    }

    .location-box {
        padding: 20px !important;
    }

    #contact-hero h1 {
        font-size: 48px !important;
    }
}