/*!
 * FILE: styles.css
 * VERSION: V55
 * DATE: 2026-04-10
 * TIME: 12:30
 * PROJECT: acarrera
 * DESC:
 * - Añade soporte para vídeo hero en home con autoplay en silencio.
 * - Incorpora poster, fallback estático y respeto a reducción de movimiento.
 * - Mantiene el contenedor visual existente sin alterar la proporción del bloque.
 */

/* =========================================================
   01. VARIABLES GLOBALES
   Define colores, tipografía base, radios, sombras y altura
   general del header. Estas variables alimentan todo el sitio.
   ========================================================= */
/* Regla clave: mantiene ocultos menú y paneles cuando usan el atributo hidden. */
[hidden] {
  display: none !important;
}

:root {
  --bg: #ffffff;
  --text: #111114;
  --muted: #111114;
  --border: #dfdfe4;
  --panel: #ffffff;
  --accent: #111114;
  --area: #111114;

  --font-size: 18px;
  --line-height: 1.52;
  --radius: 1.7rem;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.08);
  --header-h: 86px;
}
.hero-grid.hero-grid--text-only {
  grid-template-columns: 1fr;
  min-height: 0;
  align-items: start;
  padding-top: 1rem;
}
.intro-copy,
.story-copy,
.motion-copy,
.cv-block p,
.teklab-subline{
  color: #5f636f;
}
/* =========================================================
   02. CARGA DE FUENTES
   Registra la familia Atkinson Hyperlegible en sus variantes
   normal, cursiva, negrita y negrita cursiva.
   ========================================================= */
@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("../fonts/AtkinsonHyperlegible-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("../fonts/AtkinsonHyperlegible-Italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("../fonts/AtkinsonHyperlegible-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("../fonts/AtkinsonHyperlegible-BoldItalic.woff2") format("woff2");
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

/* =========================================================
   03. MODOS VISUALES Y ACCESIBILIDAD GLOBAL
   Cambia el sistema de color del body para modo oscuro,
   alto contraste, espaciado amplio y reducción de movimiento.
   ========================================================= */
body.theme-dark {
  --bg: #09090b;
  --text: #f6f6f8;
  --muted: #b6b6bf;
  --border: #24242b;
  --panel: #131318;
  --accent: #ffffff;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

body.theme-contrast {
  --bg: #000;
  --text: #fff;
  --muted: #fff;
  --border: #fff;
  --panel: #000;
  --accent: #ff0;
  --shadow: none;
}

body.spacing-wide {
  --line-height: 1.85;
  /*letter-spacing: 0em;*/
}

body.reduce-motion * {
  animation: none !important;
  transition: none !important;
  scroll-behavior: auto !important;
}

/* =========================================================
   04. RESET Y BASE
   Normaliza caja, scroll, ajuste de texto y estilo base
   del documento para asegurar consistencia general.
   ========================================================= */
* {
  box-sizing: border-box;
}

html {
  font-size: var(--font-size);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  overflow-x: hidden;
  font-family: "Atkinson Hyperlegible", Arial, sans-serif;
  font-weight: 400;
  line-height: var(--line-height);
  background: var(--bg);
  color: var(--text);
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

body.theme-contrast a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.12em;
  text-decoration-thickness: 0.12em;
}

body.theme-contrast .access-btn {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.12em;
  text-decoration-thickness: 0.12em;
}

/* =========================================================
   05. ACCESO RÁPIDO / SKIP LINK
   Enlace oculto que aparece al recibir foco para saltar
   directamente al contenido principal.
   ========================================================= */
.skip-link {
  position: absolute;
  left: -9999px;
}

.skip-link:focus {
  top: 1rem;
  left: 1rem;
  z-index: 1000;
  padding: 0.75rem 1rem;
  background: var(--accent);
  color: var(--bg);
}

/* =========================================================
   06. CONTENEDORES Y ESTRUCTURA GENERAL
   Define anchos máximos reutilizables para el layout.
   ========================================================= */
.container {
  width: min(1080px, calc(100% - max(3.5rem, 8vw)));
  margin: 0 auto;
}

.narrow {
  width: min(1080px, calc(100% - max(2rem, 7vw)));
}

.section {
  padding: 1.35rem 0;
}

.section-alt {
  background: var(--panel);
}

.section-compact {
  padding-top: 2.5rem;
}

/* =========================================================
   07. HEADER Y NAVEGACIÓN PRINCIPAL
   Gestiona el header fijo, la marca, navegación de escritorio,
   selector de idioma y botones de control.
   ========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(14px);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}

.brand-logo {
  width: auto;
  height: 18px;
  max-width: min(150px, 32vw);
}

.brand-logo-dark {
  display: none;
}

body.theme-dark .brand-logo-light,
body.theme-contrast .brand-logo-light {
  display: none;
}

body.theme-dark .brand-logo-dark,
body.theme-contrast .brand-logo-dark {
  display: block;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.15rem;
}

.site-nav a,
.lang-link,
.access-btn {
  font-size: 1rem;
  color: var(--muted);
  text-transform: none;
}

.site-nav a.active,
.lang-link.active {
  color: var(--text);
  font-weight: 700;
}

.header-tools {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.lang-switch {
  display: flex;
  gap: 0.8rem;
}

.access-btn,
.menu-btn,
.access-controls button {
  padding: 0;
  border: none;
  background: none;
  color: var(--text);
  cursor: pointer;
}

.access-btn {
  font-size: 1.65rem;
  line-height: 1;
  font-weight: 400;
}

.access-btn:hover::after {
  content: attr(title);
  position: absolute;
  top: calc(100% + 0.35rem);
  right: 0;
  z-index: 5;
  padding: 0.45rem 0.6rem;
  border-radius: 0.6rem;
  white-space: nowrap;
  font-size: 0.8rem;
  background: var(--text);
  color: var(--bg);
}

.menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
}

.menu-btn span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 10px;
}

/* =========================================================
   08. PANEL DE ACCESIBILIDAD
   Barra desplegable con opciones de contraste, espaciado,
   movimiento y otros ajustes de lectura.
   ========================================================= */
.access-panel {
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  z-index: 55;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.06);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

body.theme-dark .access-panel,
body.theme-contrast .access-panel {
  background: rgba(9, 9, 11, 0.94);
}

.access-panel-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.2rem;
  padding: 1rem 0;
}

.access-controls {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, max-content));
  justify-content: end;
  align-items: center;
  gap: 1rem 1.4rem;
}

.access-controls button {
  display: inline-flex;
  align-items: flex-start;
  gap: 0.55rem;
  font-size: 1.02rem;
  line-height: 1.15;
  text-align: left;
  color: var(--text);
  background: transparent;
  border: none;
}

.access-controls button span:first-child {
  min-width: 1rem;
  font-size: 1.1rem;
  line-height: 1;
  text-align: center;
}

.access-title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.access-caption {
  margin: 0.15rem 0 0;
  font-size: 14px;
  color: var(--muted);
}

/* =========================================================
   09. MENÚ MÓVIL
   Overlay de pantalla completa para la navegación en móvil.
   ========================================================= */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: min(2rem, 6vw) max(1.5rem, 5vw);
  background: var(--bg);
}

.mobile-menu-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.menu-close {
  padding: 0;
  border: none;
  background: none;
  color: var(--text);
  cursor: pointer;
  font-size: 4rem;
  line-height: 1;
}

.mobile-menu-nav {
  display: grid;
  gap: 1.25rem;
  padding: 2rem 0 1rem;
}

.mobile-menu-nav a {
  font-size: clamp(2.35rem, 7vw, 4.6rem);
  line-height: 1.02;
  /*letter-spacing: 0em;*/
}

.mobile-menu-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 2rem;
}

.access-btn-inline {
  font-size: 1.8rem;
}

/* =========================================================
   10. TIPOGRAFÍA GENERAL
   Estilos de ceja, títulos, subtítulos y textos destacados.
   ========================================================= */
.eyebrow {
  margin: 0 0 1rem;
  font-size: 0.95rem;
  color: var(--muted);
  text-transform: uppercase;
  /*letter-spacing: 0em;*/
}

h1,
h2,
h3 {
  margin: 0 0 1rem;
  font-weight: 400;
  line-height: 0.97;
}

h1 {
  font-size: clamp(3.4rem, 8vw, 7.2rem);
}

h2 {
  font-size: clamp(2.35rem, 5vw, 4.4rem);
}

h3 {
  font-size: clamp(1.3rem, 3vw, 1.9rem);
}

.lead {
  max-width: 48rem;
  font-size: clamp(1.16rem, 2vw, 1.45rem);
}

.meta {
  color: var(--muted);
}

.section-head {
  margin-bottom: 1.3rem;
}

.split-head {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: end;
  gap: 2.5rem;
}

.stacked-head {
  display: grid;
  gap: 0.85rem;
}

.section-head.stacked-head .section-title {
  max-width: 15ch;
  margin: 0;
  justify-self: start;
  text-align: left;
}

.section-head.stacked-head .intro-copy {
  max-width: 55rem;
}
.section-head.stacked-head {
  margin-bottom: 0.8rem;
}

.intro-copy {
  font-size: 1.6rem;
  line-height: 1.9rem;
  color: #656565;
}

.story-copy {
  font-size: 1.6rem;
  line-height: 1.9rem;
  color: #656565;
  max-width: 55rem;
}

.hero-note {
  max-width: 62rem;
}

.hero-kicker {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--muted);
}

/* =========================================================
   11. HERO Y CONTENEDORES VISUALES
   Define la rejilla de portada, paneles con imagen y bloques
   de gran tamaño para piezas destacadas.
   ========================================================= */
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 0.9fr;
  align-items: end;
  gap: 3.5rem;
  min-height: calc(100vh - 8.5rem);
}

.hero-media,
.image-panel {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--panel), var(--bg));
  box-shadow: var(--shadow);
}

.hero-poster img,
.image-panel img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-panel-large {
  aspect-ratio: 16 / 8;
}

.full-bleed-card {
  width: min(1440px, calc(100% - 2rem));
}

.visual-break {
  padding-top: 0;
}

/* =========================================================
   12. REJILLAS Y BLOQUES DE CONTENIDO
   Estructuras reutilizables para servicios, historias,
   logos, entidades y presentación de TEKLAB.
   ========================================================= */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem 3.5rem;
}

.firma-grid {
  padding-left: 0;
}

.firma-grid .service-card {
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.service-label {
  margin: 0 0 0rem;
  font-size: 2rem;
  font-weight: 400;
  color: var(--muted);
line-height: 1em;
}

.service-card ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.service-card li {
  margin: 0 0 0.42rem;
  font-size: clamp(1.25rem, 2.2vw, 2.15rem);
  line-height: 1.08;
  /*letter-spacing: 0em;*/
  color: #5f636f;
}

/* Altura mínima para las tarjetas de servicios */
.service-card {
    min-height: 280px; /* Ajusta este valor hasta que veas las 3 líneas cómodas */
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.story-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem;
}

.story-grid--stacked {
  grid-template-columns: 1fr;
}
.story-card--single .story-copy{
  max-width: 55rem;
}

.story-card {
  display: grid;
  gap: 1rem;
}

.story-card--single {
  align-content: start;
}

.story-card p {
  margin: 0;
}

.logo-marquee {
  overflow: hidden;
  margin-top: 1rem;
}

.logo-track {
  display: flex;
  width: max-content;
  gap: 1.2rem;
  padding: 1.25rem 0;
  animation: marquee 28s linear infinite;
}

.logo-track span {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 0.35rem;
  min-width: 220px;
  min-height: 96px;
  background: var(--panel);
  font-size: 1.35rem;
  color: var(--muted);
}

.logo-track span strong {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
}

.logo-track span small {
  font-size: 0.8rem;
  color: var(--muted);
}

.entities-cta {
  padding-top: 1rem;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 700;
}

.text-link::after {
  content: "→";
}

.entity-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1rem;
}

.entity-card {
  display: grid;
  place-items: center;
  height: 120px;
  border: 1px solid var(--border);
  border-radius: 1.3rem;
  background: var(--bg);
  font-size: 1.1rem;
  color: var(--muted);
}

.teklab-intro {
  display: grid;
  gap: 0.55rem;
}

.teklab-subline {
  max-width: 60rem;
  margin: 0;
  color: var(--muted);
}

.teklab-video-placeholder {
  width: 100%;
  aspect-ratio: 16 / 9;
  margin-top: 2rem;
  border: 1px solid var(--border);
  border-radius: 1.4rem;
  background: linear-gradient(135deg, var(--panel), var(--bg));
  box-shadow: var(--shadow);
}

/* =========================================================
   13. CURRÍCULUM / BLOQUES DE INFORMACIÓN
   Layout para secciones tipo CV, bloques laterales y listas
   de información complementaria.
   ========================================================= */
.cv-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2rem;
}

.cv-side,
.cv-sections {
  display: grid;
  gap: 1rem;
}

.cv-block {
  padding: 1.2rem;
  border: 1px solid var(--border);
  border-radius: 1.2rem;
  background: color-mix(in srgb, var(--panel) 70%, var(--bg));
}

.cv-block ul {
  margin: 0.5rem 0 0 1.2rem;
}

.cv-block p{
  margin: 0 0 0.6rem;
}

.cv-block p:last-child{
  margin-bottom: 0;
}

.text-strong-soft{
  color: #111114;
}
.exp-entry{
  margin-bottom: 1.1rem;
}

.exp-entry:last-child{
  margin-bottom: 0;
}

.exp-entry p{
  margin: 0 0 0.45rem;
}

.exp-entry p:last-child{
  margin-bottom: 0;
}
.contact-direct {
  display: grid;
  gap: 0.35rem;
  padding-top: 1rem;
}

.contact-direct p {
  margin: 0;
  font-size: 1.1rem;
}

.contact-direct a {
  text-decoration: underline;
  text-underline-offset: 0.15em;
}
.cv-block p,
.cv-side p,
.intro-copy,
.story-copy,
.motion-copy,
.teklab-subline{
  color: #5f636f;
}

.text-color-soft{
  color: #111114;
  font-weight: 400;
}



/* =========================================================
   13A. AC · AJUSTES EDITORIALES Y ACORDEONES
   Afinado específico para la página ac: cabecera compacta,
   foto en B/N, cajas alineadas a la izquierda y acordeones
   con + grande tipo editorial.
   ========================================================= */
.section-ac-intro {
  padding-top: 0.65rem;
}

.cv-grid--intro {
  grid-template-columns: minmax(0, 1.02fr) minmax(320px, 0.74fr);
  grid-template-areas:
    "intro photo"
    "support support";
  align-items: start;
  gap: 1.1rem 2.25rem;
}

