/**
 * Ajustes tipográficos para textos HOMES (español, más largos que el inglés del template).
 * Cargar después de styles.css en index-homes.html
 */

body.homes-es {
  --homes-accent: #e8751a;
  --homes-ui-scale: 0.8;
  overflow-wrap: break-word;
  zoom: var(--homes-ui-scale);
}

@supports not (zoom: 1) {
  body.homes-es {
    transform: scale(var(--homes-ui-scale));
    transform-origin: top center;
    width: calc(100% / var(--homes-ui-scale));
    margin-inline: auto;
  }
}

.homes-es .hero__photo--top {
  object-position: center 55%;
}

.homes-es .hero__photo--bottom {
  object-position: center center;
}

.homes-es .feature__photo {
  object-position: center 35%;
}

.homes-es .process__photo {
  object-position: center 42%;
}

.homes-es .nav__logo--homes {
  gap: 0;
  align-items: center;
}

.homes-es .nav__logo-mark {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  padding-right: 12px;
}

.homes-es .nav__logo--homes .nav__logo-image {
  width: auto;
  height: 50px;
  max-width: none;
  object-fit: contain;
  display: block;
}

.homes-es .nav__logo-divider {
  width: 1.5px;
  height: 34px;
  margin: 0 12px 0 0;
  background: var(--color-text, #1f1f1f);
  flex-shrink: 0;
}

.homes-es .nav__logo--homes .nav__logo-text-block {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  min-width: 0;
  padding: 2px 0;
}

.homes-es .nav__logo-name {
  font-size: clamp(1rem, 1.6vw, 1.25rem);
  line-height: 1.15;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.homes-es .nav__logo-name-strong {
  font-weight: 700;
}

.homes-es .nav__logo-name-light {
  font-weight: 400;
  letter-spacing: 0.08em;
}

.homes-es .nav__link {
  font-size: clamp(1rem, 1.4vw, 1.25rem);
}

/* Hero: título con flujo del template original; párrafo y stats más contenidos */
.homes-es .hero__content {
  max-width: 767px;
}

.homes-es .hero__title {
  font-size: clamp(3.5rem, 8vw, 8.3125rem);
  font-weight: 500;
  line-height: 1;
  max-width: none;
  letter-spacing: -0.02em;
}

.homes-es .hero__title-line {
  white-space: nowrap;
}

.homes-es .hero__description {
  max-width: 580px;
  hyphens: manual;
  font-size: clamp(0.9375rem, 1.4vw, 1.25rem);
  line-height: 1.48;
}

.homes-es .hero__stats {
  max-width: 620px;
  margin-top: 8px;
  text-align: left;
  align-items: start;
  gap: 16px 20px;
}

.homes-es .hero__stats--homes .hero__stat-value {
  margin: 0 0 10px;
  font-size: clamp(2.25rem, 4.5vw, 3.75rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  color: var(--color-text);
}

.homes-es .hero__stats--homes .hero__stat-label {
  margin: 0;
  font-size: clamp(0.875rem, 1.15vw, 1.0625rem);
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--color-muted);
  padding: 0;
  text-wrap: balance;
}

.homes-es .hero__cta {
  font-size: 1.25rem;
  min-height: 78px;
  padding: 20px 28px;
}

.homes-es .service-card__icon {
  width: 44px;
  height: 44px;
  color: var(--color-text);
}

.homes-es .service-card__icon img {
  width: 100%;
  height: 100%;
  display: block;
}

.homes-es .process-step__icon img {
  filter: brightness(0) invert(1);
}

.homes-es .services__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 64px;
}

.homes-es .services__header .services__title {
  margin: 0;
  max-width: none;
}

.homes-es .services__view-all {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  background: var(--color-primary);
  color: #fff;
  font-size: clamp(0.9375rem, 1.2vw, 1.125rem);
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.homes-es .services__view-all:hover {
  opacity: 0.92;
}

.homes-es .services__title {
  font-size: clamp(2.25rem, 5.5vw, 4.25rem);
  max-width: 16ch;
}

.homes-es .service-card__name {
  font-size: clamp(1.125rem, 1.8vw, 1.5rem);
  line-height: 1.25;
}

.homes-es .service-card__text {
  font-size: clamp(0.9375rem, 1.35vw, 1.1875rem);
  line-height: 1.48;
}

.homes-es .feature__title {
  font-size: clamp(1.875rem, 4vw, 3.25rem);
  line-height: 1.15;
  max-width: none;
}

.homes-es .feature__text {
  font-size: clamp(0.9375rem, 1.35vw, 1.1875rem);
  line-height: 1.5;
  max-width: 520px;
}

.homes-es .feature__row {
  font-size: clamp(0.9375rem, 1.5vw, 1.125rem);
  line-height: 1.35;
  gap: 16px;
  padding: 22px 0;
}

.homes-es .feature-accordion {
  width: 100%;
  max-width: 620px;
  margin-top: 8px;
  border-top: 1px solid #d9d9d9;
}

.homes-es .feature-accordion__item {
  border-bottom: 1px solid #d9d9d9;
}

.homes-es .feature-accordion__heading {
  margin: 0;
  font-size: inherit;
  font-weight: inherit;
}

.homes-es .feature-accordion__trigger:focus-visible {
  outline: 2px solid var(--color-text);
  outline-offset: 4px;
}

.homes-es .feature-accordion__icon {
  position: relative;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.homes-es .feature-accordion__icon::before,
.homes-es .feature-accordion__icon::after {
  content: "";
  position: absolute;
  background: var(--color-text);
  transition: transform 280ms ease, opacity 280ms ease;
}

.homes-es .feature-accordion__icon::before {
  top: 50%;
  left: 0;
  right: 0;
  height: 2px;
  transform: translateY(-50%);
}

.homes-es .feature-accordion__icon::after {
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  transform: translateX(-50%);
}

.homes-es .feature-accordion__item.is-open .feature-accordion__icon::after {
  transform: translateX(-50%) scaleY(0);
  opacity: 0;
}

.homes-es .feature-accordion__panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 280ms ease;
}

.homes-es .feature-accordion__item.is-open .feature-accordion__panel {
  grid-template-rows: 1fr;
}

.homes-es .feature-accordion__panel-inner {
  overflow: hidden;
  opacity: 0;
  transition: opacity 280ms ease;
}

.homes-es .feature-accordion__item.is-open .feature-accordion__panel-inner {
  opacity: 1;
}

.homes-es .feature-accordion__panel-inner p {
  margin: 0;
  padding: 0 0 20px;
  max-width: 56ch;
  font-size: clamp(0.875rem, 1.2vw, 1.0625rem);
  font-weight: 400;
  line-height: 1.5;
  color: var(--color-muted);
}

@media (prefers-reduced-motion: reduce) {
  .homes-es .feature-accordion__panel,
  .homes-es .feature-accordion__panel-inner,
  .homes-es .feature-accordion__icon::before,
  .homes-es .feature-accordion__icon::after {
    transition: none;
  }
}

.homes-es .process__title {
  font-size: clamp(1.875rem, 4vw, 3.25rem);
  line-height: 1.15;
  max-width: 20ch;
}

.homes-es .process-step__name {
  font-size: clamp(1.125rem, 1.8vw, 1.5rem);
}

.homes-es .process-step__text {
  font-size: clamp(0.9375rem, 1.3vw, 1.125rem);
  line-height: 1.48;
}

.homes-es .footer__logo--homes {
  gap: 0;
  align-items: center;
}

.homes-es .footer__logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 8px 10px;
  margin-right: 14px;
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}

.homes-es .footer__logo--homes .footer__logo-image {
  width: auto;
  height: 44px;
  max-width: none;
  object-fit: contain;
  display: block;
}

.homes-es .footer__logo-divider {
  width: 1.5px;
  height: 32px;
  margin: 0 12px 0 0;
  background: var(--homes-accent);
  flex-shrink: 0;
}

.homes-es .footer__logo-text-block {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  min-width: 0;
}

.homes-es .footer__logo-name {
  font-size: clamp(1rem, 1.6vw, 1.1875rem);
  line-height: 1.15;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
}

.homes-es .footer__logo-name-strong {
  font-weight: 700;
}

.homes-es .footer__logo-name-light {
  font-weight: 400;
  letter-spacing: 0.08em;
}

.homes-es .footer__about {
  font-size: 1rem;
  line-height: 1.5;
}

.homes-es .footer__heading {
  font-size: 1.125rem;
}

.homes-es .footer__links a,
.homes-es .footer__links--contact li {
  font-size: 1rem;
  line-height: 1.45;
}

.homes-es .newsletter__input {
  font-size: 1rem;
}

.homes-es .newsletter__btn {
  font-size: 1.125rem;
  min-width: 160px;
}

@media (max-width: 1200px) {
  .homes-es .hero__content {
    max-width: min(767px, 100%);
  }

  .homes-es .hero__description {
    max-width: min(580px, 100%);
  }

  .homes-es .hero__stats {
    max-width: min(620px, 100%);
  }

  .homes-es .services__title,
  .homes-es .feature__title,
  .homes-es .process__title {
    max-width: none;
  }
}

@media (max-width: 640px) {
  .homes-es .nav__link {
    font-size: 1rem;
  }

  .homes-es .nav__logo-divider {
    display: none;
  }

  .homes-es .nav__logo-mark {
    padding-right: 10px;
  }

  .homes-es .nav__logo--homes .nav__logo-image {
    height: 44px;
  }

  .homes-es .nav__logo-divider {
    height: 28px;
    margin-right: 10px;
  }

  .homes-es .hero__title-line {
    white-space: normal;
  }

  .homes-es .hero__stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    text-align: left;
    gap: 12px 10px;
  }

  .homes-es .hero__stats--homes .hero__stat-value {
    font-size: clamp(1.5rem, 6vw, 2rem);
    margin-bottom: 6px;
  }

  .homes-es .hero__stats--homes .hero__stat-label {
    font-size: 0.75rem;
    line-height: 1.2;
  }

  .homes-es .services__header {
    align-items: center;
    margin-bottom: 40px;
    gap: 16px;
  }

  .homes-es .services__view-all {
    min-height: 44px;
    padding: 12px 20px;
    font-size: 0.875rem;
  }

  .homes-es .hero__cta {
    width: 100%;
  }
}

