
.topBar {
  width: 100%;
  background-color: var(--AzulFuerte);
  color: var(--ColorWhite);
  font-size: 14px;
  position: fixed;
  top: 0;
  z-index: 20;

  padding: 5px 15px;
}



.topBarContent {
  max-width: 1400px;
  margin: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2px 0px;
}

.contactInfo {
  display: flex;
  gap: 20px;
  align-items: center;
  font-weight: 400;
}

.socialIcons {
  display: flex;
  gap: 12px;
}

.socialIcons a {
  color: var(--AzulClaro);
  font-size: 17px;
  transition: 0.3s;
  background-color: var(--ColorWhite);
  width: 25px;
  height: 25px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  margin-top:-1px;
}

/* Hover: fondo azul, icono blanco */
.socialIcons a:hover {
  background-color: var(--AzulClaro); /* fondo azul */
  color: var(--ColorWhite);            /* icono blanco */
}


/* ======================= */
/*  MENÚ PRINCIPAL BLANCO  */
/* ======================= */

header {
  width: 100%;
  background-color: var(--ColorWhite);
  box-shadow: rgba(58, 58, 58, 0.15) 1.95px 1.95px 2.6px;
  position: sticky;
  top: 36px;
  z-index: 10;
  display: flex;
  justify-content: center;
  padding: 10px 0;
  position:fixed;
  z-index: 1000;
}

.containerMenu {
  width: 100%;
  max-width: 1400px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 40px;
  padding: 0 10px;
}

/* Logo */
.containerOpenLogo img {
  width: 100%;
  height: auto;
  overflow: hidden;
  object-fit: cover;
}

/* Menú */
nav ul {
  display: flex;
  /*gap: 20px;*/
  gap: 50px; /*reducimos el gap entre los li del menu de navegacion*/
  list-style: none;
}

nav ul li a {
  text-decoration: none;
  color: var(--Color-text);

  font-family: var(--font-poppins);
  font-weight: 600;
  font-size: 18px;
}

nav ul li a:hover {
  color: var(--AzulFuerte);
}

/*buscador funcionando*/


/* Buscador */
.searchBox {
  display: flex;
  align-items: center;

  border-radius: 4px;
  width: 40px;
  height: 40px;
  justify-content: center;
  border: 1px solid var(--AzulClaro)  ;
  cursor: pointer;
  background-color:var(--AzulClaro);

  display: none;

  /*width: 280px;*/
}

.searchBox input {
  border: none;
  outline: none;
  background: none;
  width: 100%;
  font-size: 14px;
}

.searchBox i {
  color: var(--ColorWhite);
  cursor: pointer;
}

/* Botón hamburguesa */
.nav-bar {
  display: none;
  width: 45px;
  height: 45px;
  justify-content: center;
  align-items: center;
  border: 1px solid #ccc;

  cursor: pointer;
}

.nav-bar span {
  position: relative;
  width: 25px;
  height: 3px;
  background: #000;
}

.nav-bar span::before,
.nav-bar span::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 3px;
  background: #000;
  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: 0;*/
  top:134px;
  left: 0;
  width: 100%;
  height: 100vh;
  background: rgba(0, 0, 0, 0.2);
 /* background-color: transparent;*/
  display: none;
}

.displayOverlayMenu {
  display: block;
}

.spaceNav{
    width: 100%;
   /* height: 135px;*/
   height: 130px;
    background-color: transparent;
}


