/**
 * overrides.css — UNLAYERED (NO @layer)
 *
 * Reglas que necesitan ganarle al CSS unlayered de GeneratePress / Elementor.
 * Las capas @layer SIEMPRE pierden contra reglas unlayered de igual o mayor
 * especificidad. Este archivo se encola al final con la mayor prioridad.
 *
 * @package SmartCateringChild
 * @since   Fase 1 polish (2026-06-03)
 */

/* ─── Skip-to-content link (Fase 2 foundations — a11y, doc 03 §4.30) ────────
 * Off-screen until keyboard-focused, then reveals as a high-contrast pill in
 * the top-left. Targets #scc-main-content (focus anchor injected after the
 * chrome). Lets keyboard / screen-reader users bypass the nav. */
body.scc-fase0 .sc-skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 1000;
  padding: 0.75rem 1.25rem;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  background: var(--color-dark);
  color: var(--color-white);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: var(--fw-medium);
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: top var(--dur-fast) var(--ease-out-soft);
}
body.scc-fase0 .sc-skip-link:focus,
body.scc-fase0 .sc-skip-link:focus-visible {
  top: 1rem;
  color: var(--color-white);
  outline: 2px solid var(--color-gold);
  outline-offset: 2px;
}
body.scc-fase0 .sc-skip-target {
  display: block;
  height: 0;
  width: 0;
}

/* ─── Estado activo nav (fix 2026-06-03) ──────────────────────────────
 * Marca visualmente la pestaña de la página actual. Subrayado dorado
 * permanente (mismo color que el hover existente) + bold para refuerzo.
 * Replicamos el ::after del hover para que aparezca sin trigger de mouse. */
body.scc-fase0 .sc-nav__link.is-active {
  font-weight: 600;
}
body.scc-fase0 .sc-nav__link.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--color-gold);
}
body.scc-fase0 .sc-mobile-menu__link.is-active,
body.scc-fase0 .sc-mobile-menu__list a.is-active {
  color: var(--color-gold);
}

