/* ===================================
   HEADER - MINIMALISTA MODERNO
   =================================== */

/* Importar fuente IBM Plex Sans */
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600;700&display=swap');

/* Forzar ancho completo - Override de estilos globales */
body {
    margin: 0 !important;
    padding: 0 !important;
    font-family: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, sans-serif !important;
    overflow-x: hidden;
}

* {
    font-family: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

#container {
    margin: 0 !important;
    padding: 0 !important;
    max-width: none !important;
    width: 100% !important;
}

#header {
    margin: 0 !important;
    padding: 0.75rem 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    position: relative;
}

/* Variables minimalistas */
:root {
    --header-bg: #1e40af;
    --header-text: #ffffff;
    --header-accent: rgba(255, 255, 255, 0.1);
    --search-bg: rgba(255, 255, 255, 0.95);
    --search-focus: #ffffff;
    --shadow-subtle: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Header principal */
#header {
    background: var(--header-bg);
    box-shadow: var(--shadow-subtle);
    font-family: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    min-height: auto;
}

#header .container-fluid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    align-items: center;
    max-width: 100%;
    margin: 0;
    padding: 0;
    width: 100%;
}

/* Contenedor del Logo */
.header-logo-container {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    padding-left: 1.5rem;
}

.header-logo-container a {
    display: inline-block;
}

.header-logo {
    height: 55px;
    width: auto;
}

/* Contenedor del Título */
.header-title-container {
    display: flex;
    justify-content: center;
    align-items: center;
}

.brand-text {
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--header-text);
    text-decoration: none;
    font-size: 2.2rem;
    transition: transform 0.3s ease;
    text-align: center;
}

.brand-text:hover {
    transform: scale(1.05);
    color: var(--header-text);
    text-decoration: none;
}

/* Contenedor de búsqueda */
.search-container {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding-right: 1.5rem;
}

.search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 1rem;
    color: #64748b;
    font-size: 1rem;
    z-index: 2;
    pointer-events: none;
}

.search-input {
    width: 320px;
    height: 42px;
    padding: 0 1rem 0 2.5rem;
    background: var(--search-bg);
    border: 1px solid transparent;
    border-radius: 21px;
    font-size: 0.9rem;
    font-family: inherit;
    color: #1e293b;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
}

.search-input::placeholder {
    color: #64748b;
    font-weight: 400;
}

.search-input:focus {
    outline: none;
    background: var(--search-focus);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2);
    width: 360px;
}

/* Mejoras en autocomplete */
.ui-autocomplete {
    border-radius: 12px;
    border: none;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    background: #ffffff;
    backdrop-filter: blur(10px);
    max-height: 300px;
    overflow-y: auto;
    font-family: 'IBM Plex Sans', sans-serif;
    margin-top: 4px;
    min-width: 320px;
}

.ui-autocomplete .ui-menu-item {
    border: none;
    margin: 0;
}

.ui-autocomplete .ui-menu-item .ui-menu-item-wrapper {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.9rem;
    line-height: 1.4;
    transition: all 0.15s ease;
}

.ui-autocomplete .ui-menu-item .ui-menu-item-wrapper:hover,
.ui-autocomplete .ui-menu-item .ui-menu-item-wrapper.ui-state-active {
    background: #f8fafc;
    color: #1e40af;
    border-left: 3px solid #1e40af;
}

.ui-autocomplete .ui-menu-item:last-child .ui-menu-item-wrapper {
    border-bottom: none;
}

/* Responsive - Tablet */
@media (max-width: 991px) {
    .header-logo-container {
        padding-left: 1rem;
    }
    
    .search-container {
        padding-right: 1rem;
    }
    
    .search-input {
        width: 280px;
    }
    
    .search-input:focus {
        width: 300px;
    }
    
    .brand-text {
        font-size: 1rem;
    }
    
    .header-logo {
        height: 42px;
    }
}

/* Responsive - Móvil */
@media (max-width: 767px) {
    #header {
        padding: 0.5rem 0;
    }
    
    #header .container-fluid {
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
        padding: 0;
    }
    
    .header-logo-container {
        align-self: flex-start;
        padding-left: 1rem;
    }
    
    .header-title-container {
        align-self: center;
    }
    
    .search-container {
        width: 100%;
        padding: 0 1rem;
        justify-content: center;
    }
    
    .search-wrapper {
        width: 100%;
    }
    
    .search-input {
        width: 100%;
        max-width: 100%;
    }
    
    .search-input:focus {
        width: 100%;
    }
    
    .ui-autocomplete {
        min-width: calc(100vw - 2rem);
        left: 1rem !important;
        right: 1rem;
    }
    
    .header-logo {
        height: 38px;
    }
}

/* Responsive - Móvil pequeño */
@media (max-width: 575px) {
    .header-title-container {
        display: none;
    }
    
    .header-logo-container {
        align-self: center;
        padding-left: 0;
    }
    
    .header-logo {
        height: 36px;
    }
}