/* =========================================
   Global Reset & Variables
   ========================================= */
:root {
    --primary-blue: #3453a4; /* Adjust to match exact FRC team blue */
    --bg-dark: #2d2d2d;
    --bg-light: #e6e6e6;
    --text-light: #ffffff;
    --text-dark: #333333;
    --nav-bg: rgba(45, 45, 45, 0.8);
    --font-main: 'Montserrat', sans-serif; /* Recommended Google Font */
}

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

body {
    font-family: var(--font-main);
    color: var(--text-dark);
    background-color: var(--bg-light);
    line-height: 1.6;
    overflow-x: hidden;
}

/* =========================================
   Typography & Reusable Utility Classes
   ========================================= */
h1, h2, h3 {
    font-weight: 600;
    margin-bottom: 1.25rem;
}

p {
    font-size: 1rem;
    margin-bottom: 1.15rem;
}

/* The Blue Underline Style for Headings */
.title-underline {
    display: inline-block;
    border-bottom: 0.25rem solid var(--primary-blue);
    padding-bottom: 0.3125rem;
    margin-bottom: 1.5625rem;
    font-size: 2rem;
    letter-spacing: 0.0625rem;
    text-align: center;
}

/* Button Styles */
.btn {
    display: inline-block;
    padding: 0.75rem 2.1875rem;
    border-radius: 1.875rem; /* Pill shape */
    text-decoration: none;
    font-weight: bold;
    text-align: center;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
}

.btn:hover {
    transform: translateY(-0.125rem);
}

.btn-primary {
    background-color: var(--primary-blue);
    color: var(--text-light);
    border: none;
}

.btn-outline-white {
    background-color: transparent;
    color: var(--text-light);
    border: 1px solid var(--text-light);
}

.btn-outline-dark {
    background-color: transparent;
    color: var(--text-dark);
    border: 1px solid var(--text-dark);
}

.btn-group {
    display: flex;
    justify-content: center;
    gap: 0.9375rem;
    margin-top: 1.25rem;
}

/* =========================================
   Navigation Bar
   ========================================= */
.navbar {
    position: sticky;
    top: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.4rem 2rem;
    background: linear-gradient(to bottom, rgba(0,0,0,1) 0%, rgba(0,0,0,0.94) 25%, rgba(0,0,0,0.87) 50%, rgba(0,0,0,0.69) 75%, rgba(0,0,0,0.5) 100%);
    color: var(--text-light);
    z-index: 1001;
}

.nav-logo img {
    height: 4rem;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.875rem;
    list-style: none;
    flex-wrap: wrap;
}

/* Dropdown Container */
.nav-dropdown {
    position: relative;
}

/* The hidden menu */
.dropdown-menu {
    display: none; /* Hidden by default */
    position: absolute;
    top: 100%; /* Positions it directly below the "About" link */
    left: 0;
    background-color: #2d2d2d;
    min-width: 150px;
    padding: 0;
    margin: 0;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    list-style: none;
    z-index: 1000;
}

/* Links inside the dropdown */
.dropdown-menu li a {
    display: block;
    padding: 10px 20px;
    color: #ffffff;
    text-decoration: none;
}

.dropdown-menu li a:hover {
    background-color: var(--primary-blue);
}

/* Show the menu on hover */
.nav-dropdown:hover .dropdown-menu {
    display: block;
}

.nav-toggle {
    position: absolute;
    left: -9999px;
    width: 0;
    height: 0;
    opacity: 0;
    pointer-events: none;
}

.nav-toggle-label {
    display: none;
    cursor: pointer;
    width: 2.25rem;
    height: 2rem;
    flex-shrink: 0;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: 0.3rem;
    padding: 0.4rem;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 0.75rem;
}

.nav-toggle-label span {
    display: block;
    width: 1.5rem;
    height: 0.1875rem;
    background: var(--text-light);
    border-radius: 99px;
    transition: transform 0.25s ease, opacity 0.25s ease, background-color 0.25s ease;
}