/* WhatsApp flotante — compensa zoom 0.8 del body para tamaño visual ~80px */
.fab-whatsapp {
  position: fixed;
  right: 28px;
  bottom: 28px;
  z-index: 9990;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: #25d366;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.3);
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

body.homes-es .fab-whatsapp {
  zoom: calc(1 / var(--homes-ui-scale));
}

.fab-whatsapp:hover {
  transform: scale(1.06);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.32);
}

.fab-whatsapp img {
  width: 44px;
  height: 44px;
  filter: brightness(0) invert(1);
}

@supports not (zoom: 1) {
  body.homes-es .fab-whatsapp {
    transform: scale(calc(1 / var(--homes-ui-scale)));
    transform-origin: bottom right;
  }

  body.homes-es .fab-whatsapp:hover {
    transform: scale(calc(1.06 / var(--homes-ui-scale)));
  }
}

/* Mapa en footer */
.footer__col--contact {
  min-width: 0;
}

.footer__map-link {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer__map {
  margin-top: 16px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.08);
  aspect-ratio: 16 / 10;
  max-width: 280px;
}

.footer__map iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* Proyectos (home) */
.projects {
  padding: 80px 0 100px;
}

.projects__header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 48px;
}

.projects__title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 600;
  line-height: 1.1;
  max-width: 14ch;
  margin: 0;
}

