/* ============================================================
   APBEFS - Responsive Design
   ============================================================ */

@media (max-width: 1200px) {
  :root { --container: 960px; }
}

@media (max-width: 992px) {
  /* Topbar */
  .topbar-left { display: none; }
  .topbar-center { font-size: .75rem; }

  /* Navbar mobile */
  .nav-toggle { display: flex; }

  .nav-menu {
    position: fixed;
    top: 0; right: -100%;
    width: min(300px, 82vw);
    height: 100vh;
    background: #fff;
    flex-direction: column;
    align-items: stretch;
    padding: 4.5rem 1.25rem 2rem;
    box-shadow: var(--shadow-lg);
    transition: right .3s ease;
    overflow-y: auto;
    z-index: 999;
  }
  .nav-menu.open { right: 0; }
  .nav-item { border-bottom: 1px solid var(--color-border); }
  .nav-link { padding: .75rem .25rem; font-size: .95rem; }

  .dropdown {
    position: static;
    opacity: 1; visibility: visible; transform: none;
    box-shadow: none; border: none;
    border-left: 3px solid var(--color-primary);
    padding-left: .5rem;
    margin: .2rem 0 .5rem;
    display: none;
    background: #f9f9f9;
    border-radius: 0;
  }
  .dropdown.open { display: block; }
  .dropdown a { padding: .55rem .75rem; font-size: .88rem; }

  .nav-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,.4); z-index: 998; display: none;
  }
  .nav-overlay.active { display: block; }

  /* Footer */
  .footer-top { grid-template-columns: 1fr 1fr; }
  .footer-logo-col { grid-column: 1 / -1; }
}

@media (max-width: 768px) {
  .footer-top { grid-template-columns: 1fr; }
  .footer-logo-col { grid-column: auto; }
  .py-5 { padding: 3.5rem 0; }
  .py-4 { padding: 2.5rem 0; }
}

@media (max-width: 576px) {
  .container { padding: 0 1rem; }
  .navbar-brand img { height: 52px; }
  .footer-bottom { flex-direction: column; text-align: center; }
  #back-to-top { bottom: 1rem; right: 1rem; }
}

@media print {
  #header, #footer, #back-to-top, .topbar { display: none !important; }
  .page-banner { background: #fff !important; }
  .page-banner h1 { color: #000 !important; }
}
