/* ===== Reset y base ===== */
html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}
html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* Modelo de caja más predecible en toda la web */
*, *::before, *::after {
  box-sizing: border-box;
}

/* Wrapper para layout pegajoso: header / main / footer */
body {
  font-family: "Courier New", monospace;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background-color: #f0f0f0;
}

/* ===== Header (base escritorio) ===== */
header {
  background-color: rgba(42, 42, 42, 0.5);
  color: #fff;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
@supports (backdrop-filter: blur(4px)) {
  header { background-color: rgba(20, 20, 20, 0.7); }
}

.contenedor-header {
  min-height: clamp(90px, 8vw, 115px);
  display: grid;
  grid-template-columns: auto 1fr auto; /* logo | nav | buscador */
  align-items: center;
  gap: 1rem;
  margin: 0 auto;
  padding: 0.6rem 2rem;
  width: 100%;
  max-width: 1200px;
  box-sizing: border-box;
}

.logo { display: grid; align-items: center; }

/* Logo sin CLS: respeta proporciones */
.logo img {
  max-height: clamp(48px, 8vw, 108px);
  height: auto;
  width: auto;
  display: block;
}

nav { display: flex; justify-content: center; }
nav ul {
  list-style: none;
  display: flex;
  gap: 1.25rem;
  margin: 0;
  padding: 0;
}
nav ul li a {
  color: #ffffff;
  text-decoration: none;
  font-weight: 700;
  font-size: clamp(1rem, 0.8rem + 0.7vw, 1.5rem);
  line-height: 1.2;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}
nav ul li a:hover,
nav ul li a:focus-visible {
  text-decoration: underline;
  outline: none;
}

/* ===== Buscador con borde único ===== */
.buscador form {
  display: flex;
  align-items: stretch;

  /* Borde único que envuelve input + botón */
  border: 1px solid #555;
  border-radius: 6px;
  background: #fff;

  /* Evita que el resplandor sobresalga de las esquinas redondeadas */
  overflow: hidden;

  /* Suavidad del foco */
  transition: box-shadow .15s ease, border-color .15s ease;
}

.buscador input[type="search"] {
  /* Quitar el borde propio del input */
  border: none;
  outline: none;

  /* Estilos adaptados */
  padding: 0.5em 0.75em;
  font-size: 1rem;
  background: transparent; /* para que herede el fondo del form */
  color: #111;
  /* Que el input se expanda */
  flex: 1;
  min-width: 0; /* evita overflow en layouts estrechos */
}

.buscador button {
  /* Quitar bordes del botón (borde lo pone el form) */
  border: none;

  /* Estilos adaptados */
  padding: 0.5em 0.9em;
  font-size: 1rem;
  background-color: #444;
  color: #fff;
  cursor: pointer;
  transition: background-color 0.2s ease;

  /* Separador fino opcional entre input y botón */
  box-shadow: -1px 0 0 rgba(0, 0, 0, .15) inset;
}

/* Hover/focus del botón como tenías */
.buscador button:hover,
.buscador button:focus-visible {
  background-color: #666;
}

/* Foco envolvente aplicado al contenedor cuando input o botón tienen foco */
.buscador form:focus-within {
  border-color: #f2c200; /* ajusta a tu amarillo corporativo si quieres */
  box-shadow: 0 0 0 3px rgba(242, 194, 0, .35);
}

/* Pista de foco en el botón al navegar con teclado (sin romper el marco global) */
.buscador button:focus-visible {
  outline: 2px solid #f2c200;
  outline-offset: 2px;
}

/* Utilidad para .sr-only (si no la tienes ya) */
.sr-only {
  position: absolute !important;
  width: 1px; 
  height: 1px;
  padding: 0; 
  margin: -1px;
  overflow: hidden; 
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ===== Contenido principal ===== */
main {
  flex: 1;
  padding: 2rem;
  background: transparent;
}

main h1 { font-size: clamp(1.6rem, 1.2rem + 1.5vw, 2.2rem); margin-bottom: 1rem; }
main p  { font-size: clamp(1.1rem, 0.95rem + 0.8vw, 1.5rem); line-height: 1.5; }

@media (max-width: 600px) {
  main { padding-inline: 1rem; }
  main p { font-size: 1.15rem; }
}

/* Fondo solo para la home */
body.inicio {
  background-image: url('../img/fondo.jpg');
  background-size: cover;
  background-position: center 50px;
  background-repeat: no-repeat;
  background-attachment: scroll;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  margin-bottom: 0 !important;
}
@media (min-width: 1025px) {
  body.inicio { background-attachment: fixed; }
}

/* ===== Pie de página ===== */
footer {
  background-color: #333;
  color: #fff;
  text-align: center;
  padding: 0.75rem 0;
  font-size: clamp(1rem, 0.9rem + 0.5vw, 1.2rem);
  font-weight: 600;
}

/* ===== Galería ===== */
body.galeria main { padding: 2rem; }
.grid-fotos {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  justify-items: center;
}
.grid-fotos a { display: block; width: 100%; max-width: 300px; }
.grid-fotos img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  transition: transform 0.2s ease;
  /* Mantener proporción original */
  aspect-ratio: auto;
  object-fit: contain;
}
/* Hover sólo con puntero */
@media (hover: hover) and (pointer: fine) {
  .grid-fotos img:hover { transform: scale(1.03); }
}

/* ===== Lightbox ===== */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  z-index: 9999;
  padding: 1rem;
}
.lightbox-contenido {
  position: relative;
  display: inline-block;
  text-align: center;
}
/* Imagen adaptada a pantalla */
.lightbox-contenido img {
  max-width: 100vw;
  max-height: 100dvh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
  position: relative;
}
/* Botón de cierre */
.cerrar-lightbox {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: #fff;
  color: #111;
  border: none;
  font-size: clamp(1.1rem, 0.9rem + 1vw, 1.25rem);
  padding: 0.5rem;
  border-radius: 50%;
  min-width: 44px;
  min-height: 44px;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  z-index: 10;
}
.cerrar-lightbox:focus-visible {
  outline: 3px solid #ffcc00;
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 0.5rem;
  top: -40px;
  background: #000;
  color: #fff;
  padding: 8px 12px;
  z-index: 1000;
  border-radius: 4px;
}
.skip-link:focus { top: 8px; }

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* Foco visible global */
:focus-visible {
  outline: 2px solid #ffcc00;
  outline-offset: 2px;
}