.projects__view-all {
  flex-shrink: 0;
}

.projects__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.project-card {
  display: block;
  text-decoration: none;
  color: inherit;
}

.project-card__media {
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  margin-bottom: 16px;
  background: #f3f3f3;
}

.project-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.project-card:hover .project-card__media img {
  transform: scale(1.04);
}

.project-card__name {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0 0 6px;
}

.project-card__meta {
  font-size: 0.9375rem;
  color: rgba(0, 0, 0, 0.55);
  margin: 0;
}

/* Páginas internas */
.page--inner .layout {
  padding-bottom: 0;
}

.page-back {
  margin: 0 0 4px;
  padding: 8px 0 0;
}

.page-back__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9375rem;
  font-weight: 500;
  color: rgba(0, 0, 0, 0.58);
  text-decoration: none;
  transition: color 0.2s ease;
}

.page-back__link:hover {
  color: #111;
}

.page-back__icon {
  width: 18px;
  height: 18px;
  transform: rotate(-135deg);
  opacity: 0.75;
}

.page-back__link:hover .page-back__icon {
  opacity: 1;
}

.page-hero {
  padding: 48px 0 56px;
  max-width: 760px;
}

.page-hero__eyebrow {
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(0, 0, 0, 0.5);
  margin: 0 0 12px;
}

.page-hero__title {
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  font-weight: 600;
  line-height: 1.08;
  margin: 0 0 20px;
}

.page-hero__lead {
  font-size: 1.125rem;
  line-height: 1.6;
  color: rgba(0, 0, 0, 0.72);
  margin: 0;
}

.page-hero__lead strong {
  font-weight: 600;
  color: #111;
}

.page-section {
  padding: 0 0 80px;
}

.page-section__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  gap: 48px;
  align-items: start;
}

.page-section__content {
  font-size: 1.0625rem;
  line-height: 1.65;
  color: rgba(0, 0, 0, 0.78);
}

.page-section__content p + p {
  margin-top: 1em;
}

.page-section__content ul {
  margin: 1.25em 0 0;
  padding-left: 1.25em;
}

.page-section__content li + li {
  margin-top: 0.5em;
}

.page-section__media {
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
}

.page-section__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Página de servicio enriquecida */
.service-hero {
  max-width: none;
  padding-bottom: 40px;
}

.service-hero__highlights {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
}

