/* Réplica cercana a Webador / style.css del sitio original */
@import url("https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,400;0,700;0,900;1,400&family=Merriweather:ital,wght@0,400;0,700;1,400&display=swap");

:root {
  --amber: #f59e0b;
  --amber-hover: rgba(245, 158, 11, 0.8);
  --header-bg: #333333;
  --menu-muted: #a3a3a3;
  --text-body: #6a6a6a;
  --text-heading-muted: #6a6a6a;
  --box-shaded: #ececec;
  --split-text-bg: #f4f4f4;
  --split-title: #555555;
  --split-body: #777777;
  --wa: #25d366;
  --wa-hover: #1ebe5a;
  --page-pad-x: clamp(1rem, 4vw, 2.25rem);
  --content-max: 1280px;
  --dept-catalog-max: 960px;
  /* Ritmo vertical compacto pero legible (evitar cuerpo < 15px salvo notas) */
  --section-y: clamp(1.1rem, 2.6vw, 1.65rem);
  --split-y: clamp(0.75rem, 1.8vw, 1.15rem);
  --hero-min-h: min(32vw, 200px);
  /* Fichas dept: alto máx. de área foto; contain = foto entera (bandas si hace falta) */
  --dept-photo-h: clamp(200px, 32vh, 300px);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Lato", system-ui, sans-serif;
  font-size: clamp(0.9375rem, 0.9rem + 0.15vw, 1rem);
  line-height: 1.55;
  color: var(--text-body);
  background: #fff;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* —— Skip —— */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0.5rem;
  background: #111;
  color: #fff;
  padding: 0.5rem 1rem;
  z-index: 2000;
  border-radius: 4px;
}

.skip-link:focus {
  left: 0.5rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* —— Header (block-header): sticky compacto; al scrollear ocupa menos altura —— */
.block-header {
  background-color: var(--header-bg);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition:
    background-color 200ms ease,
    box-shadow 200ms ease;
}

.block-header--scrolled {
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.22);
}

.block-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 1rem var(--page-pad-x);
  transition: padding 180ms ease;
}

.block-header--scrolled .block-header__inner {
  padding-top: 0.4rem;
  padding-bottom: 0.4rem;
}

.jw-header-title {
  margin: 0;
  line-height: 1;
  color: var(--amber);
  font-family: "Merriweather", Georgia, serif;
  font-weight: 400;
  font-style: normal;
  font-size: clamp(1.85rem, 4.8vw, 3.1rem);
  flex-shrink: 0;
  transition: font-size 180ms ease;
}

.block-header--scrolled .jw-header-title {
  font-size: clamp(1.05rem, 2.8vw, 1.65rem);
}

.block-header__inner > nav {
  flex-shrink: 0;
  margin-left: auto;
}

.jw-header-title a {
  color: inherit;
  text-decoration: none;
}

.jw-header-title a:hover {
  color: var(--amber-hover);
}

.jw-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.2rem 0.75rem;
  transition: gap 180ms ease;
}

.block-header--scrolled .jw-menu {
  gap: 0.15rem 0.55rem;
}

.jw-menu-link {
  color: #fff;
  text-decoration: none;
  border-bottom: 2px solid var(--amber);
  padding: 0.38rem 0.12rem;
  font-size: 0.92rem;
  transition:
    color 200ms ease,
    background 200ms ease,
    font-size 180ms ease,
    padding 180ms ease,
    border-width 180ms ease;
}

.block-header--scrolled .jw-menu-link {
  font-size: 0.78rem;
  padding: 0.18rem 0.08rem;
  border-bottom-width: 1.5px;
}

.jw-menu-link:hover,
.jw-menu-link:focus-visible {
  color: var(--amber);
  background: transparent;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  padding: 0.5rem;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  border-radius: 1px;
}

@media (prefers-reduced-motion: reduce) {
  .block-header,
  .block-header__inner,
  .jw-header-title,
  .jw-menu,
  .jw-menu-link {
    transition: none;
  }
}

@media (max-width: 768px) {
  .block-header__inner {
    justify-content: flex-start;
  }

  .nav-toggle {
    display: flex;
    margin-left: auto;
  }

  .block-header__inner > nav {
    margin-left: 0;
  }

  .jw-menu {
    display: none;
    position: absolute;
    right: 1rem;
    top: 100%;
    background: var(--header-bg);
    flex-direction: column;
    align-items: stretch;
    padding: 0.75rem 1rem;
    border: 1px solid #444;
    border-radius: 6px;
    min-width: 200px;
  }

  .jw-menu.is-open {
    display: flex;
    justify-content: flex-start;
  }
}

