/* Lo propio de la portada (T009). Lo común (fondo con formas, títulos, botones suaves, tarjetas) está en web.css.
   Elegido por Joel en el comparador: portada sin caja (D014), primera clase en tarjeta e instalaciones abiertas (D015). */

/* ---------- Portada: el texto centrado y libre sobre el fondo ---------- */
.sp-portada { position: relative; display: flex; align-items: center; min-height: min(78vh, 680px); padding: 48px 0 64px; }
.sp-portada-dentro { display: flex; justify-content: center; }
.sp-portada-texto {
  display: flex; flex-direction: column; align-items: center; max-width: 720px; padding: 40px 24px; text-align: center;
  /* Un halo crema detrás del texto para que se lea bien aunque pase una forma por detrás */
  background: radial-gradient(closest-side, rgba(255, 249, 239, 0.92), rgba(255, 249, 239, 0.6) 60%, rgba(255, 249, 239, 0));
  animation: entra 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.sp-portada-texto .texto { margin: 0 auto; }
.sp-portada-texto .botones { justify-content: center; margin-top: 30px; }

/* ---------- Noticias: carrusel de tres (flechas en PC, el dedo en el móvil) ---------- */
.sp-flechas { display: flex; gap: 10px; }
.sp-flecha { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 1px solid var(--linea-campo); border-radius: 50%; background: var(--blanco); color: var(--gris); cursor: pointer; transition: background 0.25s, border-color 0.25s, opacity 0.25s; }
.sp-flecha svg { width: 18px; height: 18px; }
.sp-flecha:hover { background: var(--melocoton); border-color: var(--melocoton); }
.sp-flecha:disabled { opacity: 0.35; cursor: default; background: var(--blanco); border-color: var(--linea-campo); }
.sp-noticias {
  --hueco: 24px; display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 2 * var(--hueco)) / 3); gap: var(--hueco);
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none;
  margin: -12px -12px 0; padding: 12px 12px 20px; scroll-padding-inline: 12px;
}
.sp-noticias::-webkit-scrollbar { display: none; }
.sp-noticia {
  position: relative; display: flex; flex-direction: column; overflow: hidden; border-radius: 16px; scroll-snap-align: start;
  background: var(--blanco); border: 1px solid var(--linea-tarjeta); box-shadow: 0 4px 20px rgba(84, 89, 95, 0.04);
  color: inherit; text-decoration: none;
  transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.4s ease, border-color 0.4s;
}
.sp-noticia::after { content: ''; position: absolute; left: 0; bottom: 0; width: 0; height: 3px; background: var(--naranja); transition: width 0.4s cubic-bezier(0.25, 0.8, 0.25, 1); }
.sp-noticia:hover { transform: translateY(-6px); box-shadow: 0 14px 30px rgba(84, 89, 95, 0.09); border-color: var(--linea); }
.sp-noticia:hover::after { width: 100%; }
.sp-noticia-foto { aspect-ratio: 16 / 10; overflow: hidden; background: var(--superficie-2); }
.sp-noticia-foto img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94); }
.sp-noticia:hover .sp-noticia-foto img { transform: scale(1.05); }
.sp-noticia-texto { display: flex; flex-direction: column; flex: 1; padding: 20px 22px 22px; }
.sp-categoria { align-self: flex-start; margin-bottom: 12px; padding: 5px 11px; border-radius: 20px; background: var(--naranja-suave); color: var(--naranja-oscuro); font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; }
.sp-noticia h3 { margin: 0 0 8px; font-size: 17.5px; font-weight: 800; line-height: 1.3; letter-spacing: -0.2px; color: var(--gris); transition: color 0.3s; }
.sp-noticia:hover h3 { color: var(--naranja-oscuro); }
.sp-noticia p { margin: 0 0 18px; font-size: 14.5px; line-height: 1.6; color: var(--gris-suave); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sp-ver { display: flex; align-items: center; gap: 7px; margin-top: auto; font-size: 12.5px; font-weight: 700; letter-spacing: 0.6px; text-transform: uppercase; color: var(--gris); transition: gap 0.3s, color 0.3s; }
.sp-ver svg { width: 15px; height: 15px; }
.sp-noticia:hover .sp-ver { gap: 11px; color: var(--naranja-oscuro); }
.sp-noticias .aparece:nth-child(2) { transition-delay: 0.07s; }
.sp-noticias .aparece:nth-child(3) { transition-delay: 0.14s; }

/* ---------- Primera clase (en .tarjeta--cristal) ---------- */
.sp-prueba { display: grid; grid-template-columns: 1fr 1.15fr; align-items: center; gap: clamp(36px, 5vw, 64px); }
.sp-prueba-texto { display: flex; flex-direction: column; align-items: flex-start; }
.sp-video-boton {
  position: relative; display: block; width: 100%; padding: 0; overflow: hidden; aspect-ratio: 16 / 9; cursor: pointer;
  border: 4px solid var(--blanco); border-radius: 20px; background: var(--blanco); box-shadow: 0 14px 30px rgba(84, 89, 95, 0.1);
}
.sp-video-boton img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s ease; }
.sp-video-boton:hover img { transform: scale(1.03); }
.sp-play { position: absolute; left: 50%; top: 50%; display: grid; place-items: center; width: 70px; height: 70px; margin: -35px 0 0 -35px; border-radius: 50%; background: var(--naranja); color: var(--blanco); box-shadow: 0 0 0 10px rgba(255, 255, 255, 0.35), 0 10px 26px rgba(84, 89, 95, 0.22); transition: transform 0.3s ease; }
.sp-play svg { width: 26px; height: 26px; margin-left: 3px; }
.sp-video-boton:hover .sp-play { transform: scale(1.08); }
.sp-video iframe { display: block; width: 100%; aspect-ratio: 16 / 9; border: 4px solid var(--blanco); border-radius: 20px; box-shadow: 0 14px 30px rgba(84, 89, 95, 0.1); }

