html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}


.site-header {
  margin-bottom: 2rem; 
  margin-top: 0;
  padding-bottom: 0;
  padding-top: 0;
}


body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: 
    url('http://coralcheck.local/wp-content/uploads/2025/06/OrdenScleractinia_Dendrophylliaramea_JuanJoseSanchezCuervo1-1.jpg') center/cover no-repeat,
    url('http://coralcheck.local/wp-content/uploads/2025/06/Dendrophylliaramea_JuanJoseSanchezCuervo3.jpg') center/cover no-repeat,
    linear-gradient(to bottom, #e0f7fa, #062438);
}

#page {
  flex: 1;
  background: transparent !important;
}

/* Contenedor principal */
.contenedor-especies {
  max-width: 1400px;
  margin: 0 auto; /* Centra mejor */
  padding: 2rem;
  padding-top: 0rem;
  box-sizing: border-box; /* Importante para responsive */
}

/* H1 con más espacio */
h1 {
  text-align: center;
  color: #ffffff;
  font-size: 3rem;
  margin-bottom: 4rem; /* Aumentado de 2.5rem a 3.5rem */
  margin-top: 0rem;
  font-weight: 700;
  text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.6);
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
	
}

/* Tablets grandes */
@media (max-width: 1024px) {
  .contenedor-especies {
    max-width: 100%;
    padding: 1.5rem;
    padding-top: 0rem;
  }
  
  h1 {
    font-size: 2.5rem;
    margin-bottom: 3rem;
  }
}

/* Tablets */
@media (max-width: 768px) {
  .contenedor-especies {
    padding: 1rem;
    padding-top: 0rem;
  }
  
  h1 {
    font-size: 2rem;
    margin-bottom: 2.5rem;
  }
}

/* Móviles */
@media (max-width: 480px) {
  .contenedor-especies {
    padding: 0.8rem;
    padding-top: 0rem;
    margin: 0; /* Elimina margen en móvil */
  }
  
  h1 {
    font-size: 1.8rem;
    margin-bottom: 2rem;
    padding: 0 0.5rem; /* Añade un poco de padding interno */
  }
}

/* Móviles muy pequeños */
@media (max-width: 360px) {
  .contenedor-especies {
    padding: 0.5rem;
    padding-top: 0rem;  
  }
  
  h1 {
    font-size: 1.6rem;
    margin-bottom: 1.8rem;
  }
}

.espaciador-small {
  height: 2rem;
  width: 100%;
}
/* Grid con hasta 6 columnas en pantallas grandes */
.grid-especies {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
}

/* Card de especie estilo cristal */
.item-especie {
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 16px;
  padding: 1rem;
  text-align: center;
  min-height: 240px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Hover tipo botón */
.item-especie:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
  cursor: pointer;
}

/* Imagen de la especie */
.item-especie img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 0.75rem;
}

/* Título */
/* Título mejorado en cursiva */
.item-especie h2 {
  font-size: 1.1rem;
  font-weight: 700;
  font-style: italic;  /* ← Cursiva aquí */
  margin: 0;
  color: #FFFFFF;
  line-height: 1.3;
}

.item-especie h2 a {
  text-decoration: none;
  color: inherit;
  display: inline-block;
  padding: 0 0.2rem;
  transition: background 0.3s ease, color 0.3s ease;
  border-radius: 6px;
}

.item-especie h2 a:hover {
  background: rgba(0, 191, 255, 0.1);
  color: #062438;
}


/* Buscador */
.buscador-especies {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 3rem;
}

.buscador-especies input {
  padding: 0 1rem;
  height: 40px;
  font-size: 1rem;
  border-radius: 12px !important;
  border: 1px solid #FFAC5F;
  min-width: 220px;
  background: #ffffff;
  font-family: 'Montserrat', sans-serif;
  font-weight: bold;
}


/* Botones estilo marino más destacados */
.buscador-especies button,
.buscador-especies .btn-avanzada {
 height: 40px;
  background: #062438;
  color: #FFAC5F;
  border: none;
  padding: 0.75rem 1.25rem;
  font-size: 1rem;
  border-radius: 12px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.2s ease;
  text-decoration: none;
}

.buscador-especies button:hover,
.buscador-especies .btn-avanzada:hover {
  height: 40px;
  background:#062438;
  color: #0B496F;
  border: 1px solid #0B496F;
  padding: 0.75rem 1.25rem;
  font-size: 1rem;
  border-radius: 12px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.2s ease;
  text-decoration: none;
}

.buscador-especies button:hover,
.buscador-especies .btn-avanzada:hover {
  background: #062438; /* un tono más oscuro para hover */
  color: #0B496F;
  transform: scale(1.05);
}

@media (min-width: 768px) {
  .buscador-especies {
    flex-wrap: nowrap;
  }
}

/* TITULOS CON MONTSERRAT EN .item-especie */
.item-especie h2 {
  font-family: 'Montserrat', sans-serif !important;
}

/* CENTRADO VERTICAL DEL TEXTO EN BOTONES */
.buscador-especies button,
.buscador-especies .btn-avanzada {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}



/* Footer */
.site-footer {
  margin-top: auto;
}