/* =======================  
   NAVBAR PROMOLD
========================*/

/* ---- COLORES ---- */
:root {
  --green-lightest: #b8e1bb;
  --green-light: #66c28f;
  --green-dark: #0f5a34;
  --green-darker: #004d23;
  --snow-white: #ffffff;
}

/* Estilos para el menú desplegable */
.green-menu .dropdown-menu {
  background-color: #0f5a34;  /* Fondo verde de tu diseño */
}

.green-menu .dropdown-menu .dropdown-item {
  color: #fff;  /* Color de texto blanco */
}

.green-menu .dropdown-menu .dropdown-item:hover {
  background-color: #66c28f;  /* Efecto de hover (verde claro) */
  color: #fff;
}   

/* Ajuste del menú desplegable */
.dropdown-menu {
  display: none;  /* Inicialmente oculto */
  position: absolute;
  background: white;
  min-width: 220px;
  list-style: none;
  padding: 0;
  margin: 0;
  border-radius: 8px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}

.dropdown.show .dropdown-menu {
  display: block;  /* Mostrar cuando esté activo */
}

/* Eliminar el desplegable por defecto */
.green-menu .dropdown-menu {
  display: none;  /* El menú está oculto por defecto */
}

/* Mostrar el menú cuando esté activo */
.green-menu .dropdown.show .dropdown-menu {
  display: block;  /* Solo se muestra cuando el dropdown está activo */
}

/* Estilos para el menú desplegable */
.green-menu .dropdown-menu .dropdown-item {
  color: #fff;  /* Color blanco para los elementos */
  background-color: #0f5a34;  /* Fondo verde */
}

.green-menu .dropdown-menu .dropdown-item:hover {
  background-color: #66c28f;  /* Efecto de hover con color verde más claro */
}

/* Alineación del botón de "NOSOTROS" y otros botones */
.green-menu .dropdown-toggle {
  padding: 8px 15px;  /* Asegura que el padding sea el mismo que para los otros botones */
  line-height: 1.5;  /* Alinea el texto verticalmente */
  display: inline-flex;  /* Asegura que el texto y la flecha estén alineados de manera correcta */
  align-items: center;  /* Centra el texto y la flecha verticalmente */
  transform: translateY(1px); /* Ajusta el valor para subir el botón */
}

/* Ajuste de la flecha */
.green-menu .dropdown-toggle::after {
  content: " ▼";  /* Flecha para indicar desplegable */
  margin-left: 4px;  /* Espacio entre el texto y la flecha */
  margin-top: 0; /* Asegura que la flecha no afecte la alineación */
}
/* ----------------------
   TOPBAR SUPERIOR
----------------------- */
.topbar-green {
  width: 100%;
  background: linear-gradient(
    90deg,
    var(--green-lightest),
    var(--green-light),
    var(--green-dark),
    var(--green-darker)
  );
  padding: 10px 40px;
  position: relative;
  z-index: 98;
  overflow: hidden;
  border-bottom: 3px solid var(--snow-white);
}

.topbar-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  position: relative;
}

/* ----------------------
   LOGO + BUSCADOR
----------------------- */
.top-left {
  display: flex;
  align-items: center;
  gap: 0;
}

.top-left img {
  height: 120px;
  width: auto;
  display: block;
  margin-left: 80px;
}

/* ----------------------
   BUSCADOR DESKTOP (SÓLO EN ESCRITORIO)
----------------------- */
.search-box {
  flex: 1;
  max-width: 1000px;
  display: flex;
  align-items: center;
  justify-content: flex-start; /* Asegura que el campo de búsqueda y el botón estén alineados */
}

/* MOVIMIENTO A LA DERECHA SÓLO EN ESCRITORIO */
@media (min-width: 768px) {
  .search-box {
    margin-left: 70px; /* Mueve la barra más a la derecha en pantallas grandes (escritorio) */
  }
}

.search-box form {
  display: flex;
  align-items: center;
  width: 100%;
}

.search-box input {
  flex: 1;
  padding: 10px 18px;
  border: none;
  border-radius: 8px 0 0 8px;
  background: #ffffff;
  font-size: 18px;
  box-shadow: 0 0 6px #00000022;
  min-width: 400px;
}

.search-box button {
  padding: 10px 18px;
  background: #2ebc77;
  border: none;
  border-radius: 0 8px 8px 0;
  cursor: pointer;
  font-weight: 700;
  color: white;
  transition: .3s;
}

.search-box button:hover {
  background: #25a865;
}

/* ----------------------
   BOTÓN HAMBURGUESA
----------------------- */
.mobile-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 38px;
  color: white;
  cursor: pointer;
  position: absolute;
  bottom: 1px;
  left: 0;
  z-index: 5;
}

/* ----------------------
   MENÚ INFERIOR
----------------------- */
.green-menu {
  background: var(--green-dark);
  padding: 8px 0;
  width: 100%;
}

.green-menu ul {
  list-style: none;
  display: flex;
  justify-content: center;  /* Centra los botones horizontalmente */
  align-items: center;      /* Centra los botones verticalmente */
  gap: 32px;
  margin: 0;
  padding: 0;
}