.service-hero__highlight {
  padding: 16px 18px;
  border-radius: 12px;
  background: #f5f5f5;
  font-size: 0.875rem;
  line-height: 1.45;
  color: rgba(0, 0, 0, 0.72);
}

.service-hero__highlight strong {
  display: block;
  margin-bottom: 4px;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #111;
}

.service-intro {
  padding: 0 0 48px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.service-intro__label {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(0, 0, 0, 0.45);
  margin: 0 0 12px;
}

.service-intro__text {
  margin: 0;
  max-width: 72ch;
  font-size: 1.125rem;
  line-height: 1.65;
  color: rgba(0, 0, 0, 0.78);
}

.service-intro__text strong {
  font-weight: 600;
  color: #111;
}

.service-intro__text a {
  color: #111;
  font-weight: 600;
  text-underline-offset: 3px;
}

.service-facts {
  padding: 0 0 48px;
}

.service-facts__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.service-facts__item {
  padding: 22px 20px;
  border-radius: 14px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: #fafafa;
}

.service-facts__label {
  margin: 0 0 8px;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(0, 0, 0, 0.45);
}

.service-facts__value {
  margin: 0 0 8px;
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.2;
  color: #111;
}

.service-facts__hint {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.45;
  color: rgba(0, 0, 0, 0.6);
}

.service-note {
  margin-top: 32px;
  padding: 22px 24px;
  border-radius: 14px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: #f5f5f5;
}

.service-note__title {
  margin: 0 0 10px;
  font-size: 1rem;
  font-weight: 600;
  color: #111;
}

.service-note__text {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: rgba(0, 0, 0, 0.72);
}

.service-note__text strong {
  font-weight: 600;
  color: #111;
}

.about-block__title {
  margin: 0 0 16px;
  font-size: 1.375rem;
  font-weight: 600;
  line-height: 1.25;
  color: #111;
}

.about-block__link {
  display: inline-block;
  margin-top: 8px;
  font-weight: 600;
  color: #111;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.about-block__link:hover {
  color: rgba(0, 0, 0, 0.72);
}

.about-commitment {
  margin: 0 0 56px;
  max-width: 720px;
}

/* —— Nosotros: layout editorial (mismo ancho que .layout del sitio) —— */
.page--about-editorial .layout--about {
  padding-bottom: 0;
}

.page--about-editorial .site-header--about {
  margin-bottom: 0;
}

.page--about-editorial .site-footer--compact {
  margin-top: 0;
}

.about-editorial {
  min-height: calc(100vh - 140px);
  padding: 8px 0 48px;
  overflow-x: clip;
}

.about-editorial__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.25fr);
  gap: clamp(24px, 3vw, 48px);
  align-items: center;
  width: 100%;
  max-width: 100%;
  min-height: min(72vh, 820px);
}

.about-editorial__eyebrow {
  margin: 0 0 20px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(0, 0, 0, 0.45);
}

.about-editorial__slogan {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.about-editorial__slogan-lead {
  display: block;
  max-width: 11.5em;
  font-family: "Playfair Display", Georgia, "Times New Roman", serif;
  font-size: clamp(2.35rem, 4.2vw, 4.75rem);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.03em;
  color: #0a0a0a;
}

.about-editorial__accent {
  font-style: italic;
  font-weight: 500;
}

.about-editorial__slogan-sub {
  display: block;
  max-width: 26em;
  font-family: "Playfair Display", Georgia, "Times New Roman", serif;
  font-size: clamp(1.125rem, 2vw, 1.5rem);
  font-weight: 500;
  font-style: italic;
  line-height: 1.45;
  letter-spacing: 0;
  color: rgba(0, 0, 0, 0.58);
}

.about-editorial__line {
  margin: 16px 0 0;
  font-size: 1rem;
  line-height: 1.55;
  color: rgba(0, 0, 0, 0.58);
  max-width: 32ch;
}

.about-editorial__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(0, 0, 0, 0.5);
}

.about-editorial__stats strong {
  font-weight: 600;
  color: #111;
  font-size: 0.9375rem;
}

.about-editorial__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}

.about-editorial__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 26px;
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 999px;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.about-editorial__btn--primary {
  background: #111;
  color: #fff;
  border: 1px solid #111;
}

.about-editorial__btn--primary:hover {
  background: #333;
  border-color: #333;
}

.about-editorial__btn--ghost {
  background: transparent;
  color: #111;
  border: 1px solid rgba(0, 0, 0, 0.22);
}

.about-editorial__btn--ghost:hover {
  border-color: #111;
  background: rgba(0, 0, 0, 0.04);
}

.about-editorial__figure {
  margin: 0;
  height: 100%;
  min-height: min(78vh, 820px);
  display: flex;
  flex-direction: column;
}

