/* --- NAVBAR BASE (LIQUID GLASS FULL WIDTH) --- */
.nav-main {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 1.2rem 0 1rem; /* Reducido para evitar bloqueo de clics */
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  background: transparent;
  width: 100%;
}

.nav-main .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-main.scrolled {
  padding: 1rem 0 2rem;
  transition: all 0.5s ease;
  background: transparent;
  /* Desenfoque gaussiano */
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  /* Máscara para desvanecer el efecto y eliminar la línea divisoria */
  mask-image: linear-gradient(to bottom, black 40%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, black 40%, transparent 100%);
}

/* Solo aplicamos el cristal cuando estamos sobre fondo blanco (scrolled-dark-text) */
.nav-main.scrolled.scrolled-dark-text {
  background: linear-gradient(to bottom, 
    rgba(255, 255, 255, 0.85) 0%, 
    rgba(255, 255, 255, 0.4) 60%, 
    transparent 100%);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  mask-image: linear-gradient(to bottom, black 60%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, black 60%, transparent 100%);
}

.nav-main.scrolled.scrolled-dark-text a {
  color: #04101f !important;
}

.nav-main.scrolled.scrolled-dark-text .btn-premium {
  color: #fff !important;
}

.nav-main.scrolled.scrolled-dark-text .logo img {
  filter: brightness(0); /* Logo negro solo en secciones claras */
}

.nav-main.scrolled .logo img {
  filter: brightness(1) invert(0); /* Asegura que el logo sea blanco en secciones oscuras */
}

/* --- LIQUID GLASS BASE --- */
.glass {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.1);
  position: relative;
}

.glass-pill {
  border-radius: var(--radius-pill);
  padding: 0.5rem 0.5rem 0.5rem 1.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  transition: all 0.3s ease;
}

/* Links dentro del pill: estado base ligeramente apagado */
.glass-pill a:not(.btn-premium) {
  padding: 0.35rem 0.9rem;
  border-radius: var(--radius-pill);
  color: rgba(255, 255, 255, 0.65);
  font-weight: 500;
  font-size: 0.88rem;
  transition: all 0.25s ease;
  position: relative;
}

.glass-pill a:not(.btn-premium):hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