/* ---------- Instalaciones (abiertas) ---------- */
.sp-salas { display: grid; grid-template-columns: 1.15fr 1fr; align-items: center; gap: clamp(36px, 5vw, 64px); }
/* Las salas son fotos panorámicas: la grande va a lo ancho y las otras dos debajo, para que se vean enteras */
.sp-galeria { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.sp-galeria figure { margin: 0; overflow: hidden; aspect-ratio: 16 / 10; border-radius: 18px; box-shadow: 0 10px 28px rgba(84, 89, 95, 0.08); }
.sp-galeria .sp-galeria-grande { grid-column: 1 / -1; aspect-ratio: 2.1 / 1; }
.sp-galeria img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94); }
.sp-galeria figure:hover img { transform: scale(1.05); }
.sp-salas-texto { display: flex; flex-direction: column; align-items: flex-start; }

/* ---------- Contacto (centrado y limpio, como el de Joel) ---------- */
.sp-contacto { display: flex; flex-direction: column; align-items: center; width: min(100% - 2 * var(--esp-5), 980px); margin-inline: auto; }
.sp-contacto .cabecera-seccion { margin-bottom: 14px; }
.sp-contacto > .texto { margin-bottom: 30px; }
.sp-mapa { display: block; width: 200px; height: 200px; margin-bottom: 30px; overflow: hidden; border: 6px solid var(--blanco); border-radius: 50%; box-shadow: 0 14px 32px rgba(84, 89, 95, 0.13); transition: transform 0.4s ease; }
.sp-mapa:hover { transform: scale(1.04); }
.sp-mapa img { width: 100%; height: 100%; object-fit: cover; }
.sp-fichas { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; width: 100%; margin-bottom: 30px; }
.sp-ficha {
  display: flex; flex-direction: column; align-items: center; padding: 24px 14px; border-radius: 20px; text-align: center;
  background: rgba(255, 255, 255, 0.82); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.7); box-shadow: 0 10px 28px rgba(84, 89, 95, 0.05);
  color: inherit; text-decoration: none; transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.sp-ficha:hover { transform: translateY(-4px); box-shadow: 0 14px 34px rgba(84, 89, 95, 0.08); }
.sp-icono { display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 12px; border-radius: 50%; background: rgba(255, 197, 118, 0.14); color: var(--naranja); }
.sp-icono svg { width: 20px; height: 20px; }
.sp-ficha h3 { margin: 0 0 6px; font-size: 12.5px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; color: var(--gris); }
.sp-ficha p { margin: 0; font-size: 14.5px; font-weight: 500; line-height: 1.55; color: var(--texto-suave); }
.sp-ficha .sp-ficha-dato { color: var(--gris); font-weight: 700; font-size: 17px; }
.sp-fichas .aparece:nth-child(2) { transition-delay: 0.07s; }
.sp-fichas .aparece:nth-child(3) { transition-delay: 0.14s; }
.sp-fichas .aparece:nth-child(4) { transition-delay: 0.21s; }

@media (prefers-reduced-motion: reduce) { .sp-noticias { scroll-behavior: auto; } }

/* ---------- Tableta y móvil ---------- */
@media (max-width: 1000px) {
  .sp-noticias { grid-auto-columns: calc((100% - var(--hueco)) / 2); }
  .sp-fichas { grid-template-columns: repeat(2, 1fr); max-width: 620px; }
}
@media (max-width: 900px) {
  .sp-salas, .sp-prueba { grid-template-columns: 1fr; gap: 32px; }
  .sp-salas-texto, .sp-prueba-texto { align-items: center; text-align: center; order: -1; }
  .sp-salas-texto .lista-check li { justify-content: center; }
  .sp-portada { min-height: 0; padding: 40px 0 56px; }
}
@media (max-width: 640px) {
  .sp-portada-texto { padding: 30px 4px; }
  .sp-portada-texto .botones { flex-direction: column; align-self: stretch; }
  .sp-portada-texto .boton { width: 100%; }
  .sp-flechas { display: none; }
  .sp-noticias { --hueco: 14px; grid-auto-columns: 80%; margin-inline: calc(-1 * var(--esp-5)); padding-inline: var(--esp-5); scroll-padding-inline: var(--esp-5); }
  .sp-noticia:hover { transform: none; }
  .sp-galeria { gap: 10px; }
  .sp-galeria figure { border-radius: 14px; }
  .sp-mapa { width: 170px; height: 170px; }
  .sp-fichas { gap: 12px; }
  .sp-ficha { padding: 20px 10px; }
}
