/* file: public/css/styles.css */

/* =========================================
   GLOBAL VARIABLES & RESET
========================================= */
@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@300;400;600;700&family=Lato:wght@300;400;700&display=swap');

:root {
    --black: #000000;
    --offwhite: #F2F2F2;
    --yellow: #FFD75E;
    --muted-gold: #C6A84F;
    --heading-font: 'Oswald', sans-serif;
    --body-font: 'Lato', sans-serif;
    --transition: 0.25s ease-in-out;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background: var(--black) url('../assets/gritty-bg.jpg') center/cover no-repeat fixed;
    color: var(--offwhite);
    font-family: var(--body-font);
    line-height: 1.6;
    overflow-x: hidden;
}

body::before {
    content: "";
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.7); 
    pointer-events: none;
    z-index: -1;
}

.container {
    width: 90%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 15px; 
}

section {
    padding: 4rem 0;
    border-top: 1px solid rgba(255, 215, 94, 0.1);
}

/* =========================================
   HEADER & NAV
========================================= */
.site-header {
    background: var(--black);
    padding: 1rem 0;
    border-bottom: 1px solid var(--yellow);
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 90%; 
    max-width: 1400px;
    margin: 0 auto;
}

.logo-img {
    width: 350px;
    height: auto;
    display: block;
    transition: width 0.3s ease;
}

.social-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.social-links a {
    color: var(--offwhite);
    font-size: 1.5rem;
    transition: var(--transition);
}

