/* ============================================================
   SECTION 6 — THE CENTER OF GRAVITY & A GALLERY OF EXCELLENCE
   ============================================================ */

.red-page-container {
  background-color: #7A1315; /* Crimson background */
  background-image: 
    linear-gradient(
      to bottom,
      rgba(122, 19, 21, 0.0) 0%,      /* Transparent red at top */
      rgba(80, 10, 12, 0.30) 40%,     /* Gradual dark red */
      rgba(40, 5, 6, 0.65) 75%,       /* Darker red approaching bottom */
      rgba(15, 2, 3, 0.92) 100%       /* Deep dark crimson/black at the bottom */
    ),
    url('../assets/banners/Rectangle 37_red.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-blend-mode: normal;
  color: #F2E3D3;
  width: 100%;
}

/* ────────────────────────────────────────────────────────
   THE CENTER OF GRAVITY
   ──────────────────────────────────────────────────────── */

.gravity-section {
  position: relative;
  width: 100%;
  padding: 100px 0;
  display: flex;
  align-items: center;
  min-height: 100vh;
}

.gravity__container {
  max-width: 1380px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  align-items: start;
  gap: 60px;
  width: 100%;
}

/* ── Map (Left) ── */
.gravity__map-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  border: 1px solid rgba(242, 227, 211, 0.2);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
  overflow: hidden;
}

.gravity__map-iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* ── Content (Right) ── */
.gravity__content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  margin-top: -20px;
}

.gravity__title {
  font-family: 'ClassyVogue', 'Cormorant Garamond', 'Georgia', serif;
  font-size: clamp(2.4rem, 3.8vw, 50px); /* Reduced maximum size by 5px */
  font-weight: 500;
  color: #E0C99E;
  margin: 20px 0 4px 0; /* Added 20px top margin to shift header down slightly */
  white-space: nowrap;
}

/* Divider with diamond on left (using under center.png) */
.gravity__divider {
  width: clamp(380px, 38vw, 490px); /* Proportional 1 finger width offset */
  max-width: 100%;
  margin-top: -4px;
  margin-bottom: 16px;
}

.gravity__divider-img {
  width: 100%;
  height: auto;
  display: block;
}

.gravity__desc {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(0.8rem, 1.4vw, 0.92rem);
  font-weight: 400;
  line-height: 1.7;
  color: rgba(224, 201, 158, 0.85);
  max-width: 650px;
  margin-bottom: 24px; /* Increased to shift accordion points down slightly */
}

/* ── Interactive Accordion ── */
.gravity__accordion {
  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
}

.gravity__acc-item {
  border-bottom: none;
}

.gravity__acc-trigger {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  padding: 6px 0;
  text-align: left;
  color: #c9a96e;
  transition: color 0.3s ease;
  background: none;
  border: none;
  cursor: pointer;
}

.gravity__acc-trigger:hover {
  color: #E8D0A3;
}

.gravity__acc-trigger-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.gravity__acc-title-group {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.gravity__acc-under-img {
  width: 100%;
  height: auto;
  display: block;
  margin-top: 0px;
  opacity: 0.65;
  transition: opacity 0.3s ease, filter 0.3s ease;
}

.gravity__acc-trigger:hover .gravity__acc-under-img {
  opacity: 1;
  filter: brightness(1.2);
}

.gravity__acc-item.is-open .gravity__acc-under-img {
  opacity: 1;
}

.gravity__acc-icon {
  width: 20px;
  height: 20px;
  fill: #c9a96e;
}

.gravity__acc-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.gravity__acc-arrow {
  color: #c9a96e;
  font-size: 0.45rem;
  transition: transform 0.3s var(--ease-out);
}

/* Open states */
.gravity__acc-item.is-open .gravity__acc-arrow {
  transform: rotate(45deg); /* Rotates diamond slightly or indicator */
}

.gravity__acc-panel {
  max-height: 0;
  overflow: hidden;
  margin-top: -16px;
  transition: max-height 0.4s var(--ease-out);
}

.gravity__acc-content {
  padding: 0 0 10px 36px;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.95rem;
  line-height: 1.35; /* Reduced line-height for tighter spacing */
  color: var(--color-gold);
}

.gravity__acc-list {
  list-style: none;
}

.gravity__acc-list li {
  position: relative;
  padding-left: 14px;
}

.gravity__acc-list li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: #c9a96e;
}


/* ────────────────────────────────────────────────────────
   A GALLERY OF EXCELLENCE
   ──────────────────────────────────────────────────────── */

