@font-face {
  font-family: 'TypoGroteskBlackDemo';
  src: url('../font/DINNeuzeitGroteskLT-BoldCond.woff2') format('opentype');
}


header {
  padding: 0.1rem;
  background-color: #3A3A3A;
  text-align: center;
}

/* Toda la fila principal en horizontal */
.header-row {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0rem;
}

/* Logo del proyecto al lado izquierdo */
.logo-container {
  display: flex;
  flex-direction: column;
  align-items: start;
  text-align: start;
  margin-bottom: 5px;
  
}

.logo-text {
  font-weight: bold;
  font-size: 30px;
  color: rgb(247, 213, 127);
  font-family: 'TypoGroteskBlackDemo';
  
}

.logo-text span {
  font-weight: bold;
  color: #F59B00;
  font-weight: normal;
  font-size: 30px;
  text-transform: lowercase ;
  font-family: 'TypoGroteskBlackDemo';
  line-height: 29px;
  
  
}

.logo-subtitle {
  font-size: 1rem;
  color: #f7d57f;
  font-family: 'TypoGroteskBlackDemo';
  margin-top: 2px;
}

/* Enlaces de navegación */
#nav-links {
  display: flex;
  align-items: center;
  gap: 0rem;
  font-size: 0.95rem;
  margin-left: 20px ;
}

#nav-links a {
  text-decoration: none;
  color: #4bbfc5;
  font-weight: bolder;
  font-family: 'TypoGroteskBlackDemo';
  letter-spacing: -0.8px;
  line-height: 29px;
  font-size: 23px;
  transition: color 0.2s ease 0.1s; /* duración: 0.3s, tipo: ease, delay: 0.2s */
  /* transform: scale(1); */
}
#nav-links a:hover {
  color: #f5d78c; /* Cambia este color a lo que desees */
}

/* #nav-links span {
  margin: 0 0.25rem;
} */

/* Logos institucionales */
.logos-right {
  display: flex;
  align-items: center;
  /* ¡NO uses gap si hay espacio dentro de las imágenes! */
}

.logos-right img {
  height: 75px;
  margin-left: 1px;
  padding: 0;
  display: block;
}
.logos-right .imgNeomed {
  height: 100px;
  margin: 0;
  padding: 0;
  display: block;
}


.logos-right img:first-child {
  margin-right: 26px; /* o ajusta según necesidad */
}


/* .logos-right img {
  height: 90px;
  object-fit: contain;
} */


/* Botón de búsqueda */
.search-container {
  display: flex;
  align-items: center;
}

.search-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
}

.bi-search {
  font-size: 30px;
  color: #f5f5f5;
}
.bi-search:hover {
  color: #f5d78c;
}


.divider {
  width: 0.5px;
  height: 28px;
  background-color: rgb(116, 200, 203);
  margin: 1.5rem;
}

.search-btn {
  background: none;
  border: none;
  color: white;
  font-size: 22px;
  cursor: pointer;
}
.search-btn:hover {
  color: rgb(247,213,127,1);
}

/* === HAMBURGUESA SOLO EN MÓVIL === */
.menu-toggle {
  display: none;
}


/* ================================================== */
/* =============== TABLET (768px–1078px) ============ */
/* ================================================== */
@media (max-width: 1078px) and (min-width: 768px) {
  .header-row {
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
  }

  #nav-links {
    flex-wrap: wrap;
    justify-content: center;
  }

  .logos-right {
    justify-content: center;
  }

  .menu-toggle {
    display: none; /* hamburguesa no visible en tablet */
  }

  .search-container {
    position: static;
    order: 2;
  }
}

