/* ==========================================================================
   Rooms Page Styles - Guestopolis
   Visual source of truth: Reference Screenshots
   ========================================================================== */

/* Global Reset & Body Box Model */
*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* --------------------------------------------------------------------------
   1. HERO SECTION — ROOMS & ACCOMMODATION
   -------------------------------------------------------------------------- */
.rooms-hero-section {
  position: relative;
  width: 100%;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  box-sizing: border-box;
  overflow: hidden;
  background-color: #0b0f14;
  border: none;
}

.rooms-hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.50);
  z-index: 1;
}

.rooms-hero-content-wrapper {
  position: relative;
  z-index: 5;
  width: 98%;
  max-width: 1760px;
  margin: 0 auto;
  padding-top: 195px;
  padding-bottom: 120px;
  padding-left: 10px;
  padding-right: 10px;
  box-sizing: border-box;
}

.rooms-hero-title {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 58px;
  font-weight: normal;
  line-height: 1.15;
  color: #ffffff;
  margin: 0 0 18px 0;
  letter-spacing: -0.5px;
}

.rooms-hero-description {
  font-family: Arial, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.55;
  color: #ffffff;
  margin: 0;
  max-width: 820px;
  opacity: 0.95;
}

/* ==========================================================================
   Bottom Layered Animated Waves Shape
   ========================================================================== */
.hero-bottom-shape {
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 120px;
  z-index: 4;
  line-height: 0;
  pointer-events: none;
  overflow: hidden;
}

.hero-waves-svg {
  position: relative;
  width: 100%;
  height: 120px;
  margin-bottom: -1px;
  min-height: 80px;
  max-height: 150px;
  display: block;
}

/* Multi-layered Wave Parallax Animation */
.wave-parallax > use {
  animation: moveWave 25s cubic-bezier(0.55, 0.5, 0.45, 0.5) infinite;
  will-change: transform;
}

.wave-parallax > use.wave-1 {
  animation-delay: -2s;
  animation-duration: 7s;
}

.wave-parallax > use.wave-2 {
  animation-delay: -3s;
  animation-duration: 10s;
}

.wave-parallax > use.wave-3 {
  animation-delay: -4s;
  animation-duration: 13s;
}

.wave-parallax > use.wave-4 {
  animation-delay: -5s;
  animation-duration: 20s;
}

@keyframes moveWave {
  0% {
    transform: translate3d(-90px, 0, 0);
  }
  100% {
    transform: translate3d(85px, 0, 0);
  }
}

/* --------------------------------------------------------------------------
   2. WHITE INTRODUCTION SECTION & ROOM GALLERIES
   -------------------------------------------------------------------------- */
.rooms-main-section {
  background-color: #ffffff;
  width: 100%;
  font-family: Arial, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: #333333;
  box-sizing: border-box;
}

.rooms-container {
  width: 98%;
  max-width: 1760px;
  margin: 0 auto;
  padding: 90px 10px 80px;
  box-sizing: border-box;
}

/* Top Introduction Row: Left Title/Text, Right Action Button */
.rooms-intro-row {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: flex-end;
  gap: 40px;
  margin-bottom: 40px;
}

.rooms-intro-left {
  flex: 1;
  min-width: 0;
}

.rooms-intro-title {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 36px;
  font-weight: normal;
  line-height: 1.2;
  color: #1a1a1a;
  margin: 0 0 12px 0;
  letter-spacing: -0.3px;
}

.rooms-intro-desc {
  font-size: 15px;
  font-weight: 400;
  line-height: 1.6;
  color: #555555;
  margin: 0;
  max-width: 550px;
}

.rooms-intro-right {
  flex-shrink: 0;
  margin-bottom: 4px;
}

.btn-book-stay {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 170px;
  height: 45px;
  background-color: #292929;
  color: #ffffff;
  font-family: Arial, sans-serif;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  text-decoration: none;
  border: 1px solid #292929;
  border-radius: 0;
  box-sizing: border-box;
  cursor: pointer;
  transition: background-color 0.25s ease, border-color 0.25s ease;
}

.btn-book-stay:hover,
.btn-book-stay:focus {
  background-color: #404040;
  border-color: #404040;
  color: #ffffff;
}

/* --------------------------------------------------------------------------
   3. STRICT 4-COLUMN ROOM GALLERIES (GUEST O POLIS KASBA)
   -------------------------------------------------------------------------- */
.rooms-gallery-section-wrap {
  width: 100%;
}

.rooms-gallery-heading {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 26px;
  font-weight: normal;
  line-height: 1.2;
  color: #1a1a1a;
  text-align: center;
  margin: 0 0 22px 0;
  letter-spacing: -0.2px;
}

