#custom-nav-wrapper {
  padding: 10px 5rem;
  position: relative;
  align-content: center;
}

/* Progreso y botón de donación */
#custom-progress-wrapper {
  position: absolute;
  right: 5rem;
  display: flex;
  align-items: center;
  gap: 10px;
}


#custom-progress-container, #custom-progress-container-mobile-small {
  position: relative;
  background-color: #e4e4e4;
  width: 200px;
  height: 35px;
  border-radius: 20px;
  overflow: hidden;
}

#custom-progress-bar, #custom-progress-bar-mobile-small {
  background: var(--color-porcentaje);
  width: 19%;
  height: 100%;
  display: flex;
  align-items: center;
  padding-left: 8px;
  box-sizing: border-box;
}

.progress-value {
  color: white;
  font-size: 14px;
  z-index: 1;
}

#custom-btn-donar, #custom-btn-donar-mobile {
  background-color: var(--color-button-orange);
  color: white;
  border: none;
  border-radius: 20px;
  padding: 8px 20px;
}

#linkdonar {
  text-decoration: none;
  color: white;
}

/* Navbar */
#custom-navbar {
  background-color: var(--color-navbar);
  border-radius: 50px;
  padding: 15px 30px;
  margin-top: 50px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

#custom-navbar-nav {
  gap: 20px;
}

.nav-link {
  color: var(--color-text) !important;
  font-size: 16px;
  white-space: nowrap;
}

/* Buscador */
#custom-search-box {
  display: flex;
  align-items: center;
  position: relative;
  gap: 8px;
}

#custom-search-input {
  border-radius: 25px;
  padding: 8px 40px 8px 15px;
  border: none;
  width: 100%;
}

#custom-btn-search {
  position: relative;
  right: 0;
  aspect-ratio: 1;
  min-width: 35px;
  min-height: 35px;
  border-radius: 50%;
  border: none;
  background: var(--color-button-search);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Cabecera móvil oculta por defecto */
#custom-mobile-header {
  display: none;
}

.mobile-buttons-wrapper {
  display: none;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  width: 100%;
}

/* Estilos para el dropdown */
.dropdown-menu {
  background-color: var(--color-navbar);
  border-radius: 0px 0px 15px 15px;
  padding: 10px;
  border: none !important;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}
.dropdown-item {
  padding: 10px 20px;
  margin: 10px 0px;
  border-radius: 15px;
}
.dropdown-item:hover {
  background-color: var(--color-cardbluelight);
}
.navbar .dropdown-menu {
  margin-top: 20px !important;
}
.navbar .dropdown-item {
  color: var(--color-text-blackandwhite) !important;
}

/* Responsividad */
@media (max-width: 1200px) {
  #custom-nav-wrapper {
    padding: 10px 2rem;
  }

  #custom-progress-wrapper {
    right: 2rem;
  }
  #custom-navbar{
    z-index: 40;
  }
}

@media (max-width: 993px) {
  #custom-progress-wrapper {
    display: none !important; /* Ocultar en pantallas pequeñas */
  }

  #custom-mobile-header {
    display: flex; /* Mostrar progreso y menú en móviles */
    align-items: center;
    gap: 15px;
  }

  .navbar-toggler {
    border: none !important;
    box-shadow: none !important;
  }
  
  .navbar-toggler-icon {
    background: none !important;
    position: relative;
    width: 1.5em;
    height: 1.5em;
  }
  
  /* Líneas del menú - 3 ahora */
  .navbar-toggler-icon::before,
  .navbar-toggler-icon::after,
  .navbar-toggler-icon span.middle-line {
    content: '';
    position: absolute;
    left: 0;
    width: 80%;
    height: 4px;
    border-radius: 4px;
    background-color: var(--color-text-blackandwhite);
    transition: all 0.3s;
  }
  
  .navbar-toggler-icon::before {
    top: 0.13em;
    transform: none;
  }
  
  .navbar-toggler-icon span.middle-line {
    top: 50%;
    transform: translateY(-50%);
  }
  
  .navbar-toggler-icon::after {
    bottom: 0.13em;
    transform: none;
  }
  
  #custom-navbar {
    padding: 10px 20px;
    position: absolute;
    width: 95%;
  }

  #custom-navbar {
    padding: 10px 20px;
  }

  #custom-search-box {
    margin-top: 15px;
    width: 100%;
  }

  .navbar-collapse {
    margin-top: 15px;
    z-index: 1050; /* Asegurarse de que se superponga a otros elementos */

  }


  .nav-link {
    padding: 10px 0;
  }

  /* Mostrar el progreso y botón de donación debajo de la lupa en pantallas pequeñas */
  .mobile-buttons-wrapper {
    display: flex;
    margin-top: 15px;
    justify-content: space-between;
    width: 100%;
  }

  #custom-btn-donar-mobile {
    flex-basis: 20%;
    text-align: left;
  }

  #custom-progress-container-mobile-small {
    flex-basis: 80%;
    text-align: right;
  }
}

@media(max-width:755px){
  #custom-btn-donar, #custom-btn-donar-mobile {
    background-color: var(--color-button-orange);
    color: white;
    border: none;
    border-radius: 20px;
    padding: 8px 13px;
}
}

@media (max-width: 576px) {
  #custom-nav-wrapper {
    padding: 10px 1rem;
  }

  #custom-btn-donar, #custom-btn-donar-mobile {
    padding: 6px 15px;
  }

  #custom-progress-container, #custom-progress-container-mobile-small {
    width: 100%;
    height: 30px;
  }
  #primero{
    display: none;
  }
  #custom-navbar {
    border-radius: 30px;
  }

  #custom-search-input {
    padding: 6px 35px 6px 10px;
  }

  #custom-btn-search {
    width: 40px;
    height: 35px;
  }
}

@media(max-width:525px){
  #custom-btn-donar, #custom-btn-donar-mobile {
    background-color: var(--color-button-orange);
    color: white;
    border: none;
    border-radius: 20px;
    padding: 2px 12px;
    height: 2rem;
}
}

@media (max-width: 320px) {
  #custom-nav-wrapper {
    padding: 10px 1rem;
  }
  #primero{
    display: none;
  }
  #custom-btn-donar, #custom-btn-donar-mobile {
    padding: 6px 15px;
  }

  #custom-progress-container, #custom-progress-container-mobile-small {
    width: 100%;
    height: 30px;
  }

  #custom-navbar {
    border-radius: 30px;
  }

  #custom-search-input {
    padding: 6px 35px 6px 10px;
  }

  #custom-btn-search {
    width: 40px;
    height: 35px;
  }
}