/* =========================
   MOBILE HEADER + FOOTER (Typography-aligned)
========================= */

/* --- Apply only on small screens --- */
@media (max-width: 768px) {

  /* Reset */
  * {
    box-sizing: border-box;
  }

  /* ============ HEADER ============ */
  header {
    position: relative;
    z-index: 1000;
    background-color: #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  }

  .navbar {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: clamp(0.75rem, 1vw, 1rem) clamp(1.25rem, 4vw, 2rem);
    background: #fff;
  }

  /* Logo */
  .logo img {
    height: clamp(40px, 8vw, 50px);
    width: auto;
  }

  .logo {
    margin-left: 0;
    margin-bottom: 0;
  }


  .nav-links {
    display: none; /* handled by mobile-header-footer.css */
    background: none;
  }

  .navbar::after {
    display: none;
  }

  /* ============ HAMBURGER BUTTON ============ */
  .menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 22px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1100;
  }

  .menu-toggle span {
    display: block;
    height: 3px;
    width: 100%;
    background-color: var(--color-accent);
    border-radius: 2px;
    transition: all 0.3s ease;
  }

  /* Animate to X */
  .menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .menu-toggle.active span:nth-child(2) {
    opacity: 0;
  }

  .menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
  }

  /* ============ OVERLAY MENU ============ */
  .nav-links {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 100%;
    background: rgba(4, 33, 139, 0.97);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: clamp(1.5rem, 3vw, 2rem);
    transform: translateY(-100%);
    transition: transform 0.4s ease;
    z-index: 1000;
  }

  .nav-links.show {
    transform: translateY(0);
  }

  .nav-links li {
    list-style: none;
  }

  .nav-links a {
    color: #ffffff;
    font-size: var(--font-md);
    font-weight: var(--fw-semibold);
    text-decoration: none;
    letter-spacing: 0.5px;
    transition: color 0.3s ease;
  }

  .nav-links a:hover {
    color: var(--color-accent);
  }

  /* Prevent scroll behind overlay */
  body.menu-open {
    overflow: hidden;
  }

  /* ============ FOOTER ============ */
  .site-footer {
    padding: clamp(2rem, 4vw, 3rem) clamp(1.5rem, 4vw, 2rem);
    text-align: center;
    background-color: var(--color-heading);
    color: #fff;
  }

  .footer-container {
    flex-direction: column;
    align-items: center;
    gap: clamp(1.5rem, 3vw, 2rem);
  }

  .site-footer h4 {
    font-size: var(--font-md);
    font-weight: var(--fw-semibold);
    color: var(--color-accent);
    margin-bottom: 0.75rem;
    line-height: var(--lh-tight);
  }

  .site-footer p,
  .footer-contact a,
  .footer-links a,
  .footer-contact span,
  .footer-bottom {
    font-size: var(--font-base);
    line-height: var(--lh-normal);
    font-weight: var(--fw-light);
    color: #fff;
  }

  .footer-social .social-icons {
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
  }

  .footer-social img {
    width: clamp(24px, 5vw, 32px);
    height: clamp(24px, 5vw, 32px);
    filter: brightness(0) invert(1);
  }

  .footer-contact li {
    justify-content: center;
    flex-direction: column;
    text-align: center;
    margin-bottom: 0.75rem;
  }

  .footer-contact img {
    margin-right: 0;
    margin-bottom: 0.5rem;
    width: 26px;
    height: 26px;
    filter: brightness(0) invert(1);
  }

  .footer-links a:hover,
  .footer-contact a:hover {
    color: var(--color-accent);
  }

  .footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.2);
    margin-top: 1.5rem;
    padding-top: 0.75rem;
    font-size: var(--font-sm);
    opacity: 0.85;
  }
}

/* --- Hide mobile styles on desktop --- */
@media (min-width: 769px) {
  .menu-toggle {
    display: none !important;
  }

  .nav-links {
    transform: none !important;
    position: static !important;
    flex-direction: row !important;
    background: none !important;
    height: auto !important;
    justify-content: flex-end !important;
    gap: clamp(1.5rem, 2vw, 3rem) !important;
  }
}
