/* ===================== */
/* 🔲 CONTENEDORES */
/* ===================== */

.header-container, .header-container-mobile {
    width: 100%;
    height: 150px;
    display: flex;
    flex-flow: column nowrap;
    justify-content: flex-start;
    align-items: center;
    background-color: #FFFFFF;
}

/* MOBILE oculto */
.header-container-mobile {
    display: none;
}

/* ===================== */
/* 🔝 BARRA SUPERIOR */
/* ===================== */

.iconsSuperiorBar {
    width: 20px;
    height: 20px;
}

.header-barraInformativa {
    width: 100%;
    height: 35px;
    background-color: #E0E0E0;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    color: #000;
}

.header-barraInformativa ul {
    display: flex;
    padding: clamp(5px, 1vw, 10px);
    list-style: none;
    gap: clamp(5px, 1vw, 10px);
}

.header-barraInformativa li a {
    padding: 8px clamp(10px, 3vw, 40px);
    border-radius: 10px;
    font-size: clamp(12px, 1vw, 14px);
    display: flex;
    flex-flow: row nowrap;
    justify-content: center;
    align-items: center;
    gap: 10px;
    color: #000000;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    font-size: 16px;
    font-family: "Br Regular";
}

.header-barraInformativa li a:hover {
    background-color: #cecccc;
}

.buscador {
    width: 200px;
    height: auto;
    min-width: 11px;
    position: relative;
}

.buscador input {
    width: 100%;
    height: 100%;
    background-color: #cecccc;
    border: none;
    padding: 7px 10px;
    font-size: 16px;
    font-family: 'Br Regular';
}

.buscador input:hover {
    background-color: #a4a2a2;
}

.buscador img {
    position: absolute;
    right: 5px;
    top: 5px;
}

/* ===================== */
/* 🔹 SECCIONES */
/* ===================== */

.header-sections {
    width: 90%;
    display: flex;
    flex-flow: row wrap;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

/* línea verde */
.header-container article:nth-of-type(2)::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 100vw;
    height: 3px;
    background-color: #298345;
    transform: translateX(-50%);
}

.header-container article:nth-of-type(2) {
    min-height: 50%;
}

.header-sections:last-child {
    justify-content: center;
    min-height: 30%;
}

/* ===================== */
/* 🖼️ LOGO */
/* ===================== */

.header-img-top {
    width: clamp(120px, 8vw, 160px);
    height: auto;
}

.header-img-top-open {
    width: 250px;
    height: 70px;
    margin-bottom: 30px;
}

/* ===================== */
/* 📋 LISTAS */
/* ===================== */

.header-listadoOpciones, 
.header-listadoBotones {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    list-style: none;
    gap: clamp(5px, 1vw, 10px);
}

.header-listadoOpciones:last-child {
    gap: clamp(10px, 2vw, 30px);
}

.header-listadoOpciones li {
    position: relative; /* 🔥 IMPORTANTE para submenu */
}

.header-listadoOpciones li a {
    padding: clamp(10px, 1vw, 20px) clamp(6px, 0.8vw, 10px);
    color: #298345;
    font-size: clamp(11px, 0.85vw, 15px);
    display: flex;
    flex-flow: row nowrap;
    justify-content: center;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: "Br Regular";
    font-size: 14px;
}

.header-listadoOpciones li a:hover {
    color: #42B733;
    transform: translateY(-2px);
}

.header-listadoOpciones li a:hover::after {
    width: 100%;
}

/* ===================== */
/* 🔽 SUBMENÚ PRO */
/* ===================== */

.sub-menu {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;

    min-width: 240px;
    padding: 10px 0;

    background: #ffffff;
    border-radius: 12px;

    box-shadow: 0 15px 35px rgba(0,0,0,0.08);

    opacity: 0;
    visibility: hidden;
    transform: translateY(10px) scale(0.98);

    transition: all 0.25s ease;

    z-index: 100;
    
    list-style: none;
    margin: 0;
    padding: 0;
}