/* Rendimiento: omitir render fuera del viewport */
.grid-fotos > a {
  content-visibility: auto;
  contain-intrinsic-size: 300px 200px;
}

/* ===========================================================
   Página: VIDEObook
   Diseño coherente con tu galería y estilos globales
=========================================================== */

/* Ajuste del main para esta página */
body.videobook main {
  padding: 2rem;
}

/* -----------------------------------------------------------
   VIDEOBOOK PRINCIPAL (lazy embed con poster)
----------------------------------------------------------- */

.videobook-actualizado h2 {
  font-size: clamp(1.35rem, 1rem + 1.2vw, 1.7rem);
  margin-bottom: 1rem;
}

/* Contenedor del vídeo antes de hacer clic */
.video-lazy {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background-size: cover;
  background-position: center;
  border-radius: 12px;
  cursor: pointer;
  overflow: hidden;
  box-shadow: 0 3px 10px rgba(0,0,0,0.12);
  transition: transform .25s ease, box-shadow .25s ease;
  content-visibility: auto;
}

/* Reducir tamaño del videobook principal */
.videobook-actualizado .video-lazy {
  max-width: 750px;   /* ← AJUSTA AQUÍ EL TAMAÑO */
  margin-inline: auto;
  width: 100%;        /* mantiene responsividad */
}

@media (hover: hover) and (pointer: fine) {
  .video-lazy:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.18);
  }
}

/* Botón de reproducción */
.video-play {
  position: absolute;
  z-index: 5;
  inset: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.35);
  color: #fff;
  font-size: clamp(2.2rem, 6vw, 3.8rem);
  font-weight: bold;
  border: none;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.2s ease;
}

.video-play:hover,
.video-play:focus-visible {
  background: rgba(0,0,0,0.55);
  outline: none;
}

/* El iframe se incrusta aquí al hacer clic (JS) */
.video-lazy iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* -----------------------------------------------------------
   ESCENAS SECUNDARIAS (miniaturas)
----------------------------------------------------------- */

.videos-secundarios h2 {
  font-size: clamp(1.35rem, 1rem + 1.2vw, 1.7rem);
  margin-bottom: 1rem;
}

/* Reutilizamos tu .grid-fotos pero adaptado a vídeos */
.grid-fotos.videos-grid a.video-thumb {
  display: block;
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: 12px;
  background-color: #ddd;
  background-size: cover;
  background-position: center;
  overflow: hidden;
  position: relative;
  box-shadow: 0 3px 10px rgba(0,0,0,0.12);
  transition: transform .25s ease, box-shadow .25s ease;
}

/* Miniatura por defecto si no pones poster */
.video-thumb::before {
  content: attr(data-title);
  position: absolute;
  inset: auto 0 0 0;
  padding: 0.5rem 0.75rem;
  background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  opacity: 1;
}

/* Hover solo en dispositivos con puntero */
@media (hover: hover) and (pointer: fine) {
  .video-thumb:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.18);
  }
}

