body {
    min-height: 100vh;
    background-color: #f5fcff;
    font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif
}

#container {
    max-width: 1200px;
    margin: 0px auto;
    padding: 0.7rem 1.5rem;
}

.volver-lista {
    display: inline-block;
    color: #0b5f8a;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
}

.volver-lista:hover {
    text-decoration: underline;
}


h1 {
    font-size: 2rem;
    font-weight: 700;
    color: rgb(11, 60, 93);
    margin-bottom: 1rem;
    margin-top: 0.5rem;
}

#search-input {
    height: 2rem;
    width: 40%;
    border-radius: 5px;
    margin-bottom: 0;

}

.search-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2%;
}

/*boton Filtros*/
#btn-filtro {
    height: 2.2rem;
    padding: 0 1rem;
    margin-left: 0.5rem;
    border: none;
    border-radius: 6px;
    background-color: rgb(11, 60, 93);
    color: white;
    font-weight: 600;
    cursor: pointer;
}

#btn-filtro:hover {
    opacity: 0.9;
}

#grid {
    display: grid;
    grid-template-columns:
        repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.department-card {
    background-color: rgb(255, 255, 255);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: rgba(0, 0, 0, 0.08) 0px 2px 8px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    transform: translateY(0px);
}

.department-card p {
    color: rgb(74, 74, 74);
    font-size: 1.05rem;
    margin-bottom: 1rem;

}

.department-card:hover {
    transform: translateY(-4px);
}

#results-container {
    margin: 5%;
    display: grid;
    grid-template-columns: repeat(auto-fill,
            minmax(300px, 1fr));
    gap: 1.5rem;
}

.card-pesquero {
    align-items: center;
    background-color: rgb(255, 255, 255);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: rgba(0, 0, 0, 0.08) 0px 2px 8px;
    cursor: pointer;
    transition: transform 0.2s,
        box-shadow 0.2s;
    transform: translateY(0px);
}

.card-pesquero img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.link-pesquero {
    text-decoration: none;
    color: inherit;
    display: block;
}


.listado-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.listado-header h2 {
  color: rgb(11, 60, 93);
  margin: 0;
}


#results-container {
  margin: 1rem 0 2rem;
}

#search-input {
  width: 100%;
  max-width: 460px;
}


#results-container,
#recomendados-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  margin: 1rem 0 2rem;
}

#seccion-recomendados {
  margin: 2rem 0 3rem;
}

.recomendados-nota {
  color: #526775;
  font-size: 0.95rem;
  line-height: 1.5;
}

.recomendados-nota a {
  color: #0b5f8a;
  text-underline-offset: 2px;
}

.recomendados-nota a:focus-visible {
  outline: 3px solid #227c9d;
  outline-offset: 3px;
}

#seccion-recomendados[hidden],
#btn-ver-mas[hidden] {
  display: none;
}

.ver-mas-container {
  display: flex;
  justify-content: center;
  margin: 2rem 0;
}

#btn-ver-mas {
  padding: 0.8rem 2rem;
  border: 1px solid #0b3c5d;
  border-radius: 8px;
  background: transparent;
  color: #0b3c5d;
  font-weight: 600;
  cursor: pointer;
}

#btn-ver-mas:hover {
  background: #0b3c5d;
  color: white;
}


/* Panel de filtros */

.panel-filtros {
  background: white;
  border: 1px solid #dce7ed;
  border-radius: 12px;
  padding: 1.5rem;
  margin: 1rem 0 2rem;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.05);
}

.panel-filtros[hidden] {
  display: none;
}

.filtros-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.filtro-campo {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.filtro-campo label {
  font-weight: 600;
  color: #0b3c5d;
}

.filtro-campo select {
  width: 100%;
  min-width: 0;
  padding: 0.65rem;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: white;
  font: inherit;
}

.filtro-temporada {
  margin: 1.5rem 0 0;
  padding: 1rem 0 0;
  border: 0;
  border-top: 1px solid #e2e8f0;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.filtro-temporada legend {
  font-weight: 600;
  color: #0b3c5d;
  padding-right: 0.5rem;
}

.filtro-temporada label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
}

.filtros-acciones {
  display: flex;
  justify-content: flex-end;
  margin-top: 1.5rem;
}

#btn-limpiar {
  background: transparent;
  border: 1px solid #0b3c5d;
  color: #0b3c5d;
  border-radius: 6px;
  padding: 0.6rem 1rem;
  cursor: pointer;
}

#btn-limpiar:hover {
  background: #edf5f9;
}

@media (max-width: 900px) {
  .filtros-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .filtros-grid {
    grid-template-columns: 1fr;
  }

  .panel-filtros {
    padding: 1rem;
  }
}



/* Responsive */

@media (max-width: 600px) {

    #container {
        padding: 1rem 1rem;
    }

    h1 {
        font-size: 1.8rem;
    }

    .search-controls {
        width: 100%;
    }

    #search-input {
        flex: 1;
        width: auto;
    }

    #btn-filtro {
        flex-shrink: 0;
        margin-left: 0;
    }

    #grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
        margin-top: 1rem;
    }

    .department-card {
        padding: 1rem;
        border-radius: 10px;
    }

    .department-card h3 {
        font-size: 1rem;
        margin-bottom: 0.4rem;
        margin-top: 0;
    }

     #results-container,
  #recomendados-container {
    grid-template-columns: 1fr;
  }

    .department-card p {
        font-size: 0.9rem;
        margin-bottom: 0;
        margin-top: 1vh;
    }

    #results-container {
        margin: 2rem 0;
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .card-pesquero {
        width: auto;
        padding: 1rem;
    }

    .card-pesquero img {
        height: 190px;
        border-radius: 8px;
    }

    .department-card:hover {
        transform: none;
    }
}
