/* --- Gallery Section Styles --- */
.thrivescape-gallery {
  padding: 60px 0; /* Left/Right padding removed so slider goes edge-to-edge */
  background-color: #f9f9f9;
  font-family: sans-serif;
  overflow: hidden;
}

.gallery-container {
  max-width: 100%;
}

.gallery-title {
  text-align: center;
  margin-bottom: 30px;
  padding: 0 20px;
}

.gallery-title h2 {
  font-size: 2.5rem;
  color: #333;
  margin-bottom: 10px;
}

/* --- The Scrollable Flex Container --- */
.gallery-scroll-wrapper {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 10px 20px 25px 20px; /* Bottom padding gives breathing room for a subtle shadow */

  /* Smooth touch scrolling & snapping */
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
}

/* Customizing scrollbar track (Optional - makes it look premium) */
.gallery-scroll-wrapper::-webkit-scrollbar {
  height: 6px;
}
.gallery-scroll-wrapper::-webkit-scrollbar-track {
  background: #e0e0e0;
  border-radius: 10px;
}
.gallery-scroll-wrapper::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 10px;
}
.gallery-scroll-wrapper::-webkit-scrollbar-thumb:hover {
  background: #555;
}

/* --- Individual Flex Items --- */
.gallery-item {
  flex: 0 0 300px; /* Do not shrink, do not grow, default width 300px */
  aspect-ratio: 4 / 5; /* Elegant portrait aspect ratio for modern cards */
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.08);
  cursor: pointer;
  background-color: #000;
  scroll-snap-align: start; /* Snaps beautifully when scrolling */
  transition: transform 0.3s ease;
}

.gallery-item img,
.gallery-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Gentle interactive lift effect */
.gallery-item:hover {
  transform: translateY(-5px);
}

/* --- Video Overlay --- */
.video-item .play-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.25);
}

.play-overlay svg {
  width: 45px;
  height: 45px;
  fill: #fff;
  filter: drop-shadow(0px 2px 6px rgba(0, 0, 0, 0.4));
}

/* --- Lightbox Modal --- */
.gallery-lightbox {
  display: none;
  position: fixed;
  z-index: 9999;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.95);
  justify-content: center;
  align-items: center;
}

.lightbox-content {
  max-width: 90%;
  max-height: 80vh;
}

.lightbox-content img,
.lightbox-content video {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 80vh;
  border-radius: 6px;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: #fff;
  font-size: 42px;
  font-weight: bold;
  cursor: pointer;
}

/* --- Universal Media Queries --- */
@media (max-width: 768px) {
  .gallery-title h2 {
    font-size: 2rem;
  }
  .gallery-item {
    flex: 0 0 240px; /* Slightly narrower cards for tablets */
    gap: 15px;
  }
}

@media (max-width: 480px) {
  .gallery-title h2 {
    font-size: 1.75rem;
  }
  .gallery-scroll-wrapper {
    gap: 12px;
    padding-left: 15px; /* Pull margins slightly closer on small devices */
  }
  .gallery-item {
    flex: 0 0 190px; /* Perfect sizing for mobile screens */
  }
  .lightbox-close {
    top: 15px;
    right: 20px;
    font-size: 35px;
  }
}

/* --- Optimized Narrative Section --- */
.thrivescape-narrative {
  padding: 80px 20px; /* Generous vertical spacing */
  background-color: #ffffff; /* Clean white background */
}

/* Container for all content */
.about-narrative-box {
  max-width: 800px; /* Keeps text readable on large screens */
  margin: 0 auto; /* Horizontal centering */
  display: flex;
  flex-direction: column;
  gap: 30px; /* Space between P tags and Images */
}

/* Stylized Paragraphs */
.thrivescape-narrative p {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 1.15rem;
  line-height: 1.8;
  color: #444;
  margin: 0;
}

/* Lead paragraph (larger) */
.thrivescape-narrative p.paragraph-lead {
  font-size: 1.3rem;
  color: #222;
  font-weight: 500;
}

/* --- The Illustrations (Centering Logic) --- */
.narrative-image-wrapper {
  display: flex;
  justify-content: center; /* PERFECTLY CENTERS THE IMAGE HZ */
  align-items: center; /* PERFECTLY CENTERS THE IMAGE VT */
  width: 100%;
  padding: 20px 0;
}

.illustrative-graphic {
  width: auto;
  max-width: 90%; /* Stops it from hitting the edge on small screens */
  height: auto; /* Maintains aspect ratio */

  /* Apply your Thrivescape branding border radius here if needed */
  border-radius: 12px;

  /* Optional soft shadow for depth */
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

/* Responsive Media Queries */
@media (max-width: 768px) {
  .thrivescape-narrative {
    padding: 60px 15px;
  }
  .about-narrative-box {
    max-width: 95%;
  }
  .thrivescape-narrative p {
    font-size: 1.1rem;
  }
}

/* gggggggggggggggggggggg */
/* --- Optimized Narrative Section --- */
.thrivescape-narrative {
  padding: 80px 20px; /* Generous vertical spacing */
  background-color: #ffffff; /* Clean white background */
}

/* Container for all content */
.about-narrative-box {
  max-width: 800px; /* Keeps text readable on large screens */
  margin: 0 auto; /* Horizontal centering */
  display: flex;
  flex-direction: column;
  gap: 30px; /* Space between P tags and Images */
}

/* Stylized Paragraphs */
.thrivescape-narrative p {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 1.15rem;
  line-height: 1.8;
  color: #444;
  margin: 0;
}

/* Lead paragraph (larger) */
.thrivescape-narrative p.paragraph-lead {
  font-size: 1.3rem;
  color: #222;
  font-weight: 500;
}

/* --- The Illustrations (Centering Logic) --- */
.narrative-image-wrapper {
  display: flex;
  justify-content: center; /* PERFECTLY CENTERS THE IMAGE HZ */
  align-items: center; /* PERFECTLY CENTERS THE IMAGE VT */
  width: 100%;
  padding: 20px 0;
}

.illustrative-graphic {
  width: auto;
  max-width: 90%; /* Stops it from hitting the edge on small screens */
  height: auto; /* Maintains aspect ratio */

  /* Apply your Thrivescape branding border radius here if needed */
  border-radius: 12px;

  /* Optional soft shadow for depth */
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

/* Responsive Media Queries */
@media (max-width: 768px) {
  .thrivescape-narrative {
    padding: 60px 15px;
  }
  .about-narrative-box {
    max-width: 95%;
  }
  .thrivescape-narrative p {
    font-size: 1.1rem;
  }
}
