/* ====================
   App Navbar (Desktop Sticky Subheader)
   Componente compartido para todas las páginas
   ==================== */
.app-navbar {
    background-color: var(--devir-blue-dark, #1F2548);
    height: 58px;
    width: 100%;
    position: sticky;
    top: 0;
    z-index: 1090;
    display: flex;
    align-items: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.app-navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    width: 100%;
    box-sizing: border-box;
}

.app-nav-brand {
    color: white;
    font-weight: 800;
    font-size: 1.1rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-right: 2rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.app-nav-links {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    height: 100%;
    flex-wrap: wrap;
    flex: 1;
    justify-content: flex-end;
}

/* Language Toggle */
.language-toggle {
  position: relative;
}

.lang-btn {
  background: rgba(255,255,255,0.1) !important;
  border: 1px solid rgba(255,255,255,0.3) !important;
  border-radius: 6px;
  padding: 6px 12px;
  color: white;
  cursor: pointer;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.lang-btn:hover {
  background: rgba(255,255,255,0.2) !important;
  border-color: rgba(255,255,255,0.5) !important;
}

.lang-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 4px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  z-index: 1000;
  min-width: 150px;
  overflow: hidden;
}

.lang-option {
  width: 100%;
  padding: 10px 16px;
  border: none;
  background: white;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  transition: background 0.2s;
}

.lang-option:hover {
  background: #f8f9fa;
}

.lang-option.active {
  background: #e7f3ff;
  color: #3B5BA1;
}

.lang-flag-icon {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.app-nav-btn {
    position: relative;
    background: transparent;
    color: white;
    padding: 0 1.15rem;
    min-height: 40px;
    min-width: 100px; /* Un poco más de base para que respire */
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600; 
    font-size: 0.9rem;
    line-height: 1;
    white-space: nowrap;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden; 
}

/* Contenedor interno para texto e iconos */
.app-nav-btn-text {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px; 
    position: relative;
    z-index: 2; 
    width: 100%;
    pointer-events: none; 
}

/* Estilo de la flecha Dropdown */
.dropdown-caret {
    font-size: 0.7rem;
    opacity: 0.7;
    transition: transform 0.2s ease;
    display: inline-block;
    margin-left: 2px;
}

.app-nav-dropdown.is-open .dropdown-caret {
    transform: rotate(180deg);
}

/* =====================
   Efecto Neon Border Run
   Solo aplica a los 4 primeros spans (no al .app-nav-btn-text)
   ===================== */

/* Los spans de luz: SOLO los que NO son .app-nav-btn-text */
.app-nav-btn > span:not(.app-nav-btn-text) {
    position: absolute;
    display: block;
    z-index: 1;
    pointer-events: none;
}

/* Superior */
.app-nav-btn > span:nth-child(1) {
    top: 0;
    left: -100%;
    width: 100%;
    height: 2px;
}

.app-nav-btn:hover > span:nth-child(1) {
    left: 100%;
    transition: 0.6s;
}

/* Derecho */
.app-nav-btn > span:nth-child(2) {
    top: -100%;
    right: 0;
    width: 2px;
    height: 100%;
}

.app-nav-btn:hover > span:nth-child(2) {
    top: 100%;
    transition: 0.6s;
    transition-delay: 0.15s;
}

/* Inferior */
.app-nav-btn > span:nth-child(3) {
    bottom: 0;
    right: -100%;
    width: 100%;
    height: 2px;
}

.app-nav-btn:hover > span:nth-child(3) {
    right: 100%;
    transition: 0.6s;
    transition-delay: 0.3s;
}

/* Izquierdo */
.app-nav-btn > span:nth-child(4) {
    bottom: -100%;
    left: 0;
    width: 2px;
    height: 100%;
}

.app-nav-btn:hover > span:nth-child(4) {
    bottom: 100%;
    transition: 0.6s;
    transition-delay: 0.45s;
}

.app-nav-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

.app-nav-btn.special-pink {
    background-color: #CE466C !important;
    border-color: #CE466C !important;
    box-shadow: 0 2px 6px rgba(206, 70, 108, 0.4);
    color: white !important;
}

.app-nav-btn.special-pink > span:not(.app-nav-btn-text) {
    background: linear-gradient(90deg, transparent, #ffffff);
}

.app-nav-btn.special-pink:hover > span:not(.app-nav-btn-text) {
    background: #ffffff;
    box-shadow: 0 0 6px #ffffff, 0 0 12px rgba(206, 70, 108, 0.6);
}

.app-nav-btn.special-pink:hover {
    background-color: #b03858 !important;
}

.app-nav-btn.is-active,
.app-nav-dropdown.is-active .app-nav-btn {
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.65);
    transform: none;
}

.app-nav-dropdown {
    position: relative;
}

.app-nav-dropdown__trigger {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    position: relative; /* Para que los spans del efecto neon funcionen */
}

.app-nav-dropdown__trigger .dropdown-caret {
    font-size: 0.65rem;
    opacity: 0.85;
    position: relative; /* Asegurar que esté sobre los spans */
    z-index: 1;
}

.app-nav-dropdown__menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    min-width: 220px;
    background: white;
    border-radius: 10px;
    padding: 0.35rem 0;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
    display: none;
    flex-direction: column;
    z-index: 1200;
}

.app-nav-dropdown.is-open .app-nav-dropdown__menu {
    display: flex;
}

.app-nav-dropdown__item {
    padding: 0.75rem 1rem;
    text-decoration: none;
    font-weight: 600;
    color: #1F2548;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.app-nav-dropdown__item:last-child {
    border-bottom: none;
}

.app-nav-dropdown__item:hover {
    background: #f5f7ff;
}

.app-nav-dropdown__separator {
    height: 1px;
    background: rgba(0, 0, 0, 0.08);
    margin: 0.25rem 0;
}

.app-nav-dropdown__auth {
    display: flex;
    flex-direction: column;
}

.app-nav-dropdown__auth .app-nav-dropdown__item {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.app-nav-dropdown__auth .app-nav-dropdown__item:last-child {
    border-bottom: none;
}

.app-nav-btn.special-orange {
    background-color: #EB974A !important;
    color: #16224A !important;
    border-color: #EB974A !important;
    box-shadow: 0 2px 6px rgba(235, 151, 74, 0.4);
    font-weight: 700;
}

.app-nav-btn.special-orange > span:not(.app-nav-btn-text) {
    background: linear-gradient(90deg, transparent, #16224A);
}

.app-nav-btn.special-orange:hover > span:not(.app-nav-btn-text) {
    background: #16224A;
    box-shadow: 0 0 6px #16224A, 0 0 12px rgba(235, 151, 74, 0.6);
}

.app-nav-btn.special-orange:hover {
    background-color: #d6853a !important;
}

/* Desktop Only - Hide on mobile */
.desktop-only {
    display: flex;
}

@media (max-width: 991px) {
    .desktop-only {
        display: none !important;
    }
}

