/* ==== BASE HEADER ==== */
header {
    display: flex;
    flex-direction: column;
    width: 100%;
    justify-content: flex-start;
    align-items: center;
    overflow: hidden;
    position: fixed;
    border-bottom: 1px solid #ccc;
    background: white;
    
}


.header-central,
.header-superior{
    display: flex;
    width: 100%;
    z-index: 999;
    box-sizing: border-box;
    padding: 20px;
    align-items: center;
    justify-content: center;
}


.header-central-content {
    display: flex;
    width: 100%;
    justify-content: space-between;
    max-width: 1440px;
    padding: 0 20px;
    box-sizing: border-box;
}

.logo-header {
    width: 150px;
    position: relative;
    z-index: 1000;
}

/* ==== HEADER SUPERIOR ==== */
.header-superior {
    justify-content: center;
    align-items: center;
    background: black;
    padding: 0 20px;
    position: relative;
    z-index: 1000;
}

.header-superior-content {
    display: flex;
    width: 100%;
    max-width: 1440px;
    padding: 6px;
    justify-content: space-between;
    align-items: center;
}

.header-superior-left,
.header-superior-right {
    display: flex;
    width: 100%;
    height: 100%;
}

.header-superior-right {
    justify-content: flex-end;
    align-items: center;
    gap: 20px;
}

.header-superior-buttons {
    display: flex;
    gap: 20px;
}

.header-superior-buttons a,
.header-superior-left a {
    text-decoration: none;
}

.header-superior a,
.header-superior p {
    font-size: 14px;
    color: white;
}

/* ==== MENU PRINCIPAL ==== */
.header-menu {
    display: flex;
    justify-content: center;
    align-items: center;
}

.menu-items {
    display: flex;
    width: 100%;
    max-width: 1920px;
    list-style: none;
    justify-content: center;
    align-items: center;
    gap: 30px;
}

.menu-items li a {
    position: relative;
    text-decoration: none;
    color: black;
    padding: 5px 0;
    font-weight: 500;
    font-size: 14px;
    transition: color 0.3s ease;
}

.menu-items li a::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 0;
    height: 2px;
    background-color: black;
    transition: width 0.3s ease, left 0.3s ease;
}

.menu-items li a:hover::after,
.menu-items li a.active::after {
    width: 100%;
    left: 0;
}

.menu-items li a.active {
    color: black;
}

.menu-items i{
    display: none;
}

.btn-menu {
    width: 30px;
    height: 22px;
    position: relative;
    cursor: pointer;
    z-index: 1001;
    display: none;
}

/* Los tres spans como líneas absolutas */
.btn-menu span {
    display: block;
    height: 2px;
    width: 100%;
    background: #000;
    border-radius: 2px;
    position: absolute;
    left: 0;
    transition: all 0.3s ease;
}

/* Posición inicial */
.btn-menu span:nth-child(1) { top: 0; }
.btn-menu span:nth-child(2) { top: 10px; }
.btn-menu span:nth-child(3) { top: 20px; }

/* Animación a X */
.btn-menu.active span:nth-child(1) {
    transform: rotate(45deg);
    top: 10px;
}
.btn-menu.active span:nth-child(2) {
    opacity: 0;
}
.btn-menu.active span:nth-child(3) {
    transform: rotate(-45deg);
    top: 10px;
}

/* ==== MENÚ MÓVIL ==== */
@media (max-width: 920px) {
    
    .menu-items i,
    .btn-menu{
        display: block;
    }

    /* Menú oculto inicialmente */
    .header-menu {
        display: block; /* Lo volvemos visible, pero oculto a la vista */
        position: fixed;
        top: 0;
        right: -100%; /* fuera de pantalla */
        width: 100%;
        height: 100%;
        background: white;
        box-shadow: -2px 0 5px rgba(0,0,0,0.2);
        transition: right 0.3s ease;
        z-index: 999;
    }

    /* Cuando está activo */
    .header-menu.active {
        right: 0;
    }

    /* Ajustar la lista */
    .menu-items {
        flex-direction: column;
        gap: 20px;
        padding: 0 20px;
        box-sizing: border-box;
        margin-top: 120px;
        align-items: flex-start;
    }
    
    .menu-items li {
        width: 100%;
    }
    
    .menu-items li a {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        min-height: 30px;
    }


}