.cv-intro-copy {
  grid-area: intro;
  min-width: 0;
}

.cv-intro-copy--compact {
  padding-top: 0;
}

.cv-intro-copy--compact h1 {
  margin-bottom: 0.5rem;
  line-height: 0.92;
}

.cv-intro-copy--compact .lead {
  margin-bottom: 0.65rem;
}

.cv-intro-copy--compact > p:not(.eyebrow):not(.lead) {
  margin-top: 0;
  margin-bottom: 0;
}

.cv-quickfacts {
  display: grid;
  gap: 0.28rem;
  margin-top: 0.9rem;
}

.cv-quickfacts p {
  margin: 0;
}

.cv-side--intro {
  align-content: start;
}

.cv-intro-support {
  grid-area: support;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem 1.35rem;
  width: min(940px, 100%);
}

.cv-block--support {
  margin: 0;
}
.cv-intro-support > .cv-block--support > h2,
.cv-intro-support > .cv-block--support > h3 {
  margin: 0 0 0.7rem;
  font-size: clamp(1.2rem, 1.8vw, 1.55rem) !important;
  line-height: 1.12;
  color: var(--muted) !important;
  font-weight: 400 !important;
}
.cv-intro-support > .cv-block--support > h2 strong,
.cv-intro-support > .cv-block--support > h3 strong,
.cv-intro-support > .cv-block--support > h2 span,
.cv-intro-support > .cv-block--support > h3 span {
  color: inherit !important;
  font-weight: inherit !important;
}

.cv-photo-card {
  display: grid;
  gap: 0.7rem;
  margin: 0;
}

.cv-photo-card--intro {
  grid-area: photo;
  margin-top: 2.45rem;
}

.cv-photo-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  border: 1px solid var(--border);
  border-radius: 1.2rem;
  background: #f4f4f4;
}

.cv-photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(100%);
}

.cv-photo-caption {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--muted);
}

.cv-sections {
  justify-items: start;
  gap: 1rem;
}

.cv-block {
  width: 100%;
}

.cv-block--profile {
  max-width: 980px;
}

.cv-block--experience,
.cv-block--specialties {
  max-width: 940px;
}

.cv-section-note {
  margin-bottom: 0.9rem !important;
}

.cv-accordion {
  display: grid;
  gap: 0;
}

.cv-item {
  border-top: 1px solid var(--border);
}

.cv-item:last-child {
  border-bottom: 1px solid var(--border);
}

.cv-item-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 1rem;
  padding: 0.9rem 0;
  cursor: pointer;
  list-style: none;
}

.cv-item-summary::-webkit-details-marker {
  display: none;
}

.cv-item-summary::marker {
  content: '';
}

.cv-item-title {
  display: block;
  min-width: 0;
  padding-top: 0.02rem;
}

.cv-item-toggle {
  position: relative;
  width: 1.9rem;
  height: 1.9rem;
  flex: 0 0 1.9rem;
}

.cv-item-toggle::before,
.cv-item-toggle::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  border-radius: 999px;
  background: var(--text);
  transform: translate(-50%, -50%);
  transform-origin: center;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.cv-item-toggle::before {
  width: 1.15rem;
  height: 0.2rem;
}

.cv-item-toggle::after {
  width: 0.2rem;
  height: 1.15rem;
}

.cv-item[open] .cv-item-toggle::after {
  opacity: 0;
  transform: translate(-50%, -50%) scaleY(0.1);
}

.cv-item-body {
  padding: 0 0 1rem;
}

.cv-item-body > :first-child {
  margin-top: 0;
}

.cv-item-body ul {
  margin-top: 0.65rem;
  padding-left: 1.1rem;
}
/* =========================================================
   14. FOOTER
   Pie de página con marca, copy, enlaces y licencia.
   ========================================================= */
.site-footer {
  padding: 2.4rem 0 2.8rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
}

.footer-main {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: start;
  gap: 1.5rem;
}

.footer-tools {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 1rem;
}

.footer-social {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
}

.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  color: var(--muted);
}

.footer-social a:hover,
.footer-social a:focus-visible {
  color: var(--text);
}

.footer-social svg {
  display: block;
  width: 100%;
  height: 100%;
}

.footer-access {
  padding: 0;
  border: none;
  background: none;
  color: var(--text);
  cursor: pointer;
  font-size: 1.65rem;
  line-height: 1;
}

.footer-brand {
  display: inline-flex;
  align-items: flex-start;
  padding-top: 0.2rem;
}

.footer-brand img {
  width: auto;
  height: 15px;
}

.footer-brand .brand-logo-dark {
  display: none;
}

body.theme-dark .footer-brand .brand-logo-light,
body.theme-contrast .footer-brand .brand-logo-light {
  display: none;
}

body.theme-dark .footer-brand .brand-logo-dark,
body.theme-contrast .footer-brand .brand-logo-dark {
  display: block;
}

.footer-copy {
  display: grid;
  gap: 0.35rem;
}

.footer-title {
  margin: 0;
  font-size: 14px;
  color: var(--text);
}

.footer-sub {
  margin: 0;
  font-size: 13px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 0.55rem 1rem;
  font-size: 0.8rem;
}

.footer-meta-links {
  margin-top: 0.9rem;
}

.footer-license {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  font-size: 14px;
}

.license-heading {
  margin: 0 0 0.35rem;
  color: var(--text);
}

/* =========================================================
   15. BANNER DE COOKIES
   Aviso fijo inferior con texto legal y botones de acción.
   ========================================================= */
.cookie-banner {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  left: 1rem;
  z-index: 80;
  padding: 0.9rem 1rem;
  border: 1px solid var(--border);
  border-radius: 1rem;
  background: var(--bg);
  box-shadow: var(--shadow);
}

.cookie-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.cookie-copy {
  max-width: 62rem;
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
}

.cookie-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 0;
}

.cookie-actions button {
  padding: 0.52rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
  font-size: 0.8rem;
}

.cookie-actions button.cookie-accept {
  background: var(--text);
  color: var(--bg);
}