/* —— Hero: misma foto + texto encima (jw-strip--image-content-color-light) —— */
.strip-hero {
  position: relative;
  min-height: var(--hero-min-h);
  background: #000 center/cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: clamp(0.85rem, 2.2vw, 1.35rem) var(--page-pad-x);
}

.strip-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}

.strip-hero__inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: min(var(--content-max), calc(100% - 2 * var(--page-pad-x)));
  color: #fff;
}

/* H2 en hero: --jw-heading-color:#fff, Merriweather */
.h-hero {
  margin: 0 0 0.45rem;
  font-family: "Merriweather", Georgia, serif;
  font-weight: 400;
  font-size: clamp(1.2rem, 2.6vw, 1.75rem);
  line-height: 1.2;
  color: #fff;
}

.strip-hero__inner p {
  margin: 0 auto 0.6rem;
  max-width: 62ch;
  font-size: clamp(0.88rem, 1.35vw, 0.96rem);
  line-height: 1.45;
  color: #fff;
}

.lead-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.42rem 0.95rem;
  border-radius: 5px;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.btn-primary {
  background: var(--amber);
  color: #111;
}

.btn-primary:hover {
  background: #dd8e09;
  color: #111;
}

.btn-wa {
  background: var(--wa);
  color: #fff !important;
}

.btn-wa:hover {
  background: var(--wa-hover);
  color: #fff !important;
}

/* CTA por departamento: secundario respecto al FAB (menos verde sólido) */
.btn-wa-secondary {
  background: #fff;
  color: #128c7e !important;
  border: 2px solid var(--wa);
  box-shadow: none;
}

.btn-wa-secondary:hover {
  background: rgba(37, 211, 102, 0.1);
  color: #075e54 !important;
  border-color: var(--wa-hover);
}

/* —— Esencia + Historia: grilla 2×2 con filas iguales (no aspect-ratio por columna) —— */
.split-damero-section {
  padding: clamp(0.45rem, 1.2vw, 0.7rem) var(--page-pad-x);
}

.split-damero {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(0.55rem, 1.5vw, 0.85rem);
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  box-sizing: border-box;
}

@media (min-width: 900px) {
  .split-damero {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(2, minmax(0, 1fr));
    /*
     * Células 4:3 (más altas que las fotos 1.55–1.7:1):
     * cover rellena por altura → recorta solo los costados, nunca arriba/abajo.
     * Limitamos el ancho para que el bloque (que es 4:3) entre en el viewport.
     */
    aspect-ratio: 4 / 3;
    width: 100%;
    max-width: min(var(--content-max), calc((100vh - 80px) * 4 / 3));
    height: auto;
    min-height: 320px;
    gap: clamp(0.7rem, 1.4vw, 1rem);
    align-items: stretch;
    justify-items: stretch;
  }
}

