/* ==========================================================================
   Ketsaltik — sistema de diseño compartido
   Se carga primero en todas las páginas. Los CSS de cada sección
   (portafolios.css, eventos.css, ...) solo agregan lo específico.
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  /* Marca: colores del logo en acuarela */
  --c-magenta: #ef0688;
  --c-fucsia: #de09a3;
  --c-violeta: #5f12a1;          /* texto destacado: 9.8:1 */
  --c-indigo: #093bb5;           /* enlaces: 8.9:1 */
  --c-azul: #077ee0;
  --c-cian: #04c1f5;             /* solo decorativo */
  --c-amarillo: #f9bf0f;         /* solo decorativo */
  --c-naranja: #fa9204;          /* solo decorativo */
  --c-rosa: #f7a8c8;             /* solo decorativo */

  /* Alias usados por los componentes */
  --c-turquesa: var(--c-cian);
  --c-turquesa-claro: #7fd8f5;
  --c-turquesa-texto: var(--c-indigo);
  --c-coral: var(--c-magenta);
  --c-durazno: #fde58a;
  --c-durazno-suave: #fff7dc;
  --c-crema: #fffdf8;
  --c-cempasuchil: var(--c-amarillo);
  --c-rosa-mx: var(--c-fucsia);

  /* Semánticos */
  --c-primario: #d1006f;         /* botón: texto blanco 5.3:1 */
  --c-primario-hover: #a8005a;
  --c-whatsapp: #157a3c;         /* texto blanco 5.4:1 */
  --c-whatsapp-hover: #0f5c2d;
  --c-texto: #2b1a4a;            /* tinta violeta: 15:1 */
  --c-texto-2: #5a4d6b;
  --c-borde: #ebe3f2;
  --c-superficie: #ffffff;
  --c-fondo: var(--c-crema);
  --c-foco: #2b1a4a;

  /* Tipografía */
  --f-display: "Fraunces", Georgia, "Times New Roman", serif;
  --f-mano: "Caveat", "Segoe Script", cursive;   /* acentos manuscritos, como el logo */
  --f-texto: "Nunito Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --fs-xs: .875rem;
  --fs-sm: 1rem;
  --fs-md: 1.125rem;
  --fs-lg: clamp(1.35rem, 2.5vw, 1.6rem);
  --fs-xl: clamp(1.75rem, 4vw, 2.5rem);
  --fs-xxl: clamp(2.1rem, 6vw, 3.4rem);
  --lh-texto: 1.6;

  /* Espaciado */
  --sp-1: .25rem;
  --sp-2: .5rem;
  --sp-3: 1rem;
  --sp-4: 1.5rem;
  --sp-5: 2rem;
  --sp-6: 3rem;
  --sp-7: clamp(3rem, 8vw, 5.5rem);
  --ancho-contenido: 1120px;
  --ancho-lectura: 760px;
  --gutter: clamp(16px, 4vw, 32px);

  /* Radios y sombras */
  --r-sm: 6px;
  --r-md: 12px;
  --r-lg: 20px;
  --r-pill: 999px;
  --sh-1: 0 2px 6px rgba(42, 31, 26, .08);
  --sh-2: 0 6px 18px rgba(42, 31, 26, .12);
  --sh-3: 0 14px 34px -10px rgba(42, 31, 26, .35);

  /* Movimiento */
  --t-rapida: .2s ease;
  --t-media: .3s ease;

  --header-alto: 68px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-alto) + 16px); }

