/* Navbar principal */
.custom-navbar {
  background-color: #fff !important;
  padding: 15px 0;
  border-bottom: 1px solid #f0f0f0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.custom-navbar .container-fluid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

/* LOGO */
.navbar-brand {
  margin: 0;
  padding: 0;
}

.logo {
  height: 60px;
  width: auto;
  max-width: 150px;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.logo:hover {
  transform: scale(1.05);
}

/* MENÚ NEVEGACION */
.custom-nav-menu {
  gap: 1rem;
  margin: 0;
}

.custom-nav-menu .nav-link {
  color: #08328d !important;
  font-size: 1rem;
  font-weight: 500;
  padding: 8px 0;
  transition: color 0.3s ease;
  position: relative;
}

.custom-nav-menu .nav-link:hover {
  color: #796305 !important;
}

.custom-nav-menu .nav-link.cambio {
  color: #08328d !important;
  font-weight: 700;
  border-bottom: 2px solid #08328d;
}

/* Dropdown personalizado */
.custom-nav-menu .dropdown-toggle::after {
  margin-left: 0.5rem;
  vertical-align: middle;
}

.custom-dropdown {
  border: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border-radius: 6px;
  padding: 0.5rem 0;
  margin-top: 0.5rem;
}

.custom-dropdown .dropdown-item {
  color: #666;
  font-size: 0.95rem;
  padding: 0.6rem 1.25rem;
  transition: all 0.3s ease;
}

.custom-dropdown .dropdown-item:hover {
  background-color: #cfe0f8;
  color: #08328d;
  padding-left: 1.5rem;
}

/* ICONOS */
.navbar-icons {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.icon-btn {
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  transition: transform 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.icon-btn:hover {
  transform: scale(1.15);
}

.icon-btn img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  filter: invert(43%) sepia(17%) saturate(1234%) hue-rotate(295deg) brightness(88%) contrast(85%);
}

.icon-btn a {
  display: inline-flex;
  align-items: center;
  line-height: 0;
}

/* BOTON HAMBURGUESA */
.custom-toggler {
  border: none;
  padding: 8px;
  background: none;
}

.custom-toggler:focus {
  box-shadow: none;
  outline: none;
}

.custom-toggler img {
  width: 28px;
  height: 28px;
}

/* Ocultar el icono por defecto de Bootstrap */
.custom-toggler .navbar-toggler-icon {
  display: none;
}

/* RESPONSIVE MÓVIL */
@media (max-width: 991px) {
  /* Reorganizar elementos en móvil */
  .custom-navbar .container-fluid {
    position: relative;
  }

  /* Botón hamburguesa a la izquierda */
  .order-1 {
    order: 1;
    flex: 0 0 auto;
  }

  /* Logo en el centro */
  .order-2 {
    order: 2;
    flex: 1 1 auto;
    text-align: center;
  }

  /* Iconos a la derecha */
  .order-3 {
    order: 3;
    flex: 0 0 auto;
  }

  /* Menú colapsable debajo */
  .order-4 {
    order: 4;
    flex: 1 1 100%;
    width: 100%;
  }

  /* Menú móvil */
  .navbar-collapse {
    margin-top: 1rem;
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
  }

  .custom-nav-menu {
    flex-direction: column;
    gap: 0;
  }

  .custom-nav-menu .nav-item {
    border-bottom: 1px solid #e0e0e0;
  }

  .custom-nav-menu .nav-item:last-child {
    border-bottom: none;
  }

  .custom-nav-menu .nav-link {
    padding: 1rem;
    display: block;
  }

  .custom-nav-menu .nav-link:hover,
  .custom-nav-menu .nav-link.cambio {
    background-color: rgba(168, 86, 114, 0.1);
    padding-left: 1.5rem;
  }

  /* Dropdown en móvil */
  .custom-dropdown {
    border: none;
    box-shadow: none;
    background-color: transparent;
    padding-left: 1rem;
  }

  .custom-dropdown .dropdown-item {
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
  }

  /* Logo más pequeño en móvil */
  .logo {
    height: 50px;
    max-width: 120px;
  }

  /* Iconos más pequeños en móvil */
  .icon-btn img {
    width: 20px;
    height: 20px;
  }

  .navbar-icons {
    gap: 0.5rem;
  }
}

/* BOTÓN INSCRÍBETE */
.btn-inscribete {
  background: linear-gradient(135deg, #9b5e02, #b8781a);
  color: #fff;
  padding: 10px 30px;
  border-radius: 25px;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  white-space: nowrap;
  border: 2px solid #9b5e02;
  display: inline-block;
}

.btn-inscribete:hover {
  background: linear-gradient(135deg, #b8781a, #9b5e02);
  border-color: #b8781a;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(155, 94, 2, 0.4);
}

.btn-inscribete:active {
  transform: translateY(0);
}

/* RESPONSIVE  DESKTOP (LG: 992px+) */
@media (min-width: 992px) {
  /* Reorganizar para desktop: Menú | Logo | Iconos */
  .order-lg-1 {
    order: 1 !important;
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
  }

  .order-lg-2 {
    order: 2 !important;
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
    text-align: center;
  }

  .order-lg-3 {
    order: 3 !important;
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
    justify-content: flex-end;
  }

  .navbar-collapse {
    flex-basis: auto;
  }

  .custom-nav-menu {
    flex-direction: row;
    gap: 1.5rem;
  }

  .custom-nav-menu .nav-link {
    padding: 8px 12px;
  }

  .logo {
    height: 70px;
    max-width: 170px;
  }

  .icon-btn img {
    width: 26px;
    height: 26px;
  }

  .navbar-icons {
    gap: 1rem;
  }
}

/* RESPONSIVE - TABLETS (MD: 768px+) */
@media (min-width: 768px) and (max-width: 991px) {
  .logo {
    height: 60px;
    max-width: 140px;
  }

  .icon-btn img {
    width: 24px;
    height: 24px;
  }
}

/* PANTALLAS MEDIANAS - PC PEQUEÑAS (1000px - 1299px) */
@media (min-width: 1000px) and (max-width: 1299px) {
  .custom-nav-menu {
    gap: 1rem;
  }

  .custom-nav-menu .nav-link {
    font-size: 1rem;
    padding: 8px 10px;
  }

  .logo {
    height: 75px;
    max-width: 180px;
  }
}

/* PANTALLAS GRANDES - PC NORMALES (1300px - 1599px) */
@media (min-width: 1300px) and (max-width: 1599px) {
  .custom-nav-menu {
    gap: 2rem;
  }

  .custom-nav-menu .nav-link {
    font-size: 1.05rem;
    padding: 8px 12px;
  }

  .logo {
    height: 78px;
    max-width: 190px;
  }

  .icon-btn img {
    width: 27px;
    height: 27px;
  }
}

/* EXTRA LARGE (XL: 1600px+) */
@media (min-width: 1600px) {
  .custom-nav-menu {
    gap: 2.5rem;
  }

  .custom-nav-menu .nav-link {
    font-size: 1.1rem;
    padding: 8px 15px;
  }

  .logo {
    height: 80px;
    max-width: 200px;
  }

  .icon-btn img {
    width: 28px;
    height: 28px;
  }
}