.split-damero .split-text {
  background: var(--split-text-bg);
  padding: clamp(1rem, 3vw, 2rem) clamp(1rem, 3vw, 2rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  min-width: 0;
  min-height: 0;
  align-self: stretch;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 10px;
  box-sizing: border-box;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.split-damero .split-media {
  margin: 0;
  width: 100%;
  min-width: 0;
  min-height: 0;
  height: 100%;
  overflow: hidden;
  border-radius: 10px;
  border: none;
  background: #000;
  align-self: stretch;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

@media (max-width: 899px) {
  .split-damero .split-media {
    height: auto;
    aspect-ratio: 4 / 3;
  }
}

/* Celdas 4:3, fotos 1.55–1.7:1 → cover rellena por altura → recorta solo los costados */
.split-damero .split-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
}

@media (max-width: 899px) {
  .split-damero .split-media img {
    height: 100%;
  }
}

.h-shaded {
  margin: 0 0 0.35rem;
  font-family: "Merriweather", Georgia, serif;
  font-weight: 400;
  font-size: clamp(1.08rem, 2vw, 1.38rem);
  line-height: 1.22;
  color: var(--split-title);
  text-align: center;
  max-width: 40rem;
}

.split-damero .h-shaded {
  font-size: clamp(1.05rem, 1.8vw, 1.4rem);
  line-height: 1.25;
  text-align: center;
  width: 100%;
  margin-bottom: 0.6rem;
}

.split-text p {
  margin: 0;
  color: var(--split-body);
  text-align: center;
  font-size: clamp(0.9rem, 1.4vw, 0.96rem);
  line-height: 1.5;
  max-width: 48ch;
}

.split-damero .split-text p {
  font-size: clamp(0.9rem, 1.2vw, 1rem);
  line-height: 1.55;
  max-width: 36ch;
  text-align: center;
}

/* —— Títulos ámbar (Actividades, Servicios, Contacto, Departamentos) —— */
.section-pad {
  padding: var(--section-y) var(--page-pad-x);
  max-width: min(var(--content-max), calc(100% - 2 * var(--page-pad-x)));
  margin: 0 auto;
}

.h-amber {
  margin: 0 0 0.55rem;
  font-family: "Merriweather", Georgia, serif;
  font-weight: 700;
  font-size: clamp(1.12rem, 2.2vw, 1.45rem);
  line-height: 1.25;
  color: var(--amber);
}

/* Historias: centrado, gris, strong */
.section-historias {
  background: var(--box-shaded);
  padding: var(--section-y) var(--page-pad-x);
  text-align: center;
}

.h-historias {
  margin: 0 auto 0.5rem;
  max-width: 40rem;
  font-family: "Merriweather", Georgia, serif;
  font-weight: 700;
  font-size: clamp(1.08rem, 2.2vw, 1.42rem);
  line-height: 1.28;
  color: #6a6a6a;
}

.section-historias p {
  margin: 0 auto;
  max-width: 52ch;
  font-size: clamp(0.9rem, 1.4vw, 0.96rem);
  line-height: 1.48;
  color: var(--text-body);
}

/* Actividades / servicios: tarjetas en fila (mismo estilo que versión intermedia) */
.card-strip {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

@media (min-width: 768px) {
  .card-strip {
    flex-direction: row;
    align-items: stretch;
  }

  .h-card {
    flex: 1;
    min-width: 0;
  }
}

.h-card {
  margin: 0;
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 6px;
  padding: 0.75rem 0.85rem;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.05);
}

.h-card p {
  margin: 0;
  color: var(--text-body);
  font-size: clamp(0.9rem, 1.35vw, 0.94rem);
  line-height: 1.45;
}

.h-card p strong {
  display: block;
  margin-bottom: 0.2rem;
  color: #444;
  font-size: 0.96rem;
}

/* Departamentos */
.dept-section {
  background: #fff;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.65rem;
  justify-content: flex-start;
}

.filter-row button {
  font-family: inherit;
  font-size: 0.8rem;
  padding: 0.28rem 0.6rem;
  border-radius: 999px;
  border: 1px solid #ddd;
  background: #fff;
  color: var(--text-body);
  cursor: pointer;
}

.filter-row button.is-active {
  background: #333;
  color: #fff;
  border-color: #333;
}

.dept-catalog .dept-listing {
  max-width: var(--dept-catalog-max);
  margin-left: auto;
  margin-right: auto;
  width: 100%;
}

.dept-listing {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.15rem;
}

@media (min-width: 768px) {
  .dept-listing {
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem 1.6rem;
  }
}

.dept-block {
  scroll-margin-top: 3.75rem;
  padding: 0.65rem clamp(0.6rem, 1.5vw, 0.85rem) 0.7rem;
  background: #fff;
  border: 1px solid #dedede;
  border-radius: 8px;
  box-shadow: 0 1px 10px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.dept-block h3 {
  margin: 0 0 0.5rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid #eee;
  font-family: "Merriweather", Georgia, serif;
  font-weight: 700;
  font-size: clamp(0.88rem, 1.35vw, 0.98rem);
  line-height: 1.28;
  color: #333;
}

.dept-layout {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
  min-height: 0;
}

.dept-layout figure {
  margin: 0;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid #e5e5e5;
  background: transparent;
  height: var(--dept-photo-h);
  min-height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
}

.dept-layout figure:focus {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
}

.dept-layout figure img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: center;
  display: block;
  pointer-events: none;
}

.dept-open-gallery {
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--amber);
  background: none;
  border: none;
  padding: 0.15rem 0;
  cursor: pointer;
  text-decoration: underline;
  text-align: left;
  align-self: flex-start;
}

.dept-open-gallery:hover {
  color: #d97706;
}

/* —— Modal galería departamento —— */
.dept-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.dept-modal[hidden] {
  display: none;
}

.dept-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  cursor: pointer;
}