.gallery-section,
.gallery-switch-section {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 95vh; /* Keep the full background image visible and uncropped */
  background-image: 
    linear-gradient(to bottom, rgba(13, 3, 5, 0.55) 0%, rgba(13, 3, 5, 0.4) 100%),
    url('../assets/images/Rectangle 59.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  padding: 0;
}

.gallery-sliders-section {
  position: relative;
  width: 100%;
  background: transparent;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.8s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.6s ease;
  padding: 0;
}

.gallery-sliders-section.is-visible {
  max-height: 1400px; /* High enough to contain the active group */
  opacity: 1;
  padding: 60px 0 80px;
}

.gallery__header {
  text-align: center;
  margin-top: -100px; /* Shifts heading up by ~5 finger widths */
  margin-bottom: 50px; /* Spacing below title */
}

.gallery__title {
  font-family: 'ClassyVogue', 'Cormorant Garamond', 'Georgia', serif;
  font-size: clamp(44px, 6.5vw, 75px); /* Responsive up to 75px */
  line-height: 1.15;
  font-weight: 500;
  color: #ffffff; /* Changed to solid white */
  margin: 0 0 1vh 0;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5); /* Text shadow for legibility */
}

/* Centered gold line with diamond in middle */
.gallery__divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 180px;
  margin: 0 auto;
}

.gallery__divider-rule {
  width: 70px;
  height: 1px;
  background: var(--color-gold);
}

.gallery__divider-diamond {
  color: var(--color-gold);
  font-size: 0.45rem;
}

/* Gallery Toggle Switch */
.gallery__toggle-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: 1.5vh;
  margin-bottom: 3.5vh;
  z-index: 10;
}

.gallery__toggle-label {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(24px, 3.2vw, 40px); /* Responsive up to 40px */
  font-weight: 500;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.45); /* Changed to translucent white */
  text-transform: uppercase;
  transition: color 0.3s ease;
  cursor: pointer;
  user-select: none;
}

.gallery__toggle-label.is-active {
  color: #ffffff; /* Changed active label to solid white */
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.4);
}

.gallery__switch {
  position: relative;
  width: 110px; /* Increased switch width */
  height: 46px; /* Increased switch height */
  border-radius: 100px;
  background-color: rgba(10, 4, 4, 0.6);
  border: 1.5px solid rgba(224, 201, 158, 0.4);
  cursor: grab;
  padding: 0;
  outline: none;
  transition: border-color 0.3s ease;
  overflow: hidden; /* Keep zones inside border radius */
}

.gallery__switch:active {
  cursor: grabbing;
}

.gallery__switch.is-dragging {
  cursor: grabbing !important;
}

.gallery__switch-zone {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50%;
  z-index: 5; /* Positioned above the ball */
  cursor: inherit; /* Inherit drag cursor from switch */
}

#switchZoneLeft {
  left: 0;
}

#switchZoneRight {
  right: 0;
}

.gallery__switch:hover {
  border-color: #E0C99E;
}

.gallery__switch-ball {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 38px; /* Larger toggle ball */
  height: 38px;
  border-radius: 50%;
  background-color: #E0C99E;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateX(33px); /* Default to middle */
  pointer-events: none; /* Prevents ball from intercepting click coordinates */
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

.gallery__switch-text {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.7rem; /* Fits inside the 38px circle beautifully */
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #4A0707; /* Matches the dark maroon color of the Book a Private Preview button text */
  opacity: 0;
  transition: opacity 0.28s ease;
  user-select: none;
  pointer-events: none;
}

.gallery__switch[data-state="middle"] .gallery__switch-text {
  opacity: 1;
}

/* Switch ball positioning based on state */
.gallery__switch[data-state="interior"] .gallery__switch-ball {
  transform: translateX(0);
}

.gallery__switch[data-state="middle"] .gallery__switch-ball {
  transform: translateX(33px);
}

.gallery__switch[data-state="exterior"] .gallery__switch-ball {
  transform: translateX(66px);
}

/* Sub Headers for Interior & Exterior */
.gallery__sub-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 30px 0 20px;
  width: 100%;
}

.gallery__sub-line {
  height: 1px;
  background-color: rgba(242, 227, 211, 0.15);
  width: 120px;
}

.gallery__sub-diamond {
  font-size: 0.5rem;
  color: var(--color-gold);
}

.gallery__sub-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  color: #E0C99E;
  text-transform: uppercase;
  margin: 0;
}

/* Group container logic (shows/hides entire sub-header + slider) */
.gallery__group {
  display: block; /* Default to visible stacked layout */
  width: 100%;
}

