

/* ======================= */
/*  SEGUNDA BARRA - IMAGEN HEADER */
/* ======================= */

.container-response-noticias{
    display: none;
}


.headerTitle {
    width: 100%;
    background-color: var(--ColorWhite);
    position: fixed;
    top: 0;
    z-index: 1000;
    padding: 0;
    /*box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);*/
}

.headerTitleContent {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    overflow: hidden;
}

.headerTitleContent img {
    width: 100%;
    height: auto;
    max-height: 120px;
    object-fit: contain;
    display: block;
    padding: 20px 10px ;
}

/* ======================= */
/*  MENÚ PRINCIPAL AZUL    */
/* ======================= */
header {
    width: 100%;
    background-color: #38BEFD;
    position: fixed;
    top: 120px; /* Ajustado dinámicamente según la imagen */
    z-index: 999;
    /*box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);*/
    border-bottom: 4px solid #0896D9;

}

.containerMenu {
    width: 100%;
    max-width: 1400px;
    margin: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0px 20px;
    gap: 30px;
}

.container-logo-response{
    width: 95px;
    height: auto;
    display: none;
}
.container-logo-response a {
    width: 95px;
    height: 80px;
}
.container-logo-response a img{
    width: 100%;
    height:auto;
}

/* Navegación */
nav {
    flex: 1;
}

nav ul {
    display: flex;
    gap: 0;
    list-style: none;
    height:100%;
}

nav ul li a {
    text-decoration: none;
    color: var(--ColorWhite);

    font-weight: 500;
    font-size: 17px;
    padding: 25px 20px;
    display: block;
    transition: all 0.3s ease;
    white-space: nowrap;
}

nav ul li a:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* Botones de acción */
.containerButtons {
    display: flex;
    align-items: center;
    gap: 15px;
}

.btnNoticias {
    background-color: var(--ColorWhite);
    color: var(--AzulFuerte);
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btnNoticias:hover {
    background-color: var(--AzulFuerte);
    color: var(--ColorWhite);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.socialIconsHeader {
    display: flex;
    gap: 10px;
}

.socialIcon {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    transition: all 0.3s ease;
    font-size: 18px;
}

.socialIcon.facebook {
    background-color: var(--bg-blue);
    color: var(--ColorWhite);
}

.socialIcon.facebook:hover {
    background-color: var(--bg-blue-hover);
    transform: translateY(-2px);
}

.socialIcon.youtube {
    background-color: var(--red);
    color: var(--ColorWhite);
}

.socialIcon.youtube:hover {
    background-color: var(--red-hover);
    transform: translateY(-2px);
}

/* Buscador y menú hamburguesa */
.flexBuscador {
    display: none;
    gap: 10px;
}

.responseSearchButtonBox {
    display: flex;
    align-items: center;
    border-radius: 5px;
    width: 45px;
    height: 45px;
    justify-content: center;
    border: 1px solid var(--ColorWhite);
    cursor: pointer;
    background-color: var(--ColorWhite);
    color: var(--AzulClaro);
    transition: all ease 0.3s;
}

.responseSearchButtonBox i {
    font-size: 18px;
}

.responseSearchButtonBox:hover {
    background-color: var(--AzulClaro-Hover);
    color: white;
    border-color: var(--AzulClaro-Hover);
}

/* Botón hamburguesa */
.nav-bar {
    display: none;
    width: 45px;
    height: 45px;
    justify-content: center;
    align-items: center;
    border: 2px solid var(--ColorWhite);
    cursor: pointer;
    border-radius: 5px;
    background-color: var(--ColorWhite);
}

.nav-bar span {
    position: relative;
    width: 25px;
    height: 3px;
    background: var(--AzulClaro);
}

.nav-bar span::before,
.nav-bar span::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 3px;
    background: var(--AzulClaro);
    transition: 0.3s;
}

.nav-bar span::before {
    top: -8px;
}

.nav-bar span::after {
    top: 8px;
}

.closeBar span {
    background: transparent;
}

.closeBar span::before {
    transform: rotate(45deg);
    top: 0;
}

.closeBar span::after {
    transform: rotate(-45deg);
    top: 0;
}

/* Overlay */
.overlayMenu {
    position: fixed;
    top: 175px;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    display: none;
}

.displayOverlayMenu {
    display: block;
}

.spaceNav {
    width: 100%;
    height: 192px;
    background-color: transparent;
}

/* ======================= */
/*     SUBMENÚ DESKTOP     */
/* ======================= */
.submenu {
    position: relative;
}

.submenu .flecha {
    margin-left: 6px;
    font-size: 12px;
    transition: transform 0.3s ease;
}

.submenu-items {
    display: block;
    position: absolute;
    background-color: var(--ColorWhite);
    list-style: none;
    top: 100%;
    left: 0;
    min-width: 200px;
    border-radius: 0 0 5px 5px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
    z-index: 100;
    height:0;
    overflow: hidden;
    opacity: 0;
    transition: all 0.3s ease;
}

.submenu:hover .submenu-items {
    height: auto;
    opacity: 1;
}

.submenu:hover .flecha {
    transform: rotate(180deg);
}

.submenu-items li a {
    padding: 12px 20px !important;
    color: var(--black) !important;
    font-size: 14px !important;
    border-left: 3px solid transparent;
}

.submenu-items li a:hover {
    background-color: var(--AzulClaro) !important;
    color: var(--ColorWhite) !important;
    border-left-color: var(--AzulFuerte);
}

/* ======================= */
/*   BUSCADOR DESPLEGABLE  */
/* ======================= */
.search-box {
    position: fixed;
    top: -100%;
    left: 0;
    width: 100%;
    background-color: var(--ColorWhite);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 36px 20px;
    z-index: 1002;
    transition: all ease 0.3s;
    display: flex;
    justify-content: space-between;
}

.search-box.active {
    top: 0;
}

.search-wrapper {
    position: relative;
    width: 92%;
    display: flex;
    align-items: center;
}

.search-input {
    flex: 1;
    padding: 20px 50px 20px 20px;
    border: 1px solid var(--AzulClaro);
    border-radius: 10px;
    font-size: 1rem;
    outline: none;
    transition: all ease 0.3s;
}

.search-input:focus {
    border-color: var(--AzulClaro);
}

.search-clear {
    position: absolute;
    right: 50px;
    background: none;
    border: none;
    color: var(--gray);
    cursor: pointer;
    padding: 0 10px;
    opacity: 0;
    visibility: hidden;
    transition: all ease 0.3s;
}

.search-submit {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    color: var(--ColorBtn);
    cursor: pointer;
    padding: 0 10px;
}

.search-close {
    position: absolute;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--gray);
    cursor: pointer;
    transition: all ease 0.3s;
}