.about-editorial__frame {
  flex: 1;
  position: relative;
  border-radius: clamp(20px, 3vw, 32px);
  overflow: hidden;
  background: #e8e8e8;
  box-shadow:
    0 24px 80px rgba(0, 0, 0, 0.12),
    0 4px 20px rgba(0, 0, 0, 0.06);
}

.about-editorial__frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    145deg,
    rgba(0, 0, 0, 0.02) 40%,
    rgba(0, 0, 0, 0.18) 100%
  );
  pointer-events: none;
}

.about-editorial__photo {
  width: 100%;
  height: 100%;
  min-height: min(78vh, 820px);
  object-fit: cover;
  object-position: center top;
  display: block;
}

.about-editorial__caption {
  margin: 14px 4px 0;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(0, 0, 0, 0.42);
}

@media (max-width: 960px) {
  .about-editorial__grid {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .about-editorial__figure {
    order: -1;
    min-height: 0;
  }

  .about-editorial__frame,
  .about-editorial__photo {
    min-height: min(52vh, 480px);
  }

  .about-editorial__slogan {
    max-width: none;
  }
}

@media (max-width: 520px) {
  .about-editorial {
    min-height: 0;
  }

  .about-editorial__actions {
    flex-direction: column;
  }

  .about-editorial__btn {
    width: 100%;
  }
}

.service-related {
  padding: 0 0 64px;
}

.service-related__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 32px;
  border-radius: 16px;
  background: #f0f0f0;
}

.service-related__title {
  margin: 0 0 8px;
  font-size: 1.25rem;
  font-weight: 600;
  color: #111;
}

.service-related__lead {
  margin: 0;
  max-width: 52ch;
  font-size: 1rem;
  line-height: 1.55;
  color: rgba(0, 0, 0, 0.68);
}

.service-related__link {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 22px;
  border-radius: 999px;
  background: #111;
  color: #fff;
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.service-related__link:hover {
  opacity: 0.9;
}

.service-accordion__panel-inner a {
  color: #111;
  font-weight: 600;
  text-underline-offset: 3px;
}

.page-section--service-rich {
  padding-top: 56px;
}

.page-section__inner--service-rich {
  grid-template-columns: minmax(0, 1fr) minmax(300px, 400px);
  gap: 56px;
  align-items: start;
}

.service-rich__heading {
  font-size: clamp(1.5rem, 3vw, 1.875rem);
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 8px;
  color: #111;
}

.service-rich__sub {
  margin: 0 0 28px;
  font-size: 1.0625rem;
  line-height: 1.55;
  color: rgba(0, 0, 0, 0.62);
  max-width: 58ch;
}

.service-rich__note {
  margin: 0 0 24px;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: rgba(0, 0, 0, 0.55);
  max-width: 58ch;
}

.service-intro__text + .service-intro__text {
  margin-top: 1.15em;
}
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 40px;
}

.service-pillar {
  padding: 20px 18px;
  border-radius: 14px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: #fafafa;
}

.service-pillar__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin-bottom: 12px;
  border-radius: 8px;
  background: #111;
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 600;
}

.service-pillar__title {
  margin: 0 0 8px;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.3;
  color: #111;
}

.service-pillar__text {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.5;
  color: rgba(0, 0, 0, 0.62);
}

.service-accordion {
  width: 100%;
  border-top: 1px solid #d4d4d4;
}

.service-accordion__item {
  border-bottom: 1px solid #d4d4d4;
}

.service-accordion__heading {
  margin: 0;
  font-size: inherit;
  font-weight: inherit;
}

.service-accordion__trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  padding: 20px 0;
  border: none;
  background: none;
  text-align: left;
  font: inherit;
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.35;
  color: #111;
  cursor: pointer;
}

.service-accordion__trigger:focus-visible {
  outline: 2px solid #111;
  outline-offset: 4px;
}

.service-accordion__icon {
  position: relative;
  flex-shrink: 0;
  width: 22px;
  height: 22px;
}

.service-accordion__icon::before,
.service-accordion__icon::after {
  content: "";
  position: absolute;
  background: #111;
  transition: transform 280ms ease, opacity 280ms ease;
}

.service-accordion__icon::before {
  top: 50%;
  left: 0;
  right: 0;
  height: 2px;
  transform: translateY(-50%);
}

.service-accordion__icon::after {
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  transform: translateX(-50%);
}

.service-accordion__item.is-open .service-accordion__icon::after {
  transform: translateX(-50%) scaleY(0);
  opacity: 0;
}

.service-accordion__panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 300ms ease;
}

.service-accordion__item.is-open .service-accordion__panel {
  grid-template-rows: 1fr;
}