.dept-modal__panel {
  position: relative;
  z-index: 1;
  width: min(960px, 100%);
  max-height: min(92vh, 900px);
  background: #111;
  border-radius: 10px;
  padding: 2.5rem 1rem 1rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.dept-modal__close {
  position: absolute;
  top: 0.4rem;
  right: 0.5rem;
  width: 2.25rem;
  height: 2.25rem;
  border: none;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.dept-modal__close:hover {
  background: rgba(255, 255, 255, 0.22);
}

.dept-modal__title {
  margin: 0;
  padding: 0 2rem 0 0.5rem;
  font-family: "Merriweather", Georgia, serif;
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  font-weight: 700;
  color: #fff;
}

.dept-carousel {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.25rem;
  align-items: center;
  min-height: 0;
  flex: 1;
}

.dept-carousel.is-single {
  grid-template-columns: 1fr;
}

.dept-carousel.is-single .dept-carousel__btn {
  display: none;
}

.dept-carousel__viewport {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: min(60vh, 520px);
  max-height: min(65vh, 560px);
  background: #1a1a1a;
  border-radius: 6px;
  overflow: hidden;
}

.dept-carousel__img {
  max-width: 100%;
  max-height: min(65vh, 560px);
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

.dept-carousel__btn {
  width: 2.5rem;
  height: 2.5rem;
  border: none;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}

.dept-carousel__btn:hover {
  background: rgba(245, 158, 11, 0.5);
  color: #111;
}

.dept-carousel__btn:disabled {
  opacity: 0.25;
  cursor: not-allowed;
}

.dept-carousel__counter {
  margin: 0;
  text-align: center;
  font-size: 0.85rem;
  color: #ccc;
}

@media (max-width: 520px) {
  .dept-carousel__viewport {
    min-height: 38vh;
    max-height: 48vh;
  }

  .dept-carousel__img {
    max-height: 46vh;
  }
}

.dept-details {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.dept-features {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.9rem;
  line-height: 1.38;
  color: var(--text-body);
}

.dept-features li {
  position: relative;
  padding-left: 1.05rem;
  margin-bottom: 0.12rem;
}

.dept-features li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 0.38rem;
  height: 0.38rem;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.25);
}

.dept-note {
  margin: 0.15rem 0 0;
  font-size: 0.8rem;
  color: #666;
  font-style: italic;
  line-height: 1.38;
}

.dept-actions {
  margin-top: auto;
  padding-top: 0.4rem;
}

.dept-actions .btn {
  padding: 0.36rem 0.75rem;
  font-size: 0.82rem;
}

.contact-layout {
  display: grid;
  gap: 1rem;
  align-items: start;
}

@media (min-width: 768px) {
  .contact-layout {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  }
}

.contact-map {
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid #e5e5e5;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.05);
  min-height: 200px;
  background: #e8e8e8;
}

.contact-map iframe {
  display: block;
  width: 100%;
  height: 220px;
  border: 0;
}

@media (min-width: 768px) {
  .contact-map iframe {
    height: min(260px, 38vh);
    min-height: 220px;
  }
}

.contact-block p {
  margin: 0 0 0.45rem;
  font-size: clamp(0.9rem, 1.35vw, 0.94rem);
  line-height: 1.45;
}

.contact-block strong {
  display: block;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #888;
  margin-bottom: 0.1rem;
}

.contact-cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem 1.1rem;
  margin-top: 1rem;
}

.contact-cta-row .footer-social {
  margin-top: 0;
}

.footer-social {
  margin-top: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.footer-social a {
  color: var(--amber);
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  border: 2px solid var(--amber);
  transition: background 0.18s, color 0.18s;
}

.footer-social a svg {
  width: 1.1rem;
  height: 1.1rem;
  display: block;
}

.footer-social a:hover {
  background: var(--amber);
  color: #111;
}

.site-footer {
  padding: 1rem var(--page-pad-x) 4.5rem;
  background: var(--box-shaded);
  font-size: 0.86rem;
  color: var(--text-body);
}

.site-footer .section-pad {
  padding-top: 0;
  padding-bottom: 0;
}

.wa-fab {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 1100;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--wa);
  color: #fff !important;
  text-decoration: none !important;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.65rem 1rem;
  border-radius: 999px;
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.35);
}

.wa-fab:hover {
  background: var(--wa-hover);
  color: #fff !important;
}

@media (max-width: 768px) {
  .wa-fab span:last-child {
    display: none;
  }

  .wa-fab {
    border-radius: 50%;
    padding: 0.85rem;
  }
}
