/* ==================================================
   Mobile layout improvements for parando.org
   ================================================== */

.topnav .nav-toggle {
  display: none;
}


@media (max-width: 800px) {

  /* ---------- HEADER SHRINK ---------- */
  .header {
    padding: 4px 0;
  }

  .header .row {
    display: flex;
    align-items: center;
  }

  .header img {
    width: auto !important;
    max-height: 48px;
  }

  .header .title {
    font-size: 1.25rem;
    line-height: 1.2;
    margin: 0;
  }

  .header .subtitle,
  .header hr {
    display: none;
  }

  /* ---------- TOP NAV BAR ---------- */
  .topnav {
    position: relative;
    height: 44px;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 0 8px !important;
    background-color: #355681;
    font-size: 0.85rem;
    line-height: 1.2;
    overflow: visible;
  }

  /* override legacy floats */
  .topnav a {
    float: none !important;
    padding: 4px 6px;
  }

  /* ---------- HAMBURGER ---------- */
  .nav-toggle {
    display: block !important;
    font-size: 1.4rem;
    padding: 8px 12px;
    color: #f0f0ff;
    text-decoration: none;
    z-index: 1100;
    transition: transform 0.2s ease, opacity 0.2s ease;
  }

  .nav-toggle.open {
    transform: rotate(90deg);
  }

  /* hide hamburger when menu is open */
  .topnav.open .nav-toggle {
    opacity: 0;
    pointer-events: none;
  }

  /* ---------- SOCIAL ICONS ---------- */
  .topnav .float-right {
    position: static;
    display: flex !important;
    align-items: center;
    gap: 8px;
  }

  .topnav .float-right a {
    display: inline-block !important;
    padding: 8px 6px;
    color: #f0f0ff !important;
  }

  .topnav .fab,
  .topnav .fas {
    font-size: 0.9rem;
  }

  /* ---------- SIDE DRAWER ---------- */
  .nav-drawer {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 75%;
    max-width: 280px;
    padding-top: 60px;
    background-color: #355681;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.3);
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    z-index: 1000;
  }

  .nav-drawer a {
    display: block !important;
    padding: 12px 16px;
    text-align: left;
  }

  .topnav.open .nav-drawer {
    transform: translateX(0);
  }

  /* ---------- FOOTER ---------- */
  .footer .float-right {
    position: static !important;
    display: block !important;
    float: right !important;
  }

  .footer .float-right a {
    display: inline-block !important;
    padding: 0 6px !important;
  }

  /* ---------- OVERLAY ---------- */
  .nav-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.55);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease;
    z-index: 900;
  }

  /* show overlay */
  .topnav.open ~ .nav-backdrop {
    opacity: 1;
    visibility: visible;
  }

}
