/*
Theme Name: GAIA Acogimiento
Theme URI: https://gaiaacogimiento.org
Author: Qlic
Author URI: https://qlic.es
Description: Tema a medida para la Asociación GAIA, familias de acogida de la provincia de Alicante. Portada por secciones, noticias automáticas y vídeos del canal de YouTube.
Version: 1.0.3
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: gaia
*/

/* ---------- Base ---------- */
html { scroll-behavior: smooth; }
:where(h1, h2, h3) { text-wrap: balance; }
:focus-visible { outline: 3px solid var(--wp--preset--color--naranja); outline-offset: 3px; border-radius: 6px; }
.wp-site-blocks > * { margin-block-start: 0; }
main.wp-block-group { margin-block-start: 0; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* Bandas de color a todo el ancho */
.band { padding-block: clamp(64px, 9vw, 110px) !important; position: relative; overflow: hidden; }
.band > * { position: relative; z-index: 1; }
.eyebrow { font-family: var(--wp--preset--font-family--display); font-weight: 600; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--wp--preset--color--verde); margin-bottom: 10px !important; }
.wp-block-image img { border-radius: 22px; }
.wp-block-button__link { transition: transform .15s ease; }
.wp-block-button__link:hover { transform: translateY(-2px); }
.is-style-outline-claro .wp-block-button__link { background: transparent !important; color: currentColor !important; border: 2px solid currentColor; padding: 12px 22px; }

