/*============================================================================================*/
/* Your custom styles below */
/*============================================================================================*/

/* Remove default browser margins that create an extra scroll on large screens */
html,
body {
  margin: 0;
  padding: 0;
}

/* Guard against tiny overflows from parallax/kenburns transforms */
html,
body {
  overflow-x: hidden;
}

/* Ensure the hero carousel does not leak extra pixels */
#carousel-home {
  overflow: hidden;
}

/* Full-width pinned video on SPA navigation */
.pinned-image {
  width: 100vw !important; /* span the full viewport width */
}
.pinned-image__container {
  transform: none !important; /* avoid initial 0.8 scale shrinking width */
}

/* Brand variables for easy theming */
:root {
  /* Match this to your logo background color */
  --brand-bg: #faf8f5; /* template base background */
}

/* Make header logos a bit smaller on small phones */
@media (max-width: 575.98px) {
  .fixed_header .logo_normal img,
  .fixed_header .logo_sticky img {
    width: 140px !important;
    height: auto !important;
  }
  /* Off-canvas menu logo sizing */
  .main-menu .logo_panel img {
    width: 150px !important;
    height: auto !important;
  }
}

/* Make the small-screen menu background match the logo/brand background */
@media (max-width: 991.98px) {
  .main-menu {
    background-color: var(--brand-bg) !important;
  }
  .main-menu #mainNav {
    padding-top: 20px;
    padding-bottom: 20px;
  }
  .main-menu .logo_panel {
    background: transparent !important;
  }
  /* Keep menu links readable on the brand background */
  .main-menu #mainNav ul li a {
    color: #333 !important;
  }
}

/* ---------- Preloader tuning + logo animation ---------- */
.preloader-overlay {
  /* Keep template base styles (#preloader) but allow us to center content */
  display: grid;
  place-items: center;
  background-color: #292b33; /* matches template */
}
.preloader-logo-wrap {
  text-align: center;
}
.preloader-logo {
  animation: preloaderPulse 1.1s ease-in-out infinite;
  transform-origin: center;
  opacity: 0.9;
}
@keyframes preloaderPulse {
  0% {
    transform: scale(1);
    opacity: 0.9;
  }
  50% {
    transform: scale(1.05);
    opacity: 1;
  }
  100% {
    transform: scale(1);
    opacity: 0.9;
  }
}

/* Make the preloader exit faster when template toggles the .loaded state */
#preloader.loaded {
  animation-duration: 0.4s !important;
  transition-delay: 0s !important;
}

/* HEADER PADDING FIX - Reduce excessive header padding */
header.fixed_header {
  padding: 8px 0 !important;
}

/* Even less padding on larger screens */
@media (min-width: 768px) {
  header.fixed_header {
    padding: 5px 0 !important;
  }
}

@media (min-width: 1200px) {
  header.fixed_header {
    padding: 3px 0 !important;
  }
}

/* TESTIMONIALS MOBILE FIX - Prevent content cutoff */
@media (max-width: 767px) {
  .parallax_section_1 {
    height: auto !important;
    min-height: 100vh !important;
    padding: 40px 0 !important;
  }

  .parallax_section_1 .wrapper {
    min-height: 100vh !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .box_overlay {
    padding: 25px !important;
    min-height: auto !important;
    text-align: center !important;
    margin-bottom: 20px !important;
  }

  .pic {
    position: static !important;
    text-align: center !important;
    margin-bottom: 20px !important;
  }

  .pic figure {
    margin-bottom: 10px !important;
  }
}

/* Extra small screens optimization */
@media (max-width: 575px) {
  .parallax_section_1 {
    padding: 30px 0 !important;
    min-height: 90vh !important;
  }

  .box_overlay {
    padding: 20px !important;
    margin-bottom: 15px !important;
  }

  .title.white h2 {
    font-size: 1.8rem !important;
    margin-bottom: 30px !important;
  }

  .comment {
    font-size: 14px !important;
    line-height: 1.5 !important;
  }
}

/* Ensure carousel works properly on mobile */
@media (max-width: 767px) {
  .carousel_testimonials {
    margin-top: 20px !important;
  }

  .owl-dots {
    margin-top: 30px !important;
  }
}

/* GALLERY IMAGE ALIGNMENT FIX */
.carousel_item_centered .item {
  height: 300px !important;
  overflow: hidden !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background-color: #f8f9fa !important;
  border-radius: 10px !important;
}

.carousel_item_centered .item img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center !important;
  border-radius: 10px !important;
  transition: transform 0.3s ease !important;
}

/* Hover effect for gallery images */
.carousel_item_centered .item:hover img {
  transform: scale(1.05) !important;
}

/* Responsive adjustments */
@media (max-width: 767px) {
  .carousel_item_centered .item {
    height: 250px !important;
  }
}

@media (max-width: 575px) {
  .carousel_item_centered .item {
    height: 200px !important;
  }
}

/* ============================= */
/* ROOMS SECTION IMAGE FIXES */
/* ============================= */

/* Room image container with fixed aspect ratio */
.room-image-container {
  position: relative !important;
  width: 100% !important;
  height: 0 !important;
  padding-bottom: 66.67% !important; /* 3:2 aspect ratio (adjust as needed) */
  overflow: hidden !important;
  border-radius: 8px !important;
  background-color: #f5f5f5 !important;
}

/* Room image styling */
.room-image {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important; /* Maintains aspect ratio, crops if needed */
  object-position: center !important; /* Centers the image */
  transition: transform 0.3s ease !important;
}

/* Hover effect for room images */
.room-image-container:hover .room-image {
  transform: scale(1.05) !important;
}

/* Ensure Owl Carousel items have consistent height */
.carousel_item_1 .item {
  height: auto !important;
  min-height: 300px !important;
}

/* Responsive adjustments for room images */
@media (max-width: 992px) {
  .room-image-container {
    padding-bottom: 60% !important; /* Slightly different ratio on tablets */
  }

  .carousel_item_1 .item {
    min-height: 250px !important;
  }
}

@media (max-width: 768px) {
  .room-image-container {
    padding-bottom: 56.25% !important; /* 16:9 ratio on mobile */
  }

  .carousel_item_1 .item {
    min-height: 200px !important;
  }
}

@media (max-width: 576px) {
  .room-image-container {
    padding-bottom: 75% !important; /* 4:3 ratio on small mobile */
  }

  .carousel_item_1 .item {
    min-height: 180px !important;
  }
}
