/* public/css/header.css */

/* --- TOP BAR --- */
.top-bar {
    background-color: #1a1a1a;
    padding: 12px 20px;
    display: flex;
    justify-content: center;
    border-bottom: 1px solid #2d2d2d;
}

.topbar-left {
    display: none; /* Se oculta si está vacío para no romper la alineación derecha */
}

.topbar-right {
    display: flex;
    justify-content: flex-end;
    gap: 25px;
    width: 100%;
    max-width: 1060px; /* Mismo ancho que el contenedor del header para alinear bordes */
}

.top-bar a {
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    text-decoration: none;
    letter-spacing: 0.5px;
    transition: color 0.3s;
}

.top-bar a:hover {
    color: var(--color-gold);
}

/* --- MAIN HEADER --- */
.main-header {
    /*background-color: #4a4a4a; */
    background-image: repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.05) 0px, rgba(0, 0, 0, 0.05) 2px, transparent 2px, transparent 4px);
    background-blend-mode: multiply;
    position: relative;
    padding: 35px 0;
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1060px; /* Reduce el ancho para acercar el sombrero y los iconos al centro */
    margin: 0 auto;
    padding: 0 20px;
}

/* Columna Izquierda (Sombrero) */
.header-left {
    flex: 1;
    display: flex;
    justify-content: flex-start;
}

.header-left img {
    max-width: 190px;
    height: auto;
    filter: drop-shadow(3px 5px 6px rgba(0, 0, 0, 0.5));
}

/* Columna Central (Logo y Textos) */
.header-center {
    flex: 2; /* Toma el doble de espacio para asegurar que quede en el centro absoluto */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.logo-center {
    width: 110px;
    height: auto;
    object-fit: contain;
    margin-bottom: 12px;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.6));
    transition: transform 0.3s ease, filter 0.3s ease;
}

.logo-center:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.8));
}

.main-header h1 {
    color: #fff;
    font-weight: 900;
    font-size: 2.1rem;
    letter-spacing: 1px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    margin: 0 0 5px 0;
    line-height: 1.1;
}

.main-header h2 {
    color: var(--color-gold);
    font-weight: 800;
    font-size: 1.1rem;
    letter-spacing: 2px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    margin: 0;
}

/* Columna Derecha (Iconos Sociales Estilo Chorrillos) */
.header-right {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

.social-icons-header {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.social-icons-header a {
    background-color: #f1ebd9; /* Color crema suave de la imagen */
    color: #1f2937;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    font-size: 1.1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    transition: all 0.3s;
    text-decoration: none;
}

.social-icons-header a:hover {
    background-color: var(--color-gold);
    color: #fff;
    transform: scale(1.1);
}

/* Logo Portal Transparencia Flotante */
.pte-logo-container {
    position: absolute;
    left: 20px;
    top: 20px;
}

.pte-logo-container img {
    max-width: 100px;
    background: rgba(255,255,255,0.95);
    padding: 5px;
    border-radius: 6px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
    transition: transform 0.3s;
}

.pte-logo-container img:hover {
    transform: scale(1.05);
}

/* --- NAVEGACIÓN PRINCIPAL (Con doble línea dorada militar) --- */
.navbar-custom {
    background-color: #262626;
    border-top: 4px solid var(--color-gold);
    border-bottom: 4px solid var(--color-gold);
    box-shadow: inset 0 4px 0 #111, inset 0 -4px 0 #111; /* Efecto interno oscuro para dividir la línea dorada */
}

.navbar-custom .container {
    display: flex;
    justify-content: center;
}

.navbar-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    list-style: none;
    padding: 0;
    margin: 0;
}

.navbar-nav li a {
    display: block;
    color: #fff;
    font-weight: bold;
    text-transform: uppercase;
    padding: 16px 25px;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    text-decoration: none;
    transition: color 0.3s, background-color 0.3s;
}

.navbar-nav li a:hover {
    color: var(--color-gold);
    background-color: rgba(255, 255, 255, 0.05);
}

/* ========================================= */
/* --- RESPONSIVE HEADER (Tablets y Móviles) --- */
/* ========================================= */
@media (max-width: 1024px) {
    .header-container {
        max-width: 100%;
    }
    .header-left {
        display: none; /* Oculta el sombrero en pantallas pequeñas */
    }
}

@media (max-width: 768px) {
    .topbar-right {
        justify-content: center;
        flex-wrap: wrap;
        gap: 15px;
    }

    .header-container {
        flex-direction: column;
        padding: 20px;
        gap: 20px;
    }

    .logo-center {
        width: 90px;
    }

    .main-header h1 {
        font-size: 1.5rem;
    }

    .main-header h2 {
        font-size: 0.9rem;
    }

    .header-right {
        justify-content: center;
        width: 100%;
    }

    .social-icons-header {
        flex-direction: row;
        justify-content: center;
    }

    .pte-logo-container {
        position: relative;
        left: auto;
        top: auto;
        display: flex;
        justify-content: center;
        margin-bottom: 20px;
    }

    .navbar-nav li a {
        padding: 10px 15px;
        font-size: 0.8rem;
    }
}