/* ========================================
   HOME PAGE STYLES — Royal Ambarrukmo Style
   Prefix: hm-
   ======================================== */

/* ===== HERO SECTION ===== */
.hm-hero {
  position: relative;
  width: 100%;
  height: 90vh;
  min-height: 600px;
  background: #111;
  overflow: hidden;
}

.hm-hero-slider {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hm-hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.2s ease;
  pointer-events: none;
}

video.hm-hero-bg {
  pointer-events: none;
}

.hm-hero-bg.hm-active {
  opacity: 1;
}

/* Dots */
.hm-hero-dots {
  position: absolute;
  bottom: 40px;
  right: 40px;
  display: flex;
  gap: 10px;
  z-index: 10;
}

.hm-hero-dot {
  width: 8px;
  height: 8px;
  background: rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  cursor: pointer;
  transition:
    background 0.3s ease,
    transform 0.3s ease;
}

.hm-hero-dot.hm-active {
  background: #fff;
  transform: scale(1.3);
}

/* ===== BOOKING BAR WRAP ===== */
.hm-hero-booking {
  position: relative;
  width: 100%;
  z-index: 10;
  background: transparent;
}

.hm-hero-booking.bkb-is-sticky {
  position: fixed;
  top: 90px; /* below navbar */
  left: 0;
  width: 100%;
  z-index: 998;
  transition: top 0.4s cubic-bezier(0.25, 1, 0.5, 1),
              transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  animation: bkbFadeIn 0.4s ease forwards;
}

/* When navbar is hidden (scroll down), booking bar moves to top */
body.hdr-is-hidden .hm-hero-booking.bkb-is-sticky {
  top: 0;
}

@keyframes bkbFadeIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1199px) {
  .hm-hero-booking.bkb-is-sticky {
    top: 60px; /* smaller navbar on mobile */
  }
  body.hdr-is-hidden .hm-hero-booking.bkb-is-sticky {
    top: 0;
  }
}

/* ===== WELCOME / INTRO SECTION ===== */
.hm-welcome-section {
  background: var(--clr-canvas);
  padding: 80px 20px;
  display: flex;
  justify-content: center;
}

.hm-welcome {
  max-width: 760px;
  width: 100%;
  text-align: center;
}

.hm-welcome-title {
  font-family: var(--ff-display);
  font-size: var(--fs-heading-md);
  font-weight: 600;
  letter-spacing: 2px;
  color: var(--clr-ink);
  margin-bottom: 16px;
  text-transform: uppercase;
}

.hm-welcome-subtitle {
  font-family: var(--ff-primary);
  font-size: var(--fs-heading-xl);
  font-weight: 400;
  color: var(--clr-primary);
  margin-bottom: 28px;
  font-style: italic;
}

.hm-welcome-desc {
  font-family: var(--ff-primary);
  font-size: var(--fs-body-lg);
  line-height: 1.8;
  color: var(--clr-mute);
}

.hm-welcome-desc p {
  margin-bottom: 12px;
}

/* ===== FACILITIES ACCORDION ===== */
.hm-showcase {
  background-color: var(--clr-surface-card);
  overflow: hidden;
}

.hm-showcase-header {
  text-align: center;
  padding: 60px 20px 40px;
}

.hm-showcase-label {
  font-family: var(--ff-display);
  font-size: 13px;
  font-weight: 600;
  color: var(--clr-primary);
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.hm-showcase-section-title {
  font-family: var(--ff-display);
  font-size: var(--fs-display-md);
  font-weight: 500;
  color: var(--clr-ink);
  letter-spacing: -1px;
}

.hm-showcase-accordion {
  width: 100%;
  display: flex;
  height: 580px;
  gap: 3px;
}

.hm-accordion-item {
  position: relative;
  flex: 1;
  overflow: hidden;
  transition: flex 0.6s cubic-bezier(0.25, 1, 0.5, 1);
  cursor: pointer;
  text-decoration: none;
  display: block;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-color: #333;
}

.hm-accordion-item:hover,
.hm-accordion-item.hm-acc-active {
  flex: 2.5;
}

.hm-accordion-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.85) 0%,
    rgba(0, 0, 0, 0.1) 60%
  );
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 36px 32px;
  transition: background 0.4s ease;
}

