/* =========================================================================
   ZONA TÉCNICA · PORTADA  ·  Kit visual del proyecto
   Oswald (display) + Inter (texto) · Lima #ccfe04 · Naranja #ef640a
   Geometría de esquinas cuadradas (radio bajo) · estética viewfinder
   ========================================================================= */

.ztp-portada {
  /* Base */
  --ztp-white: oklch(99% 0.002 95);
  --ztp-black: oklch(15% 0.005 95);
  --ztp-ink:   oklch(20% 0.005 95);

  /* Neutros (rampa gris cálida) */
  --ztp-gray-100: oklch(96% 0.003 95);
  --ztp-gray-200: oklch(91% 0.004 95);
  --ztp-gray-300: oklch(82% 0.005 95);
  --ztp-gray-500: oklch(58% 0.006 95);
  --ztp-gray-700: oklch(38% 0.006 95);
  --ztp-gray-900: oklch(22% 0.005 95);

  /* Acentos de marca */
  --ztp-lime: #ccfe04;
  --ztp-lime-ink: oklch(28% 0.06 128);
  --ztp-orange: #ef640a;
  --ztp-orange-ink: #ffffff;

  /* Semánticos */
  --ztp-surface: var(--ztp-white);
  --ztp-border: var(--ztp-gray-200);
  --ztp-text: var(--ztp-black);
  --ztp-text-2: var(--ztp-gray-700);
  --ztp-title: var(--ztp-black);        /* color de títulos (secciones y hero) */
  --ztp-card-title: #ffffff;            /* título dentro de la caja (sobre imagen) */
  --ztp-bg: var(--ztp-white);           /* fondo de la portada */
  --ztp-btnA-bg: var(--ztp-lime);       /* Botón A: fondo */
  --ztp-btnA-text: var(--ztp-lime-ink); /* Botón A: texto */
  --ztp-btnB-bg: var(--ztp-black);      /* Botón B: fondo */
  --ztp-btnB-text: #ffffff;             /* Botón B: texto */

  /* Tipografía */
  --ztp-font-display: 'Oswald', 'Arial Narrow', sans-serif;
  --ztp-font-body: 'Inter', system-ui, sans-serif;
  --ztp-tracking-caps: 0.08em;

  /* Radios (bajos, cuadrados) */
  --ztp-radius-sm: 4px;
  --ztp-radius-md: 8px;

  /* Sombra */
  --ztp-shadow-md: 0 4px 12px oklch(15% 0 0 / 0.10);
  --ztp-shadow-lg: 0 12px 32px oklch(15% 0 0 / 0.14);

  /* Acento activo de la sección (se sobreescribe por sección) */
  --ztp-accent: var(--ztp-orange);
  --ztp-accent-ink: var(--ztp-orange-ink);

  font-family: var(--ztp-font-body);
  color: var(--ztp-text);
  background: var(--ztp-bg);
  width: 100%;
}

.ztp-portada * { box-sizing: border-box; }

/* Sin subrayado en ningún enlace de la portada (evita el subrayado del tema) */
.ztp-portada a,
.ztp-portada a:hover,
.ztp-portada a:focus { text-decoration: none !important; }

/* Ancho completo: rompe el contenedor del tema y ocupa toda la página */
.ztp-portada--full {
  width: 100vw; max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  overflow-x: clip;
}

.ztp-wrap {
  max-width: var(--ztp-container, 1360px);
  margin: 0 auto;
  padding: 0 40px;
}