.search-close:hover {
    color: var(--ColorBtn);
}

.overlay {
    position: fixed;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--overlay);
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: all ease 0.3s;
    top: 0;
}

.overlay.active {
    opacity: 1;
    visibility: visible;
}

.search-results {
    position: absolute;
    top: 110px;
    left: 0;
    width: 100%;
    max-height: 400px;
    overflow-y: auto;
    background-color: var(--ColorWhite);
    border-radius: 0 0 8px 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    z-index: 1003;
    margin-top: 10px;
    display: none;
}

.search-box.active .search-results {
    display: block;
}

.search-result-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    text-decoration: none;
    color: var(--black);
    border-bottom: 1px solid #eee;
    transition: all ease 0.3s;
}

.search-result-item:hover {
    background-color: var(--ColorVerde);
}

.search-result-image {
    width: 50px;
    height: 50px;
    margin-right: 15px;
    flex-shrink: 0;
}

.search-result-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.search-result-info h4 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 500;
}

.search-no-results,
.search-loading {
    padding: 20px;
    text-align: center;
    color: var(--gray);
}

/* Utilidades */
.w100 {
    width: 100%;
    max-width: 1400px;
    margin: auto;
    padding: 0 20px;
}

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



@media (max-width:1300px ) {
 .containerMenu{
    gap: 0px;
 }
 nav ul li a{
    padding: 25px 10px;
 }
}
@media (max-width: 1200px) {
    .headerTitleContent img {
        max-height: 100px;
    }

    header {
        top: 100px;
    }

    .spaceNav {
        height: 155px;
    }

    .overlayMenu {
        top: 155px;
    }

    .btnNoticias , .socialIconsHeader{
        display: none;
    }
    nav ul{
        justify-content: space-between;
    }

}