.hm-accordion-item:hover .hm-accordion-overlay {
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.9) 0%,
    rgba(0, 0, 0, 0.25) 70%
  );
}

.hm-accordion-content {
  max-width: 420px;
  transform: translateY(12px);
  transition: transform 0.5s ease;
}

.hm-accordion-item:hover .hm-accordion-content,
.hm-accordion-item.hm-acc-active .hm-accordion-content {
  transform: translateY(0);
}

.hm-accordion-title {
  font-family: var(--ff-display);
  font-size: var(--fs-heading-xl);
  font-weight: 500;
  color: #fff;
  margin-bottom: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.hm-accordion-desc {
  font-family: var(--ff-primary);
  font-size: var(--fs-body-md);
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 16px;
  /* Hidden by default */
  opacity: 0;
  visibility: hidden;
  max-height: 0;
  margin-bottom: 0;
  transition: all 0.5s ease;
}

.hm-accordion-content .btn-text-gold {
  opacity: 0;
  visibility: hidden;
  max-height: 0;
  margin: 0;
  transition: all 0.5s ease;
}

/* Show on hover */
.hm-accordion-item:hover .hm-accordion-desc,
.hm-accordion-item.hm-acc-active .hm-accordion-desc {
  opacity: 1;
  visibility: visible;
  max-height: 80px;
  margin-bottom: 16px;
}

.hm-accordion-item:hover .hm-accordion-content .btn-text-gold,
.hm-accordion-item.hm-acc-active .hm-accordion-content .btn-text-gold {
  opacity: 1;
  visibility: visible;
  max-height: 50px;
}

.btn-text-gold {
  color: var(--clr-primary);
  font-family: var(--ff-display);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 1px;
  display: inline-flex;
  align-items: center;
  transition: color 0.3s ease;
}

.btn-text-gold:hover {
  color: #fff;
}

/* ===== NEWS & UPDATES ===== */
.hm-offers {
  background: var(--clr-canvas);
  padding: 90px 20px;
}

.hm-offers-header {
  text-align: center;
  margin-bottom: 56px;
}

.hm-offers-title {
  font-family: var(--ff-display);
  font-size: var(--fs-display-md);
  font-weight: 500;
  letter-spacing: 3px;
  color: var(--clr-ink);
  margin-bottom: 12px;
}

.hm-offers-subtitle {
  font-family: var(--ff-primary);
  font-size: var(--fs-body-lg);
  color: var(--clr-mute);
}

.hm-offers-grid {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.hm-offer-card {
  background: var(--clr-canvas);
  border: 1px solid var(--clr-hairline);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.3s ease;
}

.hm-offer-card:hover {
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

.hm-offer-img-wrap {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
}

.hm-offer-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.hm-offer-card:hover .hm-offer-img {
  transform: scale(1.04);
}

.hm-offer-content {
  padding: 28px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.hm-offer-card-title {
  font-family: var(--ff-display);
  font-size: var(--fs-heading-sm);
  font-weight: 600;
  color: var(--clr-ink);
  margin-bottom: 12px;
  letter-spacing: 0.5px;
}

.hm-offer-card-title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.hm-offer-card-title a:hover {
  color: var(--clr-primary);
}

.hm-offer-card-desc {
  font-family: var(--ff-primary);
  font-size: var(--fs-body-md);
  color: var(--clr-mute);
  margin-bottom: 24px;
  line-height: 1.65;
  flex: 1;
}

.hm-offer-action {
  margin-top: auto;
}

.hm-offers-viewall {
  text-align: center;
  margin-top: 50px;
}

/* ===== GOOGLE MAP ===== */
.hm-map-section {
  width: 100%;
  height: 420px;
  overflow: hidden;
  position: relative;
}

.hm-map-iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* ===== REVIEWS / COMMENTS SECTION ===== */
.hm-reviews {
  background: var(--clr-surface-alt, #f9f9f9);
  padding: 90px 0;
  overflow: hidden;
}

.hm-reviews-header {
  text-align: center;
  margin-bottom: 56px;
  padding: 0 20px;
}

.hm-reviews-title {
  font-family: var(--ff-display);
  font-size: var(--fs-display-md);
  font-weight: 500;
  letter-spacing: 3px;
  color: var(--clr-ink);
  margin-bottom: 12px;
  text-transform: uppercase;
}

.hm-reviews-subtitle {
  font-family: var(--ff-primary);
  font-size: var(--fs-body-lg);
  color: var(--clr-mute);
  font-style: italic;
}

.hm-reviews-marquee-wrap {
  width: 100vw;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  overflow: hidden;
  padding: 10px 0;
  mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
}

.hm-reviews-marquee {
  display: flex;
  width: max-content;
  gap: 28px;
  animation: scrollMarquee 70s linear infinite;
}

.hm-reviews-marquee:hover {
  animation-play-state: paused;
}

@keyframes scrollMarquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(calc(-50% - 14px)); } /* -50% minus half the gap */
}

.hm-review-card {
  width: 320px;
  flex-shrink: 0;
  background: var(--clr-canvas, #fff);
  border: 1px solid var(--clr-hairline, #e2e8f0);
  padding: 24px;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.hm-review-card:hover {
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
  transform: translateY(-5px);
}

.hm-review-header {
  display: flex;
  align-items: center;
  margin-bottom: 16px;
}

.hm-review-img-wrap {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: hidden;
  margin-right: 14px;
  flex-shrink: 0;
}

.hm-review-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hm-review-meta {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
}

.hm-review-name {
  font-family: var(--ff-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--clr-ink);
  margin: 0;
  line-height: 1.1;
}

.hm-review-rating {
  color: #fbbf24;
  font-size: 13px;
  line-height: 1;
  letter-spacing: 2px;
  margin: 0;
}

.hm-review-title {
  font-family: var(--ff-display);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--clr-ink);
  margin-bottom: 8px;
}

.hm-review-comment {
  font-family: var(--ff-primary);
  font-size: 0.9rem;
  color: var(--clr-mute);
  line-height: 1.5;
  margin-bottom: 16px;
  flex: 1;
  font-style: italic;
}

.hm-review-date {
  font-family: var(--ff-primary);
  font-size: 0.85rem;
  color: #94a3b8;
  margin-top: auto;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1199px) {
  .hm-hero-dots {
    bottom: 100px;
    /* Above mobile booking bar */
  }

  .hm-showcase-accordion {
    flex-direction: column;
    height: auto;
  }

  .hm-accordion-item {
    flex: none;
    height: 220px;
    width: 100%;
  }

  .hm-accordion-item:hover,
  .hm-accordion-item.hm-acc-active {
    flex: none;
    height: 320px;
  }

  .hm-accordion-desc {
    opacity: 1;
    visibility: visible;
    max-height: 80px;
    margin-bottom: 10px;
  }

  .hm-accordion-content .btn-text-gold {
    opacity: 1;
    visibility: visible;
    max-height: 50px;
  }

  .hm-offers-grid {
    grid-template-columns: 1fr;
    max-width: 500px;
  }

  .hm-map-section {
    height: 300px;
  }
}

@media (max-width: 768px) {
  .hm-welcome-section {
    padding: 60px 20px;
  }

  .hm-welcome-subtitle {
    font-size: var(--fs-heading-lg);
  }

  .hm-showcase-header {
    padding: 40px 20px 28px;
  }

  .hm-offers {
    padding: 60px 20px;
  }

  .hm-review-card {
    width: 280px;
    padding: 20px;
  }
}

/* ===== REVIEW MODAL & ACTION ===== */
.hm-reviews-action {
  text-align: center;
  margin-top: 40px;
}

#btn-open-review {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.hm-review-modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.65);
}

.hm-review-modal-content {
  background-color: var(--clr-canvas, #fff);
  margin: 10% auto;
  padding: 30px;
  border: 1px solid var(--clr-hairline, #e2e8f0);
  width: 90%;
  max-width: 500px;
  border-radius: 8px;
  box-shadow: 0 15px 40px rgba(0,0,0,0.2);
  position: relative;
  animation: modalFadeIn 0.3s ease-out;
  will-change: transform;
  contain: layout;
}

@keyframes modalFadeIn {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

.hm-review-close {
  color: var(--clr-mute, #64748b);
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}

.hm-review-close:hover {
  color: var(--clr-ink, #0f172a);
}

.hm-review-modal-content h2 {
  font-family: var(--ff-display);
  color: var(--clr-ink);
  margin-bottom: 5px;
  font-size: 1.5rem;
}

.hm-review-modal-content p {
  color: var(--clr-mute);
  margin-bottom: 25px;
  font-size: 0.95rem;
}

#hm-review-form .form-group {
  margin-bottom: 15px;
}

#hm-review-form label {
  display: block;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--clr-ink);
}

#hm-review-form input[type="text"],
#hm-review-form textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--clr-hairline, #cbd5e1);
  border-radius: 4px;
  font-family: var(--ff-primary);
  font-size: 1rem;
  box-sizing: border-box;
  transition: border-color 0.15s ease;
}

#hm-review-form input:focus,
#hm-review-form textarea:focus {
  outline: none;
  border-color: var(--clr-primary, #b38b4d);
}

#hm-review-form .rating-input {
  display: flex;
  flex-direction: row-reverse;
  justify-content: flex-end;
  gap: 5px;
}

#hm-review-form .rating-input input {
  display: none;
}

#hm-review-form .rating-input label {
  display: inline-block;
  color: #e2e8f0;
  font-size: 28px;
  cursor: pointer;
  margin: 0;
  transition: color 0.2s;
}

#hm-review-form .rating-input input:checked ~ label,
#hm-review-form .rating-input label:hover,
#hm-review-form .rating-input label:hover ~ label {
  color: #fbbf24;
}

#review-form-message {
  display: none;
  margin-bottom: 15px;
  font-weight: 500;
}