.service-accordion__panel-inner {
  overflow: hidden;
  opacity: 0;
  transition: opacity 280ms ease;
}

.service-accordion__item.is-open .service-accordion__panel-inner {
  opacity: 1;
}

.service-accordion__panel-inner > p {
  margin: 0 0 12px;
  padding-bottom: 4px;
  font-size: 1rem;
  line-height: 1.6;
  color: rgba(0, 0, 0, 0.72);
}

.service-accordion__panel-inner > p:last-child {
  margin-bottom: 0;
}

.service-accordion__panel-inner strong {
  font-weight: 600;
  color: #111;
}

.service-accordion__list {
  margin: 0 0 16px;
  padding: 0 0 0 1.2em;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: rgba(0, 0, 0, 0.72);
}

.service-accordion__list li + li {
  margin-top: 6px;
}

.service-exclusion {
  margin-top: 32px;
  padding: 22px 24px;
  border-radius: 14px;
  border: 1px solid rgba(180, 80, 0, 0.25);
  background: #fff8f0;
}

.service-exclusion__title {
  margin: 0 0 10px;
  font-size: 1rem;
  font-weight: 600;
  color: #8a4a00;
}

.service-exclusion__text {
  margin: 0 0 12px;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: rgba(0, 0, 0, 0.72);
}

.service-exclusion__list {
  margin: 0;
  padding-left: 1.2em;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: rgba(0, 0, 0, 0.78);
}

.service-exclusion__list li + li {
  margin-top: 6px;
}

.service-aside-card {
  position: sticky;
  top: 24px;
}

.service-aside-card__media {
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  margin-bottom: 20px;
}

.service-aside-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* Carrusel de renders (API galería) */
.galeria-render-carousel {
  position: relative;
  background: #1a1a1a;
  isolation: isolate;
}

.galeria-render-carousel__loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
}

.galeria-render-carousel--ready .galeria-render-carousel__loading {
  display: none;
}

.galeria-render-carousel__stage {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.galeria-render-carousel__layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0;
  transition: opacity 1.1s ease-in-out;
  will-change: opacity;
  pointer-events: none;
}

.galeria-render-carousel__layer.is-visible {
  opacity: 1;
}

.galeria-render-carousel__fallback {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.galeria-render-carousel__chrome {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px;
  pointer-events: none;
}

.galeria-render-carousel__shade {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 52%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.82) 0%, rgba(0, 0, 0, 0.35) 55%, transparent 100%);
  pointer-events: none;
}

.galeria-render-carousel__caption {
  position: relative;
  margin: 0;
  padding: 8px 10px;
  font-size: 0.75rem;
  line-height: 1.35;
  color: #fff;
  background: rgba(0, 0, 0, 0.45);
  border-radius: 8px;
  z-index: 1;
}

.galeria-render-carousel__link {
  position: relative;
  align-self: flex-start;
  z-index: 1;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  pointer-events: auto;
}

.galeria-render-carousel__link:hover {
  background: rgba(255, 255, 255, 0.32);
}

.service-aside-card__box {
  padding: 24px;
  border-radius: 16px;
  background: #111;
  color: #fff;
}

.service-aside-card__box-title {
  margin: 0 0 16px;
  font-size: 1.0625rem;
  font-weight: 600;
}

.service-aside-checklist {
  margin: 0;
  padding: 0;
  list-style: none;
}

.service-aside-checklist li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 0.9375rem;
  line-height: 1.45;
}

.service-aside-checklist li + li {
  margin-top: 12px;
}

.service-aside-checklist li::before {
  content: "✓";
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  margin-top: 1px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
}

.service-scope-band {
  padding: 64px 0 80px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.service-scope-band__header {
  margin-bottom: 32px;
  max-width: 52ch;
}

.service-scope-band__title {
  margin: 0 0 10px;
  font-size: clamp(1.375rem, 2.5vw, 1.75rem);
  font-weight: 600;
  color: #111;
}

.service-scope-band__lead {
  margin: 0;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: rgba(0, 0, 0, 0.65);
}

.service-scope-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.service-scope-card {
  padding: 28px 26px;
  border-radius: 16px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: #fafafa;
}

.service-scope-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-bottom: 16px;
  border-radius: 12px;
  background: #111;
}

.service-scope-card__icon img {
  width: 22px;
  height: 22px;
  filter: invert(1);
}

.service-scope-card__title {
  margin: 0 0 10px;
  font-size: 1.125rem;
  font-weight: 600;
  color: #111;
}

.service-scope-card__text {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: rgba(0, 0, 0, 0.68);
}

.service-scope-card__text strong {
  font-weight: 600;
  color: #111;
}

