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

body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    line-height: 1.6;
    background-color: #f9f9f9;
    color: #333;
}

/* Page Wrapper */
.page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation - UCLA Navy Blue */
header {
    background-color: #2774AE;
    padding: 1rem 0;
    margin-bottom: 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.mainNav ul {
    list-style: none;
    display: flex;
    justify-content: center;
}

.mainNav li {
    margin: 0 20px;
}

.mainNav a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s ease;
}

.mainNav a:hover {
    color: #FFD100; /* UCLA Gold on hover */
}

/* Home Section */
#title {
    text-align: center;
    padding: 40px 0;
    
}

h1 {
    color: #2774AE;
    font-size: 2.5rem;
    margin-bottom: 40px;
    border-bottom: 4px solid #FFD100; /* Gold underline accent */
    display: inline-block;
    padding-bottom: 10px;
}

/* Button Containers & Grid */
#title {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.button-container {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin: 20px 0;
    padding: 20px;
    width: 100%;
    max-width: 600px;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.3s ease;
}

.button-container:hover {
    transform: translateY(-5px);
}

.image-container img {
    width: 100%;
    height: auto;
    max-height: 250px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 15px;
}

/* Buttons - UCLA Gold Style */
.button {
    display: inline-block;
    background-color: #FFD100;
    color: #2774AE;
    padding: 12px 24px;
    text-decoration: none;
    font-weight: bold;
    border-radius: 5px;
    text-transform: uppercase;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.button:hover {
    background-color: #2774AE;
    color: #FFD100;
}

/* Footer */
.footer {
    text-align: center;
    padding: 40px 0;
    margin-top: 40px;
    border-top: 1px solid #ccc;
    font-size: 0.9rem;
    color: #666;
}


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

html {
    scroll-behavior: smooth; /* Makes clicking nav links slide smoothly */
    overflow-x: hidden; /* Prevents horizontal scrollbars from full-width breakout sections */
}

body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background-color: #f4f4f4;
    color: #2D2D2D;
}

.page {
    max-width: 1200px;
    margin: 0 auto;
}

/* --- Navigation (UCLA Blue) --- */
header {
    background-color: #2774AE;
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    /* Starts full screen at the top of the page */
    width: 100vw;
    margin-left: calc(50% - 50vw);
    transition: all 0.4s ease;
}

/* Shrinks to a professional floating pill when scrolled */
header.scrolled {
    width: 100%;
    margin-left: 0;
    border-radius: 15px;
    top: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.mainNav ul {
    list-style: none;
    display: flex;
    justify-content: center;
}

.mainNav li { margin: 0 20px; }

.mainNav a {
    color: white;
    text-decoration: none;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.9rem;
}

.mainNav a:hover { color: #FFD100; }

/* --- Sections Styling --- */
section {
    padding: 80px 20px;
    border-bottom: 1px solid #ddd;
}

h1 {
    color: #2774AE;
    text-align: center;
    margin-bottom: 40px;
    font-size: 2.2rem;
    text-transform: uppercase;
}

h3, h4 {
    color: #2774AE;
    margin: 20px 0 10px 0;
}

/* --- The 3-Column Flexbox Logic --- */
/* This works for your Home buttons and your Event gallery */
#title, .imageGallery {
    display: flex;
    flex-wrap: wrap; /* Allows it to stack on mobile */
    gap: 20px;
    justify-content: center;
}

.button-container, .imageItem {
    flex: 1 1 calc(33.333% - 40px); /* Sets width to roughly 1/3 */
    min-width: 280px; /* Prevents them from getting too skinny */
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    text-align: center;
}

/* Fix for the images inside boxes */
.image-contianer img, .image-container img, .imageItem img {
    width: 100%;
    height: 200px;
    object-fit: cover; /* Keeps images from stretching */
    border-radius: 4px;
    margin-bottom: 15px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer; /* Indicates to the user that it's clickable */
}

/* --- Makes the image pop when hovered --- */
.imageItem img:hover {
    transform: scale(1.03); /* Zooms the image in slightly */
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2); /* Deepens the shadow to lift it off the page */
}

/* --- Buttons --- */
.button, button[type="submit"] {
    display: inline-block;
    background-color: #FFD100;
    color: #2774AE;
    padding: 10px 20px;
    text-decoration: none;
    font-weight: bold;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    transition: 0.3s;
}

.button:hover, button[type="submit"]:hover {
    background-color: #2774AE;
    color: white;
}

#banner {
    background-color: #2774AE;
    color: white;
    text-align: center;
    padding: 60px 20px;
    width: 100vw;
    margin-left: calc(50% - 50vw);
}

/* --- Contact Section Header --- */
#contact-head {
    text-align: center;
    margin-bottom: 30px;
}

#contact-head h1 {
    font-size: 3.2rem;
    font-weight: 800;
    margin-bottom: 5px;
    text-transform: none; /* Removes the global uppercase for a cleaner, professional look */
    letter-spacing: -0.5px;
}