.social-links a:hover {
    color: var(--yellow);
    transform: translateY(-3px);
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

.nav-link {
    text-decoration: none;
    color: var(--offwhite);
    font-family: var(--heading-font);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.95rem;
    transition: var(--transition);
    padding-bottom: 5px;
    border-bottom: 2px solid transparent;
}

.nav-link:hover, .nav-link.is-active {
    color: var(--yellow);
    border-bottom: 2px solid var(--yellow);
}

.nav-toggle {
    display: none;
    background: transparent;
    border: 2px solid var(--yellow);
    color: var(--yellow);
    font-size: 1.5rem;
    padding: 4px 10px;
    cursor: pointer;
    border-radius: 4px;
}

@media (max-width: 1100px) {
    .nav-container { flex-wrap: wrap; justify-content: center; gap: 1rem; }
    .logo-img { width: 200px; } 
}

/* =========================================
   MOBILE MEDIA QUERY UPDATE
   Replace your existing @media (max-width: 900px) block with this:
========================================= */
@media (max-width: 900px) {
    .nav-container { 
        /* This keeps Logo Left, Social Center, and Hamburger Right */
        justify-content: space-between; 
        align-items: center;
    }
    
    /* Shrink logo slightly to prevent overcrowding */
    .logo-img { 
        width: 120px; 
    }
    
    /* Reveal the social links on mobile! */
    .social-links { 
        display: flex; 
        gap: 0.8rem; /* Tighter gap for mobile */
    }

    /* Make icons slightly smaller on mobile to save space */
    .social-links a {
        font-size: 1.1rem;
    }

    .nav-toggle { 
        display: block; 
    }
    
    .main-nav {
        display: none;
        position: absolute;
        top: 100%; left: 0; width: 100%;
        background: var(--black);
        border-bottom: 2px solid var(--yellow);
        padding: 1rem 0;
        text-align: center;
    }
    .main-nav.is-open { display: block; }
    .main-nav ul { flex-direction: column; gap: 0; }
    .main-nav li { width: 100%; }
    .nav-link { display: block; padding: 1rem; border-bottom: 1px solid rgba(255,215,94,0.1); }
}

/* Optional: Safety check for VERY small phones (like iPhone SE) */
@media (max-width: 370px) {
    .logo-img { width: 90px; } /* Shrink logo more */
    .social-links { gap: 0.5rem; } /* Tighten icons more */
}

/* =========================================
   CARDS
========================================= */
.card-grid, .quick-links-grid, .programs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.card, .program-card, .quick-link-card {
    background: rgba(0,0,0,0.8);
    border: 1px solid rgba(255,215,94,0.2);
    padding: 2.5rem 2rem;
    border-radius: 8px;
    text-align: center;
    transition: transform 0.3s ease, border-color 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
}

.card:hover, .program-card:hover, .quick-link-card:hover {
    transform: translateY(-5px);
    border-color: var(--yellow);
    background: rgba(0,0,0,0.95);
}

.card h3, .program-card h3, .quick-link-card h3 {
    color: var(--yellow);
    font-family: var(--heading-font);
    font-size: 1.6rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
}

.card p, .program-card p, .quick-link-card p {
    font-size: 1rem;
    color: #ddd;
    line-height: 1.6;
}

/* Headshots for Staff Cards */
.card img {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    
    /* CRITICAL: This prevents the squishing! */
    object-fit: cover; 
    
    /* This keeps the heads from getting cut off */
    object-position: top; 
    
    border: 3px solid var(--yellow);
    margin-bottom: 1.5rem;
}

.card-role {
    color: #ccc;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 1rem;
    display: block;
    font-weight: 700;
}

/* =========================================
   NEW MASONRY GALLERY (3-Column Scroll)
========================================= */
.masonry-grid {
    /* This creates the 3 columns */
    column-count: 3;
    column-gap: 1.5rem; /* Space between columns */
    width: 100%;
}

.masonry-grid img {
    width: 100%; /* Forces image to fit its column */
    display: block;
    margin-bottom: 1.5rem; /* Space between images vertically */
    border-radius: 8px;
    transition: transform 0.3s ease;
    
    /* Prevent image from breaking across columns */
    break-inside: avoid; 
}

/* Optional: Slight hover effect */
.masonry-grid img:hover {
    transform: scale(1.02);
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
}

/* =========================================
   MOBILE RESPONSIVENESS
========================================= */
@media (max-width: 900px) {
    .masonry-grid {
        column-count: 2; /* 2 columns on tablets */
    }
}

@media (max-width: 600px) {
    .masonry-grid {
        column-count: 1; /* 1 big scrolling column on phones */
    }
}

/* =========================================
   FOOTER & BUTTONS
========================================= */
.site-footer {
    background: var(--black);
    border-top: 1px solid var(--yellow);
    padding: 3rem 0;
    text-align: center;
    margin-top: 8rem;
}
.site-footer a { color: var(--yellow); }

/* FIX: Ensure buttons in footer stay black text */
.site-footer .btn {
    color: var(--black) !important; 
}

.btn, .btn-secondary {
    display: inline-block;
    padding: 0.9rem 2rem;
    font-family: var(--heading-font);
    font-weight: bold;
    text-transform: uppercase;
    text-decoration: none;
    margin: 10px;
    transition: var(--transition);
    cursor: pointer;
}

.btn {
    background: var(--yellow);
    color: var(--black);
    border: 2px solid var(--yellow);
}
.btn:hover { background: #e6c200; }

.btn-secondary {
    background: transparent;
    color: var(--offwhite);
    border: 2px solid var(--yellow);
}
.btn-secondary:hover { background: var(--yellow); color: var(--black); }

/* HERO */
.hero {
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 4rem 1rem;
}
.hero h1 {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    color: var(--yellow);
    text-transform: uppercase;
    line-height: 1.1;
    margin-bottom: 1rem;
}

/* =========================================
   CONTACT FORM STYLES
========================================= */
.form-card {
    background: rgba(0, 0, 0, 0.85); /* Darker, sleek background */
    border: 1px solid rgba(255, 215, 94, 0.2); /* Subtle yellow border */
    padding: 3rem;
    border-radius: 8px;
    max-width: 600px; /* Prevents it from getting too wide on desktop */
    margin: 0 auto;   /* Centers the card perfectly */
    box-shadow: 0 4px 20px rgba(0,0,0,0.5); /* Adds depth */
}

/* Grouping Label + Input together */
.form-group {
    margin-bottom: 1.5rem; /* Space between fields */
    text-align: left;
}

.form-group label {
    display: block; /* Forces label to sit on its own line above input */
    margin-bottom: 0.5rem;
    color: var(--yellow);
    font-family: var(--heading-font);
    font-weight: bold;
    letter-spacing: 1px;
}

/* Styling the actual boxes */
.form-group input, 
.form-group textarea {
    width: 100%; /* Full width of the card */
    padding: 12px 15px;
    background: #222; /* Dark input background */
    border: 1px solid #444;
    color: var(--offwhite);
    border-radius: 4px;
    font-family: var(--body-font);
    font-size: 1rem;
    transition: var(--transition);
}

/* "Enterprise" Focus State: 
   When the user clicks the box, it glows yellow. 
   This is crucial for accessibility and UX. */
.form-group input:focus, 
.form-group textarea:focus {
    outline: none;
    border-color: var(--yellow);
    background: #333;
}

/* Mobile Tweaks for the Form */
@media (max-width: 600px) {
    .form-card {
        padding: 1.5rem; /* Less padding on small screens */
        width: 100%;
    }
}

/* =========================================
   PROGRAMS & MODAL STYLES
========================================= */
/* The "Sign Up" Button on the card */
.program-btn {
    display: inline-block;
    margin-top: 1.5rem;
    padding: 10px 20px;
    background: transparent;
    color: var(--yellow);
    border: 1px solid var(--yellow);
    text-transform: uppercase;
    font-weight: bold;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition);
}

.program-btn:hover {
    background: var(--yellow);
    color: var(--black);
}

/* The Modal Background (Dark Overlay) */
.modal-overlay {
    display: none; /* Hidden by default */
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.85);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    padding: 1rem;
}

