/* ===== HEADER ===== */
.header {
    width: 100%;
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.header-top {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 40px;
    width: 100%;
    font-size: 0.85rem;
    font-weight: 600;
    background-color: #F4F8FC;
    color: #042c6c;
}

.header-top p {
    margin: 0;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===== HEADER MAIN ===== */
.header-main {
    width: 100%;
    background: #fff;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 5%;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

/* ===== LOGO ===== */
.header-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 60px;
    width: auto;
    flex-shrink: 0;
}

.header-logo a {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    width: auto;
}

.header-logo img {
    height: 50px;
    width: auto;
}

/* ===== NAVEGACIÓN ===== */
.nav-menu {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    flex: 1;
    margin: 0 40px;
}

.nav-link {
    text-decoration: none;
    color: rgba(0, 0, 0, 0.6);
    font-weight: 500;
    font-size: 1rem;
    transition: all 0.3s ease;
    padding: 8px 0;
    border-bottom: 2px solid transparent;
}

.nav-link:hover {
    color: #042c6c;
    border-bottom-color: #042c6c;
}

.nav-link.active-home {
    color: #042c6c;
    font-weight: 700;
    border-bottom-color: #042c6c;
}

/* ===== ACCIONES DERECHA ===== */
.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-shrink: 0;
}

.header-user-btn {
    font-size: 24px;
    text-decoration: none;
    color: rgba(0, 0, 0, 0.6);
    transition: 0.3s ease;
}

.header-user-btn:hover {
    color: #042c6c;
}

/* ===== MENÚ HAMBURGUESA ===== */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    color: #042c6c;
    cursor: pointer;
    padding: 8px;
    transition: all 0.3s ease;
}

.menu-toggle:hover {
    opacity: 0.7;
}

.menu-toggle i {
    display: block;
}

/* ===== RESPONSIVE: TABLETS (769px - 1200px) ===== */
@media (max-width: 1200px) and (min-width: 769px) {
    .header-content {
        padding: 12px 5%;
    }

    .header-logo img {
        height: 45px;
    }

    .nav-menu {
        gap: 20px;
        margin: 0 20px;
    }

    .nav-link {
        font-size: 0.95rem;
    }

    .header-user-btn {
        font-size: 20px;
    }
}

/* ===== RESPONSIVE: MÓVILES (hasta 768px) ===== */
@media (max-width: 768px) {
    .header-content {
        padding: 10px 5%;
        gap: 15px;
    }

    .header-logo {
        height: 50px;
    }

    .header-logo img {
        height: 40px;
    }

    /* Mostrar menú hamburguesa */
    .menu-toggle {
        display: block;
    }

    /* Ocultar navegación por defecto */
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        width: 100%;
        background: #fff;
        flex-direction: column;
        gap: 0;
        margin: 0;
        padding: 20px 0;
        border-top: 1px solid #eee;
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
        z-index: 999;
        align-items: stretch;
    }

    /* Mostrar cuando está activa */
    .nav-menu.active {
        display: flex;
    }

    .nav-link {
        padding: 15px 5%;
        width: 100%;
        text-align: center;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
        border-bottom-color: transparent;
        font-size: 0.95rem;
    }

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

    .nav-link:hover {
        background-color: #F4F8FC;
    }

    .nav-link.active-home {
        background-color: #f0f4f8;
        border-bottom: none;
    }

    .header-user-btn {
        font-size: 20px;
    }

    .menu-toggle {
        font-size: 22px;
    }
}

/* ===== RESPONSIVE: CELULARES (hasta 500px) ===== */
@media (max-width: 500px) {
    .header-content {
        padding: 8px 5%;
        gap: 10px;
    }

    .header-logo {
        height: 45px;
    }

    .header-logo img {
        height: 35px;
    }

    .header-user-btn {
        font-size: 18px;
    }

    .menu-toggle {
        font-size: 20px;
        padding: 5px;
    }

    .nav-menu {
        top: calc(100% + 40px);
    }

    .nav-link {
        padding: 12px 5%;
        font-size: 0.9rem;
    }
}

/* ===== ANIMACIÓN MENÚ HAMBURGUESA ===== */
.menu-toggle.active {
    color: #042c6c;
    transform: rotate(90deg);
}

/* ===== FIX: Posición del header en layout flex ===== */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1;
}