/* navbar.css — Navbar dos estados: links centrados/transparente → logo+links/sólido */

/* PALETA PROHIBIDA — nunca usar estos colores */
/* #1E7087 #1e7087 #17a589 — NO son de la paleta */

/* ─── Estado base: transparente, links centrados ─── */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  padding-top: env(safe-area-inset-top);
  padding-left: calc(clamp(1.5rem, 4vw, 3.5rem) + env(safe-area-inset-left));
  padding-right: calc(clamp(1.5rem, 4vw, 3.5rem) + env(safe-area-inset-right));
  background: transparent;
  border-bottom: none;
  transition: background 0.4s ease,
              border-color 0.4s ease,
              backdrop-filter 0.4s ease,
              box-shadow 0.4s ease;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  height: clamp(56px, 7vh, 72px);
  width: 100%;
  position: relative;
}

/* ─── Logo — absoluto, oculto por defecto ─── */
.nav-logo-wrapper {
  position: absolute;
  left: 0;
  display: flex;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.nav-logo-wrapper a {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.nav-logo-img {
  height: clamp(30px, 3.2vw, 42px);
  width: auto;
  display: block;
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: 0.95;
  transition: filter 0.3s ease, opacity 0.3s ease;
}

.nav-logo-wrapper a:hover .nav-logo-img {
  filter: brightness(0) invert(1) drop-shadow(0 0 10px rgba(0,174,239,0.7));
  opacity: 1;
}

/* ─── Links ─── */
.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(1.5rem, 3vw, 3rem);
  justify-content: center;
}

.nav-links a {
  font-family: var(--font-body);
  font-size: clamp(0.8rem, 0.9vw, 0.92rem);
  font-weight: 500;
  color: #FFFFFF;
  text-decoration: none;
  letter-spacing: 0.04em;
  text-shadow: 0 1px 4px rgba(0,0,0,0.6), 0 0 8px rgba(0,0,0,0.3);
  transition: color 0.3s ease, text-shadow 0.3s ease;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute; bottom: -4px; left: 0; right: 0;
  height: 1px; background: #00AEEF;
  transform: scaleX(0); transition: transform 0.3s ease;
}

.nav-links a:hover { color: #FFFFFF; text-shadow: none; }
.nav-links a:hover::after { transform: scaleX(1); }

/* ─── CTA Cotizar ─── */
.nav-cta {
  padding: 8px 20px;
  background: #AFC0D9 !important;
  color: #081F4D !important;
  text-shadow: none !important;
  border: none;
  border-radius: 6px;
  font-family: var(--font-body) !important;
  font-size: clamp(0.78rem, 0.88vw, 0.9rem) !important;
  font-weight: 700 !important;
  text-decoration: none;
  margin-left: clamp(0.5rem, 1vw, 1rem);
  transition: background 0.3s ease, transform 0.3s ease !important;
  white-space: nowrap;
  letter-spacing: 0.05em !important;
}

.nav-cta::after { display: none !important; }

.nav-cta:hover {
  background: #D0D9E8 !important;
  color: #081F4D !important;
  text-shadow: none !important;
  transform: translateY(-1px);
}

/* ─── Hamburger móvil ─── */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  position: absolute;
  right: 0;
  z-index: 300;
  -webkit-tap-highlight-color: transparent;
}

.hamburger-line {
  display: block;
  width: 24px;
  height: 2px;
  background: #FFFFFF !important;
  border-radius: 2px;
  transition: all 0.35s cubic-bezier(0.23, 1, 0.32, 1);
  transform-origin: center;
}

.hamburger.is-open .hamburger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.hamburger.is-open .hamburger-line:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.hamburger.is-open .hamburger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ─── Estado SCROLLED ─── */
.navbar.scrolled {
  background: rgba(8, 31, 77, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0, 174, 239, 0.18);
  box-shadow: 0 4px 32px rgba(0, 0, 0, 0.3);
}

.navbar.scrolled .nav-logo-wrapper {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.navbar.scrolled .nav-links a { text-shadow: none; }

/* ─── Mobile menu overlay ─── */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 150;
  background: #081F4D !important;
  top: 0;
  padding-top: env(safe-area-inset-top);
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.4s ease, visibility 0s linear 0.4s;
  overflow-y: auto;
}

.mobile-menu.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 0.4s ease, visibility 0s linear 0s;
}