.gallery__link-to-toggle {
  display: flex;
  justify-content: center;
  margin-top: 15px;
  margin-bottom: 25px;
}

.gallery__settings-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  color: #E0C99E;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border: 1px solid rgba(224, 201, 158, 0.3);
  border-radius: 4px;
  background: rgba(13, 3, 5, 0.3);
  text-decoration: none;
  transition: all 0.3s ease;
}

.gallery__settings-btn:hover {
  border-color: #E0C99E;
  color: #ffffff;
  background: rgba(13, 3, 5, 0.5);
}

/* Slider Track & Container */
.gallery__slider-container {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
  padding: 1vh 0;
  cursor: grab;
}

.gallery__slider {
  display: flex;
  align-items: center;
  justify-content: flex-start; /* Start from left to allow absolute centering math */
  gap: 32px;
  transition: transform 0.5s var(--ease-out);
  width: max-content; /* Ensure track spans full width of all slides */
}

/* Slide Cards */
.gallery__slide {
  position: relative;
  flex-shrink: 0;
  width: 50vw; /* Slightly narrower to give side images more space */
  max-width: 700px;
  max-height: 52vh; /* Guarantee it doesn't overflow vertical height! */
  aspect-ratio: 16/10;
  overflow: hidden;
  opacity: 0.6; /* Slightly dimmed so active slide stands out, but details are fully visible */
  transform: scale(0.85); /* Scaled down for inactive slides */
  transition: transform 0.5s var(--ease-out), opacity 0.5s ease, box-shadow 0.3s ease;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.25);
}

.gallery__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

/* Active center slide */
.gallery__slide.is-active {
  opacity: 1; /* Fully bright active slide */
  transform: scale(1.0); /* Full size active slide */
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.5);
}

/* Pagination Dots */
.gallery__pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin: 24px auto 16px;
  width: fit-content;
}

.gallery__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.35);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.gallery__dot:hover {
  background-color: rgba(255, 255, 255, 0.6);
}

.gallery__dot.is-active {
  width: 28px;
  border-radius: 5px;
  background-color: #d1b78a;
}

/* Footer Tagline */
.gallery__footer {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85); /* Changed to white for high contrast */
  margin-top: 20px;
  text-align: center;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6); /* Text shadow for legibility */
}

/* Invisible full-height hover click panels overlaying left/right halves */
.gallery__nav-btn {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 15%; /* Cover 15% of the outer edges on left & right */
  height: 100%;
  background: transparent;
  border: none;
  outline: none;
  font-size: 0; /* Hide text icon completely */
  color: transparent;
  display: block;
  cursor: pointer;
  z-index: 10;
  transition: background-color 0.4s ease;
}

/* Subtle dark gradient hint on hover to indicate interactiveness */
.gallery__nav-btn--prev {
  left: 0;
  background: linear-gradient(to right, rgba(0, 0, 0, 0.15), transparent);
}
.gallery__nav-btn--prev:hover {
  background: linear-gradient(to right, rgba(0, 0, 0, 0.35), transparent);
}

.gallery__nav-btn--next {
  right: 0;
  background: linear-gradient(to left, rgba(0, 0, 0, 0.15), transparent);
}
.gallery__nav-btn--next:hover {
  background: linear-gradient(to left, rgba(0, 0, 0, 0.35), transparent);
}

/* Gallery Page Specific Background Override */
.gallery-page-body .gallery-section {
  background-image: url('../assets/images/Rectangle 59.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  min-height: calc(100vh - var(--nav-height));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 60px 0;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 992px) {
  .gravity__container {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .gravity__map-wrap {
    max-width: 600px;
    margin: 0 auto;
  }

  .gravity__title {
    white-space: normal;
  }

  .gravity__content {
    align-items: center;
    text-align: center;
  }

  .gravity__divider {
    justify-content: center;
  }

  .gravity__acc-trigger {
    justify-content: space-between;
  }
}

@media (max-width: 768px) {
  .gravity-section,
  .gallery-section {
    padding: 60px 0;
  }

  .gallery__slide {
    width: 75vw;
  }

  .gallery__slider {
    gap: 16px;
  }
}

@media (max-width: 480px) {
  .gallery__slide {
    width: 85vw;
  }

  .gallery__category {
    font-size: 0.8rem;
    margin-bottom: 16px;
  }

  .gravity__acc-title {
    font-size: 0.7rem;
  }
}

/* Global body cursor override when actively dragging elements */
body.is-dragging,
body.is-dragging * {
  cursor: grabbing !important;
  user-select: none !important;
  -webkit-user-select: none !important;
}
