/* assets/css/header.css */

/* ===== Header Base ===== */
.header-custom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.9rem 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: #fff; /* Color por defecto, se puede sobrescribir con JS/PHP */
    font-family: 'Poppins', sans-serif; /* Fuente por defecto */
}

/* ===== Logo ===== */
.logo-custom a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
}

.logo-custom img {
    height: 42px;
    margin-right: 12px;
    object-fit: contain;
}

.logo-custom span {
    font-size: 1.6rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: -0.5px;
}

/* ===== Navigation ===== */
.navigation-custom ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 1.4rem;
    align-items: center;
}

.navigation-custom a,
.navigation-custom .user-greeting {
    font-size: 1.02rem;
    font-weight: 600;
    text-decoration: none;
    color: inherit;
    transition: color 0.2s ease-in-out;
}

.navigation-custom a:hover {
    opacity: 0.8;
}

.logout-btn {
    font-weight: 700;
}

/* ===== Menu Toggle / Hamburger ===== */
.menu-toggle-custom {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 6px;
}

.menu-toggle-custom .bar {
    width: 28px;
    height: 3px;
    background-color: #333;
    margin: 4px 0;
    transition: 0.3s;
    border-radius: 2px;
}

/* Animación hamburguesa abierta */
.menu-toggle-custom.active .bar:nth-child(1) {
    transform: rotate(-45deg) translate(-6px, 6px);
}
.menu-toggle-custom.active .bar:nth-child(2) {
    opacity: 0;
}
.menu-toggle-custom.active .bar:nth-child(3) {
    transform: rotate(45deg) translate(-6px, -6px);
}

/* ===== Responsive ===== */

/* Tablets grandes */
@media (max-width: 900px) {
    .navigation-custom ul {
        gap: 1.1rem;
    }
    .logo-custom span {
        font-size: 1.4rem;
    }
}

/* Tablets pequeños / móviles */
@media (max-width: 768px) {
    .menu-toggle-custom {
        display: flex;
    }

    .navigation-custom {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        padding: 1.2rem 2rem;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        display: none;
        flex-direction: column;
        align-items: flex-start;
        background-color: #fff;
    }

    .navigation-custom.active {
        display: flex;
    }

    .navigation-custom ul {
        flex-direction: column;
        gap: 1.2rem;
        width: 100%;
    }

    .navigation-custom a,
    .navigation-custom .user-greeting {
        width: 100%;
    }
}

/* ===== Optional: Small screens extra tweak ===== */
@media (max-width: 480px) {
    .header-custom {
        padding: 0.7rem 1rem;
    }
    .logo-custom span {
        font-size: 1.2rem;
    }
    .navigation-custom ul {
        gap: 1rem;
    }
}