/*ESTILOS ADICIONALES PARA EL BUSCADOR*/
.flexBuscador{
      display: flex;
      gap: 10px; /*la separacion entre el buscador y menu Hamburgueza*/

    }

    /*buscador funcionando activo*/
    .responseSearchButtonBox{
      display: flex;
      align-items: center;

      border-radius: 4px;
      width: 45px;
      height: 45px;
      justify-content: center;
      border: 1px solid var(--AzulClaro)  ;
      cursor: pointer;
      background-color: var(--AzulClaro);
      color: var(--ColorWhite);
      transition: all ease .3s;
    }

    .responseSearchButtonBox i{
      font-size: 18px;
    }

    .responseSearchButtonBox:hover{
       background-color:var(--AzulClaro-Hover); /* Azul más oscuro */
      color: white;
      border-color: var(--AzulClaro-Hover);
    }

    .search-box {
        position: fixed;
        top: -100%;
        left: 0;
        width: 100%;
        background-color: var(--ColorWhite);
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
        padding: 36px 0; /*le cambia a max padding arriba y abajo para que se vea mejor*/
        z-index: 1001;
        transition: all ease .3s;
        display: flex;
        justify-content: space-between;
        padding-left:15px;
    }

    .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: 30px;
        font-size: 1rem;
        outline: none;
        transition: all ease .3s;
        box-shadow: none;
        /*se le agrego para que quede mejor el borde*/
        border-radius: 10px;
    }

    .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 .3s;
    }

    .search-input:not(:placeholder-shown) + .search-clear {
        opacity: 1;
        visibility: visible;
    }

    .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 .3s;
        margin-left: 20px;
    }

    .search-close:hover {
        color: var(--ColorBtn);
    }

    /* Overlay */
        .overlay {
            position: fixed;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: var(--overlay);
            z-index: 1000;
            opacity: 0;
            visibility: hidden;
            transition: all ease .3s;
            top: 50px; /*Se le agrego para que suba el overlay top 50 y se vea mejor*/
        }

        .overlay.active {
            opacity: 1;
            visibility: visible;
        }



        /* Resultados de búsqueda */
.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: 1002;
    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 var(--gray);
    transition: all ease .3s;
    background-color: var(--ColorWhite);
}

.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 {
    padding: 20px;
    text-align: center;
    color: var(--gray);
}
/*FIN DEL RESULTADO DE LA BUSQUEDA*/
/*FIN*/




/*SUB MENUS*/
/**/
/* ===== SUBMENÚ (mejorado) ===== */
/* ===== SUBMENÚ RESPONSIVE ===== */
/* ===== SUBMENÚ RESPONSIVE ===== */
.submenu {
  position: relative;
}

.submenu .flecha {
  margin-left: 6px;
  font-size: 14px;
  transition: transform 0.3s ease;
}

/* DESKTOP: menú flotante */
.submenu-items {
  display: block;
  position: absolute;
  background-color: var(--ColorWhite);
  list-style: none;
  top: 100%;
  left: 0;
  min-width: 180px;
  border-radius: 5px;
  box-shadow: rgba(0, 0, 0, 0.15) 0px 3px 5px;
  z-index: 100;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: all 0.3s ease;
}

.submenu:hover .submenu-items {
  max-height: 600px;
  overflow-y: auto;
  opacity: 1;
  top: 30PX;
}

.submenu:hover .flecha {
  transform: rotate(180deg);
}






/*FIN SUBMENIS*/
@media (min-width: 1081px) {

    nav ul li.has-submenu {
        position: relative;
    }

    nav ul li.has-submenu .submenu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        background-color: var(--ColorWhite);
        min-width: 220px;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
        border-radius: 0 0 8px 8px;
        padding: 10px 0;
        z-index: 100;
        margin-top: 0;
    }

    nav ul li.has-submenu:hover .submenu,
    nav ul li.has-submenu.show-submenu .submenu {
        display: block;
    }

    .submenu li {
        padding: 0;
    }

    .submenu li a {
        padding: 12px 20px;
        display: block;
        color: rgb(34, 34, 34);
        font-size: 15px;
        transition: all 0.3s;
        white-space: nowrap;
    }

    .submenu li a:hover {
        background-color: var(--AzulClaro);
        color: var(--ColorWhite);
       /* padding-left: 25px;*/ /*le  quitamos esto para que no crezca la imagen ese efecto*/
        font-size: 16px;
    }

    /* Flecha en desktop */
    .submenu-arrow {
        font-size: 12px;
        margin-left: 5px;
        transition: transform 0.3s;
    }

    nav ul li.has-submenu:hover .submenu-arrow,
    nav ul li.has-submenu.show-submenu .submenu-arrow {
        transform: rotate(180deg);
    }



}


