/* ==========================================================
   Sea Quest: home page only (index.html)
   Load after reset.css and styles.css
   1. Hero (the .split layout lives in styles.css)
   2. Gallery carousel
   3. Product tabs and galleries
   ========================================================== */

/* 1. HERO ------------------------------------------------ */
.hero {
  min-height: 80svh;
}

/* Never stretch the hero photo: it keeps its own shape and is only
   limited in height on tall screens */
.hero img {
  max-height: 70svh;
  object-fit: contain;
}

/* 2. CAROUSEL -------------------------------------------- */
.carousel__slides {
  display: grid;
}

.carousel__slide {
  grid-area: 1 / 1;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.6s ease, visibility 0.6s;
}

.carousel__slide.is-active {
  opacity: 1;
  visibility: visible;
}

.carousel__slide img {
  aspect-ratio: 4 / 3;
  object-fit: contain;            /* whole photo always visible, never stretched */
  background: var(--color-bg-alt);
}

.carousel__controls {
  display: flex;
  justify-content: center;
  gap: calc(var(--space) * 2);
  margin-top: var(--space);
}

.carousel__btn {
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid var(--color-border);
  border-radius: 50%;
  background: var(--color-card);
  color: var(--color-text);
  font-size: 1.25rem;
  cursor: pointer;
}

.carousel__btn:hover {
  background: var(--color-bg-dark);
  color: var(--color-text-on-dark);
}

/* 3. PRODUCT TABS AND GALLERIES -------------------------- */
.tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-block: var(--space) calc(var(--space) * 2);
}

.tab {
  padding: 0.5em 1em;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: var(--color-card);
  color: var(--color-text);
  cursor: pointer;
}

.tab:hover {
  border-color: var(--color-bg-dark);
}

.tab[aria-selected="true"] {
  background: var(--color-bg-dark);
  border-color: var(--color-bg-dark);
  color: var(--color-text-on-dark);
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: var(--space);
}

.gallery {
  align-items: start;
}

/* Photos keep their own shape (portrait fish and shrimp shots included).
   Very tall photos are capped in height and sit centred on a soft background. */
.gallery img {
  width: 100%;
  height: auto;
  max-height: 22rem;
  object-fit: contain;
  background: var(--color-bg-alt);
}

.gallery figcaption {
  padding-top: 0.25rem;
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

.section-more {
  margin-top: calc(var(--space) * 2);
  text-align: center;
}