.rooms-gallery-heading-second {
  margin-top: 50px;
  margin-bottom: 22px;
}

/* Strict 4-Column Grid */
.rooms-gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 13px 13px;
  width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
  box-sizing: border-box;
}

.rooms-gallery-item {
  width: 100%;
  margin: 0;
  padding: 0;
}

.rooms-gallery-img {
  width: 100%;
  aspect-ratio: 1.55 / 1;
  object-fit: cover;
  display: block;
  border: none;
  border-radius: 0;
  box-shadow: none;
  background-color: #f3f4f6;
  user-select: none;
  -webkit-user-drag: none;
}

/* --------------------------------------------------------------------------
   4. GUEST O POLIS KASBA & RAJDANGA ALTERNATING ROW SLIDE-IN ANIMATION
   - Row 1: Right to Left (starts offset to the right)
   - Row 2: Left to Right (starts offset to the left)
   - Row 3: Right to Left (starts offset to the right)
   - Row 4: Left to Right (starts offset to the left)
   -------------------------------------------------------------------------- */
.rooms-gallery-section-wrap,
.kasba-gallery-wrap {
  overflow: hidden;
  position: relative;
}

.kasba-gallery-grid .rooms-gallery-item,
.rajdanga-gallery-grid .rooms-gallery-item {
  will-change: transform, opacity;
  transition: opacity 0.85s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.85s cubic-bezier(0.16, 1, 0.3, 1);
}

/* 1st, 3rd, etc. Rows: Slide in from right to left */
.kasba-gallery-grid .rooms-gallery-item.slide-from-right,
.rajdanga-gallery-grid .rooms-gallery-item.slide-from-right {
  opacity: 0;
  transform: translate3d(80px, 0, 0);
}

/* 2nd, 4th, etc. Rows: Slide in from left to right */
.kasba-gallery-grid .rooms-gallery-item.slide-from-left,
.rajdanga-gallery-grid .rooms-gallery-item.slide-from-left {
  opacity: 0;
  transform: translate3d(-80px, 0, 0);
}

/* Triggered State */
.kasba-gallery-grid .rooms-gallery-item.is-visible,
.rajdanga-gallery-grid .rooms-gallery-item.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

/* Reduced motion accessibility */
@media (prefers-reduced-motion: reduce) {
  .kasba-gallery-grid .rooms-gallery-item.slide-from-right,
  .kasba-gallery-grid .rooms-gallery-item.slide-from-left,
  .rajdanga-gallery-grid .rooms-gallery-item.slide-from-right,
  .rajdanga-gallery-grid .rooms-gallery-item.slide-from-left {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* --------------------------------------------------------------------------
   RESPONSIVE MEDIA QUERIES
   -------------------------------------------------------------------------- */
@media (max-width: 991.98px) {
  .rooms-hero-section {
    min-height: 100vh;
    min-height: 100dvh;
  }

  .rooms-hero-content-wrapper {
    padding: 160px 25px 95px;
  }

  .hero-bottom-shape,
  .hero-waves-svg {
    height: 90px;
    min-height: 60px;
  }

  .rooms-hero-title {
    font-size: 42px;
  }

  .rooms-container {
    padding: 75px 20px 60px;
  }

  .rooms-intro-title {
    font-size: 30px;
  }

  .rooms-gallery-heading-second {
    margin-top: 40px;
  }

  .rooms-gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px 12px;
  }
}

@media (max-width: 767.98px) {
  .rooms-hero-section {
    min-height: 100vh;
    min-height: 100dvh;
  }

  .rooms-hero-content-wrapper {
    padding: 135px 16px 75px;
  }

  .hero-bottom-shape,
  .hero-waves-svg {
    height: 65px;
    min-height: 45px;
  }

  .rooms-hero-title {
    font-size: 32px;
    line-height: 1.2;
    margin-bottom: 12px;
  }

  .rooms-hero-description {
    font-size: 14px;
    line-height: 1.5;
  }

  .rooms-container {
    padding: 55px 16px 45px;
  }

  .rooms-intro-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 30px;
  }

  .rooms-intro-title {
    font-size: 26px;
  }

  .rooms-intro-desc {
    font-size: 14px;
  }

  .btn-book-stay {
    width: 100%;
    max-width: 200px;
  }

  .rooms-gallery-heading {
    font-size: 22px;
    margin-bottom: 16px;
  }

  .rooms-gallery-heading-second {
    margin-top: 35px;
    margin-bottom: 16px;
  }

  .rooms-gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px 10px;
  }
}

@media (max-width: 480px) {
  .rooms-gallery-grid {
    grid-template-columns: 1fr;
    gap: 12px 12px;
  }
}
