/* Styles owned by the refactor: everything Sitejet used to inject at runtime. */

/* ---- Gallery lightbox (replaces the bundle's overlay) -------------------- */
.vanilla-lightbox {
  width: min(92vw, 1200px);
  max-width: none;
  max-height: 92vh;
  padding: 0;
  border: none;
  border-radius: 10px;
  background: #101010;
  color: #fff;
  overflow: visible;
}

.vanilla-lightbox::backdrop {
  background: rgba(0, 0, 0, 0.82);
}

.vanilla-lightbox .vl-figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.vanilla-lightbox .vl-figure img {
  display: block;
  width: 100%;
  max-height: 84vh;
  object-fit: contain;
  border-radius: 10px;
}

.vanilla-lightbox figcaption {
  font-family: 'Lato', sans-serif;
  font-size: 14px;
  padding: 10px 14px;
}

.vanilla-lightbox button {
  position: absolute;
  z-index: 2;
  border: none;
  background: rgba(108, 65, 154, 0.85);
  color: #fff;
  font-size: 26px;
  line-height: 1;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
}

.vanilla-lightbox button:hover,
.vanilla-lightbox button:focus-visible {
  background: #dacc1f;
  color: #333;
}

.vanilla-lightbox .vl-close { top: -18px; right: -18px; }
.vanilla-lightbox .vl-prev { left: -18px; top: calc(50% - 22px); }
.vanilla-lightbox .vl-next { right: -18px; top: calc(50% - 22px); }

@media screen and (max-width: 575px) {
  .vanilla-lightbox .vl-close { top: 6px; right: 6px; }
  .vanilla-lightbox .vl-prev { left: 4px; }
  .vanilla-lightbox .vl-next { right: 4px; }
}

/* ---- Contact call to action (replaces the PHP-backed form) -------------- */
.contact-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  width: 100%;
}

.contact-cta .contact-cta-note {
  flex: 0 0 100%;
  text-align: center;
  font-family: 'Lato', sans-serif;
  margin: 0 0 4px;
}

/* On phones the two actions stack, so give them the same width instead of
   leaving the short one floating in the middle. */
@media screen and (max-width: 35.9375rem) {
  .contact-cta .button {
    flex: 1 1 100%;
    text-align: center;
    /* Shrink with the screen so the email address stays on one line; only
       break it on screens too narrow even for that. */
    font-size: clamp(13px, 6.1vw - 8px, 20px);
    overflow-wrap: anywhere;
  }
}

/* The footer box is a flex item, so by default it can't shrink below the
   email address on its button and pushes past the right edge of the screen,
   leaving a margin only on the left. */
.footer-tyr-box-form { min-width: 0; }

/* ---- Slider controls rebuilt without slick's JS ------------------------- */
.slider-container { position: relative; overflow: hidden; }
.slider-container .slick-list { overflow: hidden; }
.slider-container .slick-track { will-change: transform; }

.slider-container .slick-arrow {
  position: absolute;
  top: calc(50% - 22px);
  z-index: 2;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(108, 65, 154, 0.85);
  color: #fff;
  font-size: 0;
  cursor: pointer;
}

.slider-container .slick-arrow::before {
  font-size: 20px;
  line-height: 44px;
  color: inherit;
}

.slider-container .slick-prev { left: 12px; }
.slider-container .slick-next { right: 12px; }
.slider-container .slick-prev::before { content: '\2039'; }
.slider-container .slick-next::before { content: '\203A'; }

.slider-container .slick-dots {
  position: absolute;
  bottom: 8px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.slider-container .slick-dots li button {
  width: 11px;
  height: 11px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  font-size: 0;
  cursor: pointer;
}

.slider-container .slick-dots li.slick-active button { background: #dacc1f; }

/* ---- Pending video placeholder (hosting not decided yet) ---------------- */
.video-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  aspect-ratio: 16 / 9;
  border: 2px dashed #6c419a;
  border-radius: 6px;
  background: #f4f1f8 center/cover no-repeat;
  color: #6c419a;
  font-family: 'Lato', sans-serif;
  font-size: 0.9rem;
  text-align: center;
  padding: 12px;
}

.video-placeholder.has-poster {
  position: relative;
  color: #fff;
  border-style: solid;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

.video-placeholder.has-poster::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 4px;
}

.video-placeholder svg,
.video-placeholder span {
  position: relative;
}

/* ---- Granaíno ON/OFF switch (replaces the ON/OFF image) --------------- */
/* Lives in the floating social dock, under the icons, styled like them. */
/* The dock sits flush against the right edge; keep the pill off it. */
.lang-switch-holder {
  margin: 0.4rem calc(0.4rem + 8px) 0.4rem 0.4rem;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 4px 3px 8px;
  border: 3px solid #6c419a;
  border-radius: 999px;
  background: #d9cc34;
  color: #6c419a;
  font-family: 'Lato', sans-serif;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.04em;
  line-height: 1;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
}

/* Beats the site-wide a:hover (red, underlined). */
.lang-switch:hover {
  color: #6c419a;
  text-decoration: none;
}

.lang-switch:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 2px;
}

.lang-switch__track {
  position: relative;
  flex: none;
  width: 38px;
  height: 18px;
  border-radius: 999px;
  background: #6c419a;
  transition: background-color 0.2s ease;
}

.lang-switch__state {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: #d9cc34;
  font-size: 8px;
  transition: opacity 0.2s ease;
}

.lang-switch__state--on {
  left: 5px;
  color: #fff;
  opacity: 0;
}

.lang-switch__state--off {
  right: 4px;
}

.lang-switch__thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #d9cc34;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s ease;
}

.lang-switch:hover .lang-switch__thumb {
  box-shadow: 0 0 0 3px rgba(217, 204, 52, 0.35), 0 1px 2px rgba(0, 0, 0, 0.35);
}

/* ON: the page on screen is granaíno, or the visitor is switching to it. */
.lang-switch[data-variant="granaino"]:not(.is-switching) .lang-switch__track,
.lang-switch[data-variant="es"].is-switching .lang-switch__track {
  background: #4b7936;
}

.lang-switch[data-variant="granaino"]:not(.is-switching) .lang-switch__thumb,
.lang-switch[data-variant="es"].is-switching .lang-switch__thumb {
  transform: translateX(20px);
}

.lang-switch[data-variant="granaino"]:not(.is-switching) .lang-switch__state--on,
.lang-switch[data-variant="es"].is-switching .lang-switch__state--on {
  opacity: 1;
}

.lang-switch[data-variant="granaino"]:not(.is-switching) .lang-switch__state--off,
.lang-switch[data-variant="es"].is-switching .lang-switch__state--off {
  opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
  .lang-switch__track,
  .lang-switch__state,
  .lang-switch__thumb {
    transition: none;
  }
}
