/* Ajustes propios de WordPress sobre el diseño original. */

/* Barra de administración: la cabecera fija baja con ella. */
.admin-bar .nav { top: 32px; }
@media (max-width: 782px) { .admin-bar .nav { top: 46px; } }

/* Fotos de perfil: mismo recorte para cualquier persona del equipo. */
.profile-photo { width: 96px; height: 96px; flex: 0 0 96px; }

/* Logotipo sin imagen. */
span.marca-logo { font-family: var(--display); font-weight: 700; font-size: 1.4rem; color: #fff; }

/* Páginas genéricas creadas desde el editor. */
.pagina { padding-top: clamp(140px, 18vh, 200px); min-height: 70vh; }
.pagina .titular { margin-bottom: 1.5rem; }
.pagina-contenido + .pagina-contenido { margin-top: 3rem; }
.pagina-foto { margin: 0 0 2rem; }
.pagina-foto img { width: 100%; height: auto; border-radius: 14px; }
.entrada { max-width: 760px; color: rgba(255, 255, 255, .82); font-size: 1.05rem; line-height: 1.75; }
.entrada > * + * { margin-top: 1.1em; }
.entrada h2, .entrada h3, .entrada h4 { font-family: var(--display); color: #fff; line-height: 1.2; margin-top: 2em; }
.entrada a { color: #E63946; text-decoration: underline; text-underline-offset: 3px; }
.entrada img { max-width: 100%; height: auto; border-radius: 10px; }
.entrada ul, .entrada ol { padding-left: 1.3em; }
.entrada blockquote { border-left: 3px solid #E63946; padding-left: 1.2em; margin-left: 0; font-style: italic; }
.entrada-titulo { font-family: var(--display); font-size: 1.5rem; }
.entrada-titulo a { color: #fff; text-decoration: none; }
.alignleft { float: left; margin: 0 1.5em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1.5em; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); }
.nav-links { display: flex; gap: 1rem; margin-top: 2rem; }
.nav-links a, .nav-links span { color: #fff; }

/* ── Tipografía de marca ─────────────────────────────────────────
   Títulos: Cinzel en mayúsculas. Cuerpo, menús y bajadas: Montserrat.
   ─────────────────────────────────────────────────────────────── */
h1, h2, h3, .titular, .proy-title, .tarjeta-proy h3, .serv h3, .perfil h3 {
  font-family: var(--display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .02em;
  line-height: 1.15;
}
.titular { font-size: clamp(1.7rem, 3.4vw, 2.9rem); }
.titular-sm { font-size: clamp(1.5rem, 2.8vw, 2.3rem); }
.portada-title { font-size: clamp(2rem, 5vw, 4rem); }
.serv h3, .tarjeta-proy h3, .perfil h3, .porque-lista b, .mision b { font-weight: 600; letter-spacing: .03em; }
.proy-title { font-size: clamp(1.1rem, 2vw, 1.45rem); }
.titular em, .hero-lema em { font-style: normal; }

/* Lema del hero y botones destacados en Cinzel. */
.hero-lema { font-family: var(--display); font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.btn { font-family: var(--display); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }

/* Bajadas, rótulos y navegación: Montserrat en mayúsculas espaciadas. */
.kicker, .nav-link, .menu-movil nav a, .pie-links a, .pie-lema p:first-child,
.perfil-rol, .profile-area, .tarjeta-proy-meta, .proy-meta, .demo-caption span {
  font-family: var(--sans);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: .16em;
}
.nav-link { font-size: .74rem; }
.menu-movil nav a { font-weight: 300; letter-spacing: .12em; }
.kicker { font-weight: 500; }

/* Párrafos y bloques de contenido. */
body, .parrafo, .hero-lead, p, li, input, select, textarea { font-family: var(--sans); }
.parrafo, .hero-lead { font-weight: 300; }

/* ── Pie: burbujas de lava ────────────────────────────────────── */
.geo-footer { display: none; }
.pie { padding-bottom: clamp(2.5rem, 6vw, 4rem); isolation: isolate; }
.pie > .wrap { position: relative; z-index: 2; }
.pie::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 70%; z-index: 0; pointer-events: none;
  background: radial-gradient(60% 100% at 50% 120%, rgba(255, 70, 30, .16), transparent 70%);
}
.pie-lava { position: absolute; inset: 0; z-index: 1; overflow: hidden; pointer-events: none; }
.pie-lava span {
  position: absolute; bottom: calc(var(--s) * -1.2); left: var(--x);
  width: var(--s); height: var(--s); border-radius: 50%;
  background: #FF8A3D;
  box-shadow: 0 0 4px 1px rgba(255, 110, 40, .45);
  opacity: 0;
  animation: lava-sube var(--d) cubic-bezier(.45, .05, .55, .95) var(--w) infinite;
  animation-play-state: paused;
  will-change: transform, opacity;
}
.pie-lava.is-running span { animation-play-state: running; }
@keyframes lava-sube {
  0%   { transform: translate3d(0, 0, 0) scale(.6); opacity: 0; }
  12%  { opacity: .7; }
  50%  { transform: translate3d(var(--dx), calc(var(--h) * -.5), 0) scale(1); }
  80%  { opacity: .4; }
  100% { transform: translate3d(calc(var(--dx) * -.5), calc(var(--h) * -1), 0) scale(.35); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .pie-lava span { animation: none; opacity: .3; bottom: auto; top: calc(100% - var(--s) * .6); }
}
html.motion-paused .pie-lava span { animation-play-state: paused; }

/* ── Tarjetas de servicio con la misma altura ──────────────────
   Título y resumen reservan el mismo espacio y la foto tiene alto fijo:
   cerradas, todas miden igual; solo crece la que abre «Más información». */
.serv h3 { min-height: calc(1.28em * 3); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.serv > p { min-height: calc(1.62em * 4); text-align: left !important; }
.serv-foto { height: 180px; aspect-ratio: auto; flex: none; }

/* ── Legibilidad de párrafos en todo el sitio ──────────────────── */
:is(.parrafo, .hero-lead, .serv > p, .profile-intro, .porque-lista div, .equipo-nota,
    .proy-desc, .portada-lead, .mision p, .perfil-certs li, .tarjeta-proy-lugar, .entrada, .form-nota) {
  font-weight: 400;
  text-align: left !important;
  letter-spacing: .005em;
}
:is(.parrafo, .portada-lead, .proy-desc, .entrada) { font-size: clamp(1rem, .96rem + .2vw, 1.0625rem); line-height: 1.75; }
.serv > p, .profile-intro, .porque-lista div { font-size: .98rem; line-height: 1.65; }
html[data-theme="light"] :is(.parrafo, .serv > p, .profile-intro, .porque-lista div, .proy-desc, .portada-lead, .tarjeta-proy-lugar, .perfil-certs li, .equipo-nota, .form-nota, .serv-mas li) { color: #2B3544; }
html:not([data-theme="light"]) :is(.parrafo, .serv > p, .profile-intro, .porque-lista div, .proy-desc, .tarjeta-proy-lugar) { color: #D5DCE6; }

/* ── Ajustes de lectura (ronda 2) ───────────────────────────────
   Párrafos justificados con guionado en español para no abrir huecos. */
:is(.parrafo, .hero-lead, .profile-intro, .porque-lista div, .equipo-nota, .equipo-resumen,
    .proy-desc, .portada-lead, .mision p, .entrada) {
  text-align: justify !important;
  text-align-last: left;
  hyphens: none; -webkit-hyphens: none;
}

/* Tarjetas de servicio: contenido centrado. */
.serv { text-align: center; }
.serv .serv-ico { margin-inline: auto; }
.serv > p { text-align: center !important; text-align-last: center !important; text-justify: auto; hyphens: manual; }
.serv .enlace-flecha { justify-content: center; align-self: center; }
.serv-mas ul { text-align: left; }

/* Equipo: titular y párrafo a lo ancho del contenedor. */
.equipo .cab-txt { flex-basis: 100%; max-width: none; }
.equipo .titular { max-width: none; }
.equipo-resumen { max-width: none; }

/* Metadatos de las tarjetas de proyecto con más contraste. */
.tarjeta-proy-meta { font-weight: 600; }
html[data-theme="light"] .tarjeta-proy-meta, html[data-theme="light"] .tarjeta-proy-meta span { color: #344054; }
html[data-theme="light"] .tarjeta-proy-meta .tarjeta-proy-n { color: var(--accent); }
html:not([data-theme="light"]) .tarjeta-proy-meta span:not(.tarjeta-proy-n) { color: #D5DCE6; }

/* Años de la formación: blanco sobre rojo, en píldora compacta. */
.perfil .perfil-certs li span { color: #fff !important; font-weight: 700; align-self: start; height: auto; padding: .25rem 0; text-align: center; border-radius: 6px; }

/* Menú principal más nítido. */
.nav-link { color: rgba(255, 255, 255, .95); font-weight: 500; text-shadow: 0 1px 8px rgba(0, 0, 0, .35); }
.nav-link:hover, .nav-link.activo { color: #fff; font-weight: 600; }
html[data-theme="light"] .nav.compacta .nav-link { color: #1D2939; text-shadow: none; }
html[data-theme="light"] .nav.compacta .nav-link:hover,
html[data-theme="light"] .nav.compacta .nav-link.activo { color: #0E1625; }

/* Titulares en una línea y centrado del de Proyectos. */
@media (min-width: 900px) { .equipo .titular { white-space: nowrap; font-size: clamp(1.5rem, 2.9vw, 2.9rem); } }
.proyectos-txt .titular { text-align: center; }

/* Titulares de sección: más contenidos, con más aire entre letras y una raya roja. */
.seccion .titular, .seccion .titular-sm {
  font-size: clamp(1.45rem, 1.1rem + 1.35vw, 2.25rem);
  font-weight: 600;
  letter-spacing: .07em;
  line-height: 1.22;
}
.seccion .titular::after {
  content: ""; display: block; width: 56px; height: 3px; margin-top: .9rem;
  background: linear-gradient(90deg, var(--accent), rgba(211, 32, 42, 0));
  border-radius: 3px;
}
.proyectos-txt .titular::after, .cierre .titular::after { margin-inline: auto; }
.nosotros-txt .titular::after { margin-inline: auto; }
@media (min-width: 900px) { .equipo .titular { font-size: clamp(1.45rem, 1.1rem + 1.35vw, 2.25rem); } }
.seccion .titular, .seccion .titular-sm { font-weight: 700; }
.servicios .titular, .contacto .titular { max-width: 22ch; }

/* Nosotros: titular largo más ligero (versalitas de Cinzel, alineado a la izquierda). */
.seccion .nosotros-txt .titular {
  text-transform: none;
  text-align: left;
  max-width: 30ch;
  font-size: clamp(1.35rem, 1.05rem + 1.1vw, 1.95rem);
  font-weight: 600;
  letter-spacing: .02em;
  line-height: 1.32;
}
.seccion .nosotros-txt .titular::after { margin-inline: 0; }
.seccion .nosotros-txt .titular, .seccion .nosotros-txt .titular .pieza-linea, .seccion .nosotros-txt .titular .pieza-linea:last-child { text-align: left !important; text-align-last: left !important; }
.seccion .nosotros-txt .titular { margin-inline: 0 !important; }

/* Servicios: titular en una sola línea en pantallas anchas. */
@media (min-width: 900px) { .servicios .cab-txt { flex: 1 1 auto; } .seccion.servicios .titular { max-width: none; white-space: nowrap; } }

/* ── Equipo: foto grupal grande + perfiles ─────────────────────── */
.equipo-cuerpo { display: grid; gap: clamp(1.2rem, 2.5vw, 2rem); align-items: start; }
@media (min-width: 1000px) { .equipo-cuerpo { grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); } .equipo-foto { position: sticky; top: calc(var(--nav-h) + 24px); } }
.equipo-foto { margin: 0; border-radius: var(--r); overflow: hidden; aspect-ratio: 8 / 7; box-shadow: 0 24px 48px -26px rgba(16, 24, 40, .45); }
.equipo-foto img { width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }
.equipo-cuerpo .equipo-grid { grid-template-columns: 1fr; }
/* Fotos de perfil más grandes. */
.profile-photo { width: 120px !important; height: 120px !important; flex: 0 0 120px !important; border-width: 2px; }

/* Nosotros: titular dentro de un recuadro destacado. */
.seccion .nosotros-txt .titular {
  max-width: none;
  padding: clamp(1.1rem, 2.4vw, 1.7rem) clamp(1.2rem, 2.6vw, 1.9rem);
  border-left: 4px solid var(--accent);
  border-radius: 0 14px 14px 0;
  background: linear-gradient(110deg, rgba(211, 32, 42, .08), rgba(211, 32, 42, .015) 70%);
  box-shadow: 0 14px 34px -24px rgba(16, 24, 40, .35);
}
html:not([data-theme="light"]) .seccion .nosotros-txt .titular { background: linear-gradient(110deg, rgba(255, 48, 48, .14), rgba(255, 255, 255, .02) 70%); }
.seccion .nosotros-txt .titular::after { display: none; }

/* Fotos de perfil: más grandes, encuadre en la cara y anillo con separación. */
.profile-heading { gap: 1.2rem; }
.profile-photo {
  width: 150px !important; height: 150px !important; flex: 0 0 150px !important;
  object-fit: cover; object-position: center 30%;
  border: 3px solid var(--card) !important;
  box-shadow: 0 0 0 3px var(--accent), 0 14px 30px -14px rgba(16, 24, 40, .5);
  image-rendering: auto;
}
@media (max-width: 600px) { .profile-photo { width: 120px !important; height: 120px !important; flex-basis: 120px !important; } }

/* Nosotros: recuadro azul noche, texto blanco centrado y acento rojo arriba. */
.seccion .nosotros-txt .titular,
html:not([data-theme="light"]) .seccion .nosotros-txt .titular {
  position: relative;
  background: linear-gradient(150deg, #13203A 0%, #0B1220 100%);
  color: #FFFFFF;
  border-left: 0;
  border-radius: 16px;
  padding: clamp(1.6rem, 3vw, 2.2rem) clamp(1.3rem, 3vw, 2.2rem);
  box-shadow: 0 22px 44px -26px rgba(11, 18, 32, .7);
}
.seccion .nosotros-txt .titular::before {
  content: ""; position: absolute; top: 0; left: 50%; width: 64px; height: 4px;
  transform: translateX(-50%); background: var(--accent); border-radius: 0 0 4px 4px;
}
.seccion .nosotros-txt .titular em { color: #FF6B6B; }
.seccion .nosotros-txt .titular,
.seccion .nosotros-txt .titular .pieza-linea,
.seccion .nosotros-txt .titular .pieza-linea:last-child { text-align: center !important; text-align-last: center !important; }

/* ── Slider del hero: flechas pequeñas junto a los puntos ──────── */
.hero-navega { display: flex; align-items: center; gap: .7rem; margin-top: 1rem; }
.hero-navega .hero-puntos { margin: 0; }
.hero-flecha, .hero-flecha:active,
.hero-navega .hero-flecha {
  position: static !important; transform: none !important; display: grid !important;
  width: 32px !important; height: 32px !important; flex: none;
  top: auto !important; left: auto !important; right: auto !important;
  border: 1px solid rgba(255, 255, 255, .45); background: rgba(8, 13, 24, .45); color: #fff;
}
.hero-navega .hero-flecha svg { width: 15px; height: 15px; }
.hero-navega .hero-flecha:hover { background: var(--accent); border-color: var(--accent); }

/* Botón principal del hero más compacto en tablet y móvil. */
@media (max-width: 1024px) {
  .hero .btn-grande { font-size: .8rem; padding: .42rem .45rem .42rem 1.05rem; gap: .6rem; letter-spacing: .05em; }
  .hero .btn-grande .btn-circulo { width: 30px; height: 30px; }
  .hero .btn-grande .btn-circulo svg { width: 14px; height: 14px; }
}
@media (max-width: 480px) {
  .hero .btn-grande { font-size: .72rem; padding: .38rem .4rem .38rem .9rem; }
}

/* Nosotros: Cinzel no tiene minúsculas (las dibuja como versalitas); este titular va en Montserrat para leerse en mayúsculas y minúsculas. */
.seccion .nosotros-txt .titular { font-family: var(--sans); text-transform: none; font-weight: 600; letter-spacing: 0; font-size: clamp(1.25rem, 1rem + 1vw, 1.75rem); line-height: 1.4; }

/* Tarjetas de proyecto: contenido centrado. */
.tarjeta-proy-cuerpo, .tarjeta-proy-cuerpo h3, .tarjeta-proy-lugar { text-align: center !important; text-align-last: center !important; }
.tarjeta-proy-meta { justify-content: center; text-align: center; }

/* ── Pie: franja de estratos geológicos arriba y lava solo en la base ── */
.pie { padding-top: 34px; padding-bottom: 112px; }
.pie::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 26px; z-index: 2; pointer-events: none;
  background-repeat: repeat-x; background-size: 480px 26px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 480 26' preserveAspectRatio='none'%3E%3Cpath d='M0 0H480V7C400 9 330 4 250 7S90 10 0 6Z' fill='%23364152'/%3E%3Cpath d='M0 6C90 10 170 5 250 7S400 9 480 7V13C390 16 320 10 240 13S80 16 0 12Z' fill='%23A0522D'/%3E%3Cpath d='M0 12C80 16 160 11 240 13S390 16 480 13V19C400 21 330 16 250 19S90 21 0 18Z' fill='%23C9A26B'/%3E%3Cpath d='M0 18C90 21 170 16 250 19S400 21 480 19V22C400 24 320 20 240 22S80 24 0 22Z' fill='%23D3202A'/%3E%3Cpath d='M0 22C80 24 160 20 240 22S400 24 480 22V26H0Z' fill='%236B4A3A' opacity='.55'/%3E%3Cpath d='M318 0L326 9L320 15L329 26' stroke='%230B1220' stroke-width='1.6' fill='none'/%3E%3C/svg%3E");
}
.pie-lava { inset: auto 0 0 0; height: 104px; z-index: 1; }
.pie-lava span { bottom: -6px; }
.pie::after { height: 120px; }
@media (max-width: 700px) { .pie { padding-bottom: 96px; } .pie-lava { height: 88px; } }
