/* ==========================================================================
   HEADER-MOBILE.CSS (Phone Overrides)
   Max-Width: 768px
   ========================================================================== */

@media screen and (max-width: 768px) {

  /* --- 1. Alert Bar Stacking --- */
  .alert-flex {
    gap: 0.8rem;
    text-align: center;
    padding: 1rem;
  }

  .alert-title, .alert-message {
    text-align: center;
    width: 50%;
  }

  .alert-btn {
  /* 1. Turn it into a solid box so the background doesn't break */
  display: flex !important;
  align-items: center;
  justify-content: center;
  
  /* 2. Allow the text to wrap inside that box */
  white-space: normal !important;
  text-align: center;
  
  /* 3. Force the width small enough to trigger the wrap */
  max-width: 14rem; 
  width: auto;
  
  /* 4. Allow the height to grow to fit 2 lines */
  height: auto;
  min-height: 3.5rem; /* Ensures it looks like a button */
  
  /* 5. Tighter spacing for the stacked text */
  line-height: 1.1;
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
}

  /* --- 2. Header Layout --- */
  header {
    min-height: var(--header-height-mobile); /* 12rem */
  }

  .header-container {
    width: 90%; /* Expand width */
    padding: 0.5rem 0;
  }

  /* Resize Logo for Mobile */
  .logo {
    width: 15rem;
  }

  /* --- 3. Hamburger Menu Toggle --- */
  .menu-toggle {
    display: flex; /* Show hamburger */
    z-index: 2200; /* Ensure it floats above the drawer */
  }

  /* Hamburger Animation (When Active class added by JS) */
  .menu-toggle.active .bar:nth-child(1) {
    transform: translateY(0.9rem) rotate(45deg);
  }
  .menu-toggle.active .bar:nth-child(2) {
    opacity: 0;
  }
  .menu-toggle.active .bar:nth-child(3) {
    transform: translateY(-0.9rem) rotate(-45deg);
  }

  /* --- 4. Mobile Navigation Drawer --- */
  .nav-menu {
    position: fixed;
    top: 0;
    left: -100%; /* Hidden off-screen */
    width: 100%;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2000;
  }

  .nav-menu.active {
    left: 0; /* Slide in */
  }

  .nav-menu ul {
    flex-direction: column;
    gap: 4rem;
  }

  .nav-menu ul li a {
    font-size: 2.4rem; 
    font-family: var(--ff-headers); 
    letter-spacing: 0.4rem;
    
    /* ADD THESE 3 LINES: Shrinks the link and centers it */
    display: block;
    width: max-content; 
    margin: 0 auto; 
  }
}