/* ─── Reset listas (anti-GeneratePress disc bullets) ───────────────── */
body.scc-fase0 .sc-nav__menu,
body.scc-fase0 .sc-mobile-menu__list,
body.scc-fase0 .sc-footer ul,
body.scc-fase0 .sc-footer ol {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

body.scc-fase0 .sc-nav__menu li,
body.scc-fase0 .sc-mobile-menu__list li,
body.scc-fase0 .sc-footer ul li,
body.scc-fase0 .sc-footer ol li {
  list-style: none;
  list-style-type: none;
  display: list-item;
}

body.scc-fase0 .sc-nav__menu li::marker,
body.scc-fase0 .sc-mobile-menu__list li::marker,
body.scc-fase0 .sc-footer li::marker {
  content: "";
}

/* ─── Footer typography (match prototipo) ───────────────────────────── */
body.scc-fase0 .sc-footer { font-family: var(--font-sans, 'Overpass', sans-serif); }

body.scc-fase0 .sc-footer__nav a,
body.scc-fase0 .sc-footer__contact li,
body.scc-fase0 .sc-footer__contact a,
body.scc-fase0 .sc-footer__legal a,
body.scc-fase0 .sc-footer__social a,
body.scc-fase0 .sc-footer ul a,
body.scc-fase0 .sc-footer a {
  color: rgb(216, 214, 204);
  font-size: 14px;
  line-height: 1.6;
  font-family: var(--font-sans, 'Overpass', sans-serif);
}

body.scc-fase0 .sc-footer a:hover { color: var(--color-gold, #d99e39); }

body.scc-fase0 .sc-footer h4,
body.scc-fase0 .sc-footer__col h4 {
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 500;
  color: rgb(216, 214, 204);
}

body.scc-fase0 .sc-footer__copy,
body.scc-fase0 .sc-footer__bottom,
body.scc-fase0 .sc-footer__credit,
body.scc-fase0 .sc-footer__lang {
  color: rgb(216, 214, 204);
  font-size: 12px;
  line-height: 1.6;
  font-family: var(--font-sans, 'Overpass', sans-serif);
}

/* ─── Language switcher con banderas (nav inline) ───────────────────── */
body.scc-fase0 .sc-nav__lang {
  display: inline-flex;
  gap: 0.5rem;
  align-items: center;
}

body.scc-fase0 .sc-nav__lang-link {
  display: inline-flex;
  align-items: center;
  opacity: 0.55;
  transition: opacity 0.18s ease;
  line-height: 0;
  border-radius: 2px;
  overflow: hidden;
}

body.scc-fase0 .sc-nav__lang-link.is-active,
body.scc-fase0 .sc-nav__lang-link:hover,
body.scc-fase0 .sc-nav__lang-link:focus-visible { opacity: 1; }

body.scc-fase0 .sc-nav__lang-link img {
  display: block;
  width: 24px;
  height: 16px;
  object-fit: cover;
}

/* ─── Burger + Mobile close button: transparent bg (anti GP/Elementor) ─── */
/*
 * GeneratePress y Elementor inyectan `button { background: ... }` sin layer,
 * lo que pinta el burger / botón close con fondo dorado. Aquí lo forzamos a
 * transparente y nos aseguramos que la X del close sea blanca y limpia.
 */
body.scc-fase0 .sc-nav__burger,
body.scc-fase0 .sc-nav__burger:hover,
body.scc-fase0 .sc-nav__burger:focus,
body.scc-fase0 .sc-nav__burger:focus-visible,
body.scc-fase0 .sc-nav__burger[aria-expanded="true"],
body.scc-fase0 .sc-mobile-menu__close,
body.scc-fase0 .sc-mobile-menu__close:hover,
body.scc-fase0 .sc-mobile-menu__close:focus,
body.scc-fase0 .sc-mobile-menu__close:focus-visible {
  background: transparent;
  background-color: transparent;
  border: 0;
  box-shadow: none;
  padding: 0.5rem;
}

body.scc-fase0 .sc-mobile-menu__close,
body.scc-fase0 .sc-mobile-menu__close svg {
  color: #fff;
  stroke: #fff;
}

/* Burger oculto cuando el menú está abierto (la X la pone .sc-mobile-menu__close) */
body.scc-fase0 .sc-nav__burger[aria-expanded="true"] {
  visibility: hidden;
}

/* ─── Touch targets ≥44×44 (Fase 2 foundations — AC-R6.*) ──────────────────
 * WCAG 2.5.5 / Apple HIG minimum tap area. The visible flag (24×16) and
 * icon glyphs stay the same size; we only enlarge the interactive box by
 * centering the content inside a 44×44 min-size flex box. Applies on touch
 * viewports; desktop nav links keep their compact rhythm but still meet the
 * target via padding. */
body.scc-fase0 .sc-nav__lang-link,
body.scc-fase0 .sc-mobile-menu__lang .sc-nav__lang-link,
body.scc-fase0 .sc-nav__burger,
body.scc-fase0 .sc-mobile-menu__close {
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Fix (2026-06-18): the touch-target rule above sets display:inline-flex with no
 * media query, which overrode the burger's desktop hide (nav.css @media min-width:1024px).
 * Re-assert the hide so the hamburger stays hidden on desktop (>=1024px). */
@media (min-width: 1024px) {
  body.scc-fase0 .sc-nav__burger {
    display: none;
  }
}

@media (max-width: 1023px) {
  body.scc-fase0 .sc-nav__link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }
}

/* ─── Mobile menu: centering vertical + horizontal ─────────────────────── */
body.scc-fase0 .sc-mobile-menu {
  display: flex;
  flex-direction: column;
}

body.scc-fase0 .sc-mobile-menu__list {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-8) var(--space-6);
  gap: var(--space-6);
}

body.scc-fase0 .sc-mobile-menu__list li {
  display: block;
  text-align: center;
  width: 100%;
}

body.scc-fase0 .sc-mobile-menu__list a {
  display: inline-block;
  text-align: center;
}

/* ─── Mobile language switcher: usar banderas SVG igual que desktop ───── */
body.scc-fase0 .sc-mobile-menu__lang {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
  padding: 0 var(--space-6) var(--space-8);
}

body.scc-fase0 .sc-mobile-menu__lang .sc-nav__lang-link {
  display: inline-flex;
  align-items: center;
  opacity: 0.55;
  transition: opacity 0.18s ease;
  line-height: 0;
  border-radius: 2px;
  overflow: hidden;
}

body.scc-fase0 .sc-mobile-menu__lang .sc-nav__lang-link.is-active,
body.scc-fase0 .sc-mobile-menu__lang .sc-nav__lang-link:hover,
body.scc-fase0 .sc-mobile-menu__lang .sc-nav__lang-link:focus-visible {
  opacity: 1;
}

body.scc-fase0 .sc-mobile-menu__lang .sc-nav__lang-link img {
  display: block;
  width: 28px;
  height: 18px;
  object-fit: cover;
}

/* ─── Fase 2: ocultar wrappers vacios de GeneratePress site-chrome ───
 * El nav+footer custom se inyectan via hooks (inc/site-chrome.php) en
 * todas las paginas. Los wrappers GP (.site-header / .site-footer) y la
 * navegacion movil de GP quedan vacios pero ocupan espacio si tienen
 * estilos. Los ocultamos en paginas con chrome inyectado.
 * En page-home.php (.scc-chrome-inline) no aplica porque ya rinde su
 * propio doc sin esos wrappers.
 */
body.scc-chrome-injected .site-header,
body.scc-chrome-injected .site-footer,
body.scc-chrome-injected #masthead,
body.scc-chrome-injected .main-navigation:not(.sc-nav),
body.scc-chrome-injected .navigation-branding,
body.scc-chrome-injected .footer-widgets,
body.scc-chrome-injected .site-info {
  display: none !important;
}

/* Padding-top en el contenido principal para compensar el nav fijo.
 * .sc-nav es position:fixed top:20px con altura ~64-72px → ~110px de offset
 * para evitar que el nav tape el primer bloque Elementor.
 * En home (.scc-chrome-inline) no aplica: el hero dark ocupa el viewport
 * completo y el nav arranca translucido sobre el.
 */
body.scc-chrome-injected #page {
  padding-top: 110px;
}
@media (max-width: 768px) {
  body.scc-chrome-injected #page {
    padding-top: 90px;
  }
}