/* -----------------------------------------------------------
   MODAL PARA VIDEOS (VIMEO)
----------------------------------------------------------- */
.modal {
  position: fixed;      /* — importante */
  inset: 0;             /* — ocupa toda la ventana */
  display: none;        /* — oculto por defecto */
  align-items: center;
  justify-content: center;
  padding: 2rem;
  box-sizing: border-box;
  z-index: 99999;       /* — por encima del resto */
}

.modal.active {
  display: flex;   /* ← Se activa solo cuando toca */
}

/* Capa oscura */
.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.85);
  cursor: pointer; /* opcional si vas a cerrar al pinchar fuera */
}

.modal-content {
  position: relative;
  max-width: 900px;
  width: 90%;
  border-radius: 12px;
  overflow: visible; /* imprescindible para que la X sobresalga */
}

/* Botón X fuera del vídeo */
.modal-close {
  position: absolute;
  top: -20px;     /* la deja fuera del vídeo */
  right: -20px;
  background: #fff;
  color: #111;
  border: none;
  font-size: 1.4rem;
  padding: 0.4rem;
  border-radius: 50%;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.35);
  z-index: 9999;
}

.modal-close:focus-visible {
  outline: 3px solid #ffcc00;
  outline-offset: 3px;
}

/* Contenedor del iframe */
.modal-iframe-container {
  width: 100%;
  max-width: 900px; /* igual que tu videobook principal */
  margin: 0 auto;
  aspect-ratio: 16 / 9;
  background: #000;
  position: relative;
}

.modal-iframe-container iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* -----------------------------------------------------------
   DARK MODE COMPATIBLE
----------------------------------------------------------- */
body.dark .video-lazy,
body.dark .video-thumb {
  box-shadow: 0 3px 10px rgba(255,255,255,0.05);
}

body.dark .video-play {
  background: rgba(0,0,0,0.4);
}

body.dark .modal-content {
  background: #000;
}

/* Centrar títulos en la página Videobook */
body.videobook h1,
body.videobook h2 {
  text-align: center;
}

/* Introducción SEO Videobook */
.intro-videobook {
  max-width: 900px;
  margin: 0 auto 2rem;
  text-align: center;
  line-height: 1.6;
  font-size: clamp(1rem, 0.95rem + 0.4vw, 1.15rem);
}

/* ==== Resultados de búsqueda ==== */
.info-busqueda {
  margin-bottom: 1rem;
  color: #444;
}

.lista-resultados {
  display: grid;
  gap: 1rem;
}

.resultado {
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  padding: 1rem;
  background: #fff;
  transition: box-shadow .2s ease;
}

.resultado:hover {
  box-shadow: 0 4px 14px rgba(0,0,0,.08);
}

.resultado__titulo {
  margin: 0 0 .5rem;
  font-size: clamp(1.1rem, 0.95rem + 0.6vw, 1.25rem);
}

.resultado__titulo a {
  text-decoration: none;
  color: #111;
}

.resultado__titulo a:hover {
  text-decoration: underline;
}

.resultado__url {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  color: #2a7a2a;
  font-size: 1rem;
  margin: 0 0 .5rem;
}

.resultado__extracto {
  color: #333;
  line-height: 1.6;
  margin: 0;
}

mark {
  background: #fff59d;
  padding: 0 .15em;
  border-radius: .2em;
}

/* Sugerencias */
.sugerencias {
  margin-top: 2rem;
  border-top: 1px dashed #ddd;
  padding-top: 1rem;
}

/* ==========================================================
   CLAQUETA OSCURA + FONDO DEGRADADO Y TIPOGRAFÍA LEGIBLE
========================================================== */

.film-card.clapper {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 240px;
  gap: 18px;

  padding: 16px 20px;
  border-radius: 12px;
  border: 1px solid #444;

  background: linear-gradient(to bottom, #000000 0%, #2b2b2b 100%);
  color: #f0f0f0; /* Texto principal claro */
  box-shadow: 0 3px 12px rgba(0,0,0,0.4);

  line-height: 1.35;
  overflow: hidden;
  isolation: isolate;
}

/* --- Claqueta negra con franjas blancas --- */
.film-card.clapper::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 14px;
  background: repeating-linear-gradient(
    -45deg,
    #ffffff 0 10px,
    #000000 10px 20px
  );
  border-bottom: 1px solid #444;
}

/* Separación controlada bajo la claqueta */
.film-card.clapper > * {
  margin-top: 14px;
}

/* --- Tipografía (alta legibilidad) --- */
.film-year {
  font-size: clamp(0.95rem, 0.88rem + 0.3vw, 1rem);
  font-weight: 700;
  color: #8ab4ff; /* Azul claro sobre negro */
}

