/**
 * Header Styles - Tema Xacobeos (Estilo Airbnb + Concha del Camino)
 * 
 * PROPÓSITO:
 * Header moderno estilo Airbnb con colores oficiales de la concha del Camino de Santiago.
 * Azul profundo + Amarillo dorado para máxima autenticidad y reconocimiento.
 */

/* ================================
   VARIABLES CSS - COLORES OFICIALES CONCHA
   ================================ */
:root {
    --camino-blue: #1E4A8C;         /* Azul oficial concha */
    --camino-blue-dark: #162F5A;    /* Azul más oscuro */
    --camino-blue-light: #3B6BB0;   /* Azul más claro para hover */
    --camino-yellow: #FFD700;       /* Amarillo oficial concha */
    --camino-yellow-dark: #E6C200;  /* Amarillo más oscuro para hover */
    --white: #FFFFFF;
    --text-light: rgba(255, 255, 255, 0.9);
    --shadow-light: rgba(0, 0, 0, 0.1);
    --shadow-medium: rgba(0, 0, 0, 0.15);
}

/* ================================
   HEADER PRINCIPAL ESTILO AIRBNB
   ================================ */
.site-header {
    background: var(--white) !important;
    border-bottom: 1px solid rgba(221, 221, 221, 0.5) !important;
    position: sticky !important;
    top: 0 !important;
    left: auto !important;
    width: 100% !important;
    z-index: 1000 !important;
    padding: 0 !important;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.1) !important;
    display: block !important;
    justify-content: unset !important;
    align-items: unset !important;
}

.site-header.scrolled {
    box-shadow: 0 2px 16px var(--shadow-light) !important;
    border-bottom-color: rgba(221, 221, 221, 0.8) !important;
    background-color: var(--white) !important;
}

/* Container principal del header */
.site-header .site-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
    position: relative;
}

/* ================================
   LOGO / BRANDING ESTILO AIRBNB
   ================================ */
.site-branding {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    z-index: 2;
}

.site-title {
    margin: 0;
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.site-title a {
    color: var(--camino-blue) !important;
    text-decoration: none !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    /* Eliminado: transition y hover effects */
    position: relative !important;
    font-size: 1.75rem !important;
    font-weight: 700 !important;
}

.site-title a:hover {
    /* Eliminado efecto de color en hover */
}

/* Logo SVG en header */
.site-title img {
    height: 40px;
    width: auto;
    /* Eliminada transición de transform */
}

.site-title a:hover img {
    /* Eliminado efecto de escala en hover */
}

.site-description {
    display: none; /* Oculto en estilo Airbnb */
}

/* ================================
   BARRA DE BÚSQUEDA TRANSPARENTE FLOTANTE
   ================================ */
.search-banner {
    position: fixed;
    top: 80px;
    left: 0;
    right: 0;
    z-index: 999;
    background: transparent;
    padding: 20px 0;
    pointer-events: none;
    opacity: 1;
    transform: translateY(0);
    transition: all 0.3s ease;
}

.search-banner.hidden {
    opacity: 0;
    transform: translateY(-20px);
    pointer-events: none;
}

.search-banner.hidden {
    opacity: 0;
    transform: translateY(-100%);
    pointer-events: none;
}

.search-banner-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: center;
    pointer-events: auto;
}

.airbnb-search-bar {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    display: flex;
    align-items: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    min-width: 400px;
    max-width: 500px;
    overflow: hidden;
    pointer-events: auto;
}

.airbnb-search-bar:hover {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px) scale(1.02);
}

.search-section {
    padding: 12px 16px;
    border-right: 1px solid #DDDDDD;
    cursor: pointer;
    transition: background-color 0.2s ease;
    flex: 1 1 0;
    min-width: 0;
    position: relative;
}