/* ===========================================================================
 * Logo wall corporativo — clientes e instituciones (Fase X5 reposicionamiento)
 * ========================================================================= */
.sc-logo-wall-corporate__header {
  text-align: center;
  margin-bottom: clamp(2rem, 4vw, 3.5rem);
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}
.sc-logo-wall-corporate__grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: clamp(1.5rem, 3vw, 2.5rem) clamp(1rem, 2vw, 2rem);
  align-items: center;
  justify-items: center;
}
.sc-logo-wall-corporate__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  width: 100%;
  text-align: center;
}
.sc-logo-wall-corporate__img {
  max-width: 160px;
  max-height: 70px;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: grayscale(0.4);
  opacity: 0.85;
  transition: filter 0.3s ease, opacity 0.3s ease, transform 0.3s ease;
}
.sc-logo-wall-corporate__item:hover .sc-logo-wall-corporate__img {
  filter: grayscale(0);
  opacity: 1;
  transform: translateY(-2px);
}
.sc-logo-wall-corporate__note {
  font-family: var(--scc-font-body, Overpass, sans-serif);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--scc-color-dark, #000);
  opacity: 0.55;
  line-height: 1.3;
}
.sc-logo-wall-corporate__footnote {
  text-align: center;
  margin-top: clamp(2rem, 4vw, 3rem);
  font-size: 0.85rem;
  opacity: 0.65;
  font-style: italic;
}
/* Dark variant */
.sc-logo-wall-corporate--dark .sc-logo-wall-corporate__img {
  filter: grayscale(1) brightness(0) invert(1);
  opacity: 0.75;
}
.sc-logo-wall-corporate--dark .sc-logo-wall-corporate__item:hover .sc-logo-wall-corporate__img {
  filter: grayscale(0) brightness(0) invert(1);
  opacity: 1;
}
.sc-logo-wall-corporate--dark .sc-logo-wall-corporate__note,
.sc-logo-wall-corporate--dark .sc-logo-wall-corporate__footnote {
  color: var(--scc-color-cream, #F8F7F2);
}
@media (max-width: 600px) {
  .sc-logo-wall-corporate__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem 0.75rem;
  }
  .sc-logo-wall-corporate__img {
    max-width: 120px;
    max-height: 56px;
  }
  .sc-logo-wall-corporate__note {
    font-size: 0.65rem;
  }
}