/* flechita */
.sub-menu::before {
    content: "";
    position: absolute;
    top: -6px;
    left: 20px;
    width: 12px;
    height: 12px;
    background: white;
    transform: rotate(45deg);
    box-shadow: -2px -2px 5px rgba(0,0,0,0.04);
}

/* items */
.sub-menu li {
    padding: 0;
}

.sub-menu li a {
    display: block;
    padding: 12px 18px;
    font-size: 14px;
    color: #444;
    border-radius: 8px;
    margin: 0 8px;
    transition: all 0.2s ease;
}

/* hover bonito */
.sub-menu li a:hover {
    background: #f2f8f4;
    color: #298345;
    transform: translateX(4px);
}

/* mostrar */
.header-listadoOpciones li:hover .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* ===================== */
/* 🔘 BOTONES */
/* ===================== */

.header-listadoBotones button {
    padding: 10px 15px;
    background-color: #298345;
    border: none;
    color: #FFFFFF;
    border-radius: 20px;
    position: relative;
    overflow: hidden;
    z-index: 1;
    font-family: "Br Regular";
    font-size: 14px;
    transition: all 0.3s ease;
}

.header-listadoBotones button::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    width: 0%;
    height: 100%;
    background-color: #42B733;
    z-index: -1;
    transition: all 0.4s ease;
    transform: translateX(-50%);
    border-radius: 20px;
}

.header-listadoBotones button:hover {
    transform: translateY(-2px);
}

.header-listadoBotones button:hover::before {
    width: 120%;
}

/* ===================== */
/* 📱 BOTÓN MOBILE */
/* ===================== */

.header-button-mobile {
    padding: 6px;
    background-color: transparent;
    border: 1px solid #42B733;
    border-radius: 6px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.header-button-mobile:hover {
    background-color: #298345;
}

.header-img-menu {
    width: 22px;
    height: 22px;
}

/* ===================== */
/* 📱 MENÚ MOBILE */
/* ===================== */

.header-mobile-menu {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 100vh;

    background: rgba(255,255,255,0.97);
    backdrop-filter: blur(8px);

    display: flex;
    justify-content: center;
    align-items: flex-start;

    opacity: 0;
    transform: translateY(-100%);
    pointer-events: none;

    transition: all 0.3s ease;
    z-index: 999999;
}

.header-mobile-menu.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.header-sections-mobile {
    width: 100%;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    gap: 20px;
    min-height: 100vh;
}

/* GRID */
.header-sections-mobile .header-listadoOpciones {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.header-sections-mobile .header-listadoOpciones li a {
    display: block;
    text-align: center;
    padding: 12px;
    background: #f5f5f5;
    border-radius: 10px;
    font-size: 14px;
    transition: all 0.25s ease;
}

.header-sections-mobile .header-listadoOpciones li a:hover {
    background-color: #42B733;
    color: white;
    transform: scale(1.05);
}

/* BOTONES */
.header-sections-mobile .header-listadoBotones {
    width: 100%;
    display: flex;
    gap: 10px;
}

.header-sections-mobile .header-listadoBotones button {
    flex: 1;
}

/* CERRAR */
#closeMenu {
    margin-top: auto;
    margin-bottom: 20px;
    border-radius: 50%;
    padding: 10px;
}

/* DIVIDER */
.header-divider {
    width: 90%;
    border: none;
    height: 1px;
    background: linear-gradient(to right, transparent, #42B733, transparent);
    opacity: 0.6;
}

/* ===================== */
/* RESPONSIVE */
/* ===================== */

@media (max-width: 1258px) {

    .header-container {
        display: none;
    }

    .header-container-mobile {
        display: flex;
        height: 70px;
        justify-content: center;
        align-items: center;
    }

    .header-container-mobile .header-sections {
        padding: 10px 20px;
        width: 100%;
        justify-content: space-between;
    }
}