/* ============================================================
   Brijcode — Global responsive styles
   Navbar, footer, base layout
   ============================================================ */

@media (max-width: 991px) {
  .navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
  }

  .navbar-toggler {
    display: flex;
    z-index: 1101;
  }

  .site-header {
    padding: 6px 0;
  }

  .brand-logo {
    height: 50px;
  }

  .nav-collapse {
    position: fixed;
    top: 0;
    right: -100%;
    width: min(320px, 85vw);
    height: 100vh;
    height: 100dvh;
    background: var(--ink-deep);
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 30px;
    padding: 64px 28px 28px;
    margin: 0;
    transition: right 0.3s ease;
    z-index: 1100;
    box-shadow: -20px 0 50px rgba(0, 0, 0, 0.35);
    overflow-y: auto;
  }

  .nav-collapse.open {
    right: 0;
  }

  .nav-links {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
    width: 100%;
  }

  /* Mobile drawer is navy — keep links white even when header is scrolled */
  .site-header.scrolled .nav-links a {
    color: #ffffff;
  }

  .site-header.scrolled .nav-links a:hover {
    color: var(--marigold);
  }

  .btn-open-account {
    align-self: flex-start;
  }

  .nav-dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    background: rgba(255, 255, 255, 0.06);
    display: none;
    margin-top: 6px;
    min-width: 0;
    width: 100%;
  }

  .nav-dropdown.is-open .nav-dropdown-menu {
    display: block;
  }

  .nav-dropdown-menu li a {
    color: #ffffffcc;
    white-space: normal;
  }

  .nav-dropdown-menu li a:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--marigold);
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem 1.5rem;
  }

  .footer-grid > div:first-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 767px) {
  html {
    overflow-x: hidden;
  }

  body {
    overflow-x: hidden;
  }

  .container {
    padding-left: 16px;
    padding-right: 16px;
  }

  .bottom-img.bottom-right {
    display: none;
  }

  .bottom-img.bottom-left {
    opacity: 0.12;
  }

  .site-footer {
    padding: 4rem 0 1.75rem;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem 1.25rem;
  }

  .footer-desc {
    max-width: none;
  }
}

@media (max-width: 575px) {
  html {
    overflow-x: hidden;
  }

  .brand {
    margin-bottom: 0;
  }

  .brand-logo {
    height: 50px;
  }

  /* Mobile footer: brand full-width, then 2×2 link columns to reduce height */
  .footer-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 1.5rem 1rem;
  }

  .footer-grid > div:first-child {
    grid-column: 1 / -1;
  }

  .site-footer h4 {
    margin-bottom: 0.75rem;
    font-size: 0.72rem;
  }

  .site-footer li {
    margin: 0.4rem 0;
  }

  .site-footer a {
    font-size: 0.82rem;
    line-height: 1.35;
  }

  .footer-desc {
    font-size: 0.84rem;
    margin-top: 0.65rem;
  }

  .footer-contact-item {
    align-items: flex-start;
    gap: 8px;
  }

  .footer-contact-ico {
    flex-shrink: 0;
    margin-top: 2px;
  }

  .footer-address-text p {
    font-size: 0.78rem;
    line-height: 1.4;
  }

  .footer-address-label {
    font-size: 0.7rem;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 6px;
    text-align: center;
  }
}

@media (min-width: 992px) {
  html {
    overflow-x: clip;
  }
}