#contact-head h2 {
    font-size: 1.8rem;
    font-weight: 800;
}

#contact-head h2 a {
    color: #2774AE;
    text-decoration: none; /* Removes the default link underline */
    transition: all 0.2s ease-in-out;
}

#contact-head h2 a:hover {
    text-decoration: underline;
    text-decoration-thickness: 3px; /* Makes the underline bold to match the text */
    text-underline-offset: 6px; /* Pushes the underline down slightly so it breathes */
}

/* --- Contact Form --- */
#form form {
    display: flex;
    flex-direction: column;
    max-width: 500px;
    margin: 20px auto;
}

#form label { margin-bottom: 15px; font-weight: bold; }

#form input, #form textarea {
    width: 100%;
    padding: 10px;
    margin-top: 5px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

/* --- Footer --- */
.footer {
    text-align: center;
    padding: 40px;
    background: #2774AE;
    color: white;
}

/* --- Hero Section (Index Top) --- */
.hero-section {
    width: 100%;
    max-width: 1200px; /* Keeps the text aligned with the rest of the page when the background stretches */
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    margin-bottom: 20px;
    position: relative; /* Keeps content strictly above the background blur */
    z-index: 2;
}

.hero-left, .hero-right {
    flex: 1 1 calc(50% - 20px);
    min-width: 300px;
    opacity: 0;
    animation: fadeInUp 0.8s ease-out forwards;
}

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-left {
    text-align: left;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.9); /* Adds a subtle white halo to make text readable over the background */
}

.hero-left h2 {
    color: #2774AE;
    font-size: 2rem;
    margin-bottom: 15px;
    text-transform: uppercase;
}

.hero-left p {
    font-weight: 500;
    font-size: 1.1rem;
    text-shadow: 0 0 8px rgba(255, 255, 255, 1), 0 0 20px rgba(255, 255, 255, 0.9); /* Stronger double-glow specifically for the paragraph */
}

.hero-right {
    display: flex;
    flex-direction: column; /* Stacks the logo and the tagline box vertically */
    justify-content: center;
    align-items: flex-end; /* Keeps everything aligned to the right side of the screen */
    gap: 20px;
    animation-delay: 0.2s; /* Delays the right side image/title slightly for a professional staggered effect */
}

.logo-wrapper {
    display: flex;
    align-items: center;
    gap: 20px;
    border-bottom: 6px solid #FFD100; /* Adds the yellow h1 line perfectly under the logo */
    padding-bottom: 15px;
}

.logo-acronym {
    font-size: 8rem;
    font-weight: 900;
    line-height: 1;
    color: #2774AE; /* UCLA Blue */
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.9);
    letter-spacing: -2px;
}

.logo-full-name {
    display: flex;
    flex-direction: column;
    text-align: left; /* Stacks the words flush left against the acronym */
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.05;
    color: #333; /* Dark grey to contrast nicely with the blue acronym */
    text-transform: uppercase;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.9);
}

/* --- Hero Tagline Pill --- */
.hero-bottom {
    background-color: rgba(255, 255, 255, 0.95);
    padding: 10px 25px;
    border-radius: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.hero-bottom p {
    color: #2774AE;
    font-weight: 700;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0;
}

/* --- Updates to the main content --- */
#title {
    /* Your initial, high-res Photoshop banner */
    background-image: linear-gradient(to bottom, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.7)), url('images/Perth_UWA.jpeg'); 
    width: 100vw; /* Stretches the section to the full screen */
    margin-left: calc(50% - 50vw); /* Perfectly centers the breakout width */
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative; /* Essential for stacking */
    padding: 40px 20px; 
    min-height: 85vh; /* Dramatically increases background visibility */
    display: flex;
    align-items: center; /* Vertically centers the text and logo within the section */
    color: #333; /* Changed to dark text (black/grey) to stand out on the white gradient */
    text-align: center;
    overflow: hidden; /* Keeps the blur within bounds */
}

/* --- The Blurred Layer --- */
#title::after {
    content: ''; /* Required for pseudo-elements */
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    
    /* SAME image as the background */
    background-image: linear-gradient(to bottom, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.7)), url('images/Perth_UWA.jpeg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    
    /* Apply the initial blur/light here */
    filter: blur(15px) brightness(1.5); 
    
    /* Set the initial transparency. JavaScript will control this. */
    opacity: 0; 
    
    /* Smooths the transition */
    transition: opacity 0.3s ease-out; 
    
    z-index: 1; /* Puts this layer above the background */
}

/* --- Reveal More Section --- */
#more {
    display: none; /* Hides the extra text and form by default */
    margin-top: 20px;
}

#show-more-btn {
    display: block;
    margin: 20px auto 0;
    width: fit-content;
}

#cancel-btn {
    background-color: #ddd; /* A neutral grey to distinguish it from submit */
    color: #333;
    margin-top: 10px;
}

