/* ========================================================
   UHS STEM ACADEMY - CONSOLIDATED STYLESHEET
   ======================================================== */

:root {
  --primary-red: #D31145;
  --dark-bg: #000000;
  --darker-bg: #111111;
  --silver: #C0C0C0;
  --text-light: #F5F5F5;
  --white: #FFFFFF;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; }

body { background-color: var(--darker-bg); color: var(--text-light); line-height: 1.6; }

/* Header & Nav */
header {
  background-color: var(--dark-bg);
  border-bottom: 3px solid var(--primary-red);
  height: 100px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 5%;
}

.logo { height: 100%; display: flex; align-items: center; }
.logo a { height: 80%; display: block; }
.logo img { height: 100%; width: auto; object-fit: contain; }

nav ul { list-style: none; display: flex; gap: 30px; }
nav ul li a { color: var(--silver); text-decoration: none; font-weight: 600; font-size: 1.1rem; text-transform: uppercase; transition: color 0.3s ease; }
nav ul li a:hover { color: var(--white); }

/* Main Content */
main { padding: 40px 5%; max-width: 1400px; margin: 0 auto; min-height: 80vh; }

/* Calendar Section (STRICTLY SCOPED) */
#calendar-section { margin-top: 60px; }
#calendar-section .calendar-flex-container { display: flex; flex-direction: row; gap: 20px; width: 100%; margin-top: 20px; }
#calendar-section .calendar-wrapper { flex: 1; min-width: 0; background-color: var(--dark-bg); border-radius: 8px; overflow: hidden; box-shadow: 0 4px 15px rgba(0,0,0,0.5); }
#calendar-section .dark-calendar { filter: invert(0.9) hue-rotate(180deg); background-color: #ffffff; border: none; display: block; width: 100%; height: 600px; }

/* UI Elements */
.form-container {
    width: 100%;
    max-width: 800px; /* Keeps it from getting too wide on desktop */
    margin: 0 auto;   /* Centers it on the page */
    padding: 0 15px;  /* Adds breathing room on mobile edges */
    box-sizing: border-box; /* Ensures padding doesn't widen the container */
    overflow: hidden; /* Prevents invisible overflow issues */
  }
  .form-container iframe {
    width: 100%;
    min-width: 100%; /* Forces the iframe to shrink to fit the mobile container */
    border: none;
}
.btn { display: inline-block; background-color: var(--primary-red); color: var(--white); padding: 10px 20px; text-decoration: none; border-radius: 5px; font-weight: bold; }

/* Footer */
footer { text-align: center; padding: 30px 20px; background-color: var(--dark-bg); color: var(--silver); border-top: 1px solid #333; }

/* Mobile Responsive */
@media (max-width: 950px) {
  header { flex-direction: column; height: auto; padding: 20px 5%; gap: 15px; }
  .logo { height: 70px; }
  
  #calendar-section .calendar-flex-container { flex-direction: column; }
  #calendar-section .dark-calendar { height: 450px; }
}

/* --- HAMBURGER MENU & MOBILE NAVIGATION --- */

/* Hide the hamburger button on desktop */
.hamburger {
    display: none;
    cursor: pointer;
    z-index: 100; /* Keeps the button on top of the full-screen menu */
}

.hamburger .bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    -webkit-transition: all 0.3s ease-in-out;
    transition: all 0.3s ease-in-out;
    background-color: var(--white, #FFFFFF);
}

/* Stop the page from scrolling behind the menu when open */
body.no-scroll {
    overflow: hidden;
}

/* Mobile Layout Trigger (Applies only to screens smaller than 768px) */
@media (max-width: 768px) {
    .hamburger {
        display: block;
    }

    /* Animate the hamburger into an 'X' */
    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }
    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    /* Full Screen Menu Styling */
    nav ul {
        position: fixed;
        left: -100%; /* Hides the menu completely off the left side of the screen */
        top: 0;
        gap: 0;
        flex-direction: column;
        background-color: rgba(17, 17, 17, 0.98); /* Very dark, slight transparency */
        width: 100%;
        height: 100vh;
        text-align: center;
        transition: 0.3s ease-in-out;
        justify-content: center; /* Centers links vertically */
        align-items: center;
        z-index: 99; /* Sits just underneath the hamburger button */
        margin: 0;
        padding: 0;
        display: flex;
    }

    /* This class is added by JS to slide the menu into view */
    nav ul.active {
        left: 0;
    }

    nav ul li {
        margin: 25px 0;
    }

    /* Make the links big and easy to tap on mobile */
    nav ul li a {
        font-size: 2rem; 
        font-weight: bold;
    }
}