.green-menu ul li a {
  color: white;
  text-decoration: none;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 6px;
  transition: background 0.3s, transform 0.2s;
}

.green-menu ul li a:hover {
  background: #ffffff22;
  transform: scale(1.05);
}

/* ==========================
         RESPONSIVE
========================== */

/* -------- TABLET Y MÓVIL -------- */
@media (max-width: 768px) {

  .topbar-flex {
    flex-direction: column;
    align-items: center;
    position: relative;
  }

  .top-left {
    flex-direction: column;
    gap: 15px;
    width: 100%;
    justify-content: center;
  }

  .top-left img {
    height: 140px;
    margin-left: 0;
  }

  .search-box {
    width: 80%;
    max-width: none;
    margin: 0 auto;
  }

  .search-box input {
    min-width: 0;
    width: 70%;
    font-size: 15px;
  }

  .search-box button {
    width: 30%;
  }

  .mobile-toggle { 
    display: block;
    position: absolute;
    bottom: -10px;
    left: -31px;
    z-index: 1;
  }

  /* Menú en columna vertical */
  .green-menu {
    display: none;
    text-align: center;
  }

  .green-menu.open {
    display: flex;
    flex-direction: column; /* Cambiar a columna */
    justify-content: center;
    align-items: center;
    min-height: 40vh; /* Reducir altura */
  }

  .green-menu ul {
    display: flex;
    flex-direction: column; /* Hacer que los enlaces se alineen verticalmente */
    gap: 4px; /* Reducir el espacio entre los enlaces */
    margin-top: 0; /* Eliminar el margen superior */
    margin-bottom: 0; /* Eliminar el margen inferior */
  }

  /* Reducir el tamaño de los enlaces */
  .green-menu ul li a {
    font-size: 18px; /* Aumentar tamaño de fuente */
    padding: 8px 20px; /* Reducir el padding para hacer los enlaces más compactos */
  }
}

/* -------- MÓVIL PEQUEÑO -------- */
@media (max-width: 480px) {

  .top-left img {
    height: 135px;
  }

  .search-box {
    width: 110%;
    max-width: none;
    margin: 0 auto;
  }

  .search-box form {
    width: 100%;
  }

  .search-box input {
    width: 100%;
    height: 40px;
    padding: 6px 10px;
    font-size: 15px;
    line-height: 1;
  }

  .search-box button {
    width: 20%;
    height: 40px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .search-box button i {
    font-size: 16px;
  }

  .green-menu.open {
    min-height: 25vh; /* Reducir la altura */
  }

  .green-menu ul {
    flex-direction: column; /* Asegurarse de que los enlaces estén verticales */
    gap: 4px; /* Reducir más la separación entre los enlaces */
    margin-top: 0;
    margin-bottom: 0;
  }

  /* Aumentar el tamaño de los enlaces */
  .green-menu ul li a {
    font-size: 16px; /* Aumentar el tamaño de la fuente */
    padding: 8px 15px; /* Ajustar el padding para hacerlo más compacto */
  }
}
/* ===== AJUSTE SOLO ESCRITORIO ===== */
@media (min-width: 992px) {

  .green-menu ul {
    gap: 18px; /* menos espacio entre botones */
  }

  .green-menu ul li a {
    font-size: 14px;     /* más pequeño */
    padding: 5px 8px;    /* menos ancho */
    white-space: nowrap; /* evita salto de línea */
  }

}
/* IMAGEN DERECHA SUPERIOR */
.top-right-img img {
  height: 210px;  /* Aumenta el tamaño de la imagen */
  width: auto;    /* Mantén la proporción */
  position: absolute;
  right: 40px;    /* Ajusta la distancia desde el borde derecho */
  top: 50%;       /* Centra verticalmente */
  transform: translateY(-50%); /* Centrado exacto vertical */
}

/* OCULTAR EN CELULAR */
@media (max-width: 768px) {
  .top-right-img {
    display: none;
  }
}
/* contenedor */
.dropdown {
  position: relative;
}

/* menu oculto */
.dropdown-menu {
  display: none;
  position: absolute;
  background: white;
  min-width: 220px;
  list-style: none;
  padding: 0;
  margin: 0;
  border-radius: 8px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.15);
  z-index: 999;
}

/* mostrar cuando esta activo */
.dropdown.active .dropdown-menu {
  display: block;
}

/* links */
.dropdown-menu li a {
  display: block;
  padding: 12px 18px;
  color: #0f5a34;
  text-decoration: none;
}

.dropdown-menu li a:hover {
  background: #66c28f;
  color: white;
}

/* flecha */
.arrow {
  margin-left: 5px;
  transition: transform 0.3s ease;
}

/* flecha rotada cuando el menú está abierto */
.dropdown.active .arrow {
  transform: rotate(180deg);
}
/* ----------------------
   AJUSTES GLOBALES
----------------------- */
html, body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden !important;
  font-family: 'Poppins', sans-serif;
}