.mobile-menu-inner {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  background: #081F4D !important;
  padding-top: calc(env(safe-area-inset-top) + 1.5rem);
  padding-bottom: calc(env(safe-area-inset-bottom) + 1.5rem);
  padding-left: calc(env(safe-area-inset-left) + 1.5rem);
  padding-right: calc(env(safe-area-inset-right) + 1.5rem);
}

.mobile-menu-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: clamp(3rem, 10vh, 5rem);
}

.mobile-menu-logo {
  height: 36px;
  width: auto;
  filter: brightness(0) invert(1);
  opacity: 0.92;
}

.mobile-menu-close {
  display: none;
}

.mobile-menu-nav {
  display: flex;
  flex-direction: column;
  gap: 0;
  flex: 1;
}

.mobile-menu-link {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: clamp(1.2rem, 4vh, 1.8rem) 0;
  border-bottom: 1px solid rgba(175,192,217,0.12);
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.4s ease,
              transform 0.4s ease;
}

.mobile-menu-link:first-child {
  border-top: 1px solid rgba(175,192,217,0.12);
}

.mobile-menu.is-open .mobile-menu-link {
  opacity: 1;
  transform: translateY(0);
}

.mobile-menu.is-open .mobile-menu-link:nth-child(1) { transition-delay: 0.1s; }
.mobile-menu.is-open .mobile-menu-link:nth-child(2) { transition-delay: 0.15s; }
.mobile-menu.is-open .mobile-menu-link:nth-child(3) { transition-delay: 0.2s; }
.mobile-menu.is-open .mobile-menu-link:nth-child(4) { transition-delay: 0.25s; }

.mobile-menu-num {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 700;
  color: #00AEEF;
  letter-spacing: 0.08em;
  min-width: 28px;
}

.mobile-menu-text {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: clamp(2rem, 8vw, 3rem);
  font-weight: 800;
  color: #FFFFFF;
  letter-spacing: -0.01em;
  flex: 1;
  line-height: 1;
  transition: color 0.3s ease;
}

.mobile-menu-link:active .mobile-menu-text {
  color: #AFC0D9;
}

.mobile-menu-arrow {
  font-size: 18px;
  color: #00AEEF;
  opacity: 0;
  transform: translateX(-8px);
  transition: all 0.3s ease;
}

.mobile-menu-link:active .mobile-menu-arrow {
  opacity: 1;
  transform: translateX(0);
}

.mobile-menu-footer {
  margin-top: clamp(2rem, 6vh, 4rem);
  padding-top: 2rem;
  border-top: 1px solid rgba(175,192,217,0.12);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.mobile-menu-cta {
  display: inline-flex;
  align-items: center;
  background: #AFC0D9;
  color: #081F4D;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 700;
  padding: 14px 28px;
  border-radius: 6px;
  text-decoration: none;
  letter-spacing: 0.03em;
  transition: background 0.2s ease;
  align-self: flex-start;
}

.mobile-menu-cta:active {
  background: #D0D9E8;
}

.mobile-menu-tagline {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  color: rgba(175,192,217,0.5);
  line-height: 1.6;
}

.mobile-menu-tagline strong {
  color: rgba(175,192,217,0.7);
}

/* ─── Responsive — mostrar hamburguesa solo en móvil ─── */
@media (max-width: 768px) {
  .hamburger { display: flex; }
  .nav-links  { display: none; }
}

@media (min-width: 769px) {
  .mobile-menu { display: none; }
}