.search-section:last-child {
    border-right: none;
    flex: 0 0 auto;
    padding: 6px 6px 6px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-section:hover {
    background-color: #F7F7F7;
}

.search-section:first-child {
    border-radius: 40px 0 0 40px;
}

.search-section:last-child {
    border-radius: 0 40px 40px 0;
}

.search-label {
    font-size: 12px;
    font-weight: 600;
    color: #222222;
    margin-bottom: 2px;
    display: block;
}

.search-input {
    font-size: 13px;
    color: #717171;
    background: none;
    border: none;
    outline: none;
    width: 100%;
    font-family: inherit;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.search-input::placeholder {
    color: #717171;
}

/* Botón de búsqueda estilo Airbnb */
.search-button {
    background: var(--camino-yellow);
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.search-button:hover {
    background: var(--camino-yellow-dark);
    transform: scale(1.04);
}

.search-button::before {
    content: "🔍";
    font-size: 12px;
}

/* ================================
   NAVEGACIÓN DERECHA ESTILO AIRBNB
   ================================ */
.header-right {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-shrink: 0;
    z-index: 2;
}

.header-nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-user-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-link {
    color: #222222;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 10px 16px;
    border-radius: 21px;
    transition: all 0.2s ease;
    white-space: nowrap;
    height: 42px;
    min-height: 42px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.header-link:hover {
    background-color: #F7F7F7;
    color: var(--camino-blue);
}

.header-link i {
    font-size: 16px;
    color: #717171;
    transition: color 0.2s ease;
}

.header-link:hover i {
    color: var(--camino-blue);
}

/* ================================
   SELECTOR DE IDIOMAS WPML
   ================================ */
.language-selector {
    position: relative;
    display: flex;
    align-items: center;
    cursor: pointer;
    border: 1px solid #DDDDDD;
    border-radius: 21px;
    padding: 5px 12px 5px 12px;
    background: var(--white);
    transition: box-shadow 0.2s ease;
    margin-right: 8px;
    height: 42px;
    min-height: 42px;
}

.language-selector:hover {
    box-shadow: 0 2px 4px var(--shadow-light);
}

.current-language {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 500;
    color: #222222;
}

.lang-flag img {
    border-radius: 2px;
    object-fit: cover;
}

.lang-code {
    font-size: 13px;
    font-weight: 600;
}

.dropdown-arrow {
    font-size: 10px;
    color: #717171;
    transition: transform 0.2s ease;
}

.language-selector[aria-expanded="true"] .dropdown-arrow {
    transform: rotate(180deg);
}

/* Dropdown de idiomas */
.language-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--white);
    border: 1px solid #DDDDDD;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    min-width: 180px;
    margin-top: 8px;
    opacity: 0;
    transform: translateY(-8px);
    transition: all 0.2s ease;
    z-index: 1000;
    display: none;
}

.language-dropdown.show {
    opacity: 1;
    transform: translateY(0);
    display: block;
}

.language-dropdown .dropdown-content {
    padding: 8px 0;
}

/* Clase específica para enlaces de dropdown */
.dropdown-link {
    color: #222222;
    text-decoration: none;
}

.dropdown-link:visited {
    color: #222222;
}

.dropdown-link:hover,
.dropdown-link:focus,
.dropdown-link:active {
    color: #222222;
    text-decoration: none;
}

.language-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.language-item:hover {
    background-color: #F7F7F7;
}

.language-item img {
    border-radius: 2px;
    object-fit: cover;
}

.lang-name {
    flex: 1;
}

/* Menú de usuario estilo Airbnb */
.user-menu {
    position: relative;
    border: 1px solid #DDDDDD;
    border-radius: 21px;
    padding: 5px 5px 5px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: box-shadow 0.2s ease;
    background: var(--white);
    height: 42px;
    min-height: 42px;
}

.user-menu:hover {
    box-shadow: 0 2px 4px var(--shadow-light);
}

.hamburger-icon {
    width: 16px;
    height: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.hamburger-icon span {
    width: 100%;
    height: 2px;
    background-color: #717171;
    border-radius: 1px;
}

.user-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--camino-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 14px;
    font-weight: 600;
}

/* Dropdown del menú de usuario */
.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--white);
    border: 1px solid #DDDDDD;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    min-width: 200px;
    margin-top: 8px;
    opacity: 0;
    transform: translateY(-8px);
    transition: all 0.2s ease;
    z-index: 1000;
    display: none;
}

.user-dropdown.show {
    opacity: 1;
    transform: translateY(0);
    display: block;
}

.user-dropdown .dropdown-content {
    padding: 8px 0;
}

.user-dropdown .dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    color: #222222;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.user-dropdown .dropdown-item:hover {
    background-color: #F7F7F7;
}

.user-dropdown .dropdown-divider {
    height: 1px;
    background: #EEEEEE;
    margin: 8px 16px;
}

/* ================================
   NAVEGACIÓN ORIGINAL (OCULTA EN DESKTOP)
   ================================ */
.main-navigation {
    display: none;
}

/* ================================
   CONTROLES RESPONSIVE HEADER
   ================================ */
/* Desktop: Ocultar dropdown-menu, mostrar nav-links y language selector */
@media screen and (min-width: 769px) {
    .dropdown-menu,
    .user-menu {
        display: none !important;
    }
    
    .header-nav-links {
        display: flex !important;
    }
    
    .language-selector {
        display: flex !important;
    }
}

/* ================================
   RESPONSIVE MOBILE
   ================================ */
@media (max-width: 1100px) {
    .airbnb-search-bar {
        min-width: 320px;
        max-width: 400px;
    }
    
    .search-section {
        padding: 10px 12px;
    }
    
    .search-input {
        font-size: 12px;
    }
    
    .search-label {
        font-size: 11px;
    }
}

@media (max-width: 950px) {
    .search-banner {
        padding: 15px 0;
        top: 70px; /* Altura del header en móvil */
    }

    .airbnb-search-bar {
        min-width: 320px;
        max-width: 90%;
    }

    .search-section {
        padding: 8px 12px;
    }

    .search-label {
        font-size: 11px;
    }

    .search-input {
        font-size: 12px;
    }
}