.cookie-link {
  font-size: 0.8rem;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

/* =========================================================
   16. ANIMACIONES Y REVEALS
   Controla entradas suaves al hacer scroll, título animado
   y marquesina de logos.
   ========================================================= */
[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

[data-reveal].is-inview {
  opacity: 1;
  transform: none;
}

.motion-title {
  max-width: none;
  width: 100%;
  font-size: clamp(3.4rem, 8vw, 7.2rem);
}

.hero-grid.hero-grid--text-only > div {
  max-width: 100%;
}

.hero-grid.hero-grid--text-only .lead {
  max-width: 68rem;
}

.motion-line {
  display: block;
  overflow: visible;
  padding-bottom: 0.08em;
  font-size: inherit;
  line-height: 0.94;
  opacity: 0.01;
  transform: translateY(110%);
  animation: titleIn 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.motion-title .motion-line:nth-child(2) {
  animation-delay: 0.12s;
}

.motion-copy {
  opacity: 0;
  transform: translateY(18px);
  animation: copyIn 0.7s ease forwards;
  animation-delay: 0.25s;
  font-size: 1.6rem;
  line-height: 1.9rem;
  color: #656565;
}

.accent-line {
  color: #9a9aa3;
}

.lead-box {
  display: inline-block;
  background: #000;
  color: #fff;
  padding: 1rem 1.2rem;
  /*border-radius: 0.5rem;*/
  max-width: 42rem;
}

.motion-title .accent-line {
  display: block;
  color: var(--muted);
  font-size: 0.58em;
  line-height: 1.08;
  margin-top: 0.2rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1.1rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}

.button-outline {
  border: 1px solid #111;
  color: #111;
  background: transparent;
}

.button-outline:hover {
  background: #111;
  color: #fff;
}

@keyframes titleIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes copyIn {
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes marquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

/* =========================================================
   17. RESPONSIVE · TABLET / PORTÁTIL PEQUEÑO
   Ajusta navegación, rejillas y footer en pantallas medias.
   ========================================================= */
@media (max-width: 1100px) {
  :root {
    --header-h: 76px;
  }

  .site-nav {
    display: none;
  }

  .menu-btn {
    display: flex;
  }

  .hero-grid,
  .split-head,
  .cv-grid,
  .story-grid,
  .footer-main {
    grid-template-columns: 1fr;
  }

  .cv-block--profile,
  .cv-block--experience,
  .cv-block--specialties {
    max-width: 100%;
  }

  .entity-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .header-inner {
    min-height: var(--header-h);
  }

  .brand-logo {
    height: 18px;
    max-width: min(144px, 34vw);
  }

  .mobile-menu-nav a {
    font-size: clamp(2.8rem, 8vw, 5rem);
  }

  .motion-title {
    max-width: 10.5ch;
    font-size: clamp(3.4rem, 8vw, 7.2rem);
  }

  .hero-grid.hero-grid--text-only .motion-title {
    max-width: none;
  }

  .footer-tools {
    justify-content: flex-start;
  }

  .footer-links {
    justify-content: flex-start;
  }
}

/* =========================================================
   18. RESPONSIVE · MÓVIL
   Reduce espacios, reorganiza el panel de accesibilidad y
   adapta menús, cookies y tamaños para pantallas pequeñas.
   ========================================================= */
@media (max-width: 760px) {
  :root {
    --header-h: 70px;
    --font-size: 17px;
  }

  .container {
    width: min(100%, calc(100% - 1.8rem));
  }

  .section {
    padding: 2rem 0;
  }

  .grid-2 {
    grid-template-columns: 1fr;
  }

  .entity-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-grid {
    min-height: auto;
    gap: 2rem;
  }

  .section-ac-intro {
    padding-top: 0.35rem;
  }

  .cv-grid--intro {
    grid-template-columns: 1fr;
    grid-template-areas:
      "intro"
      "photo"
      "support";
    gap: 1.25rem;
  }

  .cv-intro-support {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .cv-photo-card--intro {
    margin-top: 0.15rem;
  }

  .cv-item-summary {
    gap: 0.8rem;
    padding: 0.8rem 0;
  }

  .cv-item-toggle {
    width: 1.65rem;
    height: 1.65rem;
    flex-basis: 1.65rem;
  }

  .hero-media {
    order: 2;
  }

  .motion-title {
    max-width: 100%;
  }

  .hero-grid.hero-grid--text-only .motion-title {
    max-width: 100%;
  }

  .motion-line {
    font-size: inherit;
  }

  .eyebrow {
    font-size: 0.9rem;
    /*letter-spacing: 0em;*/
  }

  .lead {
    font-size: 1.08rem;
  }

  .access-panel-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .access-controls {
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-content: flex-start;
    gap: 1rem;
  }

  .access-controls button {
    justify-content: flex-start;
    font-size: 0.95rem;
  }

  .cookie-banner {
    right: 0.75rem;
    bottom: 0.75rem;
    left: 0.75rem;
    padding: 1rem;
  }

  .cookie-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .cookie-copy {
    font-size: 0.88rem;
  }

  .cookie-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .cookie-actions button {
    flex: 1 1 140px;
    min-height: 48px;
    font-size: 0.95rem;
  }

  .cookie-link {
    font-size: 0.95rem;
  }

  .mobile-menu-nav a {
    font-size: clamp(2.4rem, 10vw, 4rem);
  }

  .footer-brand img {
    height: 14px;
  }

  .footer-tools {
    justify-content: flex-start;
  }

  .footer-links {
    justify-content: flex-start;
  }

  .logo-track span {
    min-width: 170px;
    height: 82px;
    font-size: 1.1rem;
  }

  .brand-logo {
    height: 20px;
    max-width: min(160px, 40vw);
  }

  .access-btn {
    font-size: 1.9rem;
  }

  .header-tools {
    gap: 0.85rem;
  }

  .lang-switch {
    gap: 0.7rem;
  }

  .site-header {
    backdrop-filter: none;
  }
}

/* =========================================================
   19. RESPONSIVE · MÓVIL PEQUEÑO
   Ajustes finales para teléfonos más estrechos.
   ========================================================= */
@media (max-width: 480px) {
  h1 {
    font-size: clamp(2.8rem, 17vw, 4.4rem);
  }

  h2 {
    font-size: clamp(2rem, 11vw, 3rem);
  }

  .container {
    width: min(100%, calc(100% - 1.4rem));
  }

  .header-inner {
    gap: 0.8rem;
  }

  .brand-logo {
    max-width: 42vw;
  }

  .lang-link,
  .site-nav a,
  .access-btn {
    font-size: 1rem;
  }

  .access-btn {
    font-size: 1.8rem;
  }

  .access-controls button {
    font-size: 0.92rem;
  }

  .service-card li {
    font-size: clamp(1.1rem, 7.4vw, 1.55rem);
  }
}

/* =========================================================
   13B. ADN · HERO Y BLOQUES AJUSTADOS
   Recupera la lógica correcta de Pilares / Valores y alinea
   el hero con la escala tipográfica de AC sin caja superior.
   ========================================================= */
.section-adn-intro {
  padding-top: 0.65rem;
}

.adn-layout {
  display: grid;
  gap: 1.6rem;
}

.adn-hero-copy--plain {
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.adn-hero-copy .eyebrow {
  display: none;
}

.adn-title {
  margin: 0 0 0.7rem;
}

.adn-title span {
  display: block;
}

.adn-title .adn-slogan {
  color: #4f4f50;
}

.adn-hero-copy .lead {
  max-width: 49rem;
  margin-top: 0.9rem;
}

.adn-media-card {
  display: grid;
  gap: 1rem;
  align-content: start;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.adn-media-card--stacked {
  width: min(860px, 100%);
}

.adn-media-card .service-label {
  margin-bottom: 0.2rem;
}

.adn-image-panel {
  aspect-ratio: 16 / 7;
  box-shadow: none;
}

.adn-support-copy {
  margin: 0;
  color: var(--muted);
}

.adn-section-group {
  display: grid;
  gap: 0.9rem;
}

.adn-section-head {
  display: grid;
  gap: 0.15rem;
  padding-inline: 0.2rem;
  margin-bottom: 1rem;
}

.adn-section-title {
  margin: 0;
  max-width: none;
}

.adn-card-grid {
  display: grid;
  gap: 1rem;
}

.adn-card-grid--three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.adn-card {
  display: grid;
  gap: 0.7rem;
  align-content: start;
}

.adn-card h3 {
  margin: 0;
  font-size: clamp(1.2rem, 1.8vw, 1.55rem);
  line-height: 1.08;
  /*letter-spacing: 0em;*/
  color: var(--muted);
}

.adn-card p {
  margin: 0;
}

.adn-card--value h3 {
  font-size: clamp(1.2rem, 1.8vw, 1.55rem);
}

.site-footer {
  margin-top: 3rem;
}

@media (max-width: 980px) {
  .adn-card-grid--three {
    grid-template-columns: 1fr;
  }

  .adn-image-panel {
    aspect-ratio: 16 / 10;
  }
}

/* =========================================================
   13B. TEKLAB · AJUSTE VISUAL PARA PHP V25
   Igualación tipográfica con AC en tarjetas y ajuste del hero
   para la estructura actual de pages/teklab.php.
   ========================================================= */
.section-teklab-intro {
  padding-top: 0.65rem;
}

.teklab-layout {
  display: grid;
  gap: 1.6rem;
}

.teklab-hero-copy {
  display: grid;
  gap: 0.8rem;
}

.teklab-title {
  margin: 0 0 0.35rem;
  max-width: 11ch;
}

.teklab-title span {
  display: block;
}

.teklab-title-brand {
  color: var(--text);
}

.teklab-title-main {
  color: var(--muted);
}

.teklab-media-card {
  display: grid;
  gap: 0.9rem;
}

.teklab-media-card--below-title {
  width: min(860px, 100%);
  max-width: 52rem;
  margin: 0.05rem 0 0.5rem;
}

.teklab-media-card .service-label {
  margin: 0 0 0.1rem;
}

.teklab-media-panel {
  overflow: hidden;
  aspect-ratio: 16 / 7;
  border: 1px solid var(--border);
  border-radius: 1.7rem;
  background:
    radial-gradient(circle at 50% 50%, #111114 0 11%, transparent 11.5%),
    radial-gradient(circle at 24% 24%, #efeff3 0 8%, transparent 8.5%),
    radial-gradient(circle at 76% 24%, #efeff3 0 8%, transparent 8.5%),
    radial-gradient(circle at 24% 76%, #efeff3 0 8%, transparent 8.5%),
    radial-gradient(circle at 76% 76%, #efeff3 0 8%, transparent 8.5%),
    linear-gradient(34deg, transparent 48.6%, #111114 49%, #111114 51%, transparent 51.4%),
    linear-gradient(146deg, transparent 48.6%, #111114 49%, #111114 51%, transparent 51.4%),
    linear-gradient(-34deg, transparent 48.6%, #111114 49%, #111114 51%, transparent 51.4%),
    linear-gradient(-146deg, transparent 48.6%, #111114 49%, #111114 51%, transparent 51.4%),
    linear-gradient(135deg, var(--panel), var(--bg));
  box-shadow: none;
}

.teklab-support-copy {
  margin: 0;
  color: var(--muted);
  max-width: 48rem;
  font-size: 1rem;
  line-height: 1.45;
}

.section-teklab-intro .lead {
  max-width: 62rem;
  margin: 0.35rem 0 0;
  color: #5f636f;
}

.section-teklab-intro .story-copy,
.section-teklab-intro .teklab-purpose {
  max-width: 62rem;
  margin: 0.08rem 0 0;
  font-size: clamp(1.16rem, 2vw, 1.45rem);
  line-height: 1.38;
  /*letter-spacing: 0em;*/
  color: #5f636f;
}

.teklab-word {
  color: var(--text);
  font-weight: 400;
}

.section-teklab-group {
  padding-top: 0.95rem;
}

.teklab-section-group {
  display: grid;
  gap: 0.8rem;
}

.teklab-section-head {
  display: grid;
  gap: 0.15rem;
  margin-bottom: 1.15rem;
  padding-inline: 0.2rem;
}

.teklab-section-head--split .intro-copy {
  margin: 0;
  max-width: 50rem;
  font-size: 1rem;
  line-height: 1.45;
  color: var(--muted);
}

.teklab-section-title {
  margin: 0;
  max-width: none;
}

.teklab-card-grid {
  display: grid;
  gap: 1rem;
}

.teklab-card-grid--two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.teklab-card-grid--three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.teklab-card {
  display: grid;
  gap: 0.55rem;
  align-content: start;
}

.teklab-card h3 {
  margin: 0;
  font-size: clamp(1.2rem, 1.8vw, 1.55rem);
  font-weight: 400;
  line-height: 1.14;
  /*letter-spacing: 0em;*/
  color: var(--muted);
}

.teklab-card p,
.teklab-card .story-copy {
  margin: 0;
  max-width: none;
  font-size: 1rem;
  line-height: 1.52;
  /*letter-spacing: 0em;*/
  color: #5f636f;
}

@media (max-width: 980px) {
  .teklab-card-grid--two,
  .teklab-card-grid--three {
    grid-template-columns: 1fr;
  }

  .teklab-media-panel {
    aspect-ratio: 16 / 10;
  }
}


/* =========================================================
   13D. ENTITIES / ENTIDADES
   Aislado por página para no tocar AC / ADN / TEKLAB.
   ========================================================= */
.entities-page{
  display: grid;
  gap: 2.2rem;
}

.entities-page .entity-page-copy{
  margin: 0.22rem 0 0;
  max-width: 60rem;
}

.entities-page .entities-group{
  display: grid;
  gap: 1rem;
}

.entities-page .entities-group-head{
  padding-inline: 0.15rem;
}

.entities-page .entities-group-title{
  margin: 0;
}

.entities-page .entities-grid{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.entities-page .entity-card{
  display: grid;
  align-content: start;
  gap: 0.7rem;
  min-height: 17rem;
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: 1.35rem;
  background: color-mix(in srgb, var(--panel) 76%, var(--bg));
}

.entities-page .entity-logo-shell{
  display: grid;
  align-items: center;
  justify-items: start;
  min-height: 5.6rem;
  margin: 0;
  padding: 0 0 0.2rem;
}

.entities-page .entity-logo{
  width: auto;
  max-width: min(100%, 15.5rem);
  max-height: 4.6rem;
  object-fit: contain;
  object-position: left center;
}

.entities-page .entity-card h3{
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.14;
  /*letter-spacing: 0em;*/
  color: var(--text);
}

.entities-page .entity-card p{
  margin: 0;
  font-size: 1rem;
  line-height: 1.5;
  /*letter-spacing: 0em;*/
  color: var(--muted);
}

body.theme-dark .entities-page .entity-logo,
body.theme-contrast .entities-page .entity-logo{
  filter: invert(100%);
}

@media (max-width: 1180px){
  .entities-page .entities-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px){
  .entities-page{
    gap: 1.8rem;
  }

  .entities-page .entities-grid{
    grid-template-columns: 1fr;
  }

  .entities-page .entity-card{
    min-height: auto;
  }

  .entities-page .entity-logo-shell{
    min-height: 4.8rem;
  }

  .entities-page .entity-logo{
    max-width: min(100%, 14rem);
    max-height: 4rem;
  }
}


/* =========================================================
   13E. ENTITIES / ENTIDADES · ACORDEÓN
   Añadido sobre V43 sin tocar el resto de páginas.
   ========================================================= */
.entities-page{
  gap: 1.35rem;
}

.entities-intro .lead{
  max-width: 74rem;
}

.entities-page .entity-page-copy,
.entities-intro .entity-page-copy{
  max-width: 74rem;
  font-size: clamp(1.24rem, 1.9vw, 1.5rem);
  line-height: 1.36;
}

.entities-page .entity-page-copy{
  margin-top: 0.55rem;
}

.entities-page .entities-accordion{
  display: grid;
  gap: 0;
}

.entities-page .entities-item{
  border-top: 1px solid var(--border);
}

.entities-page .entities-item:last-child{
  border-bottom: 1px solid var(--border);
}

.entities-page .entities-item-summary{
  padding: 0.9rem 0;
}

.entities-page .entities-item-heading{
  display: grid;
  grid-template-columns: 4.2rem minmax(0, 1fr);
  align-items: start;
  gap: 1rem;
  min-width: 0;
}

.entities-page .entities-index{
  display: block;
  font-size: clamp(1.02rem, 1.45vw, 1.22rem);
  line-height: 1.04;
  /*letter-spacing: 0em;*/
  font-weight: 700;
  color: var(--muted);
}

.entities-page .entities-summary-title{
  display: block;
  min-width: 0;
  font-size: clamp(1.06rem, 1.35vw, 1.24rem);
  line-height: 1.14;
  /*letter-spacing: 0em;*/
  font-weight: 700;
  color: var(--text);
}

.entities-page .entities-item-body{
  padding: 0 0 1.35rem;
}

.entities-page .entities-grid{
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1.2rem 0.8rem;
}

.entities-page .entity-card{
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 0.45rem;
  min-height: auto;
  padding: 0.15rem 0.25rem 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.entities-page .entity-logo-shell{
  display: grid;
  align-items: center;
  justify-items: center;
  min-height: 7.6rem;
  width: 100%;
  margin: 0;
  padding: 0;
}

.entities-page .entity-logo{
  width: auto;
  max-width: min(100%, 15.5rem);
  max-height: 7rem;
  object-fit: contain;
  object-position: left center;
}

.entities-page .entity-card p,
.entities-page .entity-card .entity-desc{
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.5;
  /*letter-spacing: 0em;*/
  color: var(--muted);
  text-align: center;
  max-width: 18ch;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

body.theme-dark .entities-page .entity-logo,
body.theme-contrast .entities-page .entity-logo{
  filter: invert(100%);
}

@media (max-width: 1380px){
  .entities-page .entities-grid{
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@media (max-width: 1180px){
  .entities-page .entities-grid{
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 920px){
  .entities-page .entities-item-heading{
    grid-template-columns: 3.1rem minmax(0, 1fr);
    gap: 0.75rem;
  }

  .entities-page .entities-grid{
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 720px){
  .entities-page .entities-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .entities-page .entity-logo-shell{
    min-height: 6.4rem;
  }

  .entities-page .entity-logo{
    max-height: 5.4rem;
  }
}

@media (max-width: 920px){
  .entities-page .entities-summary-title{
    font-size: 1rem;
  }
}


/* =========================================================
   13F. HOME + CONTACTO + ENTIDADES · AJUSTES V47
   Ajustes puntuales sin alterar la base del resto del sitio.
   ========================================================= */
.section-cta{
  margin-top: 1.15rem;
}

.home-contact-section{
  padding-top: 1rem;
}

.home-contact-card{
  display: grid;
  gap: 0.8rem;
}

.home-contact-copy{
  max-width: 58rem;
}

.home-contact-meta{
  display: grid;
  gap: 0.2rem;
  margin: 0 0 0.2rem;
}

.home-contact-meta p{
  margin: 0;
  font-size: 1.04rem;
  color: var(--muted);
}

.contact-page .lead{
  max-width: 52rem;
}

.contact-direct--rich{
  gap: 0.7rem;
  padding-top: 1.35rem;
}

.contact-line{
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.contact-icon{
  display: inline-flex;
  width: 1.35rem;
  justify-content: center;
  color: var(--text);
}

/* Entidades: 5 columnas, categorías más grandes pero sin negrita,
   mejor aire para logos y descripciones, y móvil más estable */
.entities-intro .lead,
.entities-page .entity-page-copy,
.entities-intro .entity-page-copy{
  max-width: 78rem;
}

.entities-page .entities-summary-title{
  font-size: clamp(1.14rem, 1.55vw, 1.34rem);
  line-height: 1.16;
  font-weight: 400;
  /*letter-spacing: 0em;*/
}

.entities-page .entities-grid{
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1.15rem 1rem;
}

.entities-page .entity-card{
  gap: 0.55rem;
  padding: 0.15rem 0.2rem 0;
}

.entities-page .entity-logo-shell{
  min-height: 8rem;
  align-items: center;
  justify-items: center;
  overflow: hidden;
}

.entities-page .entity-logo{
  max-width: min(100%, 14.8rem);
  max-height: 6.1rem;
  object-position: center center;
}

.entities-page .entity-card p,
.entities-page .entity-card .entity-desc{
  font-size: 0.8rem;
  line-height: 1.42;
  max-width: 16ch;
  min-height: calc(1.42em * 2);
  text-wrap: balance;
}

@media (max-width: 1180px){
  .entities-page .entities-grid{
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 920px){
  .entities-page .entities-summary-title{
    font-size: 1.08rem;
  }

  .entities-page .entities-grid{
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .entities-page .entity-logo-shell{
    min-height: 6.6rem;
  }

  .entities-page .entity-logo{
    max-height: 5rem;
  }
}

@media (max-width: 720px){
  .entities-page .entities-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .entities-page .entity-card p,
  .entities-page .entity-card .entity-desc{
    max-width: 14ch;
    font-size: 0.77rem;
    line-height: 1.34;
    min-height: calc(1.34em * 2);
  }
}

@media (max-width: 520px){
  .section-cta{
    margin-top: 1rem;
  }

  .contact-line{
    align-items: flex-start;
  }

  .entities-page .entities-item-heading{
    grid-template-columns: 2.6rem minmax(0, 1fr);
    gap: 0.65rem;
  }

  .entities-page .entities-grid{
    grid-template-columns: 1fr;
  }

  .entities-page .entity-logo-shell{
    min-height: 5.8rem;
  }

  .entities-page .entity-logo{
    max-height: 4.6rem;
  }

  .entities-page .entity-card p,
  .entities-page .entity-card .entity-desc{
    max-width: 18ch;
  }
}


/* =========================================================
   13G. AJUSTES FINALES HOME + ENTIDADES · V48
   ========================================================= */
.home-areas-grid .service-card{
  display: grid;
  gap: 0.45rem;
}

.home-areas-grid .service-label{
  margin: 0 0 0.15rem;
  font-size: clamp(1.25rem, 2.2vw, 2.15rem);
  line-height: 1.08;
  /*letter-spacing: 0em;*/
  font-weight: 400;
  color: var(--text);
}

.home-areas-grid .service-desc{
  margin: 0;
  max-width: 40ch;
  font-size: 1rem;
  line-height: 1.5;
  /*letter-spacing: 0em;*/
  color: var(--muted);
}

.section-cta-inline{
  margin-top: 0.35rem;
}

.section-cta-inline .button,
.home-contact-card > .button{
  justify-self: start;
  width: auto;
}

.entities-intro .lead,
.entities-page .entity-page-copy,
.entities-intro .entity-page-copy{
  max-width: 86rem;
}

.entities-page .entities-summary-title{
  font-size: clamp(1.18rem, 1.6vw, 1.42rem);
  line-height: 1.16;
  font-weight: 400;
  /*letter-spacing: 0em;*/
}

.entities-page .entities-grid{
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1.35rem 1rem;
}

.entities-page .entity-card{
  display: grid;
  grid-template-rows: auto auto;
  justify-items: center;
  align-content: start;
  gap: 0.6rem;
  padding: 0.1rem 0.2rem 0;
}

.entities-page .entity-logo-shell{
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 7.6rem;
  overflow: hidden;
}

.entities-page .entity-logo{
  width: auto;
  max-width: min(100%, 14.8rem);
  max-height: 5.6rem;
  object-fit: contain;
  object-position: center center;
  display: block;
}

.entities-page .entity-card p,
.entities-page .entity-card .entity-desc{
  display: block;
  width: 100%;
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.4;
  /*letter-spacing: 0em;*/
  color: var(--muted);
  text-align: center;
  max-width: 18ch;
  min-height: calc(1.4em * 2);
  max-height: calc(1.4em * 2);
  overflow: hidden;
  text-wrap: pretty;
  hyphens: auto;
}

@media (max-width: 1180px){
  .entities-page .entities-grid{
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 920px){
  .entities-page .entities-item-heading{
    grid-template-columns: 3rem minmax(0, 1fr);
    gap: 0.75rem;
  }

  .entities-page .entities-grid{
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .entities-page .entity-logo-shell{
    min-height: 6.8rem;
  }

  .entities-page .entity-logo{
    max-height: 4.9rem;
  }
}

@media (max-width: 720px){
  .entities-page .entities-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .entities-page .entity-logo-shell{
    min-height: 6.1rem;
  }

  .entities-page .entity-logo{
    max-height: 4.4rem;
  }

  .entities-page .entity-card p,
  .entities-page .entity-card .entity-desc{
    max-width: 16ch;
    font-size: 0.78rem;
    line-height: 1.34;
    min-height: calc(1.34em * 2);
    max-height: calc(1.34em * 2);
  }
}

@media (max-width: 520px){
  .entities-page .entities-grid{
    grid-template-columns: 1fr;
  }

  .entities-page .entity-logo-shell{
    min-height: 5.8rem;
  }

  .entities-page .entity-logo{
    max-height: 4.2rem;
  }
}


/* =========================================================
   13H. AJUSTES CONTACTO + ENTIDADES · V49
   ========================================================= */
.home-contact-card{
  justify-items: start;
}

.home-contact-card > .button,
.home-contact-card > .home-contact-button{
  display: inline-flex !important;
  width: fit-content !important;
  inline-size: fit-content !important;
  justify-self: start !important;
  align-self: start;
}

.home-contact-meta p:last-child{
  display: none;
}

.contact-direct--rich{
  gap: 0.9rem;
}

.contact-line{
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.contact-line--copy{
  gap: 0.55rem;
}

.contact-link{
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--text);
  text-decoration: none;
  font-size: clamp(1.2rem, 2vw, 1.75rem);
  line-height: 1.15;
  /*letter-spacing: 0em;*/
}

.contact-link--arrow::after{
  content: "→";
  font-size: 0.95em;
  line-height: 1;
}

.contact-copy-button{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 0.4rem;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: border-color .2s ease, color .2s ease, background-color .2s ease;
}

.contact-copy-button:hover,
.contact-copy-button:focus-visible,
.contact-copy-button.is-copied{
  color: var(--text);
  border-color: var(--text);
  background: color-mix(in srgb, var(--panel) 72%, var(--bg));
  outline: none;
}

.entities-page .entities-item-summary{
  padding: 0.78rem 0 !important;
}

.entities-page .entities-item-heading{
  grid-template-columns: 2.4rem minmax(0, 1fr) !important;
  gap: 0.45rem !important;
  align-items: center;
}

.entities-page .entities-index{
  font-size: clamp(1.02rem, 1.28vw, 1.18rem) !important;
  font-weight: 600 !important;
}

.entities-page .entities-summary-title{
  font-size: clamp(1.1rem, 1.42vw, 1.28rem) !important;
  line-height: 1.16 !important;
  font-weight: 400 !important;
  /*letter-spacing: 0em;*/ !important;
}

.entities-page .entities-grid{
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: 1.5rem 1rem !important;
  align-items: start;
}

.entities-page .entity-card{
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 0.7rem !important;
  min-height: 0 !important;
  padding: 0.1rem 0.22rem 0 !important;
}

.entities-page .entity-logo-shell{
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 7.2rem !important;
  height: 7.2rem;
  overflow: hidden;
}

.entities-page .entity-logo{
  display: block;
  width: auto;
  max-width: min(100%, 13.8rem) !important;
  max-height: 4.9rem !important;
  object-fit: contain;
  object-position: center center !important;
}

.entities-page .entity-card p,
.entities-page .entity-card .entity-desc{
  display: block !important;
  width: 100%;
  margin: 0 !important;
  font-size: 0.8rem !important;
  line-height: 1.34 !important;
  /*letter-spacing: 0em;*/
  color: var(--muted);
  text-align: center;
  max-width: 15ch !important;
  min-height: calc(1.34em * 2);
  max-height: calc(1.34em * 2);
  overflow: hidden;
  text-wrap: balance;
  hyphens: auto;
}

@media (max-width: 1180px){
  .entities-page .entities-grid{
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 920px){
  .entities-page .entities-item-heading{
    grid-template-columns: 2.2rem minmax(0, 1fr) !important;
    gap: 0.42rem !important;
  }

  .entities-page .entities-grid{
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 1.35rem 0.9rem !important;
  }

  .entities-page .entity-logo-shell{
    min-height: 6.4rem !important;
    height: 6.4rem;
  }

  .entities-page .entity-logo{
    max-height: 4.4rem !important;
  }
}

@media (max-width: 720px){
  .entities-page .entities-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 1.1rem 0.8rem !important;
  }

  .entities-page .entity-logo-shell{
    min-height: 5.7rem !important;
    height: 5.7rem;
  }

  .entities-page .entity-logo{
    max-height: 3.9rem !important;
  }

  .entities-page .entity-card p,
  .entities-page .entity-card .entity-desc{
    max-width: 14ch !important;
    font-size: 0.76rem !important;
    line-height: 1.28 !important;
    min-height: calc(1.28em * 2);
    max-height: calc(1.28em * 2);
  }
}

@media (max-width: 520px){
  .entities-page .entities-item-summary{
    padding: 0.72rem 0 !important;
  }

  .entities-page .entities-item-heading{
    grid-template-columns: 2rem minmax(0, 1fr) !important;
    gap: 0.35rem !important;
  }

  .entities-page .entities-summary-title{
    font-size: 1.02rem !important;
  }

  .entities-page .entities-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 1rem 0.65rem !important;
  }

  .entities-page .entity-logo-shell{
    min-height: 5.1rem !important;
    height: 5.1rem;
  }

  .entities-page .entity-logo{
    max-height: 3.5rem !important;
    max-width: min(100%, 10.4rem) !important;
  }

  .entities-page .entity-card p,
  .entities-page .entity-card .entity-desc{
    max-width: 12.5ch !important;
    font-size: 0.73rem !important;
    line-height: 1.24 !important;
    min-height: calc(1.24em * 2);
    max-height: calc(1.24em * 2);
  }
}


/* =========================================================
   13I. AJUSTES FINALES · CONTACTO / TEKLAB / ENTIDADES · V50
   ========================================================= */
.contact-direct--rich{
  gap: 1rem;
}

.contact-line{
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex-wrap: wrap;
}

.contact-link{
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
}

.contact-link--arrow::after{
  content: none !important;
}

.contact-link--with-icon{
  justify-content: flex-start;
}

.contact-link-icon{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.4rem;
  height: 1.4rem;
  flex: 0 0 auto;
}

.contact-icon-asset{
  display: block;
  width: 1.2rem;
  height: 1.2rem;
}

.contact-icon-asset--dark{
  display: none;
}

body.theme-dark .contact-icon-asset--light,
body.theme-contrast .contact-icon-asset--light{
  display: none;
}

body.theme-dark .contact-icon-asset--dark,
body.theme-contrast .contact-icon-asset--dark{
  display: block;
}

.contact-copy-button{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  padding: 0;
  border: 0;
  border-radius: 0.7rem;
  background: color-mix(in srgb, var(--panel) 88%, var(--border));
  color: var(--muted);
  cursor: pointer;
  transition: transform .2s ease, background-color .2s ease, color .2s ease;
}

.contact-copy-button:hover,
.contact-copy-button:focus-visible,
.contact-copy-button.is-copied{
  background: color-mix(in srgb, var(--panel) 72%, var(--text) 10%);
  color: var(--text);
  outline: none;
  transform: translateY(-1px);
}

.section-teklab-intro .container.teklab-layout{
  width: min(1180px, calc(100% - max(2rem, 6vw)));
}

.teklab-title{
  max-width: none;
}

.teklab-title-main{
  max-width: 13ch;
}

.entities-page .entities-item-summary{
  padding: 0.72rem 0 !important;
}

.entities-page .entities-item-body{
  padding: 0 0 1.7rem !important;
}

.entities-page .entities-item-heading{
  grid-template-columns: 2rem minmax(0, 1fr) !important;
  gap: 0.28rem !important;
  align-items: center !important;
}

.entities-page .entities-index{
  font-size: clamp(0.98rem, 1.15vw, 1.1rem) !important;
}

.entities-page .entities-summary-title{
  font-size: clamp(1.16rem, 1.55vw, 1.34rem) !important;
  font-weight: 400 !important;
  /*letter-spacing: 0em;*/ !important;
}

.entities-page .entities-grid{
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: 1.45rem 1rem !important;
  align-items: start !important;
}

.entities-page .entity-card{
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 0.6rem !important;
  min-height: 12rem !important;
  height: auto !important;
  overflow: hidden !important;
}

.entities-page .entity-logo-shell{
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  min-height: 7rem !important;
  height: 7rem !important;
  overflow: hidden !important;
  flex: 0 0 auto !important;
}

.entities-page .entity-logo{
  width: auto !important;
  max-width: min(100%, 12.5rem) !important;
  max-height: 5rem !important;
  object-fit: contain !important;
  object-position: center center !important;
}

.entities-page .entity-card p,
.entities-page .entity-card .entity-desc{
  width: 100% !important;
  max-width: 13ch !important;
  margin: 0 !important;
  min-height: calc(1.34em * 2) !important;
  max-height: calc(1.34em * 2) !important;
  line-height: 1.34 !important;
  text-align: center !important;
  overflow: hidden !important;
  text-wrap: balance;
}

@media (max-width: 920px){
  .teklab-title-main{
    max-width: 10.8ch;
  }

  .entities-page .entities-grid{
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 1.2rem 0.85rem !important;
  }

  .entities-page .entity-card{
    min-height: 11.2rem !important;
  }
}

@media (max-width: 680px){
  .section-teklab-intro .container.teklab-layout{
    width: min(1180px, calc(100% - 1.5rem));
  }

  .teklab-title-main{
    max-width: 10.2ch;
  }

  .entities-page .entities-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 1.1rem 0.75rem !important;
  }

  .entities-page .entity-card{
    min-height: 10.6rem !important;
  }

  .entities-page .entity-logo-shell{
    min-height: 5.8rem !important;
    height: 5.8rem !important;
  }

  .entities-page .entity-logo{
    max-height: 4.2rem !important;
    max-width: min(100%, 10.8rem) !important;
  }

  .entities-page .entity-card p,
  .entities-page .entity-card .entity-desc{
    max-width: 12.5ch !important;
    font-size: 0.76rem !important;
  }
}

@media (max-width: 520px) {
  .teklab-title-main {
    max-width: 11ch !important;
    font-size: clamp(3.5rem, 12.2vw, 4.6rem) !important;
    line-height: 0.94 !important;
  }
}

  .contact-link{
    font-size: clamp(1.05rem, 5vw, 1.4rem);
  }

  .contact-copy-button{
    width: 2.15rem;
    height: 2.15rem;
    border-radius: 0.65rem;
  }

  .entities-page .entities-item-heading{
    grid-template-columns: 1.85rem minmax(0, 1fr) !important;
    gap: 0.22rem !important;
  }

  .entities-page .entities-summary-title{
    font-size: 1.02rem !important;
  }

  .entities-page .entities-grid{
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }

  .entities-page .entity-card{
    min-height: 9.8rem !important;
  }

  .entities-page .entity-logo-shell{
    min-height: 5.2rem !important;
    height: 5.2rem !important;
  }

  .entities-page .entity-logo{
    max-height: 3.8rem !important;
  }
}


/* =========================================================
   13J. AJUSTES FINALES · CONTACTO / TEKLAB / ENTIDADES · V51
   ========================================================= */
.contact-link--with-icon{
  gap: 0.72rem !important;
}

.contact-link-icon--phone{
  order: -1 !important;
}

.contact-copy-button{
  flex: 0 0 auto !important;
}

.section-teklab-intro .container.teklab-layout{
  width: min(1080px, calc(100% - max(2rem, 4vw))) !important;
}

.teklab-title-main{
  max-width: 15ch !important;
}

.entities-page .entities-item-heading{
  grid-template-columns: 1.7rem minmax(0,1fr) !important;
  gap: 0.16rem !important;
}

.entities-page .entities-summary-title{
  font-size: clamp(1.12rem, 1.42vw, 1.28rem) !important;
  font-weight: 400 !important;
}

.entities-page .entities-grid{
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: 1.65rem 1rem !important;
  align-items: start !important;
}

.entities-page .entity-card{
  display: grid !important;
  grid-template-rows: minmax(7.8rem, auto) auto !important;
  justify-items: center !important;
  align-content: start !important;
  gap: 0.75rem !important;
  min-height: 0 !important;
  height: auto !important;
  overflow: visible !important;
  padding: 0 0.15rem 0.2rem !important;
}

.entities-page .entity-logo-shell{
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  min-height: 7.8rem !important;
  height: 7.8rem !important;
  overflow: visible !important;
}

.entities-page .entity-logo{
  width: auto !important;
  max-width: min(100%, 15.5rem) !important;
  max-height: 7rem !important;
  object-fit: contain !important;
  object-position: center center !important;
}

.entities-page .entity-card p,
.entities-page .entity-card .entity-desc {
  width: 100% !important;
  max-width: 17ch !important;
  margin: 0 auto !important;
  min-height: calc(1.34em * 2) !important;
  max-height: calc(1.34em * 2) !important;
  font-size: 0.8rem !important;
  line-height: 1.34 !important;
  /*letter-spacing: 0em;*/ !important;
  color: var(--muted) !important;
  text-align: center !important;
  overflow: hidden !important;
  text-wrap: balance;
}

@media (max-width: 920px){
  .teklab-title-main{
    max-width: 12.2ch !important;
  }

  .entities-page .entities-grid{
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 1.35rem 0.85rem !important;
  }

  .entities-page .entity-card{
    grid-template-rows: minmax(7rem, auto) auto !important;
  }

  .entities-page .entity-logo-shell{
    min-height: 7rem !important;
    height: 7rem !important;
  }

  .entities-page .entity-logo{
    max-height: 6rem !important;
  }
}

@media (max-width: 680px){
  .section-teklab-intro .container.teklab-layout{
    width: min(1320px, calc(100% - 1.15rem)) !important;
  }

  .teklab-title-main{
    max-width: 11.5ch !important;
  }

  .entities-page .entities-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 1.15rem 0.85rem !important;
  }

  .entities-page .entity-card{
    grid-template-rows: minmax(6.6rem, auto) auto !important;
  }

  .entities-page .entity-logo-shell{
    min-height: 6.6rem !important;
    height: 6.6rem !important;
  }

  .entities-page .entity-logo{
    max-width: min(100%, 12rem) !important;
    max-height: 5.4rem !important;
  }
}

@media (max-width: 430px){
  .teklab-title-main{
    max-width: 10.8ch !important;
  }

  .entities-page .entities-grid{
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }

  .entities-page .entity-card{
    grid-template-rows: minmax(6.2rem, auto) auto !important;
  }

  .entities-page .entity-logo-shell{
    min-height: 6.2rem !important;
    height: 6.2rem !important;
  }

  .entities-page .entity-logo{
    max-width: min(100%, 11.2rem) !important;
    max-height: 5rem !important;
  }
}


/* =========================================================
   13J. AJUSTES FINALES · TEKLAB + ENTIDADES · V52
   - Abre un poco más el título de TEKLAB.
   - Desplaza la caja visual para que no arranque tan a la izquierda.
   ========================================================= */
.teklab-title{
  max-width: 13.6ch !important;
}

.teklab-media-card--below-title{
  justify-self: start;
  width: min(860px, 100%);
  max-width: 52rem;
  margin: 0.1rem 0 0.55rem clamp(4.5rem, 9vw, 8rem) !important;
}

@media (max-width: 980px){
  .teklab-title{
    max-width: 12.6ch !important;
  }

  .teklab-media-card--below-title{
    margin-left: clamp(1.4rem, 4vw, 2.2rem) !important;
  }
}

@media (max-width: 760px) {
  .teklab-title-main {
    max-width: 11.2ch !important;
    font-size: clamp(3.9rem, 13vw, 5.1rem) !important;
    line-height: 0.94 !important;
  }
}

  .teklab-media-card--below-title{
    width: 100%;
    max-width: none;
    margin-left: 0 !important;
  }
}


/* =========================================================
   13K. AJUSTES FINALES · CONTRASTE / AC / CONTACTO · V54
   ========================================================= */
body.theme-dark .text-color-soft,
body.theme-contrast .text-color-soft {
  color: var(--text) !important;
}

body.theme-dark .cv-block p,
body.theme-dark .cv-side p,
body.theme-dark .intro-copy,
body.theme-dark .story-copy,
body.theme-dark .motion-copy,
body.theme-dark .teklab-subline,
body.theme-dark .cv-section-note,
body.theme-dark .cv-intro-copy--compact > p:not(.eyebrow):not(.lead),
body.theme-dark .cv-photo-caption,
body.theme-contrast .cv-block p,
body.theme-contrast .cv-side p,
body.theme-contrast .intro-copy,
body.theme-contrast .story-copy,
body.theme-contrast .motion-copy,
body.theme-contrast .teklab-subline,
body.theme-contrast .cv-section-note,
body.theme-contrast .cv-intro-copy--compact > p:not(.eyebrow):not(.lead),
body.theme-contrast .cv-photo-caption {
  color: var(--muted) !important;
}

body.theme-dark .cv-item-title,
body.theme-dark .cv-item-title *,
body.theme-dark .cv-item-body,
body.theme-dark .cv-item-body *,
body.theme-dark .cv-quickfacts p,
body.theme-dark .cv-block h2,
body.theme-dark .cv-block h3,
body.theme-dark .cv-block strong,
body.theme-dark .cv-section-note,
body.theme-contrast .cv-item-title,
body.theme-contrast .cv-item-title *,
body.theme-contrast .cv-item-body,
body.theme-contrast .cv-item-body *,
body.theme-contrast .cv-quickfacts p,
body.theme-contrast .cv-block h2,
body.theme-contrast .cv-block h3,
body.theme-contrast .cv-block strong,
body.theme-contrast .cv-section-note {
  color: var(--text) !important;
}

body.theme-dark .cv-item-body p,
body.theme-dark .cv-block--profile p,
body.theme-contrast .cv-item-body p,
body.theme-contrast .cv-block--profile p {
  color: var(--muted) !important;
}

body.theme-dark .cv-item-toggle::before,
body.theme-dark .cv-item-toggle::after,
body.theme-contrast .cv-item-toggle::before,
body.theme-contrast .cv-item-toggle::after {
  background: var(--text) !important;
}

body.theme-dark .section.section-alt,
body.theme-contrast .section.section-alt {
  background: transparent;
}

.contact-copy-button {
  position: relative;
  z-index: 2;
}



/* =========================================================
   13I. CONTACTO · AJUSTE FINAL SIN SUBRAYADOS NI FONDO
   ========================================================= */
.contact-page .contact-link,
.contact-page .contact-link:hover,
.contact-page .contact-link:focus-visible,
.contact-page .contact-link:active,
.contact-page .contact-direct a,
.contact-page .contact-direct a:hover,
.contact-page .contact-direct a:focus-visible,
.contact-page .contact-direct a:active{
  text-decoration: none !important;
  text-underline-offset: 0 !important;
  text-decoration-thickness: 0 !important;
  border-bottom: 0 !important;
  box-shadow: none !important;
}

body.theme-contrast .contact-page .contact-link,
body.theme-contrast .contact-page .contact-direct a{
  color: var(--text) !important;
  text-decoration: none !important;
}

.contact-page .contact-copy-button{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  padding: 0;
  border: 0;
  border-radius: 0.7rem;
  background: transparent !important;
  color: var(--muted);
  cursor: pointer;
  box-shadow: none !important;
  transition: transform .2s ease, background-color .2s ease, color .2s ease;
}

.contact-page .contact-copy-button:hover,
.contact-page .contact-copy-button:focus-visible,
.contact-page .contact-copy-button.is-copied{
  background: transparent !important;
  color: var(--text);
  border: 0 !important;
  outline: none;
}

.contact-page .contact-copy-button:focus-visible{
  transform: translateY(-1px);
}


/* =========================================================
   13L. AJUSTES FINALES · V53 · CONTACTO / TEKLAB / ENTIDADES
   ========================================================= */
.access-panel {
  background: rgba(255, 255, 255, 0.82) !important;
}

body.theme-dark .access-panel,
body.theme-contrast .access-panel {
  background: rgba(9, 9, 11, 0.68) !important;
}

.text-color-soft,
.contact-page .contact-title-soft {
  color: #555454 !important;
}

body.theme-dark .contact-page .contact-title-soft,
body.theme-contrast .contact-page .contact-title-soft,
body.theme-dark .text-color-soft,
body.theme-contrast .text-color-soft {
  color: var(--text) !important;
}

.section-teklab-intro {
  padding-top: 1rem !important;
}

.teklab-title {
  max-width: 13.2ch !important;
  margin: 0 0 0.45rem !important;
}

.teklab-title-logo-wrap {
  display: block;
  width: 100%;
  margin: 0.78rem 0 0.55rem !important;
}

.teklab-title-logo {
  display: block;
  width: min(19rem, 48vw) !important;
  max-width: 100%;
  height: auto;
}

.teklab-media-card--below-title {
  justify-self: start !important;
  width: min(860px, 100%) !important;
  max-width: 52rem !important;
  margin: 0.18rem 0 0.55rem 0 !important;
}

.teklab-media-card .service-label {
  justify-self: start !important;
  text-align: left !important;
  margin: 0 0 0.18rem !important;
}

.contact-line--phone {
  flex-wrap: wrap;
  align-items: center;
  gap: 0.72rem 1rem;
}

.contact-phone-dates {
  display: inline-flex;
  align-items: center;
  color: var(--muted);
  font-size: clamp(0.95rem, 1.35vw, 1.02rem);
  line-height: 1.2;
  white-space: nowrap;
}

.entities-page .entities-item-summary {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: start !important;
  gap: 0.75rem !important;
}

@media (max-width: 760px) {
  .teklab-title {
    max-width: 11.6ch !important;
  }

  .teklab-title-logo-wrap {
    margin-top: 0.95rem !important;
    margin-bottom: 0.4rem !important;
  }

  .teklab-title-logo {
    width: min(15rem, 58vw) !important;
  }

  .teklab-title-main {
    max-width: 10.4ch !important;
  }
}

@media (max-width: 520px) {
  .section-teklab-intro .container.teklab-layout {
    width: min(100%, calc(100% - 1.25rem)) !important;
  }

  .teklab-title {
    max-width: 10.5ch !important;
  }

  .teklab-title-logo-wrap {
    margin-top: 1.05rem !important;
  }

  .teklab-title-logo {
    width: min(13.2rem, 60vw) !important;
  }

  .teklab-title-main {
    max-width: 9.6ch !important;
  }

  .teklab-media-card--below-title {
    width: 100% !important;
    max-width: none !important;
    margin-left: 0 !important;
  }

  .entities-page .entities-item-summary {
    padding-right: 0.3rem !important;
  }

  .entities-page .entities-item-heading {
    grid-template-columns: 1.95rem minmax(0, 1fr) !important;
    gap: 0.4rem !important;
  }

  .entities-page .entities-summary-title {
    font-size: 1.02rem !important;
    line-height: 1.14 !important;
    padding-right: 0.15rem !important;
  }

  .entities-page .entities-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 1rem 0.7rem !important;
  }

  .entities-page .entity-card {
    grid-template-rows: minmax(5.8rem, auto) auto !important;
  }

  .entities-page .entity-card p,
  .entities-page .entity-card .entity-desc {
    max-width: 11.6ch !important;
    font-size: 0.74rem !important;
    line-height: 1.25 !important;
    min-height: calc(1.25em * 2) !important;
    max-height: calc(1.25em * 2) !important;
  }
}
.cv-intro-support .cv-block--support > :first-child {
  display: block !important;
  margin: 0 0 1.1rem !important;
}

.cv-intro-support .cv-block--support > :first-child + * {
  margin-top: 0 !important;
}
.cv-intro-support .cv-block--support > :first-child,
.cv-intro-support .cv-block--support > :first-child * {
  font-size: clamp(1.2rem, 1.8vw, 1.55rem) !important;
  line-height: 1.12 !important;
  color: #111114 !important;
  font-weight: 400 !important;
  background: transparent !important;
}
/* Estado normal (Modo Claro) */
.muted-el {
    color: var(--muted);
    transition: color 0.3s ease;
}

/* Modo Oscuro: "El" pasa a color de texto principal para no perderse */
@media (prefers-color-scheme: dark) {
    .muted-el {
        color: var(--text-main); /* O blanco directamente: #ffffff */
    }
}

/* Alto Contraste: Para personas con visión reducida */
@media (forced-colors: active) {
    .muted-el {
        color: CanvasText; /* Color del sistema para legibilidad máxima */
        font-weight: bold;
    }
}
/* =========================================================
   BLOQUE MAESTRO V93: RESCATE FINAL Y SELLADO
   - Fix Home: Áreas pegadas al título usando FLEX (Tu truco).
   - Fix Entidades: 3 líneas GARANTIZADAS (Altura Fija).
   - Fix Colores: Párrafos blancos en modo oscuro (Blindaje).
   - Niquelado total de guiones y hover de botones.
   ========================================================= */

/* 1. REGLA DE ORO: GUIONES Y LIGADURAS (PROHIBIDOS) */
* {
    hyphens: none !important;
    -webkit-hyphens: none !important;
    font-variant-ligatures: none !important;
    text-rendering: optimizeLegibility !important;
}

/* 2. TU CONFIGURACIÓN DE TÍTULO PRINCIPAL */
.motion-title {
    max-width: 1200px !important;
    width: 100%;
    line-height: 1.1 !important;
    margin-top: 1.5rem !important;
    margin-bottom: 2rem !important;
    word-break: keep-all !important;
    overflow-wrap: normal !important;
}

/* 3. HOME: PEGAR ÁREAS (USANDO TU SOLUCIÓN FLEX) */
.service-card {
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    min-height: auto !important; /* <--- Quitamos los 280px que empujaban */
}

.home-areas-grid { 
    margin-top: 0 !important; /* <--- Quitamos el negativo para que no suba tanto */
    padding-top: 0 !important; 
}

.section-head.stacked-head { 
    margin-bottom: 1.2rem !important; /* <--- Antes estaba en 0, ahora tiene aire */}


/* FORZAR 3 LÍNEAS CON ALTURA FIJA (Seguro 100%) */
.entities-page .entity-card p,
.entities-page .entity-card .entity-desc {
    display: -webkit-box !important;
    -webkit-line-clamp: 3 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    margin: 0 auto !important;
    max-width: 18ch !important;
    min-height: 4.4em !important; /* <--- Altura exacta para 3 líneas */
    max-height: 4.4em !important;
    line-height: 1.4 !important;
    font-size: 0.82rem !important;
    text-align: center !important;
}

/* 5. BLINDAJE MODO OSCURO / ALTO CONTRASTE (PÁRRAFOS BLANCOS) */
body.theme-dark, body.theme-contrast {
    /* TODO A BLANCO PURO (Incluye párrafos y títulos) */
    h1, h2, h3, h4, p, span, li, strong, a, label,
    .adn-title .adn-slogan, .teklab-card p, .motion-copy, .intro-copy,
    .story-copy, .service-label, .legal-item p, .entities-page .entity-card p,
    .cv-block h2, .cv-block h3, .cv-block p, .cv-side p, .cv-section-note,
    .cv-intro-support .cv-block--support > :first-child,
    .cv-intro-support .cv-block--support > :first-child *,
    .home-areas-grid .service-desc, .home-areas-grid .service-label {
        color: #ffffff !important;
    }

    /* FIX LÍNEAS REJILLA */
    --border: #44444c;
    .firma-grid .service-card, .cv-item, .entities-item, .service-card {
        border-top: 1px solid #44444c !important;
    }

    /* BOTONES HOVER */
    .button-outline { border: 1px solid #ffffff !important; color: #ffffff !important; background: transparent !important; }
    .button-outline:hover { background: #ffffff !important; color: #000000 !important; }
    
    /* LEAD BOX (TU CONFIGURACIÓN) */
    .lead-box { background-color: #ffffff !important; color: #000000 !important; }
}

/* MODO CLARO (COLORES SENIOR GRISES) */
body:not(.theme-dark):not(.theme-contrast) {
    .motion-copy, .intro-copy, .story-copy, .cv-block p, .cv-side p, 
    .muted-el, .legal-item p, .service-desc, .entities-page .entity-card p {
        color: #5f636f !important;
    }
    .lead-box { background-color: #ffffff !important; color: #111114 !important; }
}

/* 6. FIX ADN / TEKLAB */
.adn-layout .button-outline, .adn-card .button-outline {
    display: inline-flex !important;
    visibility: visible !important;
    margin-top: 1.5rem !important;
}


/* 3. Ajuste responsivo para móviles (para que no se salgan de la pantalla) */
@media (max-width: 768px) {
    .entities-page .entity-logo-shell {
        min-height: 8rem !important;
        height: 8rem !important;
    }
    .entities-page .entity-logo {
        max-width: min(100%, 15rem) !important;
        max-height: 6.5rem !important;
    }
}

/* --- ELIMINACIÓN RADICAL DE LA FRANJA Y CENTRADO --- */

/* 1. Limpiamos cualquier posible contenedor (section o div) que tenga la clase lead-box */
section.lead-box, 
div.lead-box, 
.lead-box {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    border: none !important;
    box-shadow: none !important;
    padding: 1rem 0 !important; /* Reducimos la altura al mínimo */
    margin: 0 !important;
    width: 100% !important;
    display: block !important;
}

/* 2. Forzamos el centrado absoluto y quitamos fondo al texto directamente */
p.lead.motion-copy,
p.lead.motion-copy,
.lead.motion-copy {
    background: none !important;
    /* background-color: transparent !important; */
    display: block !important;
    text-align: left !important;
    /* margin: 0 auto !important; */
    width: 100% !important;
    max-width: 1080px !important;
    font-size: 1.8rem !important;
    line-height: 1.2 !important;
    color: #fff !important;


}

/* 3. Adaptaciones de Accesibilidad (Modo Oscuro y Alto Contraste) */
@media (prefers-color-scheme: dark) {
    .lead.motion-copy { color: #f5f5f5 !important; }
}
body.dark-mode .lead.motion-copy { color: #f5f5f5 !important; }
body.high-contrast .lead.motion-copy { 
    color: #fff !important; 
    font-weight: bold !important; 
}
/* --- ESTADOS ACTIVOS DEL PANEL DE ACCESIBILIDAD --- */

/* Resalte para el botón de Modo Oscuro cuando está activo */
body.dark-mode .btn-dark-mode-icon { 
    background-color: #ffca28 !important; /* Amarillo para la luna/sol */
    color: #000 !important;
    border-radius: 8px;
}

/* Resalte para el botón de Alto Contraste cuando está activo */
body.high-contrast .btn-high-contrast-icon {
    background-color: #ffffff !important; /* Blanco puro */
    color: #000000 !important;
    outline: 2px solid #000 !important;
    border-radius: 8px;
}

/* Resalte para el botón de Audio cuando está activo */
body.audio-active .btn-audio-icon {
    background-color: #4caf50 !important; /* Verde "play" */
    color: #fff !important;
    border-radius: 8px;
}

/* Resalte para el botón 'Aa' del footer cuando el panel está abierto */
.footer-access[aria-expanded="true"],
.footer-access:active {
    background-color: #333 !important;
    color: #fff !important;
}
/* --- CORRECCIÓN TEXTO INFERIOR MODO OSCURO/CONTRASTE --- */

body.dark-mode .site-footer p,
body.dark-mode .footer-privacy-statement p,
body.dark-mode .footer-license p,
body.high-contrast .site-footer p,
body.high-contrast .footer-privacy-statement p {
    color: #ffffff !important; /* Blanco total para máxima legibilidad */
    opacity: 1 !important;    /* Eliminamos cualquier transparencia que lo haga gris */
}

/* --- REGLAS PARA ALTO CONTRASTE (High Contrast) --- */
body.high-contrast {
    background-color: #000000 !important; /* Negro puro para máximo fondo */
    color: #FFFFFF !important;            /* Texto base blanco puro */
}

/* Enlaces en Amarillo Brillante */
body.high-contrast a, 
body.high-contrast .footer-links a {
    color: #FFFF00 !important;            /* Amarillo puro */
    text-decoration: underline !important; /* Forzamos subrayado para identificar links */
    font-weight: bold !important;
}

/* Botón Aa y elementos interactivos */
body.high-contrast .footer-access,
body.high-contrast button {
    color: #FFFF00 !important;            /* Texto amarillo */
    border: 2px solid #FFFF00 !important; /* Contorno claro y definido */
    background: transparent !important;
    font-weight: 900 !important;
}

/* Estado activo del botón Aa */
body.high-contrast .footer-access[aria-expanded="true"] {
    background-color: #FFFF00 !important; /* Invertimos para indicar activo */
    color: #000000 !important;
}

/* --- REGLAS PARA MODO OSCURO (Dark Mode) --- */
body.dark-mode {
    background-color: #121212 !important; /* Gris muy oscuro, no negro puro */
    color: #E0E0E0 !important;            /* Blanco roto/gris claro para el texto */
}

/* Ajuste para el texto del bloque inferior que se veía gris */
body.dark-mode .site-footer p,
body.dark-mode .footer-privacy-statement p,
body.dark-mode .footer-license p,
body.dark-mode .footer-copy p {
    color: #E0E0E0 !important;            /* Forzamos el mismo gris claro legible */
    opacity: 1 !important;                /* Eliminamos transparencias */
}

/* Resalte del icono activo en Modo Oscuro */
body.dark-mode .btn-dark-mode-icon.active {
    color: #ffca28 !important;            /* Icono en amarillo suave/sol */
}
/* Reducción de brillo en imágenes para Modo Oscuro */
body.dark-mode img {
    filter: brightness(0.8) contrast(1.2); /* Menos deslumbramiento, más definición */
    transition: filter 0.3s ease;
}

body.dark-mode img:hover {
    filter: brightness(1); /* Recupera brillo al pasar el ratón */
}
/* =========================================================
   MEJORAS DE ACCESIBILIDAD Y LIMPIEZA FINAL (PASO A PASO)
   Añadido el 18-03-2026 para corregir Modos y Home
   ========================================================= */

/* 1. ALTO CONTRASTE: Forzado de Amarillo (#ff0) en links y Aa */
body.theme-contrast a, 
body.theme-contrast .site-nav a,
body.theme-contrast .footer-links a,
body.theme-contrast .access-btn,
body.theme-contrast .lang-link,
body.theme-contrast .contact-link {
    color: #ffff00 !important;
    text-decoration: underline !important;
    text-underline-offset: 0.15em;
}

/* Botón Aa del footer en amarillo para Alto Contraste */
body.theme-contrast .footer-access {
    color: #ffff00 !important;
    border: 2px solid #ffff00 !important;
    padding: 0 5px !important;
    border-radius: 4px !important;
    font-weight: bold;
}

/* 2. MODO OSCURO: Texto del bloque inferior blanco/claro (no gris) */
body.theme-dark .site-footer p,
body.theme-dark .footer-copy p,
body.theme-dark .footer-privacy-statement p,
body.theme-dark .footer-sub,
body.theme-dark .footer-license p {
    color: #E0E0E0 !important; /* Blanco roto técnico para evitar fatiga */
    opacity: 1 !important;    /* Eliminamos transparencias que lo hacían gris */
}

/* 3. ESTADOS ACTIVOS: El icono brilla cuando el modo está encendido */
/* Detectamos el botón por su función de activación */
body.theme-dark .access-controls button[onclick*="dark"] {
    color: #ffca28 !important; /* Brillo amarillo/luna cuando está activo */
}

body.theme-contrast .access-controls button[onclick*="contrast"] {
    color: #ffff00 !important; /* Brillo amarillo puro cuando está activo */
}

/* 4. HOME: Limpieza del mensaje "Lead" (Adiós a la franja) */
.lead-box {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 1.5rem 0 !important;
    margin: 0 !important;
    display: block !important;
    max-width: 1080px !important;
}

.lead.motion-copy {
    display: block !important;
    text-align: left !important; /* Alineado a la izquierda según tu preferencia */
    font-size: 1.8rem !important;
    line-height: 1.2 !important;
    background: none !important;
    color: #5f636f; /* Color original para modo claro */
}

/* Color del texto lead en modos especiales */
body.theme-dark .lead.motion-copy,
body.theme-contrast .lead.motion-copy {
    color: #ffffff !important;
}
/* =========================================================
   PARCHE DE ACCESIBILIDAD PREMIUM (V56)
   Añadido el 18-03-2026 para afinado de Modos y Visibilidad
   ========================================================= */

/* 1. ALTO CONTRASTE: Links y Botones en Amarillo Brillante (#FFFF00) */
body.theme-contrast a, 
body.theme-contrast .site-nav a,
body.theme-contrast .footer-links a,
body.theme-contrast .contact-link,
body.theme-contrast .access-btn,
body.theme-contrast .button,
body.high-contrast a,
body.high-contrast .button {
    color: #FFFF00 !important;
    text-decoration: underline !important;
    text-underline-offset: 0.18em;
    font-weight: 700 !important;
}

/* 2. ICONO ACTIVO: El botón del modo seleccionado brilla en Amarillo */
/* Detectamos el botón de Alto Contraste activo */
body.theme-contrast .access-controls button[onclick*="contrast"],
body.high-contrast .access-controls button[onclick*="contrast"] {
    color: #FFFF00 !important;
    background: rgba(255, 255, 0, 0.15) !important;
    border-radius: 6px;
    padding: 2px 6px !important;
}

/* Detectamos el botón de Modo Oscuro activo (Amarillo Sol/Luna) */
body.theme-dark .access-controls button[onclick*="dark"],
body.dark-mode .access-controls button[onclick*="dark"] {
    color: #ffca28 !important;
    background: rgba(255, 202, 40, 0.1) !important;
    border-radius: 6px;
    padding: 2px 6px !important;
}

/* 3. MODO OSCURO TÉCNICO: Gris Claro (#E0E0E0) para evitar fatiga visual */
body.theme-dark, 
body.theme-dark p, 
body.theme-dark li, 
body.theme-dark span,
body.dark-mode p,
body.dark-mode li {
    color: #E0E0E0 !important; /* Gris técnico recomendado */
}

/* Blindaje para títulos y bloques de texto específicos que se resistían */
body.theme-dark h1, body.theme-dark h2, body.theme-dark h3,
body.theme-dark .motion-copy,
body.theme-dark .footer-copy p,
body.theme-dark .cv-block p {
    color: #E0E0E0 !important;
}

/* 4. AJUSTE DE IMÁGENES: Reducción de brillo para no deslumbrar */
body.theme-dark img, 
body.dark-mode img {
    filter: brightness(0.75) contrast(1.1) !important; /* Menos brillo, más definición */
    transition: filter 0.4s ease;
}

/* Recupera el brillo al pasar el ratón para ver detalles */
body.theme-dark img:hover, 
body.dark-mode img:hover {
    filter: brightness(1) !important;
}

/* 5. EL BOTÓN Aa DEL FOOTER: También en Amarillo en Contraste */
body.theme-contrast .footer-access {
    color: #FFFF00 !important;
    border: 2px solid #FFFF00 !important;
    padding: 0 4px !important;
}
/* =========================================================
   REFINADO FINAL DE ACCESIBILIDAD (V57)
   - Forzado de Gris Técnico #E0E0E0 en Modo Oscuro.
   - Resalte intenso de iconos activos.
   - Reducción de brillo en imágenes.
   ========================================================= */

/* 1. MODO OSCURO: Gris Claro Técnico (#E0E0E0) para evitar fatiga */
/* Aplicamos a todas las etiquetas de texto para que nada se quede en blanco puro */
body.theme-dark, 
body.theme-dark h1, body.theme-dark h2, body.theme-dark h3, body.theme-dark h4,
body.theme-dark p, body.theme-dark li, body.theme-dark span, body.theme-dark a,
body.theme-dark .motion-copy, body.theme-dark .intro-copy, body.theme-dark .story-copy {
    color: #E0E0E0 !important;
}

/* 2. ICONO ACTIVO: Resalte con fondo para saber dónde hemos pulsado */
/* Para el botón de ALTO CONTRASTE activo (Fondo amarillo, texto negro) */
body.theme-contrast .access-controls button[onclick*="contrast"],
body.high-contrast .access-controls button[onclick*="contrast"] {
    background-color: #FFFF00 !important; /* Fondo amarillo sólido */
    color: #000000 !important;            /* Texto/icono negro para contraste */
    padding: 4px 10px !important;
    border-radius: 8px !important;
    font-weight: bold !important;
}

/* Para el botón de MODO OSCURO activo (Fondo dorado/luna, texto negro) */
body.theme-dark .access-controls button[onclick*="dark"],
body.dark-mode .access-controls button[onclick*="dark"] {
    background-color: #ffca28 !important; /* Fondo sol/luna sólido */
    color: #000000 !important;            /* Texto/icono negro */
    padding: 4px 10px !important;
    border-radius: 8px !important;
    font-weight: bold !important;
}

/* 3. IMÁGENES EN MODO OSCURO: Reducción de brillo (Fotofobia) */
body.theme-dark img, 
body.dark-mode img {
    filter: brightness(0.7) contrast(1.1) !important; /* 30% menos de brillo */
    transition: filter 0.3s ease;
}

/* Recuperar brillo solo al pasar el ratón para ver el detalle */
body.theme-dark img:hover, 
body.dark-mode img:hover {
    filter: brightness(1) !important;
}

/* 4. LINKS EN ALTO CONTRASTE: Aseguramos el amarillo en botones */
body.theme-contrast .button, 
body.theme-contrast .contact-link,
body.theme-contrast .site-nav a {
    color: #FFFF00 !important;
    border-color: #FFFF00 !important;
}
/* =========================================================
   CIRUGÍA DE ACCESIBILIDAD (V58) - SEPARACIÓN TOTAL
   ========================================================= */

/* --- BLOQUE 1: MODO OSCURO (Gris #E0E0E0 + Imágenes Suaves) --- */
body.theme-dark, body.dark-mode {
    background-color: #121212 !important; /* Gris técnico */
}

/* Forzado de Gris Claro para evitar fatiga en Modo Oscuro */
body.theme-dark h1, body.theme-dark h2, body.theme-dark h3, 
body.theme-dark p, body.theme-dark li, body.theme-dark span, 
body.theme-dark a, body.theme-dark .motion-copy {
    color: #E0E0E0 !important;
}

/* Reducción de brillo en imágenes solo para Modo Oscuro */
body.theme-dark img, body.dark-mode img {
    filter: brightness(0.7) !important;
    transition: filter 0.3s ease;
}
body.theme-dark img:hover { filter: brightness(1) !important; }

/* Icono Activo en Modo Oscuro (Fondo sólido dorado) */
body.theme-dark .access-controls button[onclick*="dark"] {
    background-color: #ffca28 !important; /* Color sol/luna */
    color: #000000 !important;
    padding: 4px 10px !important;
    border-radius: 6px !important;
    font-weight: bold !important;
}


/* --- BLOQUE 2: ALTO CONTRASTE (Texto Blanco + Links Amarillos) --- */
body.theme-contrast, body.high-contrast {
    background-color: #000000 !important; /* Negro puro */
}

/* Texto en Blanco Puro para máximo contraste */
body.theme-contrast h1, body.theme-contrast h2, body.theme-contrast h3, 
body.theme-contrast p, body.theme-contrast li, body.theme-contrast span {
    color: #FFFFFF !important;
}

/* Links en Amarillo Brillante */
body.theme-contrast a, body.high-contrast a,
body.theme-contrast .site-nav a, body.theme-contrast .footer-links a,
body.theme-contrast .access-btn, body.theme-contrast .contact-link {
    color: #FFFF00 !important;
    text-decoration: underline !important;
}

/* Las imágenes en Alto Contraste se mantienen normales */
body.theme-contrast img, body.high-contrast img {
    filter: none !important;
}

/* Icono Activo en Alto Contraste (Fondo sólido amarillo) */
body.theme-contrast .access-controls button[onclick*="contrast"],
body.high-contrast .access-controls button[onclick*="contrast"] {
    background-color: #FFFF00 !important; /* Amarillo sólido */
    color: #000000 !important;
    padding: 4px 10px !important;
    border-radius: 6px !important;
    font-weight: bold !important;
}

/* Botón Aa del footer en amarillo para este modo */
body.theme-contrast .footer-access {
    color: #FFFF00 !important;
    border: 2px solid #FFFF00 !important;
}
/* =========================================================
   AJUSTE QUIRÚRGICO V59: LOGOS, ICONOS Y ESTADO ACTIVO
   ========================================================= */

/* --- 1. LOGOS (Ajuste exacto del fondo en negativo) --- */

/* Modo Oscuro: Invert al 93% para igualar el fondo perfectamente */
body.theme-dark .entity-logo, 
body.dark-mode .entity-logo {
    filter: invert(93%) !important;
    opacity: 1 !important;
}
/* Congelamos el hover en 93% */
body.theme-dark .entity-logo:hover, 
body.dark-mode .entity-logo:hover {
    filter: invert(93%) !important;
}

/* Alto Contraste: Invert al 95% */
body.theme-contrast .entity-logo, 
body.high-contrast .entity-logo {
    filter: invert(95%) !important;
    opacity: 1 !important;
}
/* Congelamos el hover en 95% */
body.theme-contrast .entity-logo:hover, 
body.high-contrast .entity-logo:hover {
    filter: invert(95%) !important;
}


/* --- 2. ICONOS (aria-hidden) EN ALTO CONTRASTE --- */

/* Los iconos (SVGs o fuentes) deben ser amarillos si actúan como links o apoyos */
body.theme-contrast [aria-hidden="true"],
body.high-contrast [aria-hidden="true"],
body.theme-contrast svg,
body.high-contrast svg {
    color: #FFFF00 !important;
    fill: currentColor !important; /* Asegura que herede el amarillo si es SVG */
}


/* --- 3. ESTADO ACTIVO EN ALTO CONTRASTE (Verde Fosforito) --- */

/* Cuando el usuario "ya está" en esa sección (link .active) */
body.theme-contrast a.active, 
body.theme-contrast .site-nav a.active,
body.high-contrast a.active,
body.high-contrast .site-nav a.active {
    color: #39FF14 !important; /* Verde fosforito de alto contraste */
    text-decoration: underline !important;
    text-underline-offset: 0.15em !important;
    font-weight: 700 !important; /* Mantenemos el grosor de la navegación normal */
}

/* --- 4. PANEL DE ACCESIBILIDAD: HOVER Y ESTADOS ACTIVOS --- */
/* Mouse-over (Hover) */
.access-controls button:hover {
    background-color: rgba(128, 128, 128, 0.15) !important;
    border-radius: 6px !important;
}
/* Activo: Modo Oscuro (Letra negra, fondo dorado) */
body.theme-dark .access-controls button[onclick*="dark"] {
    background-color: #ffca28 !important;
    color: #000000 !important;
    border-radius: 6px !important;
    padding: 4px 8px !important;
    font-weight: bold !important;
}
/* Activo: Alto Contraste (Letra negra, fondo amarillo) */
body.theme-contrast .access-controls button[onclick*="contrast"] {
    background-color: #FFFF00 !important;
    color: #000000 !important;
    border-radius: 6px !important;
    padding: 4px 8px !important;
    font-weight: bold !important;
}
/* Activo: Agrandar Texto */
body.spacing-wide .access-controls button[onclick*="spacing"] {
    background-color: #333333 !important;
    color: #ffffff !important;
    border-radius: 6px !important;
    padding: 4px 8px !important;
}

/* --- 5. LIMPIEZA FINAL DE LA FRANJA "LEAD" --- */
.lead-box {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin: 1.5rem 0 !important;
    box-shadow: none !important;
}
.lead.motion-copy {
    background: none !important;
    text-align: left !important;
}

/* =========================================================
   LA ESTOCADA FINAL V66: LECTURA REAL DEL HTML (AHORA SÍ)
   ========================================================= */

/* 1. BOTÓN "Aa" (El de la cabecera) EN VERDE CUANDO EL PANEL ESTÁ ABIERTO */
/* Lee el aria-expanded="true" que me has enseñado en el HTML */
body.theme-contrast .access-btn[aria-expanded="true"],
body.high-contrast .access-btn[aria-expanded="true"] {
    color: #39FF14 !important; /* Aa en verde fosforito */
    font-weight: 700 !important;
}

/* 2. BOTÓN "ALTO CONTRASTE" EN EL PANEL (Texto en verde) */
/* Usamos el data-toggle="contrast" real de tu HTML */
body.theme-contrast button[data-toggle="contrast"],
body.high-contrast button[data-toggle="contrast"] {
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

/* Apuntamos al segundo span (el que dice "Alto contraste") */
body.theme-contrast button[data-toggle="contrast"] span:last-child,
body.high-contrast button[data-toggle="contrast"] span:last-child {
    color: #39FF14 !important; /* Texto en verde fosforito */
    font-weight: 700 !important;
    text-decoration: underline !important;
    text-underline-offset: 0.15em !important;
}

/* 3. EL ICONO "◐" SE QUEDA EN AMARILLO */
/* Apuntamos al primer span que lleva el aria-hidden="true" */
body.theme-contrast button[data-toggle="contrast"] span[aria-hidden="true"],
body.high-contrast button[data-toggle="contrast"] span[aria-hidden="true"] {
    color: #FFFF00 !important; /* Icono en amarillo brillante */
    text-decoration: none !important; /* Sin subrayado */
}
/* =========================================================
   LA ESTOCADA FINAL V67 (MEJORADA): MODO OSCURO ACTIVO (#8f8888)
   ========================================================= */

/* 1. EL BOTÓN "MODO OSCURO" EN EL PANEL (Quitamos fondos) */
body.theme-dark button[data-toggle*="dark"],
body.dark-mode button[data-toggle*="dark"] {
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

/* 2. EL TEXTO "Modo oscuro" EN COLOR #8f8888 Y GROSOR NORMAL (400) */
body.theme-dark button[data-toggle*="dark"] span:last-child,
body.dark-mode button[data-toggle*="dark"] span:last-child {
    color: #8f8888 !important; /* Tu gris específico */
    font-weight: 400 !important; /* Grosor normal para que no salte de línea */
    text-decoration: underline !important;
    text-underline-offset: 0.15em !important;
}

/* 3. EL ICONO (Luna) TAMBIÉN EN #8f8888 */
body.theme-dark button[data-toggle*="dark"] span[aria-hidden="true"],
body.theme-dark button[data-toggle*="dark"] svg,
body.dark-mode button[data-toggle*="dark"] span[aria-hidden="true"],
body.dark-mode button[data-toggle*="dark"] svg {
    color: #8f8888 !important;
    fill: #8f8888 !important;
    text-decoration: none !important;
}

/* 4. PARCHE ALTO CONTRASTE: EL BOTÓN DE MODO OSCURO DEBE SER BLANCO */
/* Si estamos en Alto Contraste, el botón de "Modo oscuro" no puede ser negro/invisible */
body.theme-contrast button[data-toggle*="dark"] span,
body.theme-contrast button[data-toggle*="dark"] svg,
body.high-contrast button[data-toggle*="dark"] span,
body.high-contrast button[data-toggle*="dark"] svg {
    color: #FFFFFF !important; /* Texto e icono en blanco puro */
    fill: #FFFFFF !important;
    font-weight: 400 !important; /* Grosor normal */
}
/* Busca este bloque en la Sección 13A y reemplázalo */
.cv-grid--intro {
  display: grid;
  /* Cambiamos el minmax(320px) por algo más flexible */
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.8fr);
  grid-template-areas:
    "intro photo"
    "support support";
  align-items: start;
  gap: 1.1rem 2.25rem;
}
/* Busca la Sección 17 y actualiza este bloque de rejillas */
@media (max-width: 1100px) {
  /* ... tus variables de root ... */

  .hero-grid,
  .split-head,
  .cv-grid,
  .cv-grid--intro, /* Asegúrate de que esta clase esté aquí */
  .story-grid,
  .footer-main {
    grid-template-columns: 1fr !important;
  }

  /* ORDEN QUIRÚRGICO PARA AC: Texto > Foto > Soporte */
  .cv-grid--intro {
    grid-template-areas: 
      "intro"
      "photo"
      "support" !important;
    gap: 2.5rem !important;
  }

  /* Ajuste visual de la foto para que no "vuele" */
  .cv-photo-card--intro {
    margin-top: 0 !important;
    max-width: 520px; /* Tamaño elegante para iPad */
    width: 100%;
  }

  /* Ajuste de márgenes del texto */
  .cv-intro-copy--compact {
    max-width: 100% !important;
  }
}
/* =========================================================
   V97: MARQUESINA HOME - BLINDAJE HORIZONTAL
   Fuerza la fila india infinita y evita que los logos se apilen.
   ========================================================= */

.logo-marquee {
    width: 100% !important;
    overflow: hidden !important; /* Esconde lo que sobra por los lados */
    position: relative;
}

.logo-track {
    display: flex !important;
    flex-direction: row !important; /* FORZAMOS QUE SEA HORIZONTAL */
    flex-wrap: nowrap !important;   /* PROHIBIDO SALTAR DE LÍNEA */
    width: max-content !important;  /* La pista debe ser larguísima */
    align-items: center !important;
    /* La animación original (puedes ajustar los 35s si va muy rápido/lento) */
    animation: marquee 35s linear infinite !important; 
}

.logo-track span {
    flex: 0 0 auto !important;   /* Evita que se encojan o se aplasten */
    min-width: 220px !important; /* Ancho fijo para cada bloque */
    height: 90px !important;
    padding: 0 1.5rem !important;
    background: transparent !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.logo-track span img {
    max-width: 140px !important;  /* Tamaño intermedio que querías */
    max-height: 60px !important;  /* Límite para que nunca se corten */
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    filter: grayscale(100%);
    transition: filter 0.3s ease;
}

.logo-track span img:hover {
    filter: grayscale(0%);
}

/* Ocultamos los textos residuales */
.logo-track span strong,
.logo-track span small,
.logo-track span p {
    display: none !important;
}

/* Aseguramos que la animación exista por si se borró */
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.teklab-media-panel--video{
  padding:0;
  overflow:hidden;
  border-radius:18px;
  aspect-ratio:16/9;
}

.teklab-video{
  display:block;
  width:100%;
  height:100%;
  object-fit:cover;
  border-radius:18px;
}
.service-label {
    margin: 0 0 0rem;
    font-size: 2rem;
    font-weight: 400;
    color: var(--muted);
    line-height: 1em;

}

/* =========================================================
   20. HOME · VÍDEO HERO ACCESIBLE · V55
   Soporte para vídeo de portada con poster, loop en silencio
   y fallback estático cuando se reduce movimiento.
   ========================================================= */
.home-video-shell{
  position: relative;
  overflow: hidden;
  background: #000;
}

.home-video,
.home-video-fallback{
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.home-video-fallback{
  display: none;
}

body.reduce-motion .home-video{
  display: none !important;
}

body.reduce-motion .home-video-fallback{
  display: block !important;
}

@media (prefers-reduced-motion: reduce){
  .home-video{
    display: none !important;
  }

  .home-video-fallback{
    display: block !important;
  }
}

/* ENTIDADES · ajuste final logos + nombre · 10/04/2026 */

.entities-page .entity-card {
  text-align: center !important;
  align-items: center !important;
}

.entities-page .entity-logo-shell {
  min-height: 7.2rem !important;
  height: 7.2rem !important;
  display: flex !important;
  align-items: flex-end !important;
  justify-content: center !important;
  margin-bottom: 0.35rem !important;
}

.entities-page .entity-logo {
  display: block !important;
  max-width: min(100%, 14.5rem) !important;
  max-height: 6rem !important;
  width: auto !important;
  object-fit: contain !important;
  object-position: center bottom !important;
}

.entities-page .entity-card h3,
.entities-page .entity-card .entity-name {
  margin: -6px auto 0.3rem auto !important;
  font-size: 0.8rem !important;
  font-weight: 600 !important;
  line-height: 1.14 !important;
  color: #616161 !important;
  text-align: center !important;
  max-width: 15ch !important;
}

.entities-page .entity-card p,
.entities-page .entity-card .entity-desc {
  margin: 0 auto !important;
  max-width: 11.6ch !important;
  font-size: 0.74rem !important;
  line-height: 1.25 !important;
  min-height: calc(1.25em * 2) !important;
  max-height: calc(1.25em * 2) !important;
  text-align: center !important;
}

/* FOOTER FINAL LIMPIO · 10/04/2026 */
/* FOOTER FINAL LIMPIO · ACARRERA + TEKLAB */

.footer-main {
  display: flex !important;
  justify-content: space-between !important;
  align-items: flex-start !important;
  gap: 2rem !important;
}

.footer-brand-stack {
  display: flex !important;
  flex-direction: column !important;
  gap: 1.2rem !important;
  flex: 1 1 auto !important;
  min-width: 0 !important;
}

/* MISMA COLUMNA DE CONTENIDO PARA ACARRERA Y TEKLAB */
.footer-brand-row,
.footer-brand-row-teklab {
  display: grid !important;
  grid-template-columns: 130px minmax(0, 1fr) !important;
  gap: 1.1rem !important;
  align-items: start !important;
}

/* COLUMNA IZQUIERDA */
.footer-brand,
.footer-brand-teklab {
  display: flex !important;
  align-items: flex-start !important;
  justify-content: flex-start !important;
  width: 130px !important;
  min-width: 130px !important;
  max-width: 130px !important;
}

/* LOGO ACARRERA */
.footer-brand .brand-logo,
.footer-brand .brand-logo-light,
.footer-brand .brand-logo-dark {
  display: block !important;
  width: 120px !important;
  height: auto !important;
  max-width: none !important;
}

.footer-brand .brand-logo-dark {
  display: none !important;
}

/* LOGO TEKLAB */
.footer-brand-teklab .teklab-logo,
.footer-brand-teklab .teklab-logo-light,
.footer-brand-teklab .teklab-logo-dark,
.footer-brand-teklab img {
  display: block !important;
  width: 90px !important;
  height: auto !important;
  max-width: none !important;
  min-width: 0 !important;
}

.teklab-logo-dark {
  display: none !important;
}

/* VISIBILIDAD CORRECTA NORMAL / DARK / CONTRAST */
body:not(.theme-dark):not(.theme-contrast) .teklab-logo-light {
  display: block !important;
}

body:not(.theme-dark):not(.theme-contrast) .teklab-logo-dark {
  display: none !important;
}

body.theme-dark .teklab-logo-light,
body.theme-contrast .teklab-logo-light {
  display: none !important;
}

body.theme-dark .teklab-logo-dark,
body.theme-contrast .teklab-logo-dark {
  display: block !important;
}

.theme-dark .footer-brand .brand-logo-light,
.theme-contrast .footer-brand .brand-logo-light {
  display: none !important;
}

.theme-dark .footer-brand .brand-logo-dark,
.theme-contrast .footer-brand .brand-logo-dark {
  display: block !important;
}

/* TEXTO */
.footer-copy {
  min-width: 0 !important;
  margin: 0 !important;
}

.footer-copy .footer-title,
.footer-copy .footer-sub {
  margin-left: 0 !important;
}

.footer-brand-row-teklab .footer-copy,
.footer-brand-row-teklab .footer-title,
.footer-brand-row-teklab .footer-sub {
  padding-top: 0 !important;
  margin-top: 0 !important;
}

/* HERRAMIENTAS */
.footer-tools {
  flex: 0 0 auto !important;
}

/* TABLET */
@media (max-width: 980px) {
  .footer-main {
    flex-direction: column !important;
    gap: 1.6rem !important;
  }

  .footer-tools {
    align-self: flex-start !important;
  }

  .footer-brand-row,
  .footer-brand-row-teklab {
    grid-template-columns: 130px minmax(0, 1fr) !important;
  }

  .footer-brand,
  .footer-brand-teklab {
    width: 130px !important;
    min-width: 130px !important;
    max-width: 130px !important;
  }

  .footer-brand .brand-logo,
  .footer-brand .brand-logo-light,
  .footer-brand .brand-logo-dark {
    width: 120px !important;
  }

  .footer-brand-teklab .teklab-logo,
  .footer-brand-teklab .teklab-logo-light,
  .footer-brand-teklab .teklab-logo-dark,
  .footer-brand-teklab img {
    width: 118px !important;
  }
}

/* MÓVIL HORIZONTAL */
@media (max-width: 932px) and (orientation: landscape) {
  .footer-brand-row,
  .footer-brand-row-teklab {
    grid-template-columns: 1fr !important;
    gap: 0.55rem !important;
  }

  .footer-brand,
  .footer-brand-teklab {
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
  }

  .footer-brand .brand-logo,
  .footer-brand .brand-logo-light,
  .footer-brand .brand-logo-dark {
    width: 120px !important;
  }

  .footer-brand-teklab .teklab-logo,
  .footer-brand-teklab .teklab-logo-light,
  .footer-brand-teklab .teklab-logo-dark,
  .footer-brand-teklab img {
    width: 112px !important;
  }

  .footer-copy,
  .footer-brand-row .footer-copy,
  .footer-brand-row-teklab .footer-copy {
    padding-top: 0 !important;
    margin-top: 0 !important;
  }
}

/* MÓVIL VERTICAL */
@media (max-width: 640px) {
  .footer-brand-row,
  .footer-brand-row-teklab {
    grid-template-columns: 1fr !important;
    gap: 0.55rem !important;
  }

  .footer-brand,
  .footer-brand-teklab {
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
  }

  .footer-brand .brand-logo,
  .footer-brand .brand-logo-light,
  .footer-brand .brand-logo-dark {
    width: 120px !important;
  }

  .footer-brand-teklab .teklab-logo,
  .footer-brand-teklab .teklab-logo-light,
  .footer-brand-teklab .teklab-logo-dark,
  .footer-brand-teklab img {
    width: 112px !important;
  }

  .footer-copy,
  .footer-brand-row .footer-copy,
  .footer-brand-row-teklab .footer-copy {
    padding-top: 0 !important;
    margin-top: 0 !important;
  }
}

/* =========================================================
   21. ACCESIBILIDAD · GUÍA DE LECTURA / LEER ENFOQUE / TECLADO
   ========================================================= */
.access-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1rem;
  line-height: 1;
}

.access-icon--keyboard {
  width: 1.18rem;
  height: 1.18rem;
}

.access-icon-asset {
  display: block;
  width: 100%;
  height: 100%;
}

body.theme-dark .access-icon-asset--keyboard {
  filter: invert(1) brightness(1.12);
}

body.theme-contrast .access-icon-asset--keyboard {
  filter: brightness(0) saturate(100%) invert(91%) sepia(78%) saturate(1129%) hue-rotate(359deg) brightness(108%) contrast(108%);
}

.reading-guide-line {
  position: fixed;
  left: 0;
  width: 100%;
  height: 2.1rem;
  pointer-events: none;
  z-index: 95;
  opacity: 0;
  transform: translateY(-9999px);
  transition: opacity 0.18s ease;
}

.reading-guide-line::before,
.reading-guide-line::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
}

.reading-guide-line::before {
  top: 50%;
  height: 4px;
  transform: translateY(-50%);
  background: rgba(17, 17, 20, 0.82);
}

.reading-guide-line::after {
  inset: 0;
  background: rgba(17, 17, 20, 0.12);
}

body.a11y-guide-line .reading-guide-line {
  opacity: 1;
}

body.theme-dark .reading-guide-line::before {
  background: rgba(255, 255, 255, 0.92);
}

body.theme-dark .reading-guide-line::after {
  background: rgba(255, 255, 255, 0.14);
}

body.theme-contrast .reading-guide-line::before {
  background: #ffff00;
}

body.theme-contrast .reading-guide-line::after {
  background: rgba(255, 255, 0, 0.18);
}

body.a11y-read-focus main {
  isolation: isolate;
}

body.a11y-read-focus main::before {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(17, 17, 20, 0.16);
  pointer-events: none;
  z-index: 110;
}

body.theme-dark.a11y-read-focus main::before {
  background: rgba(0, 0, 0, 0.28);
}

body.theme-contrast.a11y-read-focus main::before {
  background: rgba(0, 0, 0, 0.36);
}

body.a11y-read-focus .read-focus-active {
  position: relative;
  z-index: 111;
  background: color-mix(in srgb, var(--panel) 92%, #fff 8%);
  box-shadow: 0 0 0 0.32rem color-mix(in srgb, var(--panel) 78%, transparent), 0 0 0 200vmax rgba(17, 17, 20, 0.16);
  border-radius: 0.45rem;
  transition: background-color 0.16s ease, box-shadow 0.16s ease;
}

body.theme-dark.a11y-read-focus .read-focus-active {
  background: color-mix(in srgb, var(--panel) 88%, #fff 12%);
  box-shadow: 0 0 0 0.32rem rgba(19, 19, 24, 0.94), 0 0 0 200vmax rgba(0, 0, 0, 0.28);
}

body.theme-contrast.a11y-read-focus .read-focus-active {
  background: #000;
  box-shadow: 0 0 0 0.28rem #ffff00, 0 0 0 200vmax rgba(0, 0, 0, 0.36);
}

body.a11y-read-focus h1.read-focus-active,
body.a11y-read-focus h2.read-focus-active,
body.a11y-read-focus h3.read-focus-active,
body.a11y-read-focus h4.read-focus-active,
body.a11y-read-focus p.read-focus-active,
body.a11y-read-focus li.read-focus-active,
body.a11y-read-focus .intro-copy.read-focus-active,
body.a11y-read-focus .story-copy.read-focus-active,
body.a11y-read-focus .motion-copy.read-focus-active,
body.a11y-read-focus .lead.read-focus-active,
body.a11y-read-focus .service-label.read-focus-active,
body.a11y-read-focus .service-desc.read-focus-active {
  padding: 0.18rem 0.3rem;
}

body.a11y-read-focus .service-card.read-focus-active,
body.a11y-read-focus .cv-block.read-focus-active,
body.a11y-read-focus .entity-card.read-focus-active,
body.a11y-read-focus .contact-line.read-focus-active,
body.a11y-read-focus .home-contact-card.read-focus-active,
body.a11y-read-focus .story-card.read-focus-active,
body.a11y-read-focus .adn-card.read-focus-active,
body.a11y-read-focus .teklab-card.read-focus-active,
body.a11y-read-focus .entities-item-summary.read-focus-active {
  padding: 0.35rem;
}

body.a11y-keyboard-nav a:focus-visible,
body.a11y-keyboard-nav button:focus-visible,
body.a11y-keyboard-nav summary:focus-visible,
body.a11y-keyboard-nav input:focus-visible,
body.a11y-keyboard-nav select:focus-visible,
body.a11y-keyboard-nav textarea:focus-visible {
  outline: 3px solid var(--accent) !important;
  outline-offset: 4px !important;
  box-shadow: 0 0 0 6px rgba(17, 17, 20, 0.12);
  border-radius: 0.45rem;
}

body.theme-dark.a11y-keyboard-nav a:focus-visible,
body.theme-dark.a11y-keyboard-nav button:focus-visible,
body.theme-dark.a11y-keyboard-nav summary:focus-visible,
body.theme-dark.a11y-keyboard-nav input:focus-visible,
body.theme-dark.a11y-keyboard-nav select:focus-visible,
body.theme-dark.a11y-keyboard-nav textarea:focus-visible {
  box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.12);
}

body.theme-contrast.a11y-keyboard-nav a:focus-visible,
body.theme-contrast.a11y-keyboard-nav button:focus-visible,
body.theme-contrast.a11y-keyboard-nav summary:focus-visible,
body.theme-contrast.a11y-keyboard-nav input:focus-visible,
body.theme-contrast.a11y-keyboard-nav select:focus-visible,
body.theme-contrast.a11y-keyboard-nav textarea:focus-visible {
  outline-color: #ffff00 !important;
  box-shadow: 0 0 0 6px rgba(255, 255, 0, 0.18);
}

.access-controls button[aria-pressed="true"] {
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.footer-meta-links-accessibility {
  padding-top: 0.35rem;
  padding-bottom: 0.65rem;
}

.footer-links-accessibility {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2.2rem;
  min-height: 92px;
}

.footer-links-accessibility > a {
  display: inline-flex;
  align-items: center;
}

.footer-accessibility-badges {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  margin-left: 0.4rem;
}

.footer-accessibility-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  line-height: 0;
  flex: 0 0 auto;
}

.footer-accessibility-link-ac,
.footer-accessibility-link-sia {
  min-height: 72px;
}

.footer-accessibility-icon {
  height: auto;
}

.footer-accessibility-icon-light {
  display: block;
}

.footer-accessibility-icon-dark {
  display: none;
}

.footer-accessibility-icon-ac {
  width: 84px;
}

.footer-accessibility-icon-sia {
  width: 68px;
}

/* modo oscuro / alto contraste */
body.theme-dark .footer-accessibility-icon-light,
body.theme-contrast .footer-accessibility-icon-light {
  display: none;
}

body.theme-dark .footer-accessibility-icon-dark,
body.theme-contrast .footer-accessibility-icon-dark {
  display: block;
}

@media (max-width: 767px) {
  .footer-links-accessibility {
    gap: 1.25rem;
    min-height: auto;
    align-items: flex-start;
  }

  .footer-accessibility-badges {
    gap: 0.8rem;
    margin-left: 0;
  }

  .footer-accessibility-icon-ac {
    width: 72px;
  }

  .footer-accessibility-icon-sia {
    width: 58px;
  }
}
/* teclado */
::.a11y-kbd-tip {
  position: fixed;
  top: calc(var(--header-h) + 0.9rem);
  right: max(1rem, 4vw);
  z-index: 120;
  max-width: 320px;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: 0.9rem;
  background: color-mix(in srgb, var(--panel) 94%, var(--bg));
  color: var(--text);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.14);
  font-size: 0.92rem;
  line-height: 1.45;
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.a11y-kbd-tip.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.a11y-kbd-tip strong {
  color: var(--text);
  font-weight: 700;
}

.a11y-kbd-tip kbd {
  display: inline-block;
  padding: 0.08rem 0.4rem;
  margin: 0 0.08rem;
  border: 1px solid var(--border);
  border-radius: 0.35rem;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 0.86rem;
  line-height: 1.2;
}

body.theme-dark .a11y-kbd-tip,
body.theme-contrast .a11y-kbd-tip {
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

body.theme-contrast .a11y-kbd-tip kbd {
  border-color: #ffff00;
  color: #ffff00;
  background: #000;
}

@media (max-width: 760px) {
  .a11y-kbd-tip {
    left: 0.9rem;
    right: 0.9rem;
    max-width: none;
    font-size: 0.9rem;
  }
}

.access-panel {
  position: fixed;
}

.access-panel-inner {
  position: relative;
}

.access-panel-close {
  position: absolute;
  top: auto;
  right: 0;
  bottom: 0.15rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.3rem;
  height: 2.3rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 1.9rem;
  line-height: 1;
  cursor: pointer;
  border-radius: 0.5rem;
}

.access-panel-close:hover,
.access-panel-close:focus-visible {
  background: color-mix(in srgb, var(--panel) 82%, var(--border));
  outline: none;
}

body.theme-contrast .access-panel-close {
  color: #ffff00;
}

@media (max-width: 760px) {
  .access-panel-close {
    top: auto;
    right: 0;
    bottom: 0.1rem;
    width: 2.1rem;
    height: 2.1rem;
    font-size: 1.7rem;
  }
}