body {
  margin: 0;
  font-family: var(--f-texto);
  font-size: var(--fs-sm);
  line-height: var(--lh-texto);
  color: var(--c-texto);
  background: var(--c-fondo);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3 {
  font-family: var(--f-display);
  line-height: 1.15;
  color: var(--c-texto);
  margin: 0 0 var(--sp-3);
  font-weight: 600;
  text-wrap: balance;
}
h1 { font-size: var(--fs-xxl); }
h2 { font-size: var(--fs-xl); }
h3 { font-size: var(--fs-lg); }
p { margin: 0 0 var(--sp-3); }

a { color: var(--c-turquesa-texto); text-underline-offset: 3px; }
a:hover { color: var(--c-primario); }

:focus-visible {
  outline: 3px solid var(--c-foco);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: var(--sp-3);
  top: -100px;
  z-index: 2000;
  padding: var(--sp-2) var(--sp-3);
  background: var(--c-texto);
  color: #fff;
  border-radius: var(--r-sm);
}
.skip-link:focus { top: var(--sp-3); color: #fff; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--ancho-contenido);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--sp-7); }
.section--suave { background: var(--c-durazno-suave); }
.section--blanca { background: var(--c-superficie); }

.section-head { max-width: 680px; margin: 0 auto var(--sp-6); text-align: center; }
.section-head p:not(.eyebrow) { color: var(--c-texto-2); font-size: var(--fs-md); }

.eyebrow {
  display: inline-block;
  margin-bottom: var(--sp-1);
  font: 600 clamp(1.35rem, 3vw, 1.6rem)/1.1 var(--f-mano);
  color: var(--c-violeta);
  transform: rotate(-2deg);
}

.grid {
  display: grid;
  gap: var(--sp-4);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
}

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  min-height: 48px;
  padding: .75rem 1.5rem;
  border: 2px solid transparent;
  border-radius: var(--r-pill);
  font: 700 var(--fs-sm)/1.2 var(--f-texto);
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--t-rapida), color var(--t-rapida), border-color var(--t-rapida), transform var(--t-rapida);
}
.btn:hover { transform: translateY(-1px); }
.btn svg { width: 1.25em; height: 1.25em; flex-shrink: 0; fill: currentColor; }

