/* 1. RESET & BASE LAYOUT */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: #f5f5f7;
  color: #1d1d1f;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* 2. HEADER & NAVIGATION */
.site-header {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  padding: 24px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-title {
  font-family: "Britannic Bold", "Britannic", "Georgia", serif;
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: #111111;
}

.nav-button {
  text-decoration: none;
  color: #111111;
  font-size: 1rem;
  font-weight: 500;
  padding: 8px 18px;
  border: 1px solid #111111;
  border-radius: 20px;
  transition: all 0.2s ease;
}

.nav-button:hover {
  background-color: #111111;
  color: #ffffff;
}

/* 3. MAIN CONTENT CONTAINER */
.main-content {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: flex-start; /* Aligns content cleanly from top */
  padding: 20px;
}

/* 4. MAIN CAROUSEL FRAME (Dynamic Height) */
.carousel-frame {
  position: relative;
  width: 100%;
  max-width: 1200px;
  height: auto; /* Adapts automatically to child height */
  overflow: hidden !important;
  background-color: #ffffff;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
  border-radius: 0;
  touch-action: pan-y;
  /* Smooth height adjustment when changing slides */
  transition: height 0.4s ease-in-out;}

/* Utilize full viewport width when screen width is under 1441px */
@media (max-width: 1440px) {
  .main-content {
    padding-left: 0;
    padding-right: 0;
  }

  .carousel-container,
  .carousel-frame {
    max-width: 100%;
    box-shadow: none;
  }
}
  
/* 5. SLIDING TRACK */
.carousel-track {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  width: 100%;
  transition: transform 0.4s ease-in-out;
  cursor: grab;
}

.carousel-track.is-dragging {
  cursor: grabbing;
  transition: none;
}

/* 6. INDIVIDUAL SLIDES */
.carousel-slide {
  flex: 0 0 100% !important; /* Scalable 100% width of parent frame */
  width: 100% !important;
  height: auto !important;
  position: relative;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: flex-start; /* Align media at the top so heights adjust naturally */
  user-select: none;
}

/* Media maintains native proportions */
/* Images remain non-clickable so dragging works smoothly */
.carousel-slide img {
  width: 100%;
  height: auto;
  max-height: 80vh;
  object-fit: contain;
  display: block;
  pointer-events: none;
}

/* Videos allow full interaction with browser controls */
.carousel-slide video {
  width: 100%;
  height: auto;
  max-height: 80vh;
  object-fit: contain;
  display: block;
  pointer-events: auto; /* Restores play, pause, seek and volume controls */
  touch-action: manipulation;
}

/* 7. ARROW BUTTONS */
.nav-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(0, 0, 0, 0.45);
  color: #ffffff;
  border: none;
  padding: 12px 15px;
  font-size: 18px;
  cursor: pointer;
  z-index: 20;
  border-radius: 6px;
  user-select: none;
  transition: background-color 0.2s ease;
}

.nav-arrow:hover {
  background-color: rgba(0, 0, 0, 0.75);
}

.nav-arrow.prev { left: 10px; }
.nav-arrow.next { right: 10px; }

/* 8. DOTS */
.dots-wrapper {
display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 12px;
}

.dot-item {
width: 8px;
  height: 8px;
  background-color: rgba(0, 0, 0, 0.25);
  border-radius: 50%;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.2s;
}

.dot-item.active {
background-color: #111111;
  transform: scale(1.3);
}

/* 9. PARAGRAPH CAPTION BELOW DOTS */
.caption-container {
  width: 100%;       /* Matches the exact width of the carousel-container */
  margin-top: 10px;  /* Space below the dots */
  padding: 0;        /* Removes horizontal padding so edges align perfectly */
  min-height: 1.5em; /* Reserves a single line of vertical space when empty */
}

.slide-caption {
  width: 100%;       /* Spans full slide width */
  font-size: 0.95rem;
  line-height: 1.6;
  color: #555555;
  text-align: left;  /* Change to 'center' if you prefer centered caption text */
}

/* 10. ABOUT PAGE CARD */
.about-card {
  width: 100%;
  max-width: 800px;
  min-height: 300px;
  background-color: #ffffff;
  padding: 60px;
  border-radius: 0;
  box-shadow: 0 3px 9px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.about-card h2 {
  font-family: "Britannic Bold", "Britannic", "Georgia", serif;
  font-size: 2rem;
  margin-bottom: 20px;
}

.about-card p {
  font-size: 1.1rem;
  line-height: 1.7;
  color: #555555;
}

/* Hide arrows on any device where the primary input is a touch screen */
@media (pointer: coarse) {
  .nav-arrow {
    display: none !important;
  }
  .carousel-slide img {
    cursor: pointer;
  }
}

/* Enable clicking on carousel images for lightbox opening */
.carousel-slide img {
  pointer-events: auto !important;
  cursor: pointer;
}

/* 11. LIGHTBOX MODAL */
.lightbox-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.95);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  touch-action: none;
}

.lightbox-overlay.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 28px;
  font-weight: 300;
  cursor: pointer;
  z-index: 1010;
  padding: 10px;
  line-height: 1;
}

.lightbox-track-wrapper {
  width: 100%;
  height: 80vh; /* Reduced slightly to ensure clearance for dots */
  overflow: hidden;
  position: relative;
}

.lightbox-track {
  display: flex;
  height: 100%;
  width: 100%;
  transition: transform 0.3s ease-out;
}

.lightbox-slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Ensure BOTH images and videos fit inside screen bounds */
.lightbox-slide img,
.lightbox-slide video {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  transform-origin: center center;
  will-change: transform;
  user-select: none;
}

/* LIGHTBOX DOTS CONTAINER */
.lightbox-dots-wrapper {
  position: absolute;
  bottom: 40px; /* Elevated cleanly above bottom edge */
  left: 50%;
  transform: translateX(-50%);
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 12px;
  z-index: 1050; /* Higher than track and close button */
  pointer-events: auto;
}

/* LIGHTBOX DOTS */
.lightbox-dot {
  width: 12px;
  height: 12px;
  background-color: rgba(255, 255, 255, 0.4);
  border: 1px solid rgba(0, 0, 0, 0.5);
  border-radius: 50%;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.lightbox-dot.active {
  background-color: #ffffff !important;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.8);
  transform: scale(1.3);
}