/* ==========================================================================
   Sky Ceylon — Galleries

   FluentSnippets group: Galleries | type: css | run_at: wp_head
   load_as_file: yes | load_in_block_editor: yes
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. PHOTO GRID
   -------------------------------------------------------------------------- */
.skyc-gallery {
  display: grid;
  gap: var(--wp--preset--spacing--16);
}

.skyc-shot {
  position: relative;
  margin: 0;
  overflow: hidden;
  border-radius: var(--wp--custom--radius-md);
  background: var(--wp--preset--color--surface-grey);
}
.skyc-shot__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* The caption sits on the photograph, so it needs its own dark wash to stay
   readable whatever the picture underneath happens to be. */
.skyc-shot__cap {
  position: absolute;
  inset: auto 0 0 0;
  display: grid;
  gap: 0.15em;
  padding: var(--wp--preset--spacing--32) var(--wp--preset--spacing--16) var(--wp--preset--spacing--16);
  background: linear-gradient(to top, rgba(41, 6, 22, 0.88), rgba(41, 6, 22, 0));
  color: var(--wp--custom--text-invert);
  font-size: var(--wp--preset--font-size--sm);
  line-height: var(--wp--custom--leading-snug);
}
.skyc-shot__cap small {
  font-size: var(--wp--preset--font-size--xs);
  font-weight: var(--wp--custom--weight-bold);
  letter-spacing: var(--wp--custom--tracking-wider);
  text-transform: uppercase;
  color: var(--wp--preset--color--accent);
}

/* --- mosaic --- */
.skyc-gallery--mosaic { grid-auto-rows: 13rem; }
@media (min-width: 640px) {
  .skyc-gallery--mosaic { grid-template-columns: repeat(2, 1fr); }
  .skyc-gallery--mosaic .skyc-shot--tall { grid-row: span 2; }
  .skyc-gallery--mosaic .skyc-shot--wide { grid-column: span 2; }
}
@media (min-width: 1000px) {
  .skyc-gallery--mosaic {
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 15rem;
  }
}

/* --- strip --- */
.skyc-gallery--strip { grid-template-columns: repeat(2, 1fr); }
.skyc-gallery--strip .skyc-shot { aspect-ratio: 1 / 1; }
@media (min-width: 700px) {
  .skyc-gallery--strip { grid-template-columns: repeat(4, 1fr); }
}

/* --- note card --- */
.skyc-shot-note {
  display: grid;
  gap: var(--wp--preset--spacing--12);
  align-content: center;
  padding: var(--wp--preset--spacing--24);
  border-radius: var(--wp--custom--radius-md);
  background: var(--wp--preset--color--base);
}
.skyc-section--plum .skyc-shot-note {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
}
.skyc-shot-note__title {
  margin: 0;
  font-family: var(--wp--preset--font-family--display);
  font-size: var(--wp--preset--font-size--md);
  font-weight: var(--wp--custom--weight-bold);
  line-height: var(--wp--custom--leading-snug);
  color: var(--skyc-fg-strong, var(--wp--preset--color--contrast));
}
.skyc-shot-note__text {
  margin: 0;
  color: var(--skyc-fg, var(--wp--preset--color--body));
  line-height: var(--wp--custom--leading-relaxed);
}
.skyc-gallery + .skyc-actions { margin-top: var(--wp--preset--spacing--40); }

/* --------------------------------------------------------------------------
   2. DESTINATIONS

   A scroll-snapping row. The wrapper carries the page gutter as padding so the
   first and last cards line up with the rest of the page while the row itself
   still runs edge to edge.
   -------------------------------------------------------------------------- */
.skyc-dests-wrap {
  margin-top: var(--wp--preset--spacing--40);
  overflow: hidden;
}

.skyc-dests {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: min(17rem, 72vw);
  gap: var(--wp--preset--spacing--16);
  padding: 0 max(var(--wp--custom--gutter), calc((100% - var(--wp--custom--container-max)) / 2));
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-left: var(--wp--custom--gutter);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  padding-bottom: var(--wp--preset--spacing--16);
}

.skyc-dest {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: var(--wp--custom--radius-lg);
  background: var(--wp--preset--color--primary-deep);
  scroll-snap-align: start;
  text-decoration: none;
  isolation: isolate;
}
.skyc-dest__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--wp--custom--duration-slow) var(--wp--custom--ease-out);
}
.skyc-dest::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(41, 6, 22, 0.90) 0%, rgba(41, 6, 22, 0.40) 45%, rgba(41, 6, 22, 0.05) 100%);
}
a.skyc-dest:hover .skyc-dest__img { transform: scale(1.05); }

.skyc-dest__body {
  position: relative;
  z-index: 1;
  display: grid;
  gap: var(--wp--preset--spacing--4);
  align-content: end;
  height: 100%;
  padding: var(--wp--preset--spacing--20);
  color: var(--wp--custom--text-invert);
}
.skyc-dest__pin {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  margin-bottom: var(--wp--preset--spacing--4);
  border-radius: var(--wp--custom--radius-circle);
  background: rgba(255, 255, 255, 0.14);
  color: var(--wp--preset--color--accent);
}
.skyc-dest__name {
  font-family: var(--wp--preset--font-family--display);
  font-size: var(--wp--preset--font-size--lg);
  font-weight: var(--wp--custom--weight-bold);
  line-height: var(--wp--custom--leading-tight);
  color: var(--wp--custom--heading-invert);
}
.skyc-dest__note {
  font-size: var(--wp--preset--font-size--sm);
  line-height: var(--wp--custom--leading-snug);
  color: var(--wp--custom--muted-invert);
}

/* The invitation card has no photograph, so it supplies its own colour. */
.skyc-dest--invite {
  background: var(--wp--preset--color--primary);
  aspect-ratio: auto;
}
.skyc-dest--invite::after { content: none; }
.skyc-dest--invite .skyc-dest__body {
  align-content: center;
  gap: var(--wp--preset--spacing--8);
}
.skyc-dest--invite .skyc-arrow-link { margin-top: var(--wp--preset--spacing--8); }

/* --------------------------------------------------------------------------
   3. EDITOR
   -------------------------------------------------------------------------- */
.editor-styles-wrapper .skyc-gallery--mosaic { grid-auto-rows: 11rem; }
.editor-styles-wrapper .skyc-dests { grid-auto-columns: min(15rem, 60vw); }
