/* ── Mobile Responsive Navigation (Premium Redesign) ──────────────────────── */

@media (max-width: 991px) {
  /* ── Hide desktop navigation ──────────────────────────────────────── */
  .nav-links, .nav-cta {
    display: none !important;
  }

  /* ── Fixed Header on Mobile ───────────────────────────────────────── */
  .wr-nav {
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10005;
    background: rgba(6, 13, 30, 0.95) !important;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    height: 70px !important;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  }

  .nav-container {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
  }

  /* ── Brand logo styling ──────────────────────────────────────────– */
  .nav-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 10002;
    transition: all 0.3s ease;
  }

  .nav-brand .brand-logo {
    width: 32px;
    height: 32px;
  }

  .nav-brand .brand-text {
    display: flex;
    flex-direction: column;
  }

  .nav-brand .brand-name {
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
  }

  .nav-brand .brand-sub {
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 0.1em;
    text-transform: uppercase;
  }

  .nav-toggle {
    display: flex !important;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
    position: relative;
    z-index: 10002;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    transition: all 0.3s ease;
  }

  .nav-toggle:hover {
    background: rgba(201, 168, 76, 0.1);
    border-radius: 8px;
  }

  .nav-toggle span {
    display: block;
    background-color: #fff;
    height: 2px;
    width: 24px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 2px;
  }

  .nav-toggle.open span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }
  .nav-toggle.open span:nth-child(2) {
    opacity: 0;
    transform: translateX(-10px);
  }
  .nav-toggle.open span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  /* ── Close button positioning in modal ──────────────────────────── */
  .nav-links.open ~ .nav-toggle {
    position: fixed;
    top: 20px;
    left: auto;
    right: auto;
    z-index: 10003;
  }

  /* ── Mobile menu overlay backdrop ──────────────────────────────────────────── */
  body.nav-open::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    animation: fadeInBackdrop 0.3s ease;
  }

  @keyframes fadeInBackdrop {
    from { opacity: 0; }
    to { opacity: 1; }
  }

  /* ── Modal header container ──────────────────────────────────────── */
  .nav-container {
    position: relative;
  }

.nav-brand {
  opacity: 1;
  transition: opacity 0.3s ease;
}

body.nav-open .nav-brand {
  opacity: 1;
  pointer-events: auto;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10001;
  background: rgba(6, 13, 30, 0.95);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding: 15px 20px;
  height: 70px;
  display: flex;
  align-items: center;
}

  /* ── Close button as X ──────────────────────────────────────────– */
  body.nav-open .nav-toggle {
    position: fixed;
    top: 18px;
    left: auto;
    right: 20px;
    transform: none;
    width: 32px;
    height: 32px;
    background: transparent;
    z-index: 10002;
    padding: 0;
  }

  body.nav-open .nav-toggle span {
    background-color: #fff;
    width: 22px;
    box-shadow: 0 0 10px rgba(201, 168, 76, 0.5);
  }

  body.nav-open .nav-toggle span:nth-child(1) {
    transform: rotate(45deg);
    position: absolute;
  }

  body.nav-open .nav-toggle span:nth-child(2) {
    display: none;
  }

  body.nav-open .nav-toggle span:nth-child(3) {
    transform: rotate(-45deg);
    position: absolute;
  }

  /* ── Mobile menu overlay ──────────────────────────────────────────── */
  .nav-links.open {
    display: flex !important;
    flex-direction: column !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: auto !important;
    transform: none !important;
    width: 100% !important;
    max-width: none !important;
    height: 70vh !important;
    max-height: 70vh !important;
    background: rgba(6, 13, 30, 0.92) !important;
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    z-index: 10000;
    align-items: stretch;
    justify-content: flex-start;
    padding: 90px 0 30px 0 !important;
    margin: 0 !important;
    list-style: none;
    overflow-y: auto;
    border-radius: 0 0 30px 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    border-bottom: 1px solid rgba(201, 168, 76, 0.2);
  }

  @keyframes slideInMenu {
    from { 
      transform: translateY(-100%);
      opacity: 0;
    }
    to { 
      transform: translateY(0);
      opacity: 1;
    }
  }

  /* ── Remove pseudo-element header ──────────────────────────────── */
  .nav-links.open::before {
    content: '';
    display: none;
  }

  .nav-links.open li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    width: 100%;
    margin: 0;
    flex-shrink: 0;
  }

  .nav-links.open a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 1.1rem;
    padding: 18px 24px;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    min-height: 50px;
  }

  .nav-links.open a:active,
  .nav-links.open a:hover {
    background: rgba(201, 168, 76, 0.15);
    color: #c9a84c;
    padding-left: 28px;
  }

  .nav-links.open a.active {
    color: #c9a84c;
    background: rgba(201, 168, 76, 0.1);
    border-left: 4px solid #c9a84c;
    padding-left: 24px;
  }

  /* ── Mobile dropdown menus ──────────────────────────────────────── */
  .nav-link-dropdown i {
    font-size: 0.75rem;
    transition: transform 0.3s ease;
    margin-left: 10px;
    color: rgba(255, 255, 255, 0.7);
  }

  .nav-item-dropdown.open > .nav-link-dropdown i {
    transform: rotate(180deg);
    color: #c9a84c;
  }

  .nav-dropdown {
    position: static !important;
    display: none;
    opacity: 0;
    max-height: 0;
    visibility: hidden;
    background: rgba(201, 168, 76, 0.08);
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .nav-item-dropdown.open .nav-dropdown {
    display: block;
    opacity: 1;
    visibility: visible;
    max-height: 800px;
    padding: 5px 0 !important;
  }

  .nav-dropdown a {
    padding: 16px 24px 16px 48px !important;
    font-size: 0.98rem;
    color: rgba(255, 255, 255, 0.7) !important;
    border-bottom: none !important;
    font-weight: 400;
    min-height: 48px;
  }

  .nav-dropdown a:active,
  .nav-dropdown a:hover {
    background: rgba(201, 168, 76, 0.15) !important;
    color: #c9a84c !important;
    padding-left: 52px !important;
  }

  /* ── Mobile CTA buttons inside modal ──────────────────────────────────────────── */
  .nav-cta.open {
    display: none !important;
  }

  /* ── Social icons section in mobile menu ──────────────────────────– */
  body.nav-open .footer-socials {
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 16px;
    padding: 16px 24px;
    background: rgba(6, 13, 30, 0.98);
    border-top: 1px solid rgba(201, 168, 76, 0.1);
    margin-top: auto;
    flex-direction: row;
    z-index: 10;
  }

  /* ── Prevent body scroll when menu is open ──────────────────────── */
  body.nav-open {
    overflow: hidden !important;
    height: 100vh !important;
  }
}

/* ── Small mobile adjustments ────────────────────────– */
@media (max-width: 480px) {
  .brand-name {
    font-size: 0.95rem;
  }
  .brand-sub {
    display: none;
  }

  /* Modal adjustments for smaller screens - maintain 70% height */
  .nav-links.open {
    width: 100% !important;
    max-width: none !important;
    height: 70vh !important;
    max-height: 70vh !important;
    padding: 90px 0 30px 0 !important;
  }

  .nav-links.open a {
    font-size: 1rem;
    padding: 16px 20px;
    min-height: 48px;
  }

  .nav-dropdown a {
    padding: 14px 20px 14px 44px !important;
    min-height: 46px;
  }

  .nav-cta.open a {
    font-size: 0.85rem;
    padding: 12px 8px;
  }
}