/* Movil */
@media (max-width: 767px) {
  header{
    padding: 0.6rem;
    background-color: #3A3A3A;
  }
  .header-row {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    padding: 10px;
    position: relative;
  }

  /* ==== BLOQUE IZQUIERDO (logo opioidesPR + Neomed) ==== */
 
 
  .logo-subtitle {
    position: absolute;
    font-size: 12px;
    color: #f1cf6f;
    right: 45px;
    bottom: 60px;
  }

  /* Mostramos el logo Neomed encima del texto */
  .imgNeomed {
  position: absolute;
  bottom: 35px;
  left: -11px;
  height: 75px !important;
  z-index: 1000;
}
.imgSalud{
  position: absolute;
  top: 50px;
  right: 80px;
  height: 65px !important;
  z-index: 1000;
}

.logo-container{
  margin-top: 50px;
}


  /* ==== BLOQUE DERECHO (logo Salud + código + hamburguesa) ==== */
  .logos-right {
    display: flex;
    flex-direction: column;
    /* align-items: flex-end; */
    gap: 3px;
    /* margin-right: 10px; */
    order: 2;
  }

  .logos-right img {
    height: 35px;
    width: auto;
  }

  .search-container {
    display: flex;
    position: absolute;
    top: 30px;
    right: 110px;
    z-index: 1001;
    
  } 

  .search-container{
  display: none;
}
.bi-search{
   color: #ebebcb; 
}


  nav.active + .search-container {
  display: block;
   
  
}


  /* Botón hamburguesa */
  .menu-toggle {
    display: block;
    position: absolute;
    top: 60px;
    right: 30px;
    font-size: 22px;
    z-index: 1001;
    background: none;
    border: none;
    color: #ebebcb;
    cursor: pointer;
  }
   .menu-toggle.active {
    display: block;
    position: absolute;
    top: 30px;
    right: 30px;
    font-size: 22px;
    z-index: 1001;
    background: none;
    border: none;
    color: #ebebcb;
    cursor: pointer;
  }
 

  

  nav.active ~ .logos-right img {
  display: none;
}

  
  .bi-list {
    font-size: 40px; /* Ocultar icono de búsqueda en móvil */
  }

  /* Ocultar menú principal */
  #nav-links {
    display: none;
  }

  #nav-links.active {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 25px;
    position: fixed;
    top: 0;
    right: 0px;
    padding-top: 100px;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 999;
  }

  #nav-links.active ~ .search-container {
  display: block;
}
}


/* MODAL GENERAL */
.search-modal {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  background: rgba(0, 0, 0, 0.95);
  z-index: 9999;
  justify-content: center;
  align-items: center;
}

/* CONTENIDO CENTRAL DEL MODAL */
.search-modal-content {
  width: 100%;
  max-width: 900px;
  max-height: 90vh;
  overflow-y: auto;
  margin: auto;
  padding: 20px;
  text-align: center;
  background-color: #333;
  border-radius: 12px;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

/* BOTÓN DE CERRAR MODAL */
.close-btn {
  position: absolute;
  top: 20px; right: 30px;
  font-size: 40px;
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  z-index: 10000;
}

.close-btn:hover {
  color: red;
}

/* INPUT DE BÚSQUEDA */
.search-modal input[type="text"] {
  margin-top: 50px;
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  font-size: 20px;
  font-weight: 800;
  outline-color: rgb(116, 200, 203);
  background-color: #f5f5f5;
  border: none;
}

.search-modal input[type="text"]:active,
.search-modal input[type="text"]:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgb(116, 200, 203);
}



/* CONTENEDOR DE CARDS */
.cards-container {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  padding-bottom: 30px;
}

/* CARD INDIVIDUAL */
.card {
  color: white;
  padding: 20px;
  border-radius: 12px;
  text-align: left;
  /* background-color: #1e1e1e; */
  transition: transform 0.2s;
  cursor: pointer;
}

.card:hover {
  transform: scale(1.02);
}

/* IMAGEN DE LA CARD */
.card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 10px;
}

/* TÍTULO Y CATEGORÍA CON PUNTOS SUSPENSIVOS */
.card h3,
.card p {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin: 5px 0;
}

/* OPCIÓN PARA MULTILÍNEA CON PUNTOS (usa esto si prefieres truncar en 2 líneas) */
/*
.card h3, .card p {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}
*/