.hm-review-submit-btn {
  width: 100%;
  border: none;
  padding: 12px;
  cursor: pointer;
}

/* ===== HOME POPUP MODAL ===== */
.hm-popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.hm-popup-overlay.show {
  opacity: 1;
  visibility: visible;
}

.hm-popup-content {
  position: relative;
  background: #ffffff;
  width: 95%;
  max-width: 1100px;
  border-radius: 0; /* Sharp corners */
  box-shadow: 0 10px 40px rgba(0,0,0,0.3);
  transform: translateY(20px);
  transition: transform 0.4s ease;
}

.hm-popup-overlay.show .hm-popup-content {
  transform: translateY(0);
}

.hm-popup-close {
  position: absolute;
  top: -15px;
  right: -15px;
  background: #2a2a2a;
  border: 1px solid rgba(255,255,255,0.5);
  border-radius: 4px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  color: #ffffff;
  transition: all 0.3s ease;
}

.hm-popup-close:hover {
  background: #000000;
  border-color: #ffffff;
}

.hm-popup-split {
  display: flex;
  flex-direction: row;
  min-height: 550px;
}

.hm-popup-img-col {
  flex: 1;
  /* Removed aspect-ratio so it stretches to container height */
}

.hm-popup-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hm-popup-text-col {
  flex: 1; /* 1:1 ratio with image */
  padding: 50px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.hm-popup-title {
  font-family: var(--ff-display);
  font-size: var(--fs-heading-md);
  color: #1a1a1a;
  margin-bottom: 20px;
  line-height: 1.2;
}

.hm-popup-desc {
  font-family: var(--ff-body);
  font-size: var(--fs-body-md);
  color: #4a4a4a;
  line-height: 1.6;
  margin-bottom: 30px;
}

.hm-popup-cta {
  align-self: center;
  padding: 12px 36px;
  border: none;
  text-decoration: none;
  font-size: var(--fs-body-sm);
  background-color: var(--clr-primary, #b58d3e);
  color: #ffffff;
  border-radius: 0;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 500;
}

.hm-popup-cta:hover {
  background-color: var(--clr-primary-dark, #937232);
}

@media (max-width: 768px) {
  .hm-popup-split {
    flex-direction: column;
  }
  .hm-popup-img-col {
    aspect-ratio: 16/9; /* Use a wider ratio on mobile so it doesn't take up the whole screen height */
  }
  .hm-popup-text-col {
    padding: 24px;
  }
  .hm-popup-title {
    font-size: var(--fs-heading-sm);
  }
  .hm-popup-desc {
    font-size: var(--fs-body-sm);
  }
}
