/* ETAPA 09 — Cierre editorial y carrusel fotográfico.
   Aislado bajo .closing y .closing-gallery. */

.closing {
  --closing-ivory: #FFFCF9;
  --closing-green: #9CAF88;
  --closing-pink: #F4C3C4;
  position: relative;
  isolation: isolate;
  width: 100%;
  max-width: 780px;
  margin: 0 auto;
  overflow: hidden;
  background: var(--closing-ivory);
  color: #242424;
  text-align: center;
  border-radius: 0 0 24px 24px;
  box-shadow: 0 12px 32px rgba(69,54,43,.07);
}
.closing__hero {
  position: relative;
  height: clamp(250px, 75vw, 440px);
  overflow: hidden;
  background: linear-gradient(140deg, #CCC9C5, #E6E4E0);
}
.closing__hero-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 47%;
  filter: grayscale(1) contrast(.96);
}
.closing__hero--empty .closing__hero-image { display: none; }
.closing__hero-placeholder {
  display: none;
  position: absolute;
  inset: 0;
  align-items: center;
  justify-content: center;
  padding: 30px;
  background: linear-gradient(120deg,#C8C6C2,#E7E5E2 53%,#C8C5C0);
  color: #79736F;
  font: 600 10px/1.8 var(--font-sans,Arial,sans-serif);
  letter-spacing: .13em;
  text-transform: uppercase;
}
.closing__hero--empty .closing__hero-placeholder { display: flex; }
.closing__hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(to bottom,
    transparent 49%,
    rgba(255,252,249,.04) 57%,
    rgba(255,252,249,.60) 80%,
    var(--closing-ivory) 100%);
}
.closing__top-wave {
  position: absolute;
  z-index: 2;
  inset: -1px 0 auto;
  width: 100%;
  height: clamp(39px, 13vw, 77px);
  pointer-events: none;
  fill: var(--closing-ivory);
}
.closing__body {
  position: relative;
  z-index: 3;
  margin: -16px auto 0;
  padding: 0 16px clamp(56px, 9vw, 85px);
  width: 100%;
}
.closing__heart-rule {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 9px;
  width: min(100%, 145px);
  margin: 0 auto 15px;
  color: #799568;
}
.closing__heart-rule::before,
.closing__heart-rule::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #BBC9B1;
}
.closing__heart-rule svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linejoin: round;
  fill: none;
}
.closing__heading {
  max-width: 580px;
  margin: 0 auto;
  font: italic 500 clamp(41px, 10vw, 65px)/1.02 var(--font-serif,Georgia,serif);
  letter-spacing: -.025em;
  text-wrap: balance;
}
.closing__sprig {
  display: block;
  width: 70px;
  height: 29px;
  margin: 13px auto 17px;
  overflow: visible;
  pointer-events: none;
}
.closing__sprig path {
  fill: none;
  stroke: #8BA580;
  stroke-width: 1.8;
  stroke-linecap: round;
}
.closing__sprig ellipse { fill: #91A982; }

/* Galería: tres fotografías visibles y un pequeño espacio uniforme. */
.closing-gallery {
  position: relative;
  width: min(calc(100% - 12px), 640px);
  margin: 0 auto;
  --closing-gap: 6px;
  -webkit-tap-highlight-color: transparent;
}
.closing-gallery__viewport {
  overflow: hidden;
  width: 100%;
  touch-action: pan-y;
  cursor: grab;
  border-radius: 12px;
}
.closing-gallery__viewport:active { cursor: grabbing; }
.closing-gallery__track {
  display: flex;
  align-items: stretch;
  gap: var(--closing-gap);
  padding: 0;
  margin: 0;
  list-style: none;
  will-change: transform;
}
.closing-gallery__slide {
  position: relative;
  flex: 0 0 calc((100% - (2 * var(--closing-gap))) / 3);
  min-width: 0;
  height: clamp(198.5px, 57.5vw, 322.5px);
  overflow: hidden;
  background: #E7E2DC;
  border-radius: 9px;
}
.closing-gallery__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  user-select: none;
  -webkit-user-drag: none;
}
.closing-gallery__slide--empty .closing-gallery__image { display: none; }
.closing-gallery__image-placeholder {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 9px;
  background: linear-gradient(145deg,#EDE6E0,#E2E7DC);
  color: #77746D;
  font: 500 9px/1.6 var(--font-sans,Arial,sans-serif);
  letter-spacing: .08em;
  text-transform: uppercase;
  text-align: center;
}
.closing-gallery__slide--empty .closing-gallery__image-placeholder { display: flex; }
.closing-gallery__arrow {
  position: absolute;
  z-index: 4;
  top: 50%;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid rgba(0,0,0,.075);
  border-radius: 50%;
  background: rgba(255,255,255,.96);
  color: #242424;
  box-shadow: 0 3px 9px rgba(25,22,20,.15);
  transform: translateY(-50%);
  cursor: pointer;
}
.closing-gallery__arrow--prev { left: -20px; }
.closing-gallery__arrow--next { right: -20px; }
.closing-gallery__arrow svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.closing-gallery__arrow:hover { background: #fff; }
.closing-gallery__arrow:focus-visible,
.closing-gallery__dot:focus-visible { outline: 3px solid #587449; outline-offset: 4px; }
.closing-gallery__dots {
  display: flex;
  justify-content: center;
  gap: 9px;
  margin: 14px auto 0;
}
.closing-gallery__dot {
  width: 9px;
  height: 9px;
  border: 0;
  border-radius: 50%;
  padding: 0;
  background: #DFDCD5;
  cursor: pointer;
}
.closing-gallery__dot[aria-current="true"] { background: #839E76; }

/* Monograma final flanqueado por ramitas rosadas y verdes. */
.closing__signature {
  width: min(100%, 510px);
  display: grid;
  grid-template-columns: minmax(0,1fr) auto minmax(0,1fr);
  align-items: center;
  gap: clamp(6px, 2.5vw, 18px);
  margin: clamp(34px, 9vw, 57px) auto 11px;
}
.closing__signature-flowers {
  width: clamp(64px, 19vw, 125px);
  max-width: 100%;
  height: auto;
  justify-self: end;
  overflow: visible;
  pointer-events: none;
}
.closing__signature-flowers--right {
  justify-self: start;
  transform: scaleX(-1);
}
.closing__monogram-logo {
  display: block;
  width: clamp(52px, 15vw, 76px);
  max-width: 100%;
  height: auto;
  justify-self: center;
  object-fit: contain;
}
.closing__date {
  margin: 13px 0 0;
  font: 600 clamp(9px, 2vw, 10px)/1.8 var(--font-sans,Arial,sans-serif);
  letter-spacing: .43em;
  text-transform: uppercase;
}
@media (min-width:700px) {
  .closing__hero { height: 455px; }
  .closing__body { margin-top: -30px; }
  .closing__sprig { margin-top: 22px; margin-bottom: 26px; }
  .closing-gallery__slide { height: 297.5px; }
}
@media (max-width:359px) {
  .closing__heading { font-size: 37px; }
  .closing__body { padding-left: 10px; padding-right: 10px; }
  .closing-gallery { width: calc(100% - 24px); --closing-gap: 5px; }
  .closing-gallery__slide { height: 190px; }
  .closing-gallery__arrow { width: 36px; height: 36px; }
  .closing-gallery__arrow--prev { left: -17px; }
  .closing-gallery__arrow--next { right: -17px; }
  .closing__date { letter-spacing: .3em; }
}
@media (prefers-reduced-motion:reduce) {
  .closing-gallery__track { transition: none !important; }
}