.service-scope-card__list {
  margin: 12px 0 0;
  padding-left: 1.15em;
  font-size: 0.875rem;
  line-height: 1.5;
  color: rgba(0, 0, 0, 0.62);
}

@media (max-width: 1100px) {
  .service-hero__highlights {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .service-facts__grid {
    grid-template-columns: 1fr;
  }

  .service-pillars {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 960px) {
  .page-section__inner--service-rich {
    grid-template-columns: 1fr;
  }

  .service-aside-card {
    position: static;
  }

  .service-scope-grid {
    grid-template-columns: 1fr;
  }

  .service-hero__highlights {
    grid-template-columns: 1fr;
  }

  .service-related__inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  .service-accordion__panel,
  .service-accordion__panel-inner,
  .service-accordion__icon::before,
  .service-accordion__icon::after {
    transition: none;
  }
}

[data-reveal] {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: calc(var(--reveal-delay, 0) * 80ms);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

.page-section__media[data-reveal] {
  transform: translateY(28px) scale(0.98);
}

.page-section__media[data-reveal].is-visible {
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

.page-cta-bar {
  padding: 0 0 96px;
}

.page-cta-bar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 32px 36px;
  border-radius: 16px;
  background: #111;
  color: #fff;
}

.page-cta-bar__text {
  margin: 0;
  font-size: 1.125rem;
  line-height: 1.5;
  max-width: 52ch;
}

.page-cta-bar__btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 24px;
  border-radius: 999px;
  background: #fff;
  color: #111;
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.page-cta-bar__btn:hover {
  opacity: 0.92;
}

.catalogo-stub {
  padding: 0 0 96px;
}

.catalogo-stub__note {
  margin: 0 0 32px;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: rgba(0, 0, 0, 0.65);
  max-width: 60ch;
}

.catalogo-stub__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.catalogo-stub__item {
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 1;
  background: #f0f0f0;
}

.catalogo-stub__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.services--page {
  padding-top: 0;
  padding-bottom: 64px;
}

.services--page .services__grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px;
}

@media (min-width: 1100px) {
  .services--page .services__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1280px) {
  .services--page .services__grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@media (max-width: 960px) {
  .projects__grid {
    grid-template-columns: 1fr;
  }

  .page-section__inner {
    grid-template-columns: 1fr;
  }

  .catalogo-stub__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .page-cta-bar__inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Catálogo fotográfico (API) */
.page--galeria .galeria-hero {
  padding: 0 0 40px;
}

.galeria-hero__eyebrow {
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(0, 0, 0, 0.5);
  margin: 0 0 12px;
}

.galeria-hero__title {
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  font-weight: 600;
  line-height: 1.08;
  margin: 0 0 16px;
}

.galeria-hero__lead {
  font-size: 1.125rem;
  line-height: 1.6;
  color: rgba(0, 0, 0, 0.72);
  margin: 0 0 24px;
  max-width: 62ch;
}

.galeria-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
  padding: 4px;
  background: rgba(0, 0, 0, 0.04);
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.galeria-tabs__btn {
  border: none;
  background: transparent;
  color: rgba(0, 0, 0, 0.55);
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 500;
  padding: 10px 20px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.galeria-tabs__btn:hover {
  color: #111;
}

.galeria-tabs__btn.is-active {
  background: #111;
  color: #fff;
}

.galeria-hero__stats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  font-size: 0.9375rem;
  color: rgba(0, 0, 0, 0.55);
}

.galeria-hero__stats strong {
  color: #111;
  font-weight: 600;
}

.galeria-hero__stats-sep {
  width: 1px;
  height: 18px;
  background: rgba(0, 0, 0, 0.12);
}

.galeria-main {
  padding: 0 0 80px;
}

.galeria-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 28px;
}

.galeria-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.08);
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  text-align: left;
  padding: 0;
  font: inherit;
  color: inherit;
  width: 100%;
}

.galeria-card:hover,
.galeria-card:focus-visible {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.1);
  outline: none;
}

.galeria-card__media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #eee;
}

.galeria-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.galeria-card:hover .galeria-card__media img {
  transform: scale(1.04);
}

.galeria-card__badge {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 20px;
}