/* ---------- Cabecera ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(246, 250, 242, .95); backdrop-filter: blur(8px); border-bottom: 1px solid #dfe9d8; }
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 0; position: relative; } }
.site-header .wp-block-site-logo img { border-radius: 50%; }
.site-header .wp-block-site-title { font-family: var(--wp--preset--font-family--display); font-weight: 800; font-size: 20px; line-height: 1; }
.site-header .wp-block-site-title a { color: var(--wp--preset--color--bosque); text-decoration: none; }
.site-header .wp-block-site-tagline { font-size: 12px; font-weight: 600; color: var(--wp--preset--color--gris); margin: 2px 0 0; }
.site-header .wp-block-navigation a { text-decoration: none; }
.site-header .wp-block-navigation-item__content { padding: 6px 10px; border-radius: 999px; }
.site-header .wp-block-navigation-item__content:hover { background: #e5f1dc; }
.site-header .wp-block-buttons .wp-block-button__link { padding: 10px 18px; font-size: 15px; }

/* ---------- Portada ---------- */
.hero { background: var(--wp--preset--color--bosque); color: #fff; }
.hero h1 { color: #fff; }
.hero h1 em { font-style: normal; color: var(--wp--preset--color--verde); }
.hero .lead { font-size: 20px; color: #e2f0da; max-width: 30ch; }
.hero::before { content: ""; position: absolute; width: 620px; height: 620px; border: 70px solid var(--wp--preset--color--verde); border-radius: 50%; opacity: .22; right: -260px; top: -240px; z-index: 0; }
.collage .wp-block-image img { width: 100%; object-fit: cover; aspect-ratio: 4/3; }
.collage .grande img { aspect-ratio: 3/4; height: 100%; }
.collage .wp-block-column { display: flex; flex-direction: column; gap: 14px; }
.collage .wp-block-image { margin: 0; }

.quees .fotos { position: relative; }
.quees .fotos .foto-a img { aspect-ratio: 4/3; object-fit: cover; width: 100%; }
.quees .fotos .foto-b { position: absolute; width: 55%; right: -18px; bottom: -40px; margin: 0; }
.quees .fotos .foto-b img { aspect-ratio: 1; object-fit: cover; border: 8px solid var(--wp--preset--color--papel); }
.destacado { font-family: var(--wp--preset--font-family--display); font-weight: 600; font-size: 21px; line-height: 1.4; color: var(--wp--preset--color--bosque); }

.tipos { background: var(--wp--preset--color--cielo); }
.tipos h2 { color: var(--wp--preset--color--tinta); }
.tipos .intro { font-weight: 600; max-width: 44ch; }
.tipo { background: #fff; border-radius: 22px; overflow: hidden; height: 100%; }
.tipo .wp-block-image { margin: 0; }
.tipo .wp-block-image img { border-radius: 0; aspect-ratio: 4/3; object-fit: cover; width: 100%; }
.tipo .cuerpo { padding: 20px 20px 24px; }
.tipo .dur { display: inline-block; background: #e3f4fc; color: #0d5a78; font: 600 13px var(--wp--preset--font-family--display); padding: 5px 12px; border-radius: 999px; margin: 0; }
.tipo h3 { color: var(--wp--preset--color--tinta); margin-top: 10px; }
.tipo p { font-size: 15.5px; color: var(--wp--preset--color--gris); }

.dato { background: var(--wp--preset--color--naranja); }
.dato .cifra { font-family: var(--wp--preset--font-family--display); font-weight: 800; font-size: clamp(92px, 15vw, 180px); line-height: .85; letter-spacing: -.04em; color: var(--wp--preset--color--tinta); margin: 0; }
.dato h2 { font-size: clamp(26px, 3.4vw, 38px); color: var(--wp--preset--color--tinta); }
.dato p { font-weight: 600; max-width: 52ch; }
.dato .fuente { font-size: 13px; opacity: .75; font-weight: 400; }

.videos { background: var(--wp--preset--color--tinta); color: #fff; }
.videos h2 { color: #fff; }
.videos .intro { color: #c9d8cc; max-width: 40ch; }

.quienes .hacemos { list-style: none; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.quienes .hacemos li { background: #fff; border: 1px solid #dfe9d8; border-radius: 18px; padding: 20px; font-size: 15px; color: var(--wp--preset--color--gris); }
.quienes .hacemos li strong { display: block; font-family: var(--wp--preset--font-family--display); font-weight: 600; font-size: 17px; color: var(--wp--preset--color--tinta); margin-bottom: 4px; }
.quienes .sello img { width: 180px; border-radius: 50%; }

.noticias { background: #EAF3E3; }
.tarjetas .wp-block-post { background: #fff; border-radius: 22px; overflow: hidden; display: flex; flex-direction: column; }
.tarjetas .wp-block-post-featured-image { margin: 0; }
.tarjetas .wp-block-post-featured-image img { border-radius: 0; aspect-ratio: 16/10; object-fit: cover; width: 100%; }
.tarjetas .post-body { padding: 20px 22px 24px; gap: 8px; }
.tarjetas .wp-block-post-title { font-size: 21px; margin: 0; }
.tarjetas .wp-block-post-title a { text-decoration: none; color: var(--wp--preset--color--tinta); }
.tarjetas .wp-block-post-excerpt { font-size: 15.5px; color: var(--wp--preset--color--gris); margin: 0; }
.tarjetas .wp-block-post-excerpt__more-text { display: none; }

.colabora { background: var(--wp--preset--color--verde); }
.colabora h2 { color: #fff; }
.colabora .intro { font-size: 19px; font-weight: 600; max-width: 36ch; }
.colabora::before { content: ""; position: absolute; width: 520px; height: 520px; border: 60px solid var(--wp--preset--color--bosque); border-radius: 50%; opacity: .25; left: -300px; bottom: -300px; z-index: 0; }
.forma { background: #fff; border-radius: 20px; padding: 22px 24px !important; }
.forma h3 { margin: 0 0 2px; color: var(--wp--preset--color--tinta); }
.forma p { font-size: 15.5px; color: var(--wp--preset--color--gris); margin: 0; }

.contacto .datos { list-style: none; padding: 0; display: grid; gap: 14px; }
.contacto .datos li { line-height: 1.4; }
.contacto .datos strong { display: block; font-size: 13px; color: var(--wp--preset--color--gris); text-transform: uppercase; letter-spacing: .06em; }
.contacto .formulario { background: #fff; border: 1px solid #dfe9d8; border-radius: 22px; padding: 30px !important; }
.contacto .formulario input, .contacto .formulario textarea, .contacto .formulario select { border-radius: 12px !important; border: 1.5px solid #cfdcc6 !important; background: var(--wp--preset--color--papel) !important; font-size: 16px !important; }

/* ---------- Vídeos (shortcode [gaia_videos]) ---------- */
.gaia-videos .player { position: relative; aspect-ratio: 16/9; max-width: 100%; border-radius: 22px; overflow: hidden; background: #0a1610; box-shadow: 0 30px 60px -30px rgba(0,0,0,.7); }
.gaia-videos .player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.gaia-videos .miniaturas { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 18px; }
.gaia-videos .mini { all: unset; cursor: pointer; display: flex; flex-direction: column; gap: 10px; border-radius: 16px; padding: 8px; transition: background .15s; }
.gaia-videos .mini:hover { background: rgba(255,255,255,.06); }
.gaia-videos .mini:focus-visible { outline: 3px solid var(--wp--preset--color--naranja); outline-offset: 2px; }
.gaia-videos .th { position: relative; display: block; border-radius: 12px; overflow: hidden; aspect-ratio: 16/9; background: #0a1610; outline: 3px solid transparent; outline-offset: -3px; }
.gaia-videos .th img { width: 100%; height: 100%; object-fit: cover; border-radius: 0; }
.gaia-videos .mini b { font: 600 15px/1.3 var(--wp--preset--font-family--display); color: #fff; }
.gaia-videos .mini.activa .th { outline-color: var(--wp--preset--color--verde); }
.gaia-videos .mini.activa b { color: var(--wp--preset--color--verde); }
.gaia-videos .pie { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 22px; }
.gaia-videos .todos { color: #fff; font: 600 15px var(--wp--preset--font-family--display); text-decoration: none; border-bottom: 2px solid var(--wp--preset--color--verde); padding-bottom: 2px; }
.gaia-videos .yt { display: inline-flex; align-items: center; gap: 10px; background: #FF0033; color: #fff; text-decoration: none; font: 600 15px var(--wp--preset--font-family--display); padding: 12px 20px; border-radius: 999px; }
.gaia-videos .yt svg { width: 22px; height: 22px; }

/* ---------- Pie ---------- */
.site-footer { background: var(--wp--preset--color--bosque); color: #d4e6cb; font-size: 14px; }
.site-footer a { color: #d4e6cb; }
.site-footer .wp-block-site-title a { color: #fff; text-decoration: none; }

/* ---------- Entradas y páginas ---------- */
.contenido .wp-block-post-title { color: var(--wp--preset--color--bosque); }
.contenido .wp-block-post-featured-image img { aspect-ratio: 16/9; object-fit: cover; }
.contenido .wp-block-embed { margin-block: 2rem; }
.contenido .wp-block-embed iframe { border-radius: 18px; }

/* ---------- Móvil ---------- */
@media (max-width: 980px) {
  .quees .fotos { margin-bottom: 40px; }
  .quees .fotos .foto-b { right: 0; }
}
@media (max-width: 781px) {
  .quienes .hacemos { grid-template-columns: 1fr; }
  .gaia-videos .miniaturas { grid-template-columns: 1fr 1fr; gap: 10px; }
  .gaia-videos .mini b { font-size: 14px; }
  .contacto .formulario { padding: 22px !important; }
}

.site-header .wp-block-button__link, .site-header .wp-block-navigation-item__content { white-space: nowrap; }
.gaia-videos p:empty { display: none; }