@media screen and (max-width: 768px) {
    .site-header .site-container {
        height: 70px;
    }

    .site-title {
        font-size: 1.5rem;
    }

    .header-right {
        gap: 12px;
    }

    /* OCULTAR ENLACES DE NAVEGACIÓN Y SELECTOR DE IDIOMAS EN MÓVIL */
    .header-nav-links {
        display: none !important;
    }
    
    .language-selector {
        display: none !important;
    }

    .header-user-controls {
        gap: 6px;
    }
    
    /* MOSTRAR DROPDOWN-MENU EN MÓVIL */
    .dropdown-menu,
    .user-menu {
        display: flex !important;
    }

    .lang-code {
        display: none; /* Ocultar código en móvil */
    }

    .language-dropdown {
        min-width: 160px;
    }

    /* OCULTAR MENÚ HAMBURGUESA EN MÓVIL */
    .main-navigation {
        display: none !important;
    }

    .menu-toggle {
        display: none !important;
    }

    /* Header más limpio en móvil */
    .site-header .site-container {
        justify-content: space-between;
    }

    .header-right {
        gap: 8px;
    }
}

@media screen and (max-width: 480px) {
    .site-header .site-container {
        height: 60px;
    }
    
    .site-title {
        font-size: 1.3rem;
    }
    
    /* Logo más pequeño en móvil */
    .site-title img {
        height: 28px;
    }

    /* ENLACES DE NAVEGACIÓN OCULTOS EN MÓVIL PEQUEÑO */
    .header-nav-links {
        display: none !important;
    }

    /* Botones más compactos en móvil pequeño */
    .language-selector {
        padding: 3px 6px;
        margin-right: 4px;
        height: 36px;
        min-height: 36px;
    }
    
    .user-menu {
        padding: 3px 3px 3px 8px;
        height: 36px;
        min-height: 36px;
    }
    
    .user-avatar {
        width: 24px;
        height: 24px;
        font-size: 11px;
    }

    .header-right {
        gap: 6px;
    }
}

/* ================================
   NAVEGACIÓN MÓVIL SIMPLIFICADA
   ================================ */
@media (max-width: 768px) {
    /* Sin menú móvil, solo botones limpios */
    .site-content {
        padding-top: 0; /* Sin padding extra para menú móvil */
    }
    
    /* Asegurar que el logo sea clickeable y visible */
    .site-title a {
        font-size: 1.4rem !important;
    }
    
    /* Mantener funcionalidad de botones en móvil */
    .language-selector,
    .user-menu {
        cursor: pointer;
        touch-action: manipulation; /* Mejora táctil */
    }
}

/* ================================
   ACCESIBILIDAD
   ================================ */
.skip-link {
    position: absolute;
    left: -9999px;
    top: 6px;
    z-index: 999999;
    padding: 8px 16px;
    background: var(--camino-blue);
    color: var(--white);
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
}

.skip-link:focus {
    left: 6px;
}

/* ================================
   EFECTOS Y ANIMACIONES
   ================================ */
@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.main-navigation.toggled ul {
    animation: slideInDown 0.3s ease;
}

/* Estados de focus para accesibilidad */
.search-section:focus-within {
    outline: 2px solid var(--camino-yellow);
    outline-offset: -2px;
}

.search-button:focus,
.user-menu:focus {
    outline: 2px solid var(--camino-yellow);
    outline-offset: 2px;
}

/* ================================
   MENÚS DINÁMICOS PERSONALIZADOS
   ================================ */

/* Menú de enlaces del header */
.header-links-menu {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.header-links-menu li {
   
  
    list-style: none;
 
}

.header-links-menu .menu-item {
    margin: 0;
}

.header-links-menu .menu-item a {
    color: #222222;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 10px 16px;
    border-radius: 21px;
    transition: all 0.2s ease;
    white-space: nowrap;
    height: 42px;
    min-height: 42px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.header-links-menu .menu-item a:hover {
    background-color: #F7F7F7;
    color: var(--camino-blue);
}

.header-links-menu .menu-item a i {
    font-size: 16px;
    color: #717171;
    transition: color 0.2s ease;
}

/* Menú desplegable dinámico */
.dropdown-menu .dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    color: var(--camino-blue);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    border-radius: 8px;
    margin: 2px 0;
}

.dropdown-menu .dropdown-item:hover {
    background-color: rgba(30, 74, 140, 0.05);
    color: var(--camino-blue-dark);
}

.dropdown-menu .dropdown-item i {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

/* Estilos para enlaces fallback del header */
.header-nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.header-link {
    color: #222222;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 10px 16px;
    border-radius: 21px;
    transition: all 0.2s ease;
    white-space: nowrap;
    height: 42px;
    min-height: 42px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.header-link:hover {
    background-color: #F7F7F7;
    color: var(--camino-blue);
}

.header-link i {
    font-size: 16px;
    color: #717171;
    transition: color 0.2s ease;
}

/* Responsive para menús dinámicos */
@media (max-width: 768px) {
    .header-links-menu {
        flex-direction: column;
        gap: 16px;
        padding: 16px 0;
    }
    
    .header-links-menu .menu-item a {
        font-size: 16px;
        padding: 8px 0;
    }
    
    .header-nav-links {
        flex-direction: column;
        gap: 16px;
        padding: 16px 0;
    }
    
    .header-link {
        font-size: 16px;
        padding: 8px 0;
    }
}