/* MOBILE: integrarlo en el panel */
@media (max-width: 1080px) {
   nav ul{
    gap: 0px;
  }
  .submenu-items {
    position: static;
    background-color: rgba(255, 255, 255, 0.1); /* Fondo sutil para distinguir */
    box-shadow: none;
    border-radius: 0;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: all 0.3s ease;
    display: block !important;
    width: 100%;
    margin: 0;
    padding: 0;
  }

  .flexIconMenuO{
    margin-right: 10px;
  }

  /*-- Ajustes --*/
   .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: 150px;
    opacity: 1;
    padding-left: 0;
  }
  /*-- Fin de Ajustes --*/


  .submenu-items li a {
    color: var(--ColorWhite);
    padding: 12px 20px; /* Padding consistente */
    font-family: var(--font-poppins);
    font-size: 16px;
    border-left: 3px solid transparent;
    transition: all 0.3s ease;
    display: block;
    width: 100%;
  }

  .submenu-items li a:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--secundario);
    border-left: 3px solid var(--secundario);
  }

  .submenu.open .flecha {
    transform: rotate(180deg);
  }

  /* Asegurar que el toggle ocupe todo el ancho */
  .submenu > .submenu-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 20px 10px ;
  }
}








/* Responsive */
@media (max-width: 1080px) {
  nav ul {
    flex-direction: column;
    background: var(--ColorWhite);
    position: absolute;
    top: 0;
    left: 0;
    width: 280px;

    margin-top: 88px;
    margin-left: -100%;
    height: 100vh;
    padding-top: 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.2);
    overflow-y: auto; /*me aparezca el scrool*/

  }


  nav ul li a{
    display: block;
    text-decoration: none;
    color: black;
    padding: 20px 10px;
    transition: all ease .2s;
    font-family: var(--font-poppins);
    font-size: 16px;
    font-weight: 400;
    cursor: pointer;
  }

  nav ul li a:hover{
    background-color: var(--AzulFuerte);
    color: var(--ColorWhite);
  }

  .nav-bar {
    display: flex;
  }

  .searchBox {
    display: none;
  }

  .mostrar {
    margin-left: 0;
    transition: 0.3s;
    /*overflow-y: auto;*/ /*ver si funciona*/
  }

  .responseSearchButtonBox{
        display: flex;
      }


      /**/
       nav ul li.has-submenu .submenu {
        display: none;
        list-style: none;
        padding-left: 20px;
        margin-top: 0;
        background-color: #f8f9fa;
    }

    nav ul li.has-submenu.show-submenu .submenu {
        display: block;
    }

    .submenu li a {
       /* padding: 15px 20px;*/
        font-size: 15px;
        color: #555;
        border-left: 3px solid transparent;
    }

    .submenu li a:hover {
      font-size: 15px;
        background-color: var( --AzulFuerte);
        color: var(--ColorWhite);
        border-left-color: var(--AzulFuerte);
    }


    /* Flecha en móvil */
    .submenu-arrow {
        float: right;
        margin-right: 10px;
        transition: transform 0.3s;
    }

    nav ul li.has-submenu.show-submenu .submenu-arrow {
        transform: rotate(180deg);
    }

}


@media (max-width:700px ) {
 .topBar{
    display: none;
 }
 header{
    top: 0px;

 }

 .overlayMenu{
    top: 88px;
 }

 .spaceNav{
    /*height: 30px;*/
    height: 90px;
 }

 /*WIDHT DEL BUSCADOR CUANDO SALE EL OVERLAY*/
 .search-wrapper{
      width: 89%;
  }
  .search-box{
    padding: 18px ;
  }
  .search-results{
    top:85px;
  }
}
@media (max-width: 500PX) {
     .search-wrapper{
      width: 84%;
     }
    }

    @media (max-width: 430PX) {
     .search-wrapper{
      width: 82%;
     }
    }


  
*/
