/* MuluPackages.css */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,200..800;1,200..800&family=Montserrat:wght@200;300;400;500;600;700&display=swap');

/* ========================
   Global reset
   ======================== */
html, body {
  margin: 0;
  padding: 0;
  font-family: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  box-sizing: border-box;
}

*, *::before, *::after {
  box-sizing: inherit;
}

/* ========================
   Enhanced Scroll Animations 
   ======================== */
.fade-in {
  opacity: 0;
  transform: translateY(50px);
  transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
  will-change: transform, opacity;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Fade-in with blur */
.blur-in {
  opacity: 0;
  filter: blur(15px);
  transform: translateY(30px);
  transition: all 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
  will-change: transform, opacity, filter;
}

.blur-in.visible {
  opacity: 1;
  filter: blur(0);
  transform: translateY(0);
}

/* ========================
   Package Detail Section - Desktop design
   ======================== */
.package-detail-section {
  padding: 50px 20px;
  font-family: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  width: 100%;
}

.package-detail-section h2 {
  font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-weight: normal;
  font-size: 1.9rem;
  text-align: center;
  margin-bottom: 40px;
  color: #07a59d;
}

/* ========================
   Enhanced Carousel Styles (Same as index.php)
   ======================== */
.carousel-container {
  position: relative;
  max-width: 1200px;
  margin: 40px auto 0;
  overflow: hidden;
  border-radius: 10px;
  background: transparent;
  font-family: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.carousel-track {
  display: flex;
  transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  min-height: 220px;
  gap: 25px;
  flex-wrap: nowrap;
  justify-content: center; 
  align-items: center;
}

.carousel-track img {
  width: 280px;
  height: 180px;
  object-fit: cover;
  border-radius: 10px;
  transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  flex-shrink: 0;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: auto;
  -ms-interpolation-mode: nearest-neighbor;
  backface-visibility: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Mobile fade transitions */
.carousel-track img.fade-out {
  opacity: 0;
  transform: scale(0.95);
}

.carousel-track img.fade-in {
  opacity: 0;
  transform: scale(1.05);
}

.carousel-track img.active {
  opacity: 1;
  transform: scale(1);
}

.carousel-track img:hover {
  transform: scale(1.05);
  filter: brightness(1.1);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

/* Ensure that the carousel always displays 4 images */
.carousel-track img:nth-child(1),
.carousel-track img:nth-child(2),
.carousel-track img:nth-child(3),
.carousel-track img:nth-child(4) {
  display: block;
}

/* ========================
   Package Info + Booking - Desktop layout
   ======================== */
.package-details-wrapper {
  max-width: 1200px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin: 25px auto 0;
  font-family: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  align-items: flex-start;
}

/* Left Column: Info - Desktop version */
.package-info {
  flex: 0 0 65%;
  background-color: transparent;
  padding: 0;
  font-family: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.package-info-top {
  width: 100%;
}

.package-info h3 {
  margin: 0 0 10px 0;
  font-size: 1.5rem;
  color: #30595a;
  font-family: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  text-align: left;
}

.package-info h4 {
  margin: 45px 0 9px 0;
  font-size: 1rem;
  color: black;
  font-family: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  text-align: left;
}

.package-info p {
  margin: 0 0 0 0;
  line-height: 1.5;
  font-size: 0.95rem;
  font-family: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  text-align: left;
}

/* Right Column: Booking - Desktop version */
.booking-info {
  flex: 0 0 30%;
  background-color: transparent;
  padding: 30px 25px;
  border-radius: 8px;
  font-family: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  position: sticky;
  top: 20px;
  height: fit-content;
  box-sizing: border-box;
  border: 2px solid #f5f5f5;
  display: flex;
  flex-direction: column;
  align-items: flex-start; /* Desktop version: left-aligned */
  text-align: left; /* Desktop version: left-aligned */
}

.booking-info h3 {
  font-size: 1.5rem;
  text-align: left; /* Desktop version: left-aligned */
  color: #30595a;
  border-bottom: 1px solid lightgray;
  padding: 0px 0px 22px 0px;
  margin: 0;
  font-family: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  box-sizing: border-box;
  width: 100%;
}

.booking-info h3 .min-pax {
  font-size: 15px;
  text-align: left; /* Desktop version: left-aligned */
  color: black;
  font-weight: lighter;
  padding-bottom: 12px;
  margin: 0;
  font-family: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  box-sizing: border-box;
  flex-shrink: 0;
  display: block;
  width: 100%;
}

.rate-rows-container {
  display: flex;
  flex-direction: column;
  flex: 1;
  justify-content: space-between;
  width: 100%;
}

/* Rate Row style - Desktop version */
.rate-row {
  display: flex;
  justify-content: space-between; /* Desktop version: justified alignment */
  padding: 15px 0;
  border-bottom: 1px solid lightgray;
  margin: 0;
  font-family: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  align-items: center;
  box-sizing: border-box;
  flex: 1;
  min-height: 50px;
  width: 100%;
}

.rate-label {
  font-weight: 500;
  color: #333;
  text-align: left; /* Desktop version: left-aligned */
}

.rate-price {
  font-weight: 600;
  color: #07a59d;
  font-size: 1.1rem;
  text-align: right; /* Desktop version: right-aligned */
}

.booking-info .text-center {
  text-align: left; /* Desktop version: left-aligned */
  margin: 0;
  flex-shrink: 0;
  width: 100%;
}

.book-btn {
  display: inline-block;
  padding: 16px 16px;
  border-radius: 8px;
  font-weight: normal;
  color: white;
  background-color: #dbaf3b;
  border-color: #dbaf3b;
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-size: 0.9rem;
  width: 40%;
  font-family: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  box-sizing: border-box;
  flex-shrink: 0;
  margin-top: 25px;
  text-align: center;
  align-self: flex-start; /* Desktop version: left-aligned */
}

.book-btn:hover {
    background: #042b2f;
    border: #042b2f;;
}

/* ========================
   Section Background (only #mulu-pinnacles) - Desktop version
   ======================== */
#mulu-pinnacles {
  background-color: #fcf5eb;
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  display: block;
  font-family: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

#mulu-pinnacles .package-details-wrapper {
  max-width: 1200px;
  margin: 20px auto;
  padding: 0 auto;
  display: flex;
  gap: 30px;
  align-items: flex-start;
}

#mulu-pinnacles .package-info {
  flex: 0 0 65%;
  border-radius: 8px;
  box-sizing: border-box;
}

#mulu-pinnacles .booking-info {
  border: 2px solid #f5eee5 !important;
  flex: 0 0 30%;
  z-index: 1; 
  border-radius: 8px;
  background-color: transparent;
  box-sizing: border-box;
  align-items: flex-start; /* Desktop version: left-aligned */
  text-align: left; /* Desktop version: left-aligned */
}

/* ========================
   Enhanced Mobile Carousel Transitions (Same as index.php)
   ======================== */
@media (max-width: 768px) {
  /* Carousel - Mobile optimization with improved spacing and transitions */
  .carousel-container {
    margin: 10px 0 0 0;
    padding: 0 15px 60px; /* Add bottom padding */
    box-sizing: border-box;
    text-align: center;
    height: auto; 
    position: relative;
    overflow: visible !important; /* Ensure the indicator is not clipped */
  }

  .carousel-track {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .carousel-track img {
    width: 90%; 
    max-width: 400px; 
    height: auto; 
    aspect-ratio: 16/9; 
    object-fit: cover; 
    border-radius: 8px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  }

  /* Active image styling */
  .carousel-track img.active {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    z-index: 2;
  }

  /* Inactive images */
  .carousel-track img:not(.active) {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.95);
    z-index: 1;
  }

  /* Fade transition effects */
  .carousel-track img.fade-out {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.95);
  }

  .carousel-track img.fade-in {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.05);
  }

.carousel-indicators {
  position: absolute;
  bottom: 35px !important; /* 修改：从25px改为35px */
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 12px;
  z-index: 9999;
  padding: 20px 0; /* 修改：从15px改为20px */
  background: none;
}

.carousel-indicator {
  width: 8px;  
  height: 8px; 
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.8); 
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: 2px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.3); 
}