.btn--primary { background: var(--c-primario); color: #fff; }
.btn--primary:hover { background: var(--c-primario-hover); color: #fff; }

.btn--secondary { background: transparent; color: var(--c-turquesa-texto); border-color: var(--c-turquesa-texto); }
.btn--secondary:hover { background: var(--c-turquesa-texto); color: #fff; }

.btn--whatsapp { background: var(--c-whatsapp); color: #fff; }
.btn--whatsapp:hover { background: var(--c-whatsapp-hover); color: #fff; }

.btn--sm { min-height: 40px; padding: .5rem 1.1rem; font-size: var(--fs-xs); }
.btn--block { width: 100%; }

.btn-group { display: flex; flex-wrap: wrap; gap: var(--sp-3); }

/* ---------- Header y navegación ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 248, 244, .96);
  border-bottom: 1px solid var(--c-borde);
  backdrop-filter: saturate(1.2) blur(6px);
}
.site-header__inner {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  min-height: var(--header-alto);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  margin-right: auto;
  font: 600 1.35rem/1 var(--f-display);
  color: var(--c-texto);
  text-decoration: none;
}
.brand img { width: 48px; height: 48px; border-radius: 50%; }
.brand:hover { color: var(--c-turquesa-texto); }

.site-nav { display: flex; align-items: center; gap: var(--sp-4); }
.site-nav ul { display: flex; gap: var(--sp-1); margin: 0; padding: 0; list-style: none; }
.site-nav ul a {
  display: block;
  padding: .6rem .75rem;
  border-radius: var(--r-sm);
  font-weight: 700;
  font-size: .95rem;
  color: var(--c-texto);
  text-decoration: none;
}
.site-nav ul a:hover { background: var(--c-durazno-suave); color: var(--c-texto); }
.site-nav ul a[aria-current="page"] { color: var(--c-primario); box-shadow: inset 0 -3px 0 var(--c-primario); border-radius: 0; }

.lang-switch { display: flex; gap: 2px; font-size: var(--fs-xs); font-weight: 800; }
.lang-switch a {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 40px; min-height: 40px;
  border-radius: var(--r-sm);
  color: var(--c-texto-2);
  text-decoration: none;
}
.lang-switch a[aria-current="true"] { color: var(--c-texto); background: var(--c-durazno-suave); }
.lang-switch a:hover { color: var(--c-primario); }

.nav-toggle {
  display: none;
  width: 48px; height: 48px;
  padding: 0;
  border: 0;
  border-radius: var(--r-sm);
  background: transparent;
  cursor: pointer;
  color: var(--c-texto);
}
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  display: block;
  width: 24px; height: 2px;
  margin: auto;
  background: currentColor;
  border-radius: 2px;
  position: relative;
  transition: transform var(--t-rapida), background-color var(--t-rapida);
}
.nav-toggle span::before, .nav-toggle span::after { content: ""; position: absolute; left: 0; }
.nav-toggle span::before { top: -7px; }
.nav-toggle span::after { top: 7px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 960px) {
  .nav-toggle { display: block; }
  .site-nav {
    display: none;
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: var(--sp-3);
    padding: var(--sp-3) var(--gutter) var(--sp-5);
    background: var(--c-crema);
    border-bottom: 1px solid var(--c-borde);
    box-shadow: var(--sh-2);
    max-height: calc(100vh - var(--header-alto));
    overflow-y: auto;
  }
  .site-nav.is-open { display: flex; }
  .site-nav ul { flex-direction: column; }
  .site-nav ul a { padding: .85rem .5rem; font-size: var(--fs-md); border-bottom: 1px solid var(--c-borde); border-radius: 0; }
  .site-nav ul a[aria-current="page"] { box-shadow: none; }
  .lang-switch { justify-content: center; }
}

/* ---------- Encabezado de página interior ---------- */
.page-hero {
  padding-block: var(--sp-6) var(--sp-5);
  background:
    radial-gradient(circle at 12% 20%, rgba(239, 6, 136, .14), transparent 45%),
    radial-gradient(circle at 88% 0%, rgba(4, 193, 245, .2), transparent 40%),
    var(--c-durazno-suave);
  text-align: center;
}
.page-hero h1 { margin-bottom: var(--sp-2); }
.page-hero p:not(.eyebrow) { max-width: 640px; margin-inline: auto; color: var(--c-texto-2); font-size: var(--fs-md); }
.page-hero .btn-group { justify-content: center; margin-top: var(--sp-4); }

/* Submenú de categorías (chips con scroll horizontal en móvil) */
.subnav {
  position: sticky;
  top: var(--header-alto);
  z-index: 900;
  background: var(--c-crema);
  border-bottom: 1px solid var(--c-borde);
}
.subnav ul {
  display: flex;
  gap: var(--sp-2);
  margin: 0 auto;
  padding: var(--sp-2) var(--gutter);
  max-width: var(--ancho-contenido);
  list-style: none;
  overflow-x: auto;
  scrollbar-width: none;
}
.subnav ul::-webkit-scrollbar { display: none; }
.subnav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 1rem;
  border: 1px solid var(--c-borde);
  border-radius: var(--r-pill);
  background: var(--c-superficie);
  font-weight: 700;
  font-size: var(--fs-xs);
  color: var(--c-texto);
  text-decoration: none;
  white-space: nowrap;
}
.subnav a:hover { border-color: var(--c-primario); color: var(--c-primario); }

/* ---------- Tarjetas ---------- */
.card {
  display: flex;
  flex-direction: column;
  background: var(--c-superficie);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-1);
  overflow: hidden;
  transition: box-shadow var(--t-media), transform var(--t-media);
}
.card:hover { box-shadow: var(--sh-2); }
.card__media { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.card__body { display: flex; flex-direction: column; gap: var(--sp-2); flex: 1; padding: var(--sp-4); }
.card__body h3 { margin: 0; }
.card__body p { margin: 0; color: var(--c-texto-2); }
.card__body .btn { margin-top: auto; align-self: flex-start; }
.card__body > :last-child.btn { margin-top: var(--sp-3); }

/* ---------- Galería + visor ---------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(45%, 220px), 1fr));
  gap: var(--sp-3);
}
.gallery-item {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--c-durazno-suave);
  cursor: zoom-in;
  box-shadow: var(--sh-1);
}
.gallery-item img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  transition: transform var(--t-media);
}
.gallery-item:hover img { transform: scale(1.04); }

.lightbox {
  width: min(92vw, 900px);
  max-height: 92vh;
  padding: 0;
  border: 0;
  border-radius: var(--r-lg);
  background: #140e0b;
  color: #fff;
  overflow: hidden;
}
.lightbox::backdrop { background: rgba(20, 14, 11, .85); }
.lightbox__figure { margin: 0; display: grid; }
.lightbox__img { width: 100%; max-height: 72vh; object-fit: contain; background: #000; }
.lightbox__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
}
.lightbox__bar figcaption { font-size: var(--fs-xs); color: #f3e6de; }
.lightbox__close, .lightbox__nav {
  position: absolute;
  display: grid;
  place-items: center;
  width: 48px; height: 48px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .92);
  color: var(--c-texto);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}
.lightbox__close { top: 12px; right: 12px; }
.lightbox__nav--prev { left: 12px; top: 36vh; }
.lightbox__nav--next { right: 12px; top: 36vh; }

/* ---------- Pasos, FAQ, CTA ---------- */
.steps { counter-reset: paso; display: grid; gap: var(--sp-4); grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); margin: 0; padding: 0; list-style: none; }
.steps li { position: relative; padding: var(--sp-5) var(--sp-4) var(--sp-4); background: var(--c-superficie); border-radius: var(--r-lg); box-shadow: var(--sh-1); }
.steps li::before {
  counter-increment: paso;
  content: counter(paso);
  display: grid; place-items: center;
  width: 44px; height: 44px;
  margin-bottom: var(--sp-3);
  border-radius: 50%;
  background: var(--c-durazno);
  font: 700 1.25rem/1 var(--f-display);
  color: var(--c-texto);
}
.steps h3 { font-size: 1.2rem; margin-bottom: var(--sp-2); }
.steps p { margin: 0; color: var(--c-texto-2); }

.faq { max-width: var(--ancho-lectura); margin-inline: auto; }
.faq details { border-bottom: 1px solid var(--c-borde); }
.faq summary {
  display: flex;
  justify-content: space-between;
  gap: var(--sp-3);
  padding: var(--sp-4) 0;
  font-weight: 800;
  font-size: var(--fs-md);
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.5rem; line-height: 1; color: var(--c-primario); }
.faq details[open] summary::after { content: "−"; }
.faq details p { color: var(--c-texto-2); padding-bottom: var(--sp-3); }

.cta-band {
  padding: var(--sp-6) var(--gutter);
  border-radius: var(--r-lg);
  background:
    radial-gradient(circle at 90% 10%, rgba(239, 6, 136, .45), transparent 40%),
    radial-gradient(circle at 5% 100%, rgba(4, 193, 245, .35), transparent 40%),
    linear-gradient(135deg, #2b1a4a, #4a1f7a);
  color: #fff;
  text-align: center;
}
.cta-band h2 { color: #fff; }
.cta-band p { color: #f3e6de; max-width: 560px; margin-inline: auto; }
.cta-band .btn-group { justify-content: center; margin-top: var(--sp-4); }
.cta-band .btn--secondary { color: #fff; border-color: #fff; }
.cta-band .btn--secondary:hover { background: #fff; color: var(--c-texto); }

/* ---------- Formularios ---------- */
.form { display: grid; gap: var(--sp-4); }
.form-row { display: grid; gap: var(--sp-4); grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.field { display: grid; gap: var(--sp-1); }
.field label, .field legend { font-weight: 700; }
.field .hint { font-size: var(--fs-xs); color: var(--c-texto-2); font-weight: 400; }
.field input, .field select, .field textarea {
  width: 100%;
  min-height: 48px;
  padding: .7rem .9rem;
  border: 1.5px solid #cdb6a8;
  border-radius: var(--r-md);
  background: var(--c-superficie);
  font: inherit;
  color: var(--c-texto);
}
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--c-turquesa-texto); outline: 3px solid rgba(31, 107, 99, .25); outline-offset: 0; }
.honeypot { display: none !important; }

/* ---------- Artículos (blog, legales) ---------- */
.prose { max-width: var(--ancho-lectura); margin-inline: auto; font-size: var(--fs-md); }
.prose h2 { font-size: var(--fs-lg); margin-top: var(--sp-6); color: var(--c-turquesa-texto); }
.prose h3 { font-size: 1.2rem; margin-top: var(--sp-5); }
.prose img { border-radius: var(--r-md); margin: var(--sp-4) 0; }
.prose ul, .prose ol { padding-left: 1.25rem; }
.prose li { margin-bottom: var(--sp-2); }
.meta { font-size: var(--fs-xs); color: var(--c-texto-2); }

/* ---------- Botón flotante de WhatsApp ---------- */
.fab-whatsapp {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 950;
  display: grid;
  place-items: center;
  width: 60px; height: 60px;
  border-radius: 50%;
  background: #25d366;
  box-shadow: var(--sh-3);
  transition: transform var(--t-rapida);
}
.fab-whatsapp:hover { transform: scale(1.06); }
.fab-whatsapp svg { width: 34px; height: 34px; fill: #fff; }

/* ---------- Footer ---------- */

.site-footer {
  margin-top: var(--sp-7);
  padding-block: var(--sp-6) var(--sp-4);
  background: #2b1a4a;
  color: #efe7f7;
  font-size: var(--fs-xs);
}
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { color: var(--c-amarillo); text-decoration: underline; }
.site-footer__grid { display: grid; gap: var(--sp-5); grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.site-footer h2 { font: 800 var(--fs-xs)/1.2 var(--f-texto); letter-spacing: .12em; text-transform: uppercase; color: var(--c-amarillo); margin-bottom: var(--sp-3); }
.site-footer ul { margin: 0; padding: 0; list-style: none; display: grid; gap: var(--sp-2); }
.site-footer ul a { display: inline-flex; align-items: center; gap: var(--sp-2); min-height: 32px; }
.site-footer svg { width: 20px; height: 20px; fill: currentColor; flex-shrink: 0; }
.site-footer__brand { display: flex; align-items: center; gap: var(--sp-3); font: 600 1.35rem/1 var(--f-display); color: #fff; margin-bottom: var(--sp-3); }
.site-footer__brand img { width: auto; height: 64px; padding: 6px 12px; border-radius: var(--r-md); background: #fffdf8; }
.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--sp-3);
  margin-top: var(--sp-6);
  padding-top: var(--sp-4);
  border-top: 1px solid rgba(243, 230, 222, .2);
  color: #d9c7bc;
}

/* ==========================================================================
   Capa artística: papel picado, pinceladas, acuarela y trazos a mano
   ========================================================================== */

/* Guirnalda de papel picado */
.papel-picado,
.page-hero::before,
.hero::before,
.site-footer::before {
  content: "";
  display: block;
  height: 54px;
  background: url("/img/papel-picado.svg") repeat-x left top / auto 54px;
  pointer-events: none;
}
.page-hero { position: relative; padding-top: 0; }
.page-hero::before { margin-bottom: var(--sp-5); }
.site-footer { position: relative; padding-top: 0; }
.site-footer::before { margin-bottom: var(--sp-6); opacity: .85; }

/* Palabra resaltada con pincelada */
.brush {
  position: relative;
  white-space: nowrap;
  padding-inline: .08em;
  background: url("/img/pincelada.svg") no-repeat center 85% / 100% .55em;
}

/* Manchas de acuarela en fondos */
.acuarela { position: relative; isolation: isolate; overflow: hidden; }
.acuarela::before,
.acuarela::after {
  content: "";
  position: absolute;
  z-index: -1;
  width: min(46vw, 460px);
  aspect-ratio: 1;
  border-radius: 58% 42% 63% 37% / 45% 55% 45% 55%;
  filter: blur(34px);
  opacity: .45;
  pointer-events: none;
}
.acuarela::before { top: -12%; left: -10%; background: var(--c-magenta); opacity: .22; }
.acuarela::after { bottom: -18%; right: -8%; background: var(--c-turquesa-claro); border-radius: 40% 60% 35% 65% / 60% 40% 60% 40%; }
.acuarela::after { background: var(--c-cian); opacity: .3; }
.section--suave.acuarela::after { background: var(--c-amarillo); opacity: .35; }

/* Títulos de sección con trazo a mano debajo */
.section-head h2::after {
  content: "";
  display: block;
  width: 120px;
  height: 14px;
  margin: var(--sp-2) auto 0;
  background: url("/img/pincelada.svg") no-repeat center / 100% 100%;
}

/* Números pintados en los pasos */
.steps li::before {
  border-radius: 62% 38% 55% 45% / 48% 60% 40% 52%;
  font-family: var(--f-mano);
  font-size: 1.9rem;
  color: #fff;
  background: var(--c-magenta);
  transform: rotate(-6deg);
}
.steps li:nth-child(2)::before { background: var(--c-azul); transform: rotate(5deg); }
.steps li:nth-child(3)::before { background: var(--c-violeta); transform: rotate(-3deg); }

/* Tarjetas con borde superior pintado */
.card { position: relative; }
.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  z-index: 1;
  height: 5px;
  background: var(--c-magenta);
}
.card:nth-child(3n+2)::before { background: var(--c-amarillo); }
.card:nth-child(3n)::before { background: var(--c-rosa); }

/* Galería: marcos tipo foto impresa que se inclinan al pasar */
.gallery-item { border: 6px solid #fff; transition: transform var(--t-media), box-shadow var(--t-media); }
.gallery-item:nth-child(odd):hover { transform: rotate(-1.5deg) scale(1.02); box-shadow: var(--sh-3); }
.gallery-item:nth-child(even):hover { transform: rotate(1.5deg) scale(1.02); box-shadow: var(--sh-3); }
.gallery-item:hover img { transform: none; }

/* Nota manuscrita */
.nota-mano { font: 600 1.35rem/1.2 var(--f-mano); color: var(--c-primario); }

@media (prefers-reduced-motion: reduce) {
  .gallery-item:hover { transform: none !important; }
}

/* Menú con el banner de la marca: franja clara con olas a todo lo ancho y el logo */
/* Fija arriba con espacio reservado: al compactarse no mueve el contenido */
:root { --header-banner: 124px; }
body:has(> .site-header--banner) { padding-top: var(--header-banner); }
.site-header--banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  isolation: isolate;
  background: #f5effe;           /* violeta claro */
  border-bottom: 0;
  backdrop-filter: none;
  box-shadow: 0 8px 22px -12px rgba(43, 26, 74, .35);
}
.header-waves { position: absolute; inset: 0; overflow: hidden; z-index: -1; }
.header-waves .wave {
  position: absolute;
  border-radius: 40%;
  animation: wave 30s infinite linear;
  will-change: transform;   /* la rotación se hace en la GPU, sin repintar al hacer scroll */
}
.header-waves .wave:nth-child(1) { left: 16%; width: 1500px; height: 1500px; top: -660px; background: #ffe2f3; animation-duration: 32s; }                               /* magenta */
.header-waves .wave:nth-child(2) { left: 44%; width: 1350px; height: 1350px; top: -594px; background: #ffd9e3; animation-duration: 26s; animation-direction: reverse; }  /* rosa */
.header-waves .wave:nth-child(3) { left: 70%; width: 1550px; height: 1550px; top: -682px; background: #ffe4cc; animation-duration: 38s; }                               /* naranja */

.site-header--banner .site-header__inner { min-height: 124px; }
.brand--logo img { width: auto; height: 84px; border-radius: 0; }

.site-header--banner .site-nav ul a { color: var(--c-texto); }
.site-header--banner .site-nav ul a:hover { background: rgba(255, 255, 255, .55); }
.site-header--banner .site-nav ul a[aria-current="page"] { color: var(--c-texto); box-shadow: inset 0 -3px 0 var(--c-magenta); }
.site-header--banner .lang-switch a { color: var(--c-texto); }
.site-header--banner .lang-switch a[aria-current="true"] { background: rgba(255, 255, 255, .7); }

/* Compacta al hacer scroll */
.site-header--banner.is-compact .site-header__inner { min-height: var(--header-alto); }
.brand--logo .brand__k { display: none; }
.site-header--banner.is-compact .brand--logo .brand__full { display: none; }
.site-header--banner.is-compact .brand--logo .brand__k { display: block; height: 54px; }

@media (max-width: 960px) {
  :root { --header-banner: 104px; }
  .site-header--banner .site-header__inner { min-height: 104px; }
  .brand--logo img { height: 58px; }
  .header-waves .wave:nth-child(n) { width: 700px; height: 700px; top: -300px; }
  .header-waves .wave:nth-child(1) { left: 12%; }
  .header-waves .wave:nth-child(2) { left: 42%; }
  .header-waves .wave:nth-child(3) { left: 70%; }
}

@keyframes wave {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ---------- Carrusel de tarjetas (deslizable, con botones) ---------- */
.carousel { position: relative; }
.carousel__track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 2 * var(--sp-4)) / 3);
  gap: var(--sp-4);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: var(--sp-2) 2px var(--sp-4);
  scrollbar-width: none;
}
.carousel__track::-webkit-scrollbar { display: none; }
.carousel__track > * { scroll-snap-align: start; }
.carousel__btn {
  position: absolute;
  top: 38%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: var(--c-superficie);
  color: var(--c-texto);
  font-size: 1.7rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--sh-2);
  transition: opacity var(--t-rapida);
}
.carousel__btn--prev { left: -18px; }
.carousel__btn--next { right: -18px; }
.carousel__btn:disabled { opacity: 0; pointer-events: none; }
@media (max-width: 900px) {
  .carousel__track { grid-auto-columns: calc((100% - var(--sp-4)) / 2); }
}
@media (max-width: 600px) {
  .carousel__track { grid-auto-columns: 84%; }
  .carousel__btn { width: 40px; height: 40px; }
  .carousel__btn--prev { left: -6px; }
  .carousel__btn--next { right: -6px; }
}

/* Llamado a la acción de S Quetzal Digital al final de la página (reemplaza al antiguo popup) */
.site-footer:has(.footer-cta) { padding-bottom: 0; }
.footer-cta {
  margin-top: var(--sp-5);
  padding-block: var(--sp-4);
  background: #1c1033;
  border-top: 3px solid var(--c-magenta);
}
.footer-cta__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3) var(--sp-5);
}
.footer-cta__title { margin: 0; font: 600 1.25rem/1.3 var(--f-display); color: #fff; }
.footer-cta__sub { margin: 2px 0 0; color: #cfc3e0; }
.site-footer a.footer-cta__btn { background: var(--c-amarillo); color: #2b1a4a; }
.site-footer a.footer-cta__btn:hover { background: #ffd24d; color: #2b1a4a; text-decoration: none; }
@media (max-width: 600px) {
  .footer-cta__inner { flex-direction: column; align-items: flex-start; }
}