.galeria-card__body {
  padding: 20px 22px 22px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.galeria-card__tipo {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(0, 0, 0, 0.45);
  margin: 0;
}

.galeria-card__titulo {
  font-size: 1.125rem;
  font-weight: 600;
  color: #111;
  margin: 0;
  line-height: 1.3;
}

.galeria-card__cliente {
  font-size: 0.9375rem;
  color: rgba(0, 0, 0, 0.6);
  margin: 0;
}

.galeria-card__ubicacion {
  font-size: 0.875rem;
  color: rgba(0, 0, 0, 0.5);
  margin: 0;
}

.galeria-card__ref {
  margin-top: auto;
  padding-top: 10px;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  color: rgba(0, 0, 0, 0.35);
  text-transform: uppercase;
}

.galeria-card__estado {
  display: inline-block;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 8px;
  border-radius: 4px;
  margin-bottom: 4px;
  width: fit-content;
  background: rgba(0, 0, 0, 0.06);
  color: rgba(0, 0, 0, 0.65);
}

.galeria-card__estado--ejecucion {
  background: rgba(232, 117, 26, 0.12);
  color: #b85a0f;
}

.galeria-card__estado--finalizada {
  background: rgba(60, 120, 80, 0.12);
  color: #3d6b4f;
}

.galeria-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(0, 0, 0, 0.1);
  border-top-color: #111;
  border-radius: 50%;
  animation: galeria-spin 0.8s linear infinite;
  margin: 0 auto 12px;
}

@keyframes galeria-spin {
  to {
    transform: rotate(360deg);
  }
}

.galeria-loading,
.galeria-empty,
.galeria-error,
.projects-loading,
.projects-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 48px 20px;
  color: rgba(0, 0, 0, 0.55);
}

.galeria-error {
  color: #a04444;
}

.projects-empty {
  padding: 24px 0;
  font-size: 1rem;
}

.galeria-detalle__back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  color: #111;
  font-weight: 500;
  padding: 0;
  margin-bottom: 28px;
  cursor: pointer;
  font: inherit;
  font-size: 0.9375rem;
}

.galeria-detalle__back-icon {
  width: 16px;
  height: 16px;
  transform: rotate(-135deg);
  opacity: 0.7;
}

.galeria-detalle__back:hover {
  opacity: 0.75;
}

.galeria-detalle__header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.galeria-detalle__tipo {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(0, 0, 0, 0.45);
  margin: 0 0 8px;
}

.galeria-detalle__titulo {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 600;
  color: #111;
  margin: 0 0 8px;
}

.galeria-detalle__cliente {
  font-size: 1rem;
  color: rgba(0, 0, 0, 0.65);
  margin: 0 0 6px;
}

.galeria-detalle__ubicacion {
  font-size: 0.9375rem;
  color: rgba(0, 0, 0, 0.5);
  margin: 0;
  max-width: 560px;
}

.galeria-detalle__codigo {
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: rgba(0, 0, 0, 0.35);
  margin: 0;
  text-transform: uppercase;
}

/* Galería densa: miniaturas 4:3; la principal ocupa 2×2 sin huecos (misma altura que dos filas) */
.galeria-detalle-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  grid-auto-flow: dense;
}

.galeria-detalle-grid .galeria-thumb {
  position: relative;
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 0;
  border: none;
  padding: 0;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 4 / 3;
  background: #e8e8e8;
}

/* La miniatura siempre recorta (vertical u horizontal); no usa el tamaño intrínseco del archivo */
.galeria-detalle-grid .galeria-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.35s ease;
}

.galeria-detalle-grid .galeria-thumb:hover img {
  transform: scale(1.03);
}

/* 2×2 celdas 4:3 → marco apaisado; foto vertical se recorta dentro */
.galeria-detalle-grid .galeria-thumb--hero {
  grid-column: span 2;
  grid-row: span 2;
  aspect-ratio: 4 / 3;
}

.galeria-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10050;
  background: rgba(10, 10, 10, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 72px;
}

.galeria-lightbox[hidden] {
  display: none !important;
}

.galeria-lightbox__figure {
  margin: 0;
  max-width: min(1200px, 92vw);
  max-height: 82vh;
  text-align: center;
}

.galeria-lightbox__figure img {
  max-width: 100%;
  max-height: 78vh;
  object-fit: contain;
  border-radius: 4px;
}

.galeria-lightbox__figure figcaption {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.875rem;
  margin-top: 12px;
}

.galeria-lightbox__close {
  position: absolute;
  top: 20px;
  right: 24px;
  background: none;
  border: none;
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0.85;
  padding: 8px;
}

.galeria-lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.75rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.galeria-lightbox__nav:hover {
  background: rgba(255, 255, 255, 0.18);
}

.galeria-lightbox__nav--prev {
  left: 20px;
}

.galeria-lightbox__nav--next {
  right: 20px;
}

.galeria-lightbox__contador {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.875rem;
  margin: 0;
}

@media (max-width: 767px) {
  .galeria-detalle-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
  }

  .galeria-detalle-grid .galeria-thumb--hero {
    grid-column: span 2;
    grid-row: span 2;
    aspect-ratio: 4 / 3;
  }

  .galeria-lightbox {
    padding: 48px 12px;
  }

  .galeria-lightbox__nav {
    width: 40px;
    height: 40px;
  }
}