.film-title {
  font-size: clamp(1.25rem, 1.05rem + 0.9vw, 1.45rem);
  font-weight: 700;
  margin: 6px 0;
  color: #ffffff;
}

.film-role {
  font-size: clamp(1.05rem, 0.95rem + 0.5vw, 1.15rem);
  font-weight: 600;
  color: #f0f0f0;
  margin: 4px 0;
}

.film-meta {
  font-size: clamp(0.9rem, 0.85rem + 0.25vw, 0.95rem);
  color: #bfbfbf;
  margin: 4px 0 8px;
}

.film-desc {
  font-size: clamp(0.9rem, 0.85rem + 0.25vw, 0.95rem);
  color: #e6e6e6;
  margin: 4px 0 6px;
}

/* --- Imagen y crédito --- */
.film-right {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.film-right img {
  width: 100%;
  border-radius: 8px;
  border: 2px solid #555; 
  aspect-ratio: 16/9;
  object-fit: cover;
}

.film-credit-img {
  font-size: clamp(0.7rem, 0.65rem + 0.2vw, 0.8rem);
  color: #cccccc;
  opacity: 0.9;
  margin-top: 6px;
  text-align: center;
}

/* --- Responsive --- */
@media (max-width: 900px) {
  .film-card.clapper {
    grid-template-columns: 1fr;
    padding: 14px;
  }

  .film-card.clapper > * {
    margin-top: 12px;
  }
}

/* Forzar subtítulo del HERO a negro en la página sobre-mi */
body.sobre-mi .hero .hero__subtitle {
  color: #000 !important;
}

/* Separación entre tarjetas del bloque Mis trabajos */
.film-cards {
  display: grid;
  gap: clamp(20px, 3vw, 36px);
}

/* FORMACIÓN */
.cols {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, 1fr);
}

.list li {
  margin: 6px 0;
}

/* RESPONSIVE GENERAL */
@media (max-width: 980px) {
  .hero {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .story__row,
  .story__row:nth-child(even) {
    grid-template-columns: 1fr;
  }

  .card { 
    grid-column: span 12; 
  }

  .cols { 
    grid-template-columns: 1fr; 
  }

  .hero__text {
    text-align: center;
  }
}

/* Centrar el contenido del texto en el HERO */
.hero__text {
  text-align: center;
}

/* Centrar el botón dentro del bloque de texto */
.hero__text .btn {
  margin-inline: auto;
  display: inline-flex;
}

/* Forzar texto de introducción a negro */
body.sobre-mi .section__lead {
  color: #000 !important;
  font-size: clamp(1.05rem, 0.98rem + 0.4vw, 1.18rem);
  line-height: 1.6;
}

/* === Separación estética entre secciones del Videobook === */

/* Primera sección sin hueco extra */
.videobook-actualizado {
  margin-bottom: 0 !important;
}

/* El resto de secciones separadas de forma estética */
body.videobook section:not(:first-of-type) {
  margin-top: 3rem !important;   /* separación estética real */
}

/* Un poco de aire interno arriba de cada sección */
body.videobook section {
  padding-top: 1.5rem;           /* hace visible la separación */
}

/* Títulos con margen limpio y elegante */
body.videobook h2 {
  margin-top: 0 !important;
  margin-bottom: 2rem !important;  /* más visual y equilibrado */
}

/* =========================================================
   CONTACTO — Fondo
========================================================= */

body.contacto {
  background-image: none !important;
  position: relative;
  overflow-x: hidden;
}

body.contacto::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;

  background-image: url('../img/fondo-contacto.png');
  background-repeat: no-repeat;
  background-position: center 56%;
  background-size: 760px auto;
  opacity: 1;
}

/* Móvil: sin fondo */
@media (max-width: 700px) {
  body.contacto::before {
    display: none;
  }
}

/* =========================================================
   CONTACTO — Layout general
========================================================= */

body.contacto .contenedor-pagina {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1rem 1rem 0;   /* <-- este cambio quita scroll extra */
  background: transparent;
  display: block;
}

/* Evitar que el <main> rellene altura en Contacto */
body.contacto main {
  flex: 0 0 auto;
}

/* Grid 1 columna / 2 columnas en escritorio */
.contacto-dos-columnas {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 900px) {
  .contacto-dos-columnas {
    grid-template-columns: 1fr 1fr;
    gap: 3.5rem;
  }
}

/* Columnas base */
.columna {
  text-align: center;
  background: transparent;
  padding: 0 1.5rem;
  display: flex;
  flex-direction: column;
  max-width: 100%;
  box-sizing: border-box;
  font-weight: bold;
}

/* =========================================================
   CONTACTO — COLUMNA IZQUIERDA (Formulario)
========================================================= */

.columna-personal {
  max-width: 500px;
  margin: 0 auto;
}

