/* =============================================
   NAV — Museos San Lorenzo
   ============================================= */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: 72px;
  display: flex;
  align-items: center;
  transition: background var(--t-base), box-shadow var(--t-base);
}

.nav--scrolled {
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 1px 0 rgba(0,0,0,0.08), var(--shadow-sm);
}

.nav--scrolled .nav__link {
  color: var(--c-dark);
}

.nav--scrolled .nav__link:hover {
  color: var(--c-azul);
}

.nav--scrolled .nav__link:hover::after,
.nav--scrolled .nav__link.active::after {
  transform: scaleX(1);
  background: var(--c-rojo);
}

.nav--scrolled .nav__logo-text {
  color: var(--c-dark);
}

.nav--scrolled .nav__cta {
  background: var(--c-rojo);
  color: var(--c-white);
}

.nav__inner {
  position: relative;
  z-index: 99999;
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--s4);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s4);
}

/* ---- LOGO ---- */
.nav__logo {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  text-decoration: none;
}

.nav__logo-icon {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
}

.nav__logo-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.nav__logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  color: var(--c-white);
  transition: color var(--t-base);
}

.nav__logo-text span:first-child {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.7;
}

.nav__logo-text span:last-child {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ---- LINKS ---- */
.nav__links {
  display: flex;
  align-items: center;
  gap: var(--s3);
  list-style: none;
}

.nav__link {
  font-size: 13px;
  font-weight: 500;
  color: rgba(255,255,255,0.88);
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: color var(--t-fast);
  position: relative;
  padding-bottom: 2px;
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--c-rojo);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform var(--dur-base) var(--ease-out-expo);
  will-change: transform;
}

.nav__link:hover::after,
.nav__link.active::after {
  transform: scaleX(1);
}

.nav__link:hover {
  color: var(--c-white);
}

/* ---- RIGHT SIDE ---- */
.nav__right {
  display: flex;
  align-items: center;
  gap: var(--s2);
  flex-shrink: 0;
}

.nav__contact-info {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.nav__contact-info a {
  font-size: 11px;
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  transition: color var(--t-fast);
  font-weight: 400;
}

.nav__contact-info a:hover {
  color: rgba(255,255,255,0.95);
}

.nav--scrolled .nav__contact-info a {
  color: var(--c-mid);
}

.nav--scrolled .nav__contact-info a:hover {
  color: var(--c-dark);
}

.nav__cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  background: var(--c-white);
  color: var(--c-dark);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: var(--r-md);
  text-decoration: none;
  transition: all var(--t-base);
  white-space: nowrap;
}

.nav__cta:hover {
  background: var(--c-rojo);
  color: var(--c-white);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(227,11,23,0.3);
}

/* ---- HAMBURGER ---- */
.nav__hamburger {
  position: relative;
  z-index: 99999;
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 6px;
  background: none;
  border: none;
}

.nav__hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--c-white);
  border-radius: 2px;
  transition: all var(--t-base);
}

.nav--scrolled .nav__hamburger span {
  background: var(--c-dark);
}

.nav__hamburger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav__hamburger.open span:nth-child(2) {
  opacity: 0;
}
.nav__hamburger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---- MOBILE MENU ---- */
.nav__mobile {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #fff;
  z-index: 88888;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 6rem 2rem 3rem;
  /* Oculto por defecto */
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-12px);
  transition:
    opacity    0.28s ease,
    transform  0.28s ease,
    visibility 0s   linear 0.28s;
}

.nav__mobile.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
  transition:
    opacity    0.28s ease,
    transform  0.28s ease,
    visibility 0s   linear 0s;
}

.nav__mobile-link {
  font-size: 15px;
  font-weight: 600;
  color: var(--c-dark);
  padding: var(--s2) 0;
  border-bottom: 1px solid var(--c-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-decoration: none;
}

.nav__mobile-link:hover {
  color: var(--c-azul);
}

.nav__mobile .nav__cta {
  background: var(--c-rojo);
  color: var(--c-white);
  justify-content: center;
  margin-top: var(--s1);
}

/* ---- MUSEUM COLOR BAR ---- */
.nav__museo-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  display: flex;
}

.nav__museo-bar span {
  flex: 1;
}

.nav__museo-bar span:nth-child(1) { background: var(--c-azul); }
.nav__museo-bar span:nth-child(2) { background: var(--c-rojo); }
.nav__museo-bar span:nth-child(3) { background: var(--c-naranja); }
.nav__museo-bar span:nth-child(4) { background: var(--c-verde); }

/* ---- RESPONSIVE ---- */
@media (max-width: 1100px) {
  .nav__links { gap: var(--s2); }
  .nav__contact-info { display: none; }
}

@media (max-width: 900px) {
  .nav__links { display: none; }
  .nav__hamburger {
  position: relative;
  z-index: 99999; display: flex; }
}

@media (max-width: 480px) {
  .nav__logo-text span:last-child { font-size: 13px; }
}

/* ── Botón cerrar dentro del overlay ── */
.nav__mobile-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #f5f5f5;
  border: none;
  font-size: 22px;
  color: #1a1a1a;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.nav__mobile-close:active {
  background: #e0e0e0;
  transform: scale(0.95);
}