/* ─── CONTAINER ─────────────────────────────────────── */
.container {
  width: min(1100px, calc(100% - 48px));
  margin: 0 auto;
}

/* ─── NAVBAR ─────────────────────────────────────────── */
.navbar {
  background-color: rgba(26, 35, 50, 0.95) !important;
  backdrop-filter: blur(10px);
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* ─── LOGO ───────────────────────────────────────────── */
.logo {
  height: 75px;
  width: auto;
}

/* ─── LINKS ──────────────────────────────────────────── */
.nav-link {
  color: var(--text-light-gray) !important;
  font-weight: 500;
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 1px;
  transition: color 0.3s;
  margin: 0 0.4rem;
  border-radius: 6px;
  transition: all 0.25s, transform 0.25s;
}

.nav-link:not(#nav-contact):hover {
  color: var(--accent-mind) !important;
  background: rgba(255, 255, 255, 0.06);
  filter: brightness(1.3);
}

.nav-link:not(#nav-contact).active {
  color: var(--accent-mind) !important;
  background: rgba(255, 255, 255, 0.06);
}

/* ─── BOTÓN CONTACTO ─────────────────────────────────── */
#nav-contact {
  background: var(--accent-mind);
  color: var(--text-white) !important;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 9px 18px;
  border-radius: 8px;
  margin-left: 10px;
  transition: filter 0.25s, transform 0.25s;
}

#nav-contact:hover {
  filter: brightness(1.12);
  transform: translateY(-1px);
  background: var(--accent-mind);
}

/* ─── SEPARADOR ──────────────────────────────────────── */
.nav-sep {
  width: 1px;
  height: 22px;
  background: rgba(255, 255, 255, 0.15);
  margin: 0 20px;
  flex-shrink: 0;
}

/* ─── SELECTOR IDIOMA ────────────────────────────────── */
.language-selector {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.language-selector select {
  background-color: rgba(45, 123, 135, 0.15);
  color: var(--text-white);
  border: 1px solid rgba(45, 123, 135, 0.3);
  border-radius: 4px;
  padding: 0.4rem 0.8rem;
  font-size: 0.85rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.3s ease;
  outline: none;
}

.language-selector select:hover {
  background-color: rgba(45, 123, 135, 0.25);
  border-color: var(--accent-mind);
}

.language-selector select:focus {
  border-color: var(--accent-mind);
  box-shadow: 0 0 0 2px rgba(45, 123, 135, 0.2);
}

.language-selector select option {
  background-color: var(--dark-blue);
  color: var(--text-white);
}

.language-selector select {
    background-image: url('../img/flags/es.svg');
    background-repeat: no-repeat;
    background-position: 8px center;
    background-size: 20px;
    padding-left: 32px;
}

/* ─── MOBILE ─────────────────────────────────────────── */
@media (max-width: 991.98px) {

  /* Neutraliza la animación de altura de Bootstrap */
  .navbar-collapse.collapsing {
    height: auto !important;
    transition: none !important;
  }

  /* Estado base del panel (cerrado) */
  .navbar-collapse {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: rgba(26, 35, 50, 0.98);
    backdrop-filter: blur(10px);
    padding: 0 24px;
    z-index: 9998;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);

    /* Animación: entra desde arriba */
    opacity: 0;
    transform: translateY(-20px);
    transition: opacity 0.4s cubic-bezier(0.23, 1, 0.32, 1), transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    pointer-events: none;
    visibility: hidden;
  }

  /* Panel abierto */
  .navbar-collapse.show {
    display: flex !important;
    flex-direction: column;
    align-items: stretch;
    padding: 16px 24px 28px;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    visibility: visible;
  }

  .nav-link {
    margin: 0;
    padding: 18px 0;
    font-size: 1.1rem;
    letter-spacing: 2px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 0;
  }

  /* Contacto */
  #nav-contact {
    margin: 20px 0 0;
    padding: 14px 20px;
    text-align: center;
    justify-content: center;
    border-bottom: none;
    border-radius: 8px;
    width: 100%;
    display: block;
  }

  .nav-sep {
    width: 100%;
    height: 1px;
    margin: 20px 0 16px;
  }

  /* Selector idioma */
  .language-selector {
    padding: 0;
    margin-left: 0;
  }


  /* TOGGLEADOR PERSONALIZADO - HAMBURGUESA Y X */
  .custom-toggler {
    position: relative;
    z-index: 9999;
    border: none !important;
    box-shadow: none !important;
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* HAMBURGUESA - Contenedor */
  .hamburger {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 24px;
    height: 20px;
    position: relative;
  }

  /* LÍNEAS de la hamburguesa */
  .hamburger .line {
    width: 100%;
    height: 3px;
    background-color: white;
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: center;
  }

  /* ─── HAMBURGUESA (sin .collapsed - ESTADO POR DEFECTO) ─── */
  .custom-toggler .hamburger .line:nth-child(1) {
    transform: translateY(0) rotate(0deg);
    opacity: 1;
  }

  .custom-toggler .hamburger .line:nth-child(2) {
    transform: translateY(0) rotate(0deg);
    opacity: 1;
  }

  .custom-toggler .hamburger .line:nth-child(3) {
    transform: translateY(0) rotate(0deg);
    opacity: 1;
  }

  /* ─── X (con .collapsed - CUANDO ESTÁ ABIERTO) ─── */
  .custom-toggler.collapsed .hamburger .line:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
  }

  .custom-toggler.collapsed .hamburger .line:nth-child(2) {
    opacity: 0;
  }

  .custom-toggler.collapsed .hamburger .line:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
  }
}