#cancel-btn:hover {
    background-color: #bbb;
    color: #111;
}

/* --- Lightbox / Image Popup --- */
#lightbox {
    display: none; /* Hidden by default, toggled to 'flex' by JS */
    position: fixed;
    z-index: 9999;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background-color: rgba(0, 0, 0, 0.85); /* Dark semi-transparent background */
    align-items: center;
    justify-content: center;
    cursor: pointer; /* Indicates clicking anywhere closes it */
}

#lightbox img {
    max-width: 90%;
    max-height: 90vh;
    border-radius: 8px;
    box-shadow: 0 4px 25px rgba(0,0,0,0.5);
    animation: zoomIn 0.3s ease-out; /* Makes it snap cleanly into view */
}

@keyframes zoomIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* --- About Page Styles (Corporate Firm Theme) --- */
.about-hero {
    background-color: #2774AE;
    color: white;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    padding: 100px 20px;
    text-align: center;
}

.about-hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.about-hero h1 {
    color: white;
    font-size: 3.5rem;
    border-bottom: none;
    margin-bottom: 20px;
    padding-bottom: 0;
}

.about-hero .lead {
    font-size: 1.25rem;
    font-weight: 300;
    line-height: 1.8;
    opacity: 0.9;
}

.about-purpose {
    padding: 80px 20px;
    max-width: 1000px;
    margin: 0 auto;
    border-bottom: none;
}

.purpose-grid {
    display: flex;
    gap: 60px;
}

.purpose-card {
    flex: 1;
    border-top: 4px solid #FFD100; /* Subtle gold accent line */
    padding-top: 25px;
}

.purpose-card h3 {
    font-size: 1.8rem;
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
}

.purpose-card p {
    font-size: 1.1rem;
    color: #555;
    line-height: 1.7;
}

.about-image-banner {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    padding: 0;
    border: none;
    height: 450px;
    background-image: url('images/uwa.jpg');
    background-size: cover;
    background-position: center top; /* Focuses on the top of the image (the sky) */
    background-attachment: fixed; /* Creates the dynamic parallax scrolling effect */
}

.about-values {
    padding: 80px 20px;
    background-color: #f9f9f9;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    border-bottom: none;
}

.about-values h2 {
    text-align: center;
    font-size: 2.5rem;
    color: #2774AE;
    margin-bottom: 50px;
}

.values-grid {
    display: flex;
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    justify-content: center;
}

.value-card {
    flex: 1;
    background: white;
    padding: 40px 30px;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.06);
    transition: transform 0.3s ease;
}

.value-card:hover {
    transform: translateY(-5px); /* Gentle float effect on hover */
}

.value-card h4 {
    font-size: 1.3rem;
    margin-top: 0;
    margin-bottom: 15px;
    color: #2774AE;
}

.value-card p {
    color: #666;
    font-size: 1rem;
    line-height: 1.6;
}

/* --- Mobile Responsiveness --- */
@media (max-width: 768px) {
    /* Wraps navigation links so they don't overflow the screen */
    .mainNav ul {
        flex-wrap: wrap;
        padding: 0 10px;
    }
    .mainNav li {
        margin: 5px 10px; 
    }
    .mainNav a {
        font-size: 0.8rem;
    }

    /* Center-aligns and stacks the Hero Section */
    #title {
        padding: 60px 20px 120px 20px; /* Gives the tagline extra room so it doesn't overlap text */
    }
    .hero-section {
        flex-direction: column; /* Stacks text on top of logo */
        text-align: center;
        gap: 40px;
    }
    .hero-left, .hero-right {
        align-items: center;
        text-align: center;
    }
    
    /* Scales down the giant logo */
    .logo-wrapper {
        flex-direction: column; /* Stacks the ECS above the full name */
        gap: 10px;
        border-bottom: 4px solid #FFD100;
    }
    .logo-acronym {
        font-size: 5.5rem; /* Shrunk from 8rem */
    }
    .logo-full-name {
        font-size: 1.8rem;
        text-align: center;
    }

    /* Mobile Tagline */
    .hero-bottom {
        width: 85vw; /* Gives the white pill more breathing room on small screens */
        bottom: 25px;
    }
    .hero-bottom p {
        font-size: 0.85rem;
    }

    /* Shrink the huge contact headings & fix email overflow */
    #contact-head h1 {
        font-size: 2.2rem;
    }
    #contact-head h2 {
        font-size: 1.2rem;
        word-break: break-all; /* Forces the super long contact email to wrap neatly onto two lines */
        padding: 0 15px;
    }

    /* About Page Mobile Responsiveness */
    .about-hero {
        padding: 60px 20px;
    }
    .about-hero h1 {
        font-size: 2.5rem;
    }
    .purpose-grid {
        flex-direction: column;
        gap: 40px;
    }
    .about-image-banner {
        height: 250px;
    }
    .values-grid {
        flex-direction: column;
        gap: 20px;
    }
}