/* The Modal Content Box */
.modal-content {
    background: #111;
    border: 1px solid var(--yellow);
    padding: 2rem;
    width: 100%;
    max-width: 500px;
    border-radius: 8px;
    position: relative;
    box-shadow: 0 0 25px rgba(255, 215, 94, 0.2);
    max-height: 90vh; /* Allow scrolling on small phones */
    overflow-y: auto;
}

/* Close 'X' Button */
.close-modal {
    position: absolute;
    top: 15px; right: 20px;
    font-size: 1.5rem;
    color: #fff;
    cursor: pointer;
}
.close-modal:hover { color: var(--yellow); }

/* =========================================
   CONTACT PAGE: TOPIC CHIPS
========================================= */
.topic-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 2rem;
}

.topic-chip {
    background: transparent;
    border: 1px solid #555;
    color: #ccc;
    padding: 8px 16px;
    border-radius: 20px; /* Pill shape */
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.topic-chip:hover {
    border-color: var(--yellow);
    color: var(--yellow);
    background: rgba(255, 215, 94, 0.1);
}

/* Active state (optional, for visual feedback) */
.topic-chip:active {
    transform: scale(0.95);
}

/* =========================================
   HOMEPAGE MODAL UPGRADES (v2)
========================================= */

/* The Container for the 3 Options */
.program-selector {
    display: flex;
    flex-direction: column; /* Stack them for better readability */
    gap: 10px;
    margin-bottom: 1.5rem;
}

/* Hide the actual radio circle */
.program-selector input[type="radio"] {
    display: none;
}

/* THE CLICKABLE CARD */
.program-selector label {
    display: flex;
    flex-direction: column; /* Stack Title on top of Text */
    padding: 15px;
    background: #222;
    border: 1px solid #444;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

/* The Title inside the card */
.program-selector strong {
    color: var(--offwhite);
    font-size: 1.1rem;
    text-transform: uppercase;
    display: block;
    margin-bottom: 4px;
}

/* The Blurb inside the card */
.program-selector span {
    color: #888;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* HOVER STATE */
.program-selector label:hover {
    border-color: var(--yellow);
    background: #2a2a2a;
}

/* SELECTED STATE (When clicked) */
.program-selector input[type="radio"]:checked + label {
    background: rgba(255, 215, 94, 0.1); /* Glow yellow */
    border-color: var(--yellow);
}

.program-selector input[type="radio"]:checked + label strong {
    color: var(--yellow);
}