/* Título y texto */
.columna-personal h1 {
  font-size: clamp(1.6rem, 1.2rem + 1.2vw, 2rem);
  font-weight: 800;
  margin: 0.25rem 0 0.5rem;
  color: #111;
}

.columna-personal > p {
  font-size: 1rem;
  color: #333;
  margin-bottom: 0.9rem;
}

/* Formulario */
#form-contacto {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  box-sizing: border-box;
}

#form-contacto .campo-form {
  margin-bottom: 0.45rem;
  text-align: left;
}

#form-contacto input,
#form-contacto textarea {
  width: 100%;
  padding: 0.60rem 0.6rem;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: #fff;
  box-sizing: border-box;
}

#form-contacto textarea {
  min-height: 100px;
}

/* Botón enviar */
#form-contacto .btn-enviar {
  padding: 0.65rem 1.1rem;
  margin-top: 0.3rem;
  font-size: 1rem;
  background: #222;
  color: #fff;
  border-radius: 6px;
  font-weight: 700;
}

/* Redes */
/* =========================================================
   CONTACTO — COLUMNA DERECHA (Representante)
========================================================= */

.columna-representante {
  padding: 0 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* Título */
.columna-representante h2 {
  font-size: clamp(1.6rem, 1.2rem + 1.2vw, 2rem);
  font-weight: 800;
  margin: 0.25rem 0 0.25rem;
  color: #111;
  white-space: nowrap;
}

/* Intro */
.representante > p:first-of-type {
  font-size: 1rem;
  color: #333;
  margin-bottom: 0.9rem;
}

/* Bloque del representante */
.representante {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* Avatar */
.avatar-representante {
  margin: 0 auto 0.75rem auto;
  display: flex;
  justify-content: center;
}

.avatar-representante img {
  width: 120px;
  height: auto;
  object-fit: contain;
}

/* Datos */
.datos-representante {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.datos-representante .nombre {
  margin: 0.2rem 0 0.25rem;
  font-size: 1rem;
}

.datos-representante .agencia {
  margin: 0.15rem 0 0.4rem;
  font-size: 1rem;
}

/* Lista contacto */
.lista-contacto-rep {
  list-style: none;
  margin: 0.5rem auto 0.45rem;
  padding: 0;
  display: grid;
  gap: 0.15rem;
  justify-items: center;
}

.lista-contacto-rep li {
  font-size: 1rem;
}

/* Nota de privacidad (ya equilibrada) */
.nota-privacidad {
  margin-top: 0.8rem;
  font-size: 1rem;
  text-align: center;
}

/* ===== SOBRE MÍ — Descripciones ===== */
body.sobre-mi .story__row p:not(figcaption):not(.caption) {
  font-size: clamp(1.05rem, 0.98rem + 0.4vw, 1.18rem);
  line-height: 1.6;
}

/* Más aire solo debajo de la última claqueta */
body.sobre-mi .film-card.clapper:last-of-type {
  margin-bottom: 16px;
}

/* ===== REDES EN HORIZONTAL ===== */
.columna-personal .redes-contacto {
  display: flex;
  align-items: center;
  justify-content: center; /* centrado también en escritorio */
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 0.75rem;
}
.columna-personal .redes-contacto h2 {
  width: 100%;
  margin-bottom: 0.35rem;
  font-size: 1rem;
}
.columna-personal .redes-contacto a {
  display: inline-flex;
  align-items: center;
  text-decoration: none !important;
}
.columna-personal .redes-contacto img {
  width: 28px;
  height: 28px;
  display: block;
}

/* ===== REDES CENTRADAS EN MÓVIL ===== */
@media (max-width: 700px) {
  .columna-personal .redes-contacto {
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 12px;
  }
}

/* ===== CENTRAR TODO EN MÓVIL ===== */
@media (max-width: 700px) {
  .columna {
    text-align: center !important;
    align-items: center !important;
  }
  #form-contacto {
    margin: 0 auto;
  }
}

/* ===== REPRESENTANTE CENTRADO ===== */
@media (max-width: 700px) {
  .tarjeta-representante {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    gap: 0.6rem;
  }
  .avatar-representante {
    display: flex !important;
    justify-content: center !important;
    margin: 0 auto;
  }
  .avatar-representante img {
    width: 120px !important;
    height: auto !important;
    object-fit: contain !important;
  }
}

/* ===== Anti-desbordes globales ===== */
img, svg, video, canvas, iframe {
  max-width: 100%;
  height: auto;
}

/* ===== FIX: evitar desplazamiento horizontal en móvil ===== */
@media (max-width: 700px) {
  html, body { overflow-x: hidden; }
}

/* =========================================================
   CONTACTO — BLOQUE DE MEJORA VISUAL FINAL
   (alineación, ritmo, márgenes coherentes)
========================================================= */

/* === Encabezado de Contacto (h1 y subtítulos) === */
body.contacto main h1,
body.contacto .columna-personal h1,
body.contacto .columna-representante h2 {
    letter-spacing: 0.5px;
    padding-left: 1rem !important;
    padding-right: 1rem !important;
    margin-top: 1.25rem;
    margin-bottom: 1rem;
    text-align: center;
    box-sizing: border-box;
}

/* === Párrafos iniciales y textos descriptivos === */
body.contacto .columna-personal > p,
body.contacto .representante > p:first-of-type {
    font-size: clamp(1rem, 0.95rem + 0.35vw, 1.1rem);
    line-height: 1.55;
    padding-left: 1.2rem;
    padding-right: 1.2rem;
    margin-top: 0.25rem;
    margin-bottom: 1rem;
    text-align: center;
}

/* === Sección REPRESENTANTE: alineación y aire === */
body.contacto .columna-representante {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

body.contacto .columna-representante h2 {
    font-weight: 800;
    padding-left: 1rem !important;
    padding-right: 1rem !important;
    line-height: 1.3;
}

/* logo BATEACAST centrado bien con margen consistente */
body.contacto .avatar-representante img {
    margin-top: 0.25rem;
    margin-bottom: 0.75rem;
}

/* === Datos del representante === */
body.contacto .datos-representante .nombre,
body.contacto .datos-representante .agencia,
body.contacto .lista-contacto-rep li {
    font-size: clamp(0.98rem, 0.93rem + 0.25vw, 1.05rem);
    line-height: 1.45;
    margin-bottom: 0.25rem;
    padding-left: 1rem;
    padding-right: 1rem;
}

/* === Ajustes de “Sígueme en redes” si existe ese bloque === */
body.contacto .redes-sociales-texto,
body.contacto .columna-personal h2 {
    font-size: 1.1rem;
    letter-spacing: 0.3px;
    padding-left: 1rem;
    padding-right: 1rem;
    margin-top: 1.25rem;
    margin-bottom: 0.75rem;
    text-align: center;
}

/* === Iconos de redes: centrado limpio === */
body.contacto .columna-personal .redes-contacto {
    justify-content: center !important;
    gap: 14px;
    margin-bottom: 1.2rem;
}

/* === Móvil: asegurar aire lateral SIMÉTRICO === */
@media (max-width: 700px) {
    body.contacto .columna,
    body.contacto .columna-personal,
    body.contacto .columna-representante {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
        box-sizing: border-box;
    }
}

/* ===== Ajustes finos para pantallas grandes ===== */
@media (min-width: 1600px) {
  .contenedor-header,
  body.contacto .contenedor-pagina {
    max-width: 1280px;
  }

  main {
    padding-inline: clamp(2rem, 6vw, 5rem);
  }
}

/* ===== FIX CONTACTO MÓVIL DESPLAZADO (2026-06) ===== */
@media (max-width: 700px) {
  body.contacto {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  body.contacto main,
  body.contacto .contenedor-pagina,
  body.contacto .contacto-dos-columnas,
  body.contacto .columna,
  body.contacto .columna-personal,
  body.contacto .columna-representante,
  body.contacto .representante,
  body.contacto .tarjeta-representante,
  body.contacto .datos-representante {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
  }

  body.contacto .columna-representante h2 {
    white-space: normal !important;
    overflow-wrap: anywhere;
  }

  body.contacto .lista-contacto-rep,
  body.contacto .lista-contacto-rep li,
  body.contacto .lista-contacto-rep a {
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
  }
}

/* =========================================================
   RESPONSIVE FINAL — HEADER, PORTADA Y ORIENTACIÓN
   - Móvil vertical: header compacto en 2 filas.
   - Tablet vertical: header tipo escritorio.
   - Tablet horizontal y escritorio: diseño horizontal.
========================================================= */

/* Altura fiable en móviles/tablets */
@supports (height: 100svh) {
  @media (max-width: 900px) {
    body {
      min-height: 100svh;
    }
  }
}

/* ---------- Header móvil vertical ---------- */
@media (orientation: portrait) and (max-width: 700px) {
  header {
    position: sticky;
    top: 0;
    z-index: 9999;
  }

  .contenedor-header {
    display: grid;
    grid-template-columns: auto minmax(160px, 220px);
    grid-template-rows: auto auto;
    grid-template-areas:
      "logo buscador"
      "nav nav";
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem 0.6rem;
    width: 100%;
    max-width: 100%;
    min-height: auto;
    margin: 0;
    padding: 0.55rem 0.75rem 0.65rem;
  }

  .contenedor-header > * {
    min-width: 0;
  }

  .logo {
    grid-area: logo;
    justify-self: start;
  }

  .logo img {
    width: 76px;
    max-height: none;
    height: auto;
  }

  .buscador {
    grid-area: buscador;
    justify-self: end;
    width: 100%;
    max-width: 220px;
  }

  .buscador form {
    width: 100%;
    max-width: 220px;
    min-width: 0;
  }

  .buscador input[type="search"] {
    width: 100%;
    min-width: 0;
    padding: 0.4em 0.55em;
    font-size: 0.85rem;
  }

  .buscador button {
    padding: 0.4em 0.6em;
    font-size: 0.9rem;
  }

  nav {
    grid-area: nav;
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  nav ul {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.35rem 0.75rem;
    width: 100%;
    margin: 0;
    padding: 0;
  }

  nav ul li a {
    font-size: 0.92rem;
    line-height: 1.2;
    white-space: nowrap;
  }
}

/* ---------- Header tablet vertical: tipo escritorio ---------- */
@media (orientation: portrait) and (pointer: coarse) and (min-width: 701px) and (max-width: 1100px) {
  header {
    position: sticky;
    top: 0;
    z-index: 9999;
  }

  .contenedor-header {
    display: grid;
    grid-template-columns: auto 1fr auto;
    grid-template-areas: "logo nav buscador";
    align-items: center;
    gap: clamp(0.7rem, 1.8vw, 1.3rem);
    width: 100%;
    max-width: 100%;
    min-height: 94px;
    margin: 0 auto;
    padding: 0.55rem 1rem;
  }

  .logo {
    grid-area: logo;
    justify-self: start;
  }

  .logo img {
    width: clamp(104px, 14vw, 120px);
    max-height: none;
    height: auto;
  }

  nav {
    grid-area: nav;
    width: auto;
    justify-self: center;
    justify-content: center;
    text-align: center;
  }

  nav ul {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
    gap: clamp(0.5rem, 1.2vw, 0.95rem);
    width: auto;
    margin: 0;
    padding: 0;
  }

  nav ul li a {
    font-size: clamp(0.86rem, 1.35vw, 1.02rem);
    line-height: 1.2;
    white-space: nowrap;
  }

  .buscador {
    grid-area: buscador;
    justify-self: end;
    width: clamp(185px, 24vw, 220px);
    max-width: 220px;
  }

  .buscador form {
    width: 100%;
    max-width: 220px;
    min-width: 0;
  }

  .buscador input[type="search"] {
    width: 100%;
    min-width: 0;
    padding: 0.42em 0.6em;
    font-size: 0.9rem;
  }

  .buscador button {
    padding: 0.42em 0.65em;
    font-size: 0.95rem;
  }
}

/* ---------- Portada vertical: móvil y tablet ---------- */
.retrato-portada-movil {
  display: none;
}

@media (orientation: portrait) and (max-width: 900px) {
  body.inicio {
    height: auto;
    min-height: 100svh;
    overflow-y: auto;
    background-image: none !important;
    background-color: #f0f0f0;
  }

  body.inicio main {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    text-align: center;
    padding: 2.5rem 1rem 2rem;
    overflow: visible;
  }

  body.inicio main::after {
    display: none;
  }

  body.inicio .contenedor {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
  }

  body.inicio .retrato-portada-movil {
    display: block;
    width: 100%;
    max-width: 360px;
    margin: 2rem auto 0;
    padding: 0 1rem;
  }

  body.inicio .retrato-portada-movil img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0,0,0,.25);
  }
}

/* ---------- Horizontal: escritorio y tablet horizontal ---------- */
@media (orientation: landscape) and (min-width: 701px) {
  body.inicio {
    height: 100svh;
    min-height: 100svh;
    overflow: hidden;
    background-image: none !important;
    background-color: #f0f0f0;
  }

  body.inicio header,
  body.inicio footer {
    flex: 0 0 auto;
  }

  body.inicio main {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    padding: clamp(0.8rem, 2.5svh, 2rem);
    overflow: hidden;
  }

  body.inicio main::after {
    content: "";
    position: absolute;
    right: 5%;
    bottom: 0;
    width: min(44vw, 500px);
    height: min(65svh, 520px);
    background-image: url('../img/fondo.jpg');
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    z-index: 0;
  }

  body.inicio .contenedor {
    position: relative;
    z-index: 1;
    max-width: 60%;
  }

  body.inicio .retrato-portada-movil {
    display: none;
  }
}

/* Tablet horizontal táctil: mantener footer visible y portada equilibrada */
@media (orientation: landscape) and (pointer: coarse) and (min-width: 701px) and (max-width: 1366px) {
  body.inicio main {
    padding: clamp(0.8rem, 2svh, 1.4rem);
  }

  body.inicio main::after {
    right: 4%;
    width: min(40vw, 440px);
    height: min(58svh, 430px);
  }

  body.inicio .contenedor {
    max-width: 58%;
  }

  body.inicio h1 {
    font-size: clamp(1.55rem, 2.2vw, 2rem);
    margin: 0.6rem 0 1rem;
  }

  body.inicio p {
    font-size: clamp(1rem, 1.5vw, 1.25rem);
    line-height: 1.4;
    margin: 0.6rem 0;
  }
}

/* Móvil horizontal: evitar compresión */
@media (orientation: landscape) and (max-height: 520px) and (max-width: 900px) {
  .contenedor-header {
    min-height: auto;
    padding: 0.4rem 1rem;
  }

  .logo img {
    width: 80px;
    max-height: none;
    height: auto;
  }

  nav ul {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.6rem;
  }

  nav ul li a {
    font-size: 0.95rem;
  }

  .buscador form {
    max-width: 260px;
    margin-left: auto;
  }

  main {
    padding: 1rem;
  }

  footer {
    padding: 0.4rem 0;
    font-size: 0.9rem;
  }

  body.inicio {
    height: auto !important;
    min-height: 100svh !important;
    overflow-y: auto !important;
    background-image: none !important;
  }

  body.inicio main {
    display: block !important;
    padding: 1rem 1rem 1.5rem !important;
    overflow: visible !important;
    text-align: center;
  }

  body.inicio main::after {
    display: none !important;
  }

  body.inicio .contenedor {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto;
  }

  body.inicio h1 {
    font-size: 1.4rem;
    margin: 0.5rem 0;
  }

  body.inicio p {
    font-size: 1rem;
    line-height: 1.35;
    margin: 0.35rem 0;
  }

  body.inicio .retrato-portada-movil {
    display: block;
    max-width: 220px;
    margin: 0.8rem auto 0;
    padding: 0;
  }

  body.contacto::before {
    display: none;
  }
}

/* Contacto en móvil horizontal: una columna centrada */
@media (orientation: landscape) and (max-height: 520px) {
  body.contacto .contacto-dos-columnas {
    grid-template-columns: 1fr !important;
    justify-items: center !important;
    text-align: center;
  }

  body.contacto .columna,
  body.contacto .columna-personal,
  body.contacto .columna-representante {
    width: 100% !important;
    max-width: 520px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    align-items: center !important;
    text-align: center !important;
  }

  body.contacto #form-contacto {
    margin-left: auto !important;
    margin-right: auto !important;
  }
}


/* ===== MÓVIL HORIZONTAL (ajuste final) ===== */
@media (orientation: landscape) and (max-height: 520px) and (max-width: 900px) {
  .contenedor-header {
    grid-template-columns: auto 1fr auto;
    grid-template-areas: "logo nav buscador";
    gap: 0.7rem;
  }

  .logo img {
    width: 78px !important;
  }

  nav ul {
    gap: 0.45rem 0.65rem;
  }

  nav ul li a {
    font-size: 0.82rem !important;
  }

  .buscador,
  .buscador form {
    width: 210px !important;
    max-width: 210px !important;
  }

  .buscador input[type="search"] {
    font-size: 0.8rem !important;
  }
}



/* ==========================================================
   BOTÓN "VER VIDEOBOOK"
========================================================== */
.boton-videobook{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:.55rem;
    margin:2rem auto 0;
    padding:14px 28px;
    background:#1d4ed8;
    color:#fff !important;
    border-radius:12px;
    text-decoration:none;
    font-weight:700;
    font-size:1.05rem;
    transition:.25s ease;
    box-shadow:0 4px 12px rgba(0,0,0,.18);
}
.boton-videobook:hover{
    background:#1e40af;
    transform:translateY(-2px);
    box-shadow:0 8px 18px rgba(0,0,0,.25);
}
.boton-videobook:active{transform:translateY(0);}
.boton-videobook::before{content:"▶";font-size:.9rem;}
body.galeria .boton-centro{text-align:center;}

/* Ajuste específico para pantallas 1280x720 y similares */
@media (orientation: landscape) and (min-width:701px) and (max-height:750px){
 body.inicio main{padding:.5rem 1.2rem .8rem;}
 body.inicio .contenedor{max-width:55%;}
 body.inicio main h1{font-size:clamp(1.5rem,1rem + 1.2vw,2rem);margin-bottom:.5rem;}
 body.inicio main p{font-size:clamp(.98rem,.85rem + .5vw,1.15rem);line-height:1.35;margin-bottom:.6rem;}
 body.inicio main::after{width:min(40vw,430px);height:min(60svh,430px);right:3%;}
}
