/* nav-responsive.css — Menú hamburguesa en pantallas < 500px */

.navbar-clasi-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  width: 100%;
}

.navbar-clasi-menu {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.nav-hamburger {
  display: none;
  margin-left: auto;
  padding: 0.5rem;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.nav-hamburger-box {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 26px;
  height: 22px;
}

.nav-hamburger-line {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--brand-text);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.2s ease;
}

.nav-hamburger.is-active .nav-hamburger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-hamburger.is-active .nav-hamburger-line:nth-child(2) {
  opacity: 0;
}

.nav-hamburger.is-active .nav-hamburger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav-mobile-only {
  display: none !important;
}

.nav-desktop-only {
  display: flex;
}

.navbar-clasi-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-shrink: 0;
}

.nav-overlay {
  display: none;
}

@media (max-width: 499px) {
  .nav-hamburger {
    display: flex;
    align-items: center;
  }

  .nav-desktop-only {
    display: none !important;
  }

  .nav-mobile-only {
    display: block !important;
  }

  .navbar-clasi-inner {
    flex-wrap: nowrap;
    position: relative;
  }

  .navbar-clasi-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1050;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    max-height: calc(100vh - 56px);
    overflow-y: auto;
    background: #fff;
    border-bottom: 1px solid var(--brand-border);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
    padding: 0.75rem 1rem 1.25rem;
  }

  .navbar-clasi-menu.is-open {
    display: flex;
  }

  .nav-overlay {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 1040;
    background: rgba(0, 0, 0, 0.35);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, visibility 0.25s ease;
  }

  .nav-overlay.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  body.nav-open {
    overflow: hidden;
  }

  .navbar-clasi-actions {
    order: 1;
    flex-direction: column;
    width: 100%;
    gap: 0.5rem;
    padding-bottom: 0.75rem;
    margin-bottom: 0.75rem;
    border-bottom: 1px solid var(--brand-border);
  }

  .nav-menu-section {
    order: 2;
    padding-bottom: 0;
    margin-bottom: 0;
    border-bottom: none;
  }

  .nav-menu-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--brand-muted);
    margin: 0 0 0.5rem;
  }

  .nav-cat-links {
    list-style: none;
    margin: 0;
    padding: 0;
  }

  .nav-cat-links li + li {
    margin-top: 0.15rem;
  }

  .nav-cat-links a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 0.35rem;
    color: var(--brand-text);
    text-decoration: none;
    font-size: 0.95rem;
    border-radius: 8px;
  }

  .nav-cat-links a:hover {
    background: var(--brand-bg2);
    color: var(--brand-accent);
  }

  .navbar-clasi-actions .btn {
    width: 100%;
    justify-content: center;
    padding: 0.65rem 1rem;
  }
}