.carousel-indicator.active {
  background: #07a59d;
  opacity: 1;
  transform: scale(3);
  border: 2px solid white;
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.8);
}

.carousel-indicator:hover {
  opacity: 1;
  transform: scale(3);
  background: rgba(255, 255, 255, 1);
}
}

/* ========================
   Responsive design for tablets (768px-1024px): Fine-tune only while preserving the two-column layout.
   ======================== */
@media screen and (max-width: 1024px) {
  .package-detail-section {
    padding: 40px 20px;
  }
  
  .package-detail-section h2 {
    font-size: 1.7rem;
    margin-bottom: 30px;
  }
  
  .package-details-wrapper {
    gap: 15px;
    margin: 20px auto 0;
  }
  
  .package-info {
    flex: 0 0 60%;
  }
  
  .booking-info {
    flex: 0 0 38%;
    padding: 25px 20px;
  }
  
  .book-btn {
    width: 50%;
    background-color: #dbaf3b;
    border-color: #dbaf3b;
  }
}

/* ========================
   Responsive design for mobile (<768px): Switch to single-column centered layout here
   ======================== */
@media screen and (max-width: 768px) {
  .package-detail-section {
    padding: 30px 15px;
  }
  
  .package-detail-section h2 {
    font-size: 1.5rem;
    margin-bottom: 25px;
  }
  
  /* Switch to single-column layout */
  .package-details-wrapper {
    flex-direction: column;
    gap: 25px;
    margin: 20px auto 0;
    align-items: center; /* Ensure the entire wrapper is center-aligned */
  }
  
  .package-info {
    flex: 1;
    width: 100%;
    order: 1;
    text-align: center; /* Ensure package-info content is centered */
  }
  
  .booking-info {
    flex: 1;
    width: 100%;
    position: static;
    order: 2;
    margin: 0 auto;
    max-width: 500px;
    padding: 25px 20px;
    align-items: center; /* Mobile version: center aligned */
    text-align: center; /* Mobile version: center aligned */
    justify-content: center; /* Vertically centered */
  }
  
  /* All text centered on mobile version */
  .package-info h3,
  .package-info h4,
  .package-info p {
    text-align: center;
  }
  
  .booking-info h3 {
    text-align: center; /* Mobile version: center aligned */
  }
  
  .booking-info h3 .min-pax {
    text-align: center; /* Mobile version: center aligned */
  }
  
  /* "Rate Per Person" completely centered on mobile version */
  .rate-row {
    flex-direction: column; /* Change to vertical layout */
    justify-content: center;
    align-items: center;
    text-align: center;
    gap: 8px;
    padding: 12px 0;
  }
  
  .rate-label, .rate-price {
    text-align: center;
    width: 100%;
  }
  
  .rate-label {
    font-size: 1rem;
    font-weight: 600;
    color: #30595a;
  }
  
  .rate-price {
    font-size: 1.3rem;
    font-weight: 700;
    color: #07a59d;
  }
  
  .book-btn {
    width: 60%;
    align-self: center; /* Mobile version: center aligned */
    margin-left: auto;  /* Apply auto margins to left and right */
    margin-right: auto; /* Apply auto margins to left and right */
    display: block;     /* Switch to block element to enable margin: auto */
    background-color: #dbaf3b;
    border-color: #dbaf3b;
  }
  
  /* Adjust content spacing */
  .package-info h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
  }
  
  .package-info h4 {
    margin: 35px 0 9px 0;
  }
  
  .package-info p {
    text-align: justify;
    line-height: 1.6;
  }
}