/* ===========================================================================
 * Hide "Pendiente Harri" placeholder notes from public (Bodas — Fase 5)
 * The kosher placeholder block ships with honest internal notes ("Pendiente
 * Harri — nivel kosher" / "Pendiente de confirmar con Harri…"). They must stay
 * visible for the team while editing (WordPress adds `logged-in` to <body> for
 * authenticated users) but be hidden from public visitors. The neutral premium
 * copy ("Operamos cocina separada…") is a plain <p> and is intentionally NOT
 * targeted, so the section keeps a working description without the pending data.
 * ========================================================================= */
.sc-division-case--placeholder .sc-division-case__client,
.sc-division-case--placeholder .sc-division-case__note,
.scc-placeholder {
  display: none !important;
}

body.logged-in .sc-division-case--placeholder .sc-division-case__client,
body.logged-in .sc-division-case--placeholder .sc-division-case__note {
  display: block !important;
  outline: 1px dashed var(--color-gold-ink, #a87410);
  outline-offset: 4px;
}

/* Inline placeholder note (e.g. kosher type accordion): revealed inline for the
 * team, hidden inline for the public. Uses inline display so it stays in the
 * sentence flow when an editor is logged in. */
body.logged-in .scc-placeholder {
  display: inline !important;
  outline: 1px dashed var(--color-gold-ink, #a87410);
  outline-offset: 2px;
}

/* ===========================================================================
 * Nav links: kill underlines + bump size (feedback Pepe 2026-06-05)
 * Underlines vienen de GeneratePress/Elementor link defaults; .sc-nav__link
 * tiene text-decoration:none en layer pero un unlayered de tema las pinta.
 * ========================================================================= */
.sc-nav__link,
.sc-nav__link:link,
.sc-nav__link:visited,
.sc-nav__link:hover,
.sc-nav__link:focus,
.sc-nav__link:active,
.sc-nav .sc-nav__link {
  text-decoration: none !important;
  font-size: 1rem !important;
  letter-spacing: 0.03em;
}
@media (max-width: 1023px) {
  .sc-nav__link {
    font-size: 1.05rem !important;
  }
}

/* ===========================================================================
 * Sobre hero — bloque de video first-class (feedback Pepe 2026-06-05)
 * Reemplaza al video como fondo. Ahora bloque dedicado con controles nativos,
 * autoplay muted (browser policy), pausa al salir del viewport (JS).
 * ========================================================================= */
.sc-sobre-hero--text {
  padding-block: clamp(3rem, 7vw, 5rem);
}
/* Cancela el layout full-bleed bottom-aligned heredado del hero antiguo (video bg). */
.sc-sobre-hero--text .sc-sobre-hero__content {
  display: block !important;
  min-height: 0 !important;
  height: auto !important;
  justify-content: flex-start !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}
.sc-sobre-hero--text .sc-sobre-hero__title {
  font-family: var(--scc-font-display, Merriweather, serif);
  font-size: clamp(2rem, 4.5vw, 3.4rem);
  line-height: 1.1;
  margin: 0.5rem 0 1.25rem;
}
.sc-sobre-hero--text .sc-sobre-hero__lead {
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  line-height: 1.55;
  max-width: 720px;
  opacity: 0.92;
}
.sc-sobre-video-block {
  padding-block: clamp(2rem, 5vw, 3.5rem) clamp(3rem, 6vw, 5rem);
}
.sc-sobre-video-block__frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  /* Poster as frame background so the block is never a pure-black void while
   * the video buffers (the MP4 is heavy) or before the <video> poster paints. */
  background: #000 url("../img/photos/nuestra-historia-poster-2.jpg") center / cover no-repeat;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}
.sc-sobre-video-block__video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
/* Big play button overlay — visible mientras el frame está .is-idle */
.sc-sobre-video-block__play {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, rgba(0,0,0,0.25) 0%, rgba(0,0,0,0.55) 100%);
  border: 0;
  cursor: pointer;
  color: var(--scc-color-cream, #F8F7F2);
  font-family: var(--scc-font-body, Overpass, sans-serif);
  transition: background 0.3s ease, opacity 0.4s ease;
  z-index: 2;
}
.sc-sobre-video-block__play:hover {
  background: linear-gradient(180deg, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0.45) 100%);
}
.sc-sobre-video-block__play:focus-visible {
  background: linear-gradient(180deg, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0.45) 100%);
  outline: 3px solid var(--scc-color-gold, #D99E39); /* a11y: gold on dark video bg = passes AA. Inset offset avoids clip. */
  outline-offset: -3px;
}
.sc-sobre-video-block__play-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: clamp(72px, 9vw, 112px);
  height: clamp(72px, 9vw, 112px);
  border-radius: 50%;
  background: var(--scc-color-gold, #D99E39);
  color: #000;
  box-shadow: 0 12px 36px rgba(0,0,0,0.45), 0 0 0 0 rgba(217,158,57,0.45);
  transition: transform 0.25s ease, box-shadow 0.4s ease;
  animation: scc-play-pulse 2.4s ease-out infinite;
}
.sc-sobre-video-block__play-icon svg {
  width: 42%;
  height: 42%;
  margin-left: 6%; /* compensa el triángulo asimétrico */
}
.sc-sobre-video-block__play:hover .sc-sobre-video-block__play-icon,
.sc-sobre-video-block__play:focus-visible .sc-sobre-video-block__play-icon {
  transform: scale(1.06);
  animation: none;
  box-shadow: 0 16px 48px rgba(0,0,0,0.55), 0 0 0 8px rgba(217,158,57,0.18);
}
.sc-sobre-video-block__play-label {
  font-size: clamp(0.9rem, 1.5vw, 1.1rem);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-shadow: 0 2px 8px rgba(0,0,0,0.4);
}
@keyframes scc-play-pulse {
  0%   { box-shadow: 0 12px 36px rgba(0,0,0,0.45), 0 0 0 0 rgba(217,158,57,0.45); }
  70%  { box-shadow: 0 12px 36px rgba(0,0,0,0.45), 0 0 0 22px rgba(217,158,57,0); }
  100% { box-shadow: 0 12px 36px rgba(0,0,0,0.45), 0 0 0 0 rgba(217,158,57,0); }
}
/* Una vez activado: ocultar overlay con fade. El video toma el control con sus controles nativos. */
.sc-sobre-video-block__frame:not(.is-idle) .sc-sobre-video-block__play {
  opacity: 0;
  pointer-events: none;
}

/* ============================================================ */
/* Centered CTA alignment fix (prelaunch QA).                   */
/* text-align:center centers inline text but NOT block boxes:   */
/* lead paragraphs carry a max-width (so their box sits left),  */
/* and button rows use display:flex with no justify-content     */
/* (so buttons pack to the start). Center both to match the     */
/* already-centered heading. Scoped to the CTA blocks only so   */
/* left-aligned sections that reuse .sc-section__lead are safe. */
/* ============================================================ */
body.scc-fase0 .sc-bodas-cta__inner .sc-section__lead,
body.scc-fase0 .sc-servicios-cta__inner .sc-section__lead,
body.scc-fase0 .sc-division-cta__inner .sc-section__lead,
body.scc-fase0 .sc-finca-catering .sc-section__lead {
  margin-inline: auto;
}
body.scc-fase0 .sc-bodas-cta__inner > div {
  justify-content: center;
}
body.scc-fase0 .sc-finca-catering .sc-section__inner {
  text-align: center;
}
