/* ========== Layout: page centered on viewport (no backend; single static page) ========== */
/* Page centered on both axes */
body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
}

/* ========== Swiper component: image area + small gap + nav bar ========== */
/* Swiper layout: image area + gap-1 + nav bar below */
.swiper {
  display: flex;
  flex-direction: column;
  gap: 4px; /* gap-1: less gap between image and bottom slider div */
}

/* Wrapper for slides; fixed height so all images sit in same-sized box */
.swiper-wrapper {
  flex-shrink: 0;
  height: 400px;
}

/* ========== Nav bar: sliding product text + centered arrows/dots (Shopify style) ========== */
/* Nav bar: text on left, arrows + dots centered (Shopify style) */
.swiper-navigation-pagination-container {
  position: relative;
  display: flex;
  align-items: center;
  padding: 16px 20px;
  background-color: rgba(0, 0, 0, 0.5);
  color: white;
  min-height: 56px;
}

/* Strip of 5 text cells; script.js sets transform so active slide’s text is visible */
/* Full-width sliding text strip (syncs with image swiper, slides left–right across entire bar) */
.nav-bar-product-text-wrapper {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

/* 500% = 5 slides × 100%; each child is 20% (see .nav-bar-text-slide) */
.nav-bar-text-slider {
  display: flex;
  width: 500%;
  height: 100%;
  transition: transform 0.35s ease;
  will-change: transform;
}

.nav-bar-text-slide {
  flex: 0 0 20%;
  width: 20%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-right: 80px;
  padding-left: 20px;
  box-sizing: border-box;
}

.nav-bar-text-slide .nav-subtitle {
  margin: 0 0 4px;
  font-size: 1rem;
  font-weight: 600;
}

.nav-bar-text-slide .nav-subsubtitle {
  margin: 0;
  font-size: 0.8rem;
  opacity: 0.9;
}

/* Arrows + dots in the middle of the nav bar (above the text strip) */
.nav-bar-controls {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 1;
  pointer-events: auto;
}

/* ========== Swiper UI overrides: keep pagination/arrows in nav bar flow (not absolute) ========== */
/* Override Swiper's absolute positioning so pagination stays in flow */
.swiper-pagination {
  position: static !important;
  transform: none !important;
  left: auto !important;
  bottom: auto !important;
  width: auto !important;
}

.swiper-button-next,
.swiper-button-prev {
  position: static;
  display: inline-block;
  color: white;
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
  color: #7dd3fc;
}

/* Swiper pagination bullet styling */
.swiper-pagination-bullet {
  background-color: rgba(255, 255, 255, 0.5);
}

.swiper-pagination-bullet-active {
  background-color: #3b82f6;
}

/* ========== Header: title + educational callout ========== */
/* Header section: independent layout block */
.header-section {
  position: relative;
  margin-bottom: 20px;
}

/* Heading styling */
.heading {
  font-size: 1.5rem;
  font-weight: bold;
  margin-bottom: 20px;
  color: #000000;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Educational callout for beginner learners */
.educational-callout {
  position: relative;
  margin-bottom: 0;
  padding: 12px 16px;
  background-color: #e0f2fe;
  border: 1px solid #7dd3fc;
  border-radius: 8px;
  font-size: 0.9rem;
  line-height: 1.5;
  color: #0c4a6e;
}
.educational-callout strong {
  color: #0369a1;
}
.educational-callout code {
  background-color: #bae6fd;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.85em;
}

/* ========== Swiper section container ========== */
/* Swiper section: independent layout block, displays just below header */
.swiper-section {
  position: relative;
  margin-top: 20px;
}

/* ========== Slide content: subtitle/subsubtitle (used in .text-overlay; overlay hidden, text in nav bar) ========== */
/* Subtitle styling */
.subtitle {
  margin: 20px 20px 0px;
  font-size: 1rem;
  text-align: left;
  line-height: 1.5;
}

/* Subsubtitle styling */
.subsubtitle {
  margin: 0px 20px 20px;
  font-size: 0.8rem;
  text-align: left;
  line-height: 1.5;
}

/* ========== Image container: fixed height, object-fit so no layout shift ========== */
/* Image container: fixed min-height for consistent layout across all slides */
.image-container {
  min-height: 400px;
  height: 400px;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  overflow: hidden;
}

/* Image styling: fill container uniformly regardless of source aspect ratio */
.image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Text overlay: hidden on image; same content shown in nav bar next to arrows/dots */
.text-overlay {
  position: absolute;
  bottom: 30px;
  width: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  color: white;
  padding: 0px;
  visibility: hidden; /* text displayed in nav bar instead */
}

/* ========== Base typography and container ========== */
/* HTML element styling */
html {
  font-family:
    -apple-system,
    BlinkMacSystemFont,
    avenir next,
    avenir,
    segoe ui,
    helvetica neue,
    helvetica,
    Cantarell,
    Ubuntu,
    roboto,
    noto,
    arial,
    sans-serif;
}

/* Container styling */
.container {
  max-width: 800px;
  margin: auto;
  padding: 0 16px;
}

/* ========== Swiper theme variables (bullet size, nav size, colors) ========== */
/* CSS variables for Swiper */
:root {
  --swiper-pagination-bullet-size: 20px;
  --swiper-navigation-size: 28px;
  --swiper-pagination-bottom: 50px;
  --swiper-theme-color: #fff;
  --swiper-pagination-bullet-inactive-color: #fff;
  --swiper-pagination-bullet-inactive-opacity: 0.3;
}