@media (max-width: 1080px) {
    /* Ajustar espacios */
    .headerTitleContent img {
        max-height: 100px;
    }

    .containerMenu{
        padding: 10px ;
    }

    /*.headerTitle{
        display: none;
    }*/

    .container-logo-response{
        display: block;
    }
    .responseSearchButtonBox{
        display: none;
    }
    header {
       /* top: 90px;*/
       /*top: 0px;*/
       top: 100px;
    }

    .spaceNav {
        /*height: 145px;*/
        /*height: 69px;*/
        height: 168px;
    }

    .overlayMenu {
        /*top: 145px;*/
        top: 169px;
    }

    /* Mostrar menú hamburguesa */
    .flexBuscador {
        display: flex;
    }

    .nav-bar {
        display: flex;
    }

    /* Ocultar elementos en móvil */
    .btnNoticias,
    .socialIconsHeader {
        display: none;
    }

    /* Menú lateral */
    nav ul {
        flex-direction: column;
        background: var(--ColorWhite);
        position: fixed;
        /*top: 67px;**/
        top: 169px;
        left: -100%;
        width: 300px;
        /*height: calc(100vh - 145px);*/
        /*padding-top: 20px;*/
        overflow-y: auto;
        transition: left 0.3s ease;
        gap: 0;
        /*justify-self:flex-start;*/
        justify-content: flex-start;
        height:auto;
    }

    nav .mostrar{
        height:100%;
    }



    nav ul.mostrar {
        left: 0;
    }

    nav ul li a {
        color: var(--black);
        padding: 18px 20px;
        border-bottom: 1px solid #eee;
    }

    nav ul li a:hover {
        background-color: var(--AzulClaro);
        color: var(--ColorWhite);
    }
  .submenu.open > .submenu-toggle {
        background-color: var(--AzulClaro);
        color: var(--ColorWhite);
    }

    /* Submenú móvil */
    .submenu-items {
        position: static;
        background-color: #f5f5f5;
        box-shadow: none;
        border-radius: 0;
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        transition: all 0.3s ease;
    }

    .submenu:hover .submenu-items:not(.submenu.open .submenu-items) {
        max-height: 0;
        opacity: 0;
    }

    .submenu:hover .flecha {
        transform: rotate(0deg);
    }

    .submenu.open .submenu-items {
        max-height: none; /* Cambiado de 500px a none para que muestre todos */
        opacity: 1;
        overflow-y: visible;
    }

    .submenu.open .flecha {
        transform: rotate(180deg);
    }

    .submenu-items li a {
        padding: 12px 20px 12px 30px !important;
        font-size: 14px !important;
        color: var(--black) !important;
        border-left: 3px solid transparent;
    }

    .submenu-items li a:hover {
        background-color: var(--AzulClaro) !important;
        color: var(--ColorWhite) !important;
        border-left-color: var(--AzulFuerte);
    }

    .submenu > .submenu-toggle {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
    }

    .container-response-noticias{
        display: block;

    }
    .btnNoticiasResponse{
        background-color: var(--ColorWhite);
    color: var(--AzulFuerte);
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    white-space: nowrap;
    }

    .btnNoticiasResponse:hover{
    background-color: var(--AzulFuerte);
    color: var(--ColorWhite);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}



}

@media (max-width: 768px) {
    .headerTitleContent img {
        max-height: 100px;
    }

    header {
     /*   top: 80px;*/
     top: 100px;
    }

    /*.spaceNav {
        height: 135px;
    }*/

    /*.overlayMenu {
        /*top: 135px;*/
       /* top: 66px;
    }*/

    /*nav ul {
        top: 135px;
        height: calc(100vh - 135px);
    }*/
    .spaceNav{
        height: 167px;
    }
}

@media (max-width:650px ) {
 header{
    top: 95px;
 }
.spaceNav{
        height: 163px;
    }
 .overlayMenu{
    top: 164px;
 }
 nav ul{
    top: 164px;
 }

}

@media (max-width: 600px) {
    .headerTitleContent img {
        max-height: 100px;
    }

    header {
      /*  top: 70px;*/
      top: 91px
    }

    .spaceNav {
        height: 160px;
    }

    .overlayMenu {
        top: 160px;
    }

    nav ul {
        top: 161px;

    }
}

@media (max-width: 550px) {
 header {
      /*  top: 70px;*/
      top: 86px
    }

    .spaceNav {
        height: 156px;
    }

    .overlayMenu {
        top: 155px;
    }

    nav ul {
        top: 155px;

    }
}

@media (max-width: 500px) {
    .headerTitleContent img {
        max-height: 100px;
        max-width: 100%;
        width: 100%;
    }

    header {
        /*top: 60px;*/
        top: 84px;
    }

    .spaceNav {
        height: 147px;
    }

    .overlayMenu {
        top: 153px;
    }

    nav ul {
       top: 153px;

    }

    .search-wrapper {
        width: 84%;
    }
}


@media (max-width: 460px) {
     header {
      /*  top: 70px;*/
      top: 76px
    }

    .spaceNav {
        height: 144px;
    }

    .overlayMenu {
        top: 145px;
    }

    nav ul {
       top: 145px;

    }
}

@media (max-width: 400px) {
    /*.headerTitleContent img {
        max-height: 50px;
    }*/

    header {
       /* top: 50px;*/
       top: 74px;
    }

    .spaceNav {
        height: 141px;
    }

     .overlayMenu {
        top: 143px;
    }

    nav ul {
       top: 143px;

    }
}

@media (max-width:370px ) {
 header {
      /*  top: 70px;*/
      top: 70px
    }

    .spaceNav {
        height: 136px;
    }

     .overlayMenu {
        top: 137px;
    }

    nav ul{
        top: 137px;
    }

}
@media (max-width:350px ) {
 header {
      /*  top: 70px;*/
      top: 68px
    }
}