/* ========================
   Small Screen Mobile (<576px) - Responsive Design
   ======================== */
@media screen and (max-width: 576px) {
  .package-detail-section {
    padding: 25px 12px;
  }
  
  .package-detail-section h2 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    line-height: 1.4;
  }
  
  .package-details-wrapper {
    gap: 20px;
    margin: 15px auto 0;
  }
  
  .booking-info {
    padding: 20px 15px;
    border-width: 1px;
  }
  
  .booking-info h3 {
    font-size: 1.3rem;
    padding: 0px 0px 15px 0px;
  }
  
  .booking-info h3 .min-pax {
    font-size: 14px;
  }
  
  /* Small screen mobile: "Rate Per Person" styles */
  .rate-row {
    padding: 10px 0;
    min-height: 40px;
    gap: 6px;
  }
  
  .rate-label {
    font-size: 0.95rem;
  }
  
  .rate-price {
    font-size: 1.2rem;
  }
  
  .book-btn {
    width: 70%;
    padding: 14px 12px;
    font-size: 0.85rem;
    margin-top: 20px;
    background-color: #dbaf3b;
    border-color: #dbaf3b;
  }
  
  /* Content adjustment */
  .package-info h3 {
    font-size: 1.2rem;
  }
  
  .package-info h4 {
    margin: 25px 0 8px 0;
    font-size: 0.95rem;
  }
  
  .package-info p {
    font-size: 0.9rem;
    line-height: 1.6;
  }

  .carousel-track img {
    width: 92%;
    max-width: 350px;
    aspect-ratio: 4/3; 
  }

  /* Special section adjustments */
  #mulu-pinnacles .package-details-wrapper {
    gap: 20px;
  }
}