/* Estado activo: mini-píldora con fondo blanco semitransparente */
.glass-pill a.active:not(.btn-premium) {
  color: #fff;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* Variante cuando el nav está sobre sección clara */
.nav-main.scrolled.scrolled-dark-text .glass-pill a:not(.btn-premium) {
  color: rgba(4, 16, 31, 0.55) !important;
}

.nav-main.scrolled.scrolled-dark-text .glass-pill a:not(.btn-premium):hover {
  color: #04101f !important;
  background: rgba(4, 16, 31, 0.07);
}

.nav-main.scrolled.scrolled-dark-text .glass-pill a.active:not(.btn-premium) {
  color: #04101f !important;
  background: rgba(4, 16, 31, 0.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* Active state en el menú mobile */
.nav-mobile-menu a.active {
  color: #fff;
  position: relative;
}

.nav-mobile-menu a.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--brand-blue);
  border-radius: 2px;
}

/* --- ANIMACIÓN DE REVELADO --- */
@keyframes revealUp {
  0% {
    opacity: 0;
    transform: translateY(30px);
    filter: blur(10px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

.reveal {
  opacity: 0;
  will-change: transform, opacity;
}

.reveal.active {
  animation: revealUp 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Estado del vidrio cuando el nav se desplaza sobre fondo blanco */
.nav-main.scrolled .glass {
  background: rgba(195, 223, 255, 0.2); /* Usando el nuevo tono #c3dfff con transparencia */
  backdrop-filter: blur(20px) brightness(1);
  border-color: rgba(195, 223, 255, 0.4);
}

.nav-main.scrolled a {
  color: #b3c9fc !important; /* Texto oscuro para fondo blanco */
}

.nav-main.scrolled .logo {
  color: #04101f !important;
}

.nav-main.scrolled .btn-premium {
  color: #fff !important; /* Mantener texto blanco en el botón azul */
}

/* --- BOTONES PREMIUM --- */
.btn-premium {
  background: var(--brand-blue);
  color: #fff;
  padding: 0.8rem 2rem;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 15px var(--brand-blue-glow);
  transition: var(--transition-fast);
}

.btn-premium:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px var(--brand-blue-glow);
  background: #3865f5;
}

.btn-glass {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  padding: 0.8rem 2rem;
  border-radius: var(--radius-pill);
  font-weight: 500;
  transition: var(--transition-fast);
}

.btn-glass:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* --- CARDS --- */
.glass-card {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: var(--transition-slow);
  overflow: hidden;
  position: relative;
}

.glass-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-5px);
}

.glass-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  color: #fff;
}

.glass-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* --- BRAND CARDS (PREMIUM STYLE) --- */
.brand-card {
  position: relative;
  border-radius: 32px;
  overflow: hidden;
  height: 100%;
  transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  background: #000;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.brand-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.brand-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 30px 60px rgba(0,0,0,0.4);
}

.brand-card:hover img {
  transform: scale(1.08);
}

.brand-card .card-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1.8rem;
  background: linear-gradient(to top, 
    rgba(0,0,0,0.9) 0%, 
    rgba(0,0,0,0.6) 50%, 
    transparent 100%);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.brand-card .card-tag-wrapper {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.brand-card .card-tag {
  background: rgba(255, 255, 255, 0.15);
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  backdrop-filter: blur(5px);
}

.brand-card h3 {
  font-size: 1.4rem;
  font-weight: 800;
  margin: 0;
  line-height: 1.2;
}

.brand-card p {
  color: rgba(255,255,255,0.6);
  font-size: 0.85rem;
  line-height: 1.4;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.brand-card .btn-card {
  background: #fff;
  color: #000;
  padding: 0.8rem;
  border-radius: 16px;
  font-weight: 800;
  font-size: 0.9rem;
  text-align: center;
  margin-top: 1.2rem;
  transition: all 0.3s ease;
  text-decoration: none;
}

.brand-card:hover .btn-card {
  background: var(--brand-blue);
  color: #fff;
}

/* --- FOOTER CTA & BAR --- */
.footer-section {
  padding: 10rem 0 4rem;
  background: var(--bg-deep);
  position: relative;
  overflow: hidden;
}

.footer-section::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, var(--brand-blue-glow) 0%, transparent 70%);
  opacity: 0.5;
  z-index: 0;
}

.footer-cta {
  background: rgba(60, 71, 133, 0.137);
  backdrop-filter: blur(40px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 40px;
  padding: 6rem 2rem;
  text-align: center;
  position: relative;
  z-index: 1;
}

.footer-cta h2 {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 800;
  margin-bottom: 1.5rem;
  line-height: 1;
  color: #fff;
}

.footer-cta p {
  color: var(--text-muted);
  max-width: 500px;
  margin: 0 auto 3rem;
}

.footer-bar {
  margin-top: 6rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--text-dim);
}

.footer-links {
  display: flex;
  gap: 2rem;
}

.footer-links a {
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: #fff;
}

/* --- FONDO DEGRADADO BRAND --- */
.bg-brand-glow {
  background:
    radial-gradient(ellipse at 80% 15%, rgba(26, 107, 255, 0.28) 0%, transparent 50%),
    radial-gradient(ellipse at 15% 85%, rgba(26, 107, 255, 0.12) 0%, transparent 40%),
    #04101f;
}

/* --- TITULOS --- */
.title-italic {
  font-family: var(--font-heading);
  font-style: italic;
}

.hero-title {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: clamp(3.5rem, 8vw, 7rem);
  letter-spacing: -0.04em;
  margin-bottom: 1.5rem;
  color: #fff;
}

/* --- HAMBURGER BUTTON --- */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0.5rem;
  z-index: 1100;
}

.nav-hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.nav-hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; width: 0; }
.nav-hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* --- MOBILE MENU OVERLAY --- */
.nav-mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(4, 16, 31, 0.97);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  z-index: 1050;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
  padding: 2rem;
}

.nav-mobile-menu.open { display: flex; }

.nav-mobile-menu a {
  font-size: 1.6rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  letter-spacing: -0.02em;
  transition: color 0.2s ease;
}

.nav-mobile-menu a:hover { color: #fff; }

.nav-mobile-menu .btn-premium {
  font-size: 1rem;
  margin-top: 1rem;
}

/* --- RESPONSIVE BREAKPOINTS --- */
@media (max-width: 768px) {
  /* Navbar: ocultar pill y botón 2026, mostrar hamburger */
  .nav-main .glass-pill { display: none; }
  .nav-hide-mobile { display: none !important; }
  .nav-hamburger { display: flex; }

  /* Hero title: reducir en mobile */
  .hero-title {
    font-size: clamp(2.8rem, 12vw, 4rem) !important;
  }

  /* Footer CTA */
  .footer-cta {
    padding: 3rem 1.5rem;
    border-radius: 24px;
  }

  .footer-section { padding: 5rem 0 3rem; }

  /* Footer bar: stack vertical */
  .footer-bar {
    flex-direction: column !important;
    align-items: center !important;
    text-align: center;
    gap: 1.5rem;
  }

  .footer-links { justify-content: center; gap: 1.5rem; }

  /* Hero CTAs: columna en mobile */
  .hero-ctas {
    flex-direction: column;
    align-items: center;
    gap: 1rem !important;
  }
}