/* Acentos por sección */
.ztp-accent--orange { --ztp-accent: var(--ztp-orange); --ztp-accent-ink: #fff; }
.ztp-accent--lime   { --ztp-accent: var(--ztp-lime);   --ztp-accent-ink: var(--ztp-lime-ink); }
.ztp-accent--black  { --ztp-accent: var(--ztp-black);  --ztp-accent-ink: #fff; }

/* ------------------------------------------------------------------ HERO */
.ztp-hero {
  position: relative;
  padding: 72px 0 56px;
}
.ztp-hero__inner {
  display: flex;
  gap: 56px;
  align-items: center;
}
.ztp-hero__col { flex: 1; min-width: 0; }
.ztp-hero__kicker {
  font-family: var(--ztp-font-display);
  font-size: 13px; font-weight: 600;
  letter-spacing: var(--ztp-tracking-caps);
  text-transform: uppercase;
  color: var(--ztp-orange);
}
.ztp-hero__title {
  font-family: var(--ztp-font-display);
  font-size: clamp(34px, 5vw, 52px);
  font-weight: 700;
  text-transform: uppercase;
  line-height: 1.02;
  margin: 12px 0 18px;
  color: var(--ztp-title);
}
.ztp-hero__text {
  font-size: 17px; line-height: 1.5;
  color: var(--ztp-text-2);
  max-width: 480px;
}
.ztp-hero__media {
  flex: 1;
  aspect-ratio: 4 / 3;
  border: 2px solid var(--ztp-orange);
  border-radius: var(--ztp-radius-sm);
  background-size: cover;
  background-position: center;
  background-color: var(--ztp-gray-100);
}

/* --------------------------------------------------------------- BOTONES */
.ztp-btns { display: flex; gap: 12px; margin-top: 26px; flex-wrap: wrap; }
.ztp-portada .ztp-btn {
  font-family: var(--ztp-font-display);
  font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 12px 22px;
  border-radius: var(--ztp-radius-sm);
  border: 2px solid var(--ztp-btnA-bg) !important;
  background: var(--ztp-btnA-bg) !important;
  color: var(--ztp-btnA-text) !important;
  cursor: pointer; text-decoration: none;
  display: inline-block; line-height: 1; box-shadow: none;
  transition: transform .12s ease, filter .12s ease;
}
.ztp-portada .ztp-btn--b {
  border-color: var(--ztp-btnB-bg) !important;
  background: var(--ztp-btnB-bg) !important;
  color: var(--ztp-btnB-text) !important;
}
.ztp-portada .ztp-btn:hover { transform: translateY(-1px); filter: brightness(0.92); }
/* Variantes antiguas (compatibilidad) */
.ztp-btn--lime  { background: var(--ztp-lime); border-color: var(--ztp-lime); color: var(--ztp-lime-ink); }
.ztp-btn--orange { background: var(--ztp-orange); border-color: var(--ztp-orange); color: #fff; }
.ztp-btn--ghost { background: transparent; color: var(--ztp-btnA-bg); border-color: var(--ztp-btnA-bg); }

/* -------------------------------------------------------------- SECCIÓN */
.ztp-section { padding: 48px 0; border-top: 1px solid var(--ztp-border); }
.ztp-section:first-of-type { border-top: 0; }
.ztp-section__head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 20px; margin-bottom: 24px; flex-wrap: wrap;
}
.ztp-kicker {
  display: inline-block;
  font-family: var(--ztp-font-display);
  font-size: 12px; font-weight: 600;
  letter-spacing: var(--ztp-tracking-caps);
  text-transform: uppercase;
  color: var(--ztp-accent);
  margin-bottom: 6px;
}
.ztp-heading {
  font-family: var(--ztp-font-display);
  font-size: clamp(24px, 3.4vw, 34px);
  font-weight: 700; text-transform: uppercase;
  line-height: 1.05; margin: 0;
  position: relative; padding-left: 16px;
  color: var(--ztp-title);
}
.ztp-heading::before {
  /* barra-acento tipo "viewfinder" a la izquierda del título */
  content: ""; position: absolute; left: 0; top: 4px; bottom: 4px;
  width: 5px; background: var(--ztp-accent);
}
.ztp-section__link {
  font-family: var(--ztp-font-display);
  font-size: 13px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.05em; text-decoration: none;
  color: var(--ztp-accent); white-space: nowrap;
  display: inline-flex; align-items: center; gap: 4px;
}
.ztp-section__link:hover { color: var(--ztp-black); }

/* ============================ MAQUETACIONES ============================= */
/* Las columnas se calculan según el ANCHO REAL disponible (container query),
   no según la ventana; así nunca quedan huecos por culpa del contenedor del tema. */

.ztp-section > .ztp-wrap { container-type: inline-size; }

/* Rejilla — base: 1 columna, se amplía según el ancho del contenedor */
.ztp-grid { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); }

@container (min-width: 560px) {
  .ztp-grid--2, .ztp-grid--3, .ztp-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@container (min-width: 880px) {
  .ztp-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ztp-grid--4 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@container (min-width: 1120px) {
  .ztp-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* Banner ancho (una sola caja) */
.ztp-banner { display: block; }

/* Destacado + lista lateral */
.ztp-hero-split { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; align-items: start; }
@container (min-width: 720px) {
  .ztp-hero-split { grid-template-columns: 2fr 1fr; }
}
.ztp-hero-split--solo { grid-template-columns: minmax(0, 1fr) !important; }
.ztp-hero-split__main { min-width: 0; }
.ztp-hero-split__list { display: flex; flex-direction: column; }

/* Destacado arriba + rejilla debajo */
.ztp-featured-row { display: flex; flex-direction: column; gap: 20px; }

/* Fallback si el navegador no soporta container queries (usa la ventana) */
@supports not (container-type: inline-size) {
  @media (min-width: 700px) {
    .ztp-grid--2, .ztp-grid--3, .ztp-grid--4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .ztp-hero-split { grid-template-columns: 2fr 1fr; }
  }
  @media (min-width: 1000px) {
    .ztp-grid--3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
    .ztp-grid--4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
  }
}

/* Banda de botones / CTA */
.ztp-ctaband { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.ztp-ctaband--center { justify-content: center; }
.ztp-ctaband--left   { justify-content: flex-start; }
.ztp-ctaband--right  { justify-content: flex-end; }

/* Carrusel / fila con scroll */
.ztp-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(260px, 1fr);
  gap: 20px;
  overflow-x: auto;
  padding-bottom: 8px;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
}
.ztp-row > * { scroll-snap-align: start; }

/* ================================ CAJAS ================================ */
/* Caja unificada: una imagen, oscurecido configurable y texto dentro o fuera */

.ztp-cb {
  position: relative; display: block; min-width: 0;
  border-radius: var(--ztp-radius-md); overflow: hidden;
  color: inherit; text-decoration: none;
  background: var(--ztp-surface);
  border: 1px solid var(--ztp-border);
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
}
.ztp-cb:hover { transform: translateY(-3px); box-shadow: var(--ztp-shadow-md); border-color: var(--ztp-gray-300); }
.ztp-cb__title, .ztp-cb__text, .ztp-cb__meta, .ztp-item__title { overflow-wrap: anywhere; word-break: break-word; }

/* Zona de imagen */
.ztp-cb__media {
  position: relative; overflow: hidden; isolation: isolate;
  aspect-ratio: 16 / 9; background: var(--ztp-gray-100);
}
.ztp-cb__img {
  position: absolute; inset: 0; z-index: 0;
  background-size: cover; background-position: center;
  background-color: var(--ztp-gray-100);
  background-image: repeating-linear-gradient(135deg, var(--ztp-gray-200), var(--ztp-gray-200) 10px, var(--ztp-gray-100) 10px, var(--ztp-gray-100) 20px);
  transition: transform .4s ease;
}
.ztp-cb__img--photo { background-image: none; }
.ztp-cb:hover .ztp-cb__img--photo { transform: scale(1.04); }

/* Oscurecido configurable (modo texto dentro) */
.ztp-cb__scrim { position: absolute; inset: 0; z-index: 1; background: #000; opacity: var(--ztp-ov, 0.4); }

/* Texto superpuesto (siempre con degradado inferior para legibilidad) */
.ztp-cb__over {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  padding: 22px 20px; color: #fff;
  background: linear-gradient(to top, oklch(10% 0 0 / 0.92) 0%, oklch(10% 0 0 / 0.45) 55%, oklch(10% 0 0 / 0) 100%);
}
.ztp-cb__over--slim {
  padding: 16px 18px;
  background: linear-gradient(to top, oklch(10% 0 0 / 0.85) 0%, oklch(10% 0 0 / 0) 100%);
}
.ztp-cb__title {
  font-family: var(--ztp-font-display);
  font-weight: 700; text-transform: uppercase;
  font-size: 20px; line-height: 1.08; margin: 6px 0 0;
}
.ztp-cb__over .ztp-cb__title { color: var(--ztp-card-title); }
.ztp-cb__meta {
  font-family: var(--ztp-font-display);
  font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--ztp-accent);
}
.ztp-cb__meta--on { color: #fff; opacity: .85; }
.ztp-cb__text { font-size: 14px; line-height: 1.45; color: var(--ztp-text-2); margin: 6px 0 0; }
.ztp-cb__text--on { color: oklch(96% 0 0 / 0.92); max-width: 46ch; }

/* Caja de texto exterior (modo imagen + texto debajo) */
.ztp-cb__out { padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; background: var(--ztp-surface); }

/* --- Modo texto DENTRO: la tarjeta es la imagen (sin caja blanca) --- */
.ztp-cb--inside { border: 0; background: var(--ztp-gray-900); }
.ztp-cb--inside .ztp-cb__media { aspect-ratio: auto; min-height: 230px; height: 100%; }

/* --- Tamaños por variante --- */
.ztp-cb--normal.ztp-cb--inside  .ztp-cb__media { min-height: 240px; }
.ztp-cb--feature.ztp-cb--inside .ztp-cb__media { min-height: 360px; }
.ztp-cb--feature.ztp-cb--outside .ztp-cb__media { aspect-ratio: 16 / 10; }
.ztp-cb--feature .ztp-cb__title { font-size: clamp(22px, 2.4vw, 32px); }
.ztp-cb--banner.ztp-cb--inside  .ztp-cb__media { min-height: 260px; }
.ztp-cb--banner.ztp-cb--outside .ztp-cb__media { aspect-ratio: 24 / 8; min-height: 200px; }
.ztp-cb--banner .ztp-cb__title { font-size: clamp(24px, 3vw, 38px); }

/* ---- Caja "list": horizontal compacta (lista lateral) --------------- */
.ztp-item {
  display: flex; gap: 14px; align-items: center;
  padding: 14px 0; text-decoration: none; color: inherit;
  border-bottom: 1px solid var(--ztp-border);
}
.ztp-hero-split__list .ztp-item:first-child { padding-top: 0; }
.ztp-hero-split__list .ztp-item:last-child { border-bottom: 0; }
.ztp-item:hover .ztp-item__title { color: var(--ztp-accent); }
.ztp-item__thumb {
  display: block; flex: 0 0 96px; width: 96px; height: 68px;
  border-radius: var(--ztp-radius-sm);
  background-size: cover; background-position: center;
  background-color: var(--ztp-gray-100);
  background-image: repeating-linear-gradient(135deg, var(--ztp-gray-200), var(--ztp-gray-200) 8px, var(--ztp-gray-100) 8px, var(--ztp-gray-100) 16px);
}
.ztp-item__thumb--img { background-image: none; }
.ztp-item__body { display: flex; flex-direction: column; min-width: 0; }
.ztp-item__cat {
  font-family: var(--ztp-font-display);
  font-size: 10px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--ztp-accent);
}
.ztp-item__title { font-size: 15px; font-weight: 600; line-height: 1.25; margin: 3px 0 0; transition: color .12s ease; }

/* ---------------------------------------------------------------- BADGE */
.ztp-badge {
  position: absolute; top: 10px; left: 10px;
  font-family: var(--ztp-font-display);
  font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.06em; padding: 4px 10px;
  border-radius: var(--ztp-radius-sm);
  background: var(--ztp-accent); color: var(--ztp-accent-ink);
  z-index: 1;
}
.ztp-badge--orange { background: var(--ztp-orange); color: #fff; }
.ztp-badge--lime   { background: var(--ztp-lime);   color: var(--ztp-lime-ink); }
.ztp-badge--black  { background: var(--ztp-black);  color: #fff; }

/* ------------------------------------------------------------------ CTA */
.ztp-cta {
  padding: 44px 0; margin-top: 8px;
  border-top: 1px solid var(--ztp-border);
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; flex-wrap: wrap;
}
.ztp-cta__title {
  font-family: var(--ztp-font-display);
  font-size: clamp(24px, 3vw, 30px); font-weight: 700;
  text-transform: uppercase; margin: 0;
}

/* --------------------------------------------------------------- EMPTY */
.ztp-empty {
  padding: 60px 20px; text-align: center; color: var(--ztp-gray-500);
  border: 1px dashed var(--ztp-border); border-radius: var(--ztp-radius-md);
  font-size: 15px;
}

/* --------------------------------------------------------- RESPONSIVE */
@media (max-width: 900px) {
  .ztp-wrap { padding: 0 20px; }
  .ztp-hero__inner { flex-direction: column; align-items: stretch; }
}

/* ============================ MENÚ DE CABECERA ========================== */
.ztp-nav {
  width: 100%;
  position: relative;
  --nav-bg: var(--ztp-lime);
  --nav-fg: var(--ztp-lime-ink);
  --nav-underline: var(--ztp-black);
  --nav-cta-bg: var(--ztp-black);
  --nav-cta-fg: #fff;
  --nav-line: oklch(15% 0 0 / 0.12);   /* separadores en versión clara (lima) */
  background: var(--nav-bg);
  color: var(--nav-fg);
}
.ztp-nav--sticky { position: sticky; top: 0; z-index: 50; box-shadow: 0 2px 0 oklch(15% 0 0 / 0.12); }

/* Variantes de color */
.ztp-nav--orange { --nav-bg: var(--ztp-orange); --nav-fg: #fff; --nav-underline: #fff; --nav-cta-bg: var(--ztp-black); --nav-cta-fg: #fff; --nav-line: rgba(255,255,255,.22); }
.ztp-nav--black  { --nav-bg: var(--ztp-black);  --nav-fg: #fff; --nav-underline: var(--ztp-lime); --nav-cta-bg: var(--ztp-lime); --nav-cta-fg: var(--ztp-lime-ink); --nav-line: rgba(255,255,255,.16); }

/* La casilla que controla el menú móvil está oculta (accesible por el label) */
.ztp-nav__toggle { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }

.ztp-nav__inner {
  display: flex; align-items: stretch; gap: 32px;
  min-height: 56px;
}
.ztp-nav__brand {
  font-family: var(--ztp-font-display);
  font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em;
  font-size: 18px; display: flex; align-items: center; white-space: nowrap;
}

/* Contenedor de pestañas + botón: en escritorio ocupa el resto de la barra */
.ztp-nav__menu {
  display: flex; align-items: stretch; flex: 1; min-width: 0; gap: 28px;
}
.ztp-nav__links {
  display: flex; align-items: stretch; gap: 28px;
  margin-right: auto; flex-wrap: wrap; min-width: 0;
}
.ztp-nav__link {
  font-family: var(--ztp-font-display);
  font-size: 14px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.05em; text-decoration: none;
  color: var(--nav-fg); display: inline-flex; align-items: center;
  border-bottom: 3px solid transparent; opacity: .92;
  transition: opacity .12s ease, border-color .12s ease, background .12s ease;
}
.ztp-nav__link:hover { opacity: 1; border-bottom-color: var(--nav-underline); }
.ztp-nav__link.is-active { opacity: 1; border-bottom-color: var(--nav-underline); }
.ztp-nav .ztp-nav__cta {
  align-self: center;
  font-family: var(--ztp-font-display);
  font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em;
  font-size: 13px; text-decoration: none; white-space: nowrap;
  padding: 9px 18px; border-radius: var(--ztp-radius-sm);
  background: var(--nav-cta-bg) !important; color: var(--nav-cta-fg) !important;
  border: 2px solid var(--nav-cta-bg) !important;
  box-shadow: none;
  transition: transform .12s ease, background .12s ease, color .12s ease, border-color .12s ease;
}
.ztp-nav .ztp-nav__cta:hover {
  transform: translateY(-1px);
  background: var(--nav-cta-fg) !important;
  color: var(--nav-cta-bg) !important;
  border-color: var(--nav-cta-fg) !important;
}

/* Botón hamburguesa (oculto en escritorio) */
.ztp-nav__burger { display: none; }
.ztp-burger {
  display: inline-block; width: 24px; height: 16px; position: relative;
}
.ztp-burger span {
  position: absolute; left: 0; height: 2.5px; width: 100%;
  background: var(--nav-fg); border-radius: 2px;
  transition: transform .2s ease, opacity .15s ease, top .2s ease;
}
.ztp-burger span:nth-child(1) { top: 0; }
.ztp-burger span:nth-child(2) { top: 6.75px; }
.ztp-burger span:nth-child(3) { top: 13.5px; }

/* ----------------------------- MÓVIL ---------------------------------- */
@media (max-width: 820px) {
  .ztp-nav__inner { align-items: center; gap: 14px; min-height: 54px; }

  .ztp-nav__burger {
    display: inline-flex; align-items: center; justify-content: center;
    margin-left: auto; width: 46px; height: 46px; margin-right: -8px;
    cursor: pointer; color: var(--nav-fg); background: transparent; border: 0;
  }
  .ztp-nav__burger:focus-visible { outline: 2px solid var(--nav-fg); outline-offset: 2px; border-radius: 4px; }

  /* Panel desplegable: por defecto oculto */
  .ztp-nav__menu {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--nav-bg);
    box-shadow: 0 12px 28px oklch(15% 0 0 / 0.22);
    padding: 4px 0 12px; z-index: 60;
    max-height: calc(100vh - 54px); overflow-y: auto;
  }
  /* Al activar la casilla, se muestra el panel */
  .ztp-nav__toggle:checked ~ .ztp-nav__inner .ztp-nav__menu { display: flex; }

  /* Transformar hamburguesa en "X" al abrir */
  .ztp-nav__toggle:checked ~ .ztp-nav__inner .ztp-burger span:nth-child(1) { top: 6.75px; transform: rotate(45deg); }
  .ztp-nav__toggle:checked ~ .ztp-nav__inner .ztp-burger span:nth-child(2) { opacity: 0; }
  .ztp-nav__toggle:checked ~ .ztp-nav__inner .ztp-burger span:nth-child(3) { top: 6.75px; transform: rotate(-45deg); }

  .ztp-nav__links {
    flex-direction: column; align-items: stretch; gap: 0;
    margin: 0; flex-wrap: nowrap; overflow: visible; width: 100%;
  }
  .ztp-nav__link {
    width: 100%; padding: 15px 24px; border-bottom: 0;
    border-top: 1px solid var(--nav-line); opacity: 1;
    justify-content: flex-start;
  }
  .ztp-nav__link:hover, .ztp-nav__link.is-active {
    border-bottom: 0; background: oklch(50% 0 0 / 0.12);
  }
  .ztp-nav__cta {
    align-self: stretch; margin: 12px 24px 2px; text-align: center;
    justify-content: center; padding: 13px 18px; font-size: 14px;
  }
}