/* ========================
   Responsive Design - Extra Small Mobile Devices (< 400px)
   ======================== */
@media screen and (max-width: 400px) {
  .package-detail-section {
    padding: 20px 10px;
  }
  
  .package-detail-section h2 {
    font-size: 1.2rem;
  }
  
  .booking-info {
    padding: 18px 12px;
  }
  
  .booking-info h3 {
    font-size: 1.2rem;
  }
  
  /* Rate Per Person" styling for extra small screens */
  .rate-row {
    gap: 4px;
    padding: 8px 0;
  }
  
  .rate-label {
    font-size: 0.9rem;
  }
  
  .rate-price {
    font-size: 1.1rem;
  }
  
  .book-btn {
    width: 80%;
    padding: 12px 10px;
    background-color: #dbaf3b;
    border-color: #dbaf3b;
  }

  .carousel-track img {
    width: 94%;
    aspect-ratio: 16/9; 
  }
}

/* ========================
   Landscape mode optimization
   ======================== */
@media (orientation: landscape) and (max-width: 768px) {
  /* Carousel adjustments - consistent with desktop version */
  .carousel-container {
    margin: 20px auto 0;
    padding: 0 15px 70px;
  }
  
  .carousel-track {
    height: 180px;
  }
  
  /* Fix image proportions - use same ratio as desktop */
  .carousel-track img {
    width: 280px;
    height: 180px;
    max-width: 280px;
    aspect-ratio: 16/9;
    object-fit: cover;
    object-position: center;
  }
  
  /* Fix indicators - ensure perfect circles */
  .carousel-indicators {
    bottom: 30px !important;
    padding: 20px 0;
  }
  
  .carousel-indicator {
    width: 8px !important;
    height: 8px !important;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, 0.8);
    border: 2px solid rgba(255, 255, 255, 0.8);
    transform: scale(1);
    transition: all 0.3s ease;
  }
  
  .carousel-indicator.active {
    background: #07a59d;
    transform: scale(2) !important;
    border: 2px #07a59d;
    box-shadow: 0 0 10px rgba(7, 165, 157, 0.6);
  }
  
  /* Content layout - consistent with desktop */
  .package-detail-section {
    padding: 30px 15px;
  }
  
  .package-details-wrapper {
    flex-direction: column;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
  }
  
  .package-info {
    width: 100%;
    max-width: 800px;
    text-align: center;
  }
  
  .package-info h3,
  .package-info h4,
  .package-info p {
    text-align: center;
  }
  
  .booking-info {
    width: 100%;
    max-width: 400px;
    margin: 20px auto;
    padding: 25px 20px;
    align-items: center;
    text-align: center;
    border: 2px solid #f5f5f5;
  }
  
  .booking-info h3 {
    text-align: center;
  }
  
  .rate-row {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 5px;
    width: 100%;
  }
  
  .rate-label,
  .rate-price {
    text-align: center;
    width: 100%;
  }
  
  .book-btn {
    width: 50%;
    margin: 20px auto 0;
    align-self: center;
  }
}

/* ========================
   Small landscape screens optimization
   ======================== */
@media (orientation: landscape) and (max-width: 768px) and (max-height: 500px) {
  .carousel-container {
    margin: 15px auto 0;
    padding: 0 15px 60px;
  }
  
  .carousel-track {
    height: 160px;
  }
  
  .carousel-track img {
    width: 240px;
    height: 150px;
    max-width: 240px;
  }
  
  .carousel-indicators {
    bottom: 25px !important;
    padding: 15px 0;
  }
  
  .carousel-indicator {
    width: 6px !important;
    height: 6px !important;
  }
  
  .booking-info {
    max-width: 350px;
    padding: 20px 15px;
  }
}

/* Tablet landscape mode optimization */
@media (min-width: 768px) and (max-width: 1024px) and (orientation: landscape) {
  .package-details-wrapper {
    flex-direction: row; /* Maintain a two-column layout */
  }
}

/* ========================
   High-DPI/Retina Display Optimization 
   ======================== */
@media (-webkit-min-device-pixel-ratio: 2), 
       (min-resolution: 192dpi), 
       (min-resolution: 2dppx) {
  .carousel-track img {
    image-rendering: crisp-edges;
  }
}