.nav-toggle:checked + .nav-toggle-label span:nth-child(1) {
    transform: translateY(0.5rem) rotate(45deg);
}

.nav-toggle:checked + .nav-toggle-label span:nth-child(2) {
    opacity: 0;
}

.nav-toggle:checked + .nav-toggle-label span:nth-child(3) {
    transform: translateY(-0.5rem) rotate(-45deg);
}

.nav-links a {
    color: var(--text-light);
    text-decoration: none;
    font-size: 1rem;
}

.nav-links a:hover, 
.nav-links a.active {
    border-bottom: 0.125rem solid var(--text-light);
}

/* =========================================
   Hero Section (Image 1)
   ========================================= */
.hero-section {
    height: 100vh;
    background-image: none;
    background-size: cover;
    object-position: center 60%;
    background-position: center center;
    background-attachment: fixed;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.hero-overlay {
    background-color: rgba(35, 39, 48, 0.21);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.hero-content {
    position: relative;
    z-index: 10;
    background-color: rgba(35, 39, 48, 0.21);
    padding: 2.5rem 5rem;
    text-align: center;
    color: var(--text-light);
    text-shadow: 
    -1px -1px 0 #000,  
     1px -1px 0 #000,
    -1px  1px 0 #000,
     1px  1px 0 #000; /* Solid 1px black outline to contrast background */
}

.hero-content h2 {
    font-size: 2rem;
    letter-spacing: 0.125rem;
    display: block;
}

.hero-content h1 {
    font-size: 2.5rem;
    display: block;
}

/* =========================================
   Welcome Section (Image 1 Bottom)
   ========================================= */
.welcome-section {
    background-color: var(--bg-light);
    padding: 5rem 1.25rem;
    text-align: center;
}

.welcome-content {
    max-width: 55rem;
    margin: 0 auto;
    text-align: left;
}

.welcome-content h2 {
    color: var(--text-dark);
}

/* =========================================
   Split Layouts (Images 2, 3, & 4)
   ========================================= */
.split-section {
    padding: 6.25rem 2.5rem;
    position: relative;
}

.split-container {
    display: flex;
    align-items: center;
    text-align: left;
    justify-content: space-between;
    max-width: 75rem;
    margin: 0 auto;
    gap: 4rem;
}

/* Reverses the layout for alternating image/text sides */
.split-reverse {
    flex-direction: row-reverse;
}

.split-image-col {
    flex: 1;
}

.split-image-col img {
    width: 100%;
    height: auto;
    border-radius: 0.5rem; /* Optional slight rounding for photos */
    box-shadow: 0 0.625rem 1.25rem rgba(0,0,0,0.12);
}

.split-text-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Dark Background Sections (About & Join) */
.bg-dark-section {
    background-color: var(--bg-dark);
    color: var(--text-light);
}

/* Section Curve Separators */
/* Simple CSS curve using border-radius. For complex swoops, an SVG background is recommended */
.curve-top,
.curve-top-no-bottom-curve {
    position: relative;
    overflow: visible;
    padding-top: 5rem;
    padding-bottom: 5rem;
}

.curve-top::before,
.curve-top::after,
.curve-top-no-bottom-curve::before {
    content: "";
    position: absolute;
    left: 0;
    width: 100%;
    height: 7rem;
    background-repeat: no-repeat;
    background-position: top center;
    background-size: 100% 100%;
    pointer-events: none;
    z-index: 100;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 120' preserveAspectRatio='none'%3E%3Cpath fill='%232d2d2d' d='M0,48 C360,0 720,96 1080,48 C1260,24 1440,72 1440,72 L1440,120 L0,120 Z'/%3E%3C/svg%3E");
}

.curve-top::before, 
.curve-top-no-bottom-curve::before {
    top: 0;
    transform: translateY(-65%) scale(1.1, 1);
}

.curve-top::after {
    bottom: 0;
    transform: translateY(65%) rotate(180deg) scale(1.1, 1);
}


/* =========================================
   Footer (Image 4 Bottom)
   ========================================= */
.site-footer {
    background-color: var(--primary-blue);
    color: var(--text-light);
    padding: 1.0rem 2.5rem;
    text-align: center;
    justify-content: center;
    justify-items: center;
}

.footer-container {
    display: grid;
    grid-template-columns: auto 1fr 1fr;
    grid-template-rows: 1fr, 1fr;
    gap: 8px;
}

.footer-container p {
    font-size: 1rem;
    margin: 0rem;
}

.footer-logo img {
    width: 240px;
    height: auto;
    justify-content: center;
}

.footer-title h2 {
    font-size: 2rem;
    margin: 0 0;
    text-align: center;
}

.footer-social a {
    color: var(--text-light);
    text-decoration: underline;
    font-size: 1rem;
}

.footer-disclaimer {
    font-size: 0.875rem;
    margin-top: 0rem;
    color: rgba(255,255,255,0.8);
}
    
.div1 {
    grid-row: span 2 / span 2;
}

.div2 {
    grid-column: span 2 / span 2;
}

.div3 {
    grid-column-start: 2;
    grid-row-start: 2;
}

.div4 {
    grid-column-start: 3;
    grid-row-start: 2;
}

/* =========================================
   Responsive Design (Mobile) Tablets & Phones
   ========================================= */
@media only screen and (max-width: 767px) {
    .split-container, .split-reverse {
        flex-direction: column;
        text-align: center;
        max-width: 100%;
        padding: 0 2rem;
    }
    
    .navbar {
        flex-wrap: wrap;
        justify-content: space-between;
        padding: 0.4rem 1rem;
    }

    .nav-toggle {
        display: block;
    }

    .nav-toggle-label {
        display: flex;
    }

    .nav-links {
        width: 100%;
        justify-content: center;
        gap: 1rem;
        margin-top: 0.75rem;
        display: none;
        flex-direction: column;
        background: rgba(0,0,0,0.7);
        border-radius: 0.5rem;
        padding: 0.75rem 0;
    }

    .nav-toggle:checked + .nav-toggle-label + .nav-links {
        display: flex;
    }

    .nav-links li {
        flex: 1 1 auto;
        text-align: center;
    }

    .nav-links a {
        font-size: 0.95rem;
        padding: 0.75rem 0;
        display: block;
    }

    /* Allow the dropdown to be opened by clicking the parent */
    .nav-dropdown:active .dropdown-menu,
    .nav-dropdown:focus-within .dropdown-menu {
        display: block;
    }
    
    /* Make the dropdown menu full-width on mobile for better touch access */
    .dropdown-menu {
        position: static; /* Stack it in the flow instead of overlaying */
        width: 100%;
    }

    .footer-container {
        flex-direction: column;
        text-align: center;
        display: grid;
        grid-template-columns: auto 1fr 1fr;
        grid-template-rows: auto, 1fr;
        gap: 8px;
    }

    .footer-details {
        flex-direction: column;
        gap: 0.9375rem;
    }

    .div1 {
        grid-row: span 2 / span 2;
    }

    .div2 {
        grid-column: span 2 / span 2;
    }

    .div3 {
        grid-column-start: 2;
        grid-row-start: 2;
    }

    .div4 {
        grid-column-start: 3;
        grid-row-start: 2;
    }
}

@media (max-width: 600px) {
    .navbar {
        padding: 0.4rem 1rem;
    }

    .nav-links {
        gap: 0.75rem;
    }

    .nav-links li {
        width: 100%;
    }

    .nav-links a {
        padding: 0.75rem 1rem;
    }

    .nav-logo img {
        height: 4rem;
    }

    .footer-container {

    }

    .div1 {
        grid-row: span 2 / span 2;
    }

    .div2 {
        grid-column: span 2 / span 2;
    }

    .div3 {
        grid-column-start: 2;
        grid-row-start: 2;
    }

    .div4 {
        grid-column-start: 3;
        grid-row-start: 2;
    }
}