.nav-pills .nav-link-package {
  display: block;
  padding: 0.75rem 1.5rem;
  color: #6c757d;
  background-color: #f8f9fa;
  transition: all 0.3s ease;
  text-decoration: none;
  border-radius: 50rem;
  font-weight: 600;
  border: 1px solid transparent;
  text-align: center;
  letter-spacing: 0.3px;
}

.nav-pills .nav-link-package:hover {
  background-color: #e9ecef;
  color: #212529;
  transform: translateY(-1px);
}

.nav-pills .nav-link-package.active {
  background-color: #0c979c !important;
  color: white !important;
  box-shadow: 0 4px 12px rgba(12, 151, 156, 0.25);
  transform: translateY(-1px);
}

.nav-pills .nav-item {
  margin-bottom: 0.5rem;
}

.hover-elevate {
  transition: transform 0.2s;
}

.hover-elevate:hover {
  transform: translateY(-2px);
}

html {
  scroll-behavior: smooth;
}

.tab-content {
  min-height: 300px;
}

.package-calendar {
  position: relative;
}

.package-calendar .calendar-dropdown {
  position: absolute;
  width: 360px;
  padding: 16px;
  left: 0;
  right: auto;
  transform: none;
  margin-top: 6px;
  z-index: 1050;
}

.package-calendar .calendar-container {
  gap: 0;
}

.package-calendar .calendar-month {
  min-width: 0;
}

@media (max-width: 768px) {
  .package-calendar .calendar-dropdown {
    width: 95vw;
    left: 50%;
    transform: translateX(-50%);
  }
}

.package-calendar .calendar-icon {
  position: absolute;
  right: 14px;
  top: 29px !important;
  transform: translateY(-50%) !important;
  color: #0c979c;
  font-size: 18px;
  pointer-events: none;
}

.package-calendar .form-control {
  padding-right: 44px;
}

.form-floating>.form-control:focus~label::after,
.form-floating>.form-control:not(:placeholder-shown)~label::after {
  background-color: transparent !important;
}

.timeline-wrapper {
  position: relative;
}

.timeline-item {
  position: relative;
  padding-left: 40px;
  margin-bottom: 30px;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: -30px;
  width: 2px;
  background-color: #e9ecef;
}

.timeline-item:last-child::before {
  bottom: 0;
  height: 20px;
}

.timeline-marker {
  position: absolute;
  left: -14px;
  top: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background-color: #0c979c;
  color: white;
  text-align: center;
  line-height: 30px;
  font-weight: bold;
  z-index: 2;
  box-shadow: 0 0 0 5px white;
}

.timeline-content {
  background: #fff;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  border: 1px solid #f1f1f1;
  transition: transform 0.2s;
}

.timeline-content:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.wishlist-container {
  z-index: 10;
}

.wishlist-btn-size {
  width: 45px;
  height: 45px;
}

.featured-badge-container {
  z-index: 10;
}

.carousel-image {
  height: 500px;
  object-fit: cover;
}

.carousel-placeholder {
  height: 500px;
}

.carousel-control-custom {
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: 50%;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.overview-description {
  line-height: 1.8;
}

.itinerary-title {
  color: #0c979c;
}

.itinerary-description {
  font-family: inherit;
  line-height: 1.6;
}

.itinerary-fallback {
  font-family: inherit;
  color: #555;
}

.booking-sidebar {
  top: 20px;
  z-index: 10;
}

.booking-header {
  background-color: #0C979C;
}

.help-icon {
  width: 50px;
  height: 50px;
}

.message-textarea {
  height: 100px;
}
.gallery-modal {
  z-index: 10500 !important;
}

.gallery-modal .modal-backdrop {
  z-index: 10499 !important;
}
#gallery-thumbnails .gallery-thumb-item {
  cursor: pointer;
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

/* Always keep thumbnails in a single row — no wrapping */
#gallery-thumbnails.row {
  flex-wrap: nowrap !important;
}

#gallery-thumbnails.row > [class*="col-"] {
  flex: 1 1 0 !important;
  min-width: 0 !important;
  max-width: none !important;
  width: auto !important;
}

#gallery-thumbnails .gallery-thumb-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  border-color: rgba(12, 151, 156, 0.3);
}

#gallery-thumbnails .gallery-thumb-item.active {
  border-color: #0c979c;
  box-shadow: 0 0 0 3px rgba(12, 151, 156, 0.25);
}

#gallery-thumbnails .gallery-thumb-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#gallery-thumbnails .more-images-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 1.5rem;
  backdrop-filter: blur(3px);
  transition: all 0.3s ease;
}

#gallery-thumbnails .gallery-thumb-item:hover .more-images-overlay {
  background: rgba(0, 0, 0, 0.45);
}

/* Form Validation Styles */
.form-floating>.form-control.is-invalid~.invalid-feedback {
  display: block;
  font-size: 0.75rem;
  margin-top: 0.25rem;
  padding-left: 0.5rem;
}

.form-floating>.form-control.is-invalid {
  border: 1px solid #dc3545 !important;
  background-color: #fff8f8 !important;
}

#travelers.is-valid, 
#travelers.is-invalid,
#travel_date.is-valid,
#travel_date.is-invalid {
  background-image: none !important;
}

#travelers {
  padding-right: 0.75rem !important;
}

.package-calendar .form-control {
  padding-right: 44px !important;
}

#message.is-invalid, #message.is-valid {
  background-position: right calc(0.375em + 0.1875rem) center !important;
}

@media (max-width: 991px) {
  .booking-sidebar {
    position: static !important;
    top: auto !important;
  }

  .carousel-image {
    height: 350px;
  }

  .carousel-placeholder {
    height: 350px;
  }
}

@media (max-width: 768px) {
  .carousel-image {
    height: 280px;
    border-radius: 16px !important;
  }

  .carousel-placeholder {
    height: 280px;
    border-radius: 16px !important;
  }
  .carousel-control-custom {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.95);
  }

  .carousel-control-prev {
    margin-left: 0.5rem !important;
  }

  .carousel-control-next {
    margin-right: 0.5rem !important;
  }

  .wishlist-btn-size {
    width: 40px;
    height: 40px;
  }
  .wishlist-container {
    margin: 0.5rem !important;
    top: 0 !important;
    right: 0 !important;
  }

  .wishlist-btn-size {
    width: 36px !important;
    height: 36px !important;
    font-size: 0.8rem;
  }

  .featured-badge-container .badge {
    font-size: 0.75rem !important;
    padding: 0.5rem 0.75rem !important;
  }

  /* Package title and meta */
  .package-detail h2 {
    font-size: 1.5rem !important;
    margin-bottom: 1rem !important;
  }

  /* Badge adjustments */
  .package-detail .badge {
    font-size: 0.8rem !important;
    padding: 0.5rem 0.75rem !important;
  }

  /* Navigation tabs - make them scrollable */
  #packageTab {
    flex-wrap: nowrap !important;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    gap: 0.5rem !important;
    padding-bottom: 0.5rem;
  }

  #packageTab::-webkit-scrollbar {
    display: none;
  }

  #packageTab .nav-item {
    flex: 0 0 auto;
    margin-bottom: 0;
  }

  .nav-pills .nav-link-package {
    white-space: nowrap;
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
  }

  .nav-pills .nav-link-package i {
    font-size: 0.875rem;
  }

  /* Card body padding */
  .card-body.p-md-5 {
    padding: 1.5rem !important;
  }

  /* Tab content */
  .tab-content {
    min-height: 200px;
  }

  .tab-pane h4 {
    font-size: 1.25rem !important;
    margin-bottom: 14px !important;
  }

  .timeline-item {
    padding-left: 30px;
    margin-bottom: 20px;
  }

  .timeline-marker {
    width: 24px;
    height: 24px;
    line-height: 24px;
    font-size: 0.75rem;
    left: -12px;
  }

  .timeline-content {
    padding: 15px;
  }

  /* Booking card */
  .booking-sidebar .card {
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12) !important;
  }

  .booking-header {
    padding: 1.5rem !important;
  }

  .booking-header h2 {
    font-size: 1.75rem !important;
  }

  .booking-header .fs-6 {
    font-size: 0.875rem !important;
  }

  /* Form fields */
  .form-floating>label {
    font-size: 0.875rem;
  }

  .form-control {
    font-size: 1rem;
  }

  /* Help card */
  .help-icon {
    width: 45px;
    height: 45px;
  }

  .help-icon i {
    font-size: 1.25rem !important;
  }
}

@media (max-width: 576px) {

  .package-detail {
    padding-top: 2rem !important;
    padding-bottom: 2rem !important;
  }
  .carousel-image {
    height: 240px;
    border-radius: 12px !important;
  }

  .carousel-placeholder {
    height: 240px;
    border-radius: 12px !important;
  }

  .carousel-wrapper {
    margin-bottom: 1.5rem !important;
  }

  /* Package title */
  .package-detail h2 {
    font-size: 1.35rem !important;
    line-height: 1.3;
  }
  .package-detail .d-flex.gap-3 {
    gap: 0.5rem !important;
  }

  .package-detail .badge {
    font-size: 0.75rem !important;
    padding: 0.4rem 0.65rem !important;
  }

  .card-header {
    padding: 0.75rem !important;
  }
  .nav-pills .nav-link-package {
    padding: 0.5rem 1rem;
    font-size: 0.813rem;
  }

  .card-body.p-4,
  .card-body.p-md-5 {
    padding: 1rem !important;
  }

  .tab-pane h4 {
    font-size: 1.15rem !important;
  }

  .tab-pane .col-md-6 {
    margin-bottom: 1rem;
  }

  .tab-pane .col-md-6 .h-100 {
    padding: 1rem !important;
  }

  .tab-pane .col-md-6 h5 {
    font-size: 1rem !important;
    margin-bottom: 0.75rem !important;
  }

  /* Booking header */
  .booking-header {
    padding: 1.25rem !important;
  }

  .booking-header h2 {
    font-size: 1.5rem !important;
  }

  .booking-header .fs-6 {
    font-size: 0.813rem !important;
  }
  .booking-sidebar h5 {
    font-size: 1rem !important;
  }

  .row.g-2 {
    gap: 0.5rem !important;
  }

  .btn-primary.w-100 {
    padding: 0.75rem !important;
    font-size: 0.938rem;
  }

  .help-icon {
    width: 40px;
    height: 40px;
  }

  .help-icon i {
    font-size: 1.125rem !important;
  }

  .card-body.p-4.d-flex {
    padding: 1rem !important;
    gap: 0.75rem !important;
  }

  .card-body h6 {
    font-size: 0.938rem !important;
  }

  .card-body .small {
    font-size: 0.813rem !important;
  }
}

/* Extra small devices (≤375px) */
@media (max-width: 375px) {

  .carousel-image,
  .carousel-placeholder {
    height: 200px;
  }

  .package-detail h2 {
    font-size: 1.25rem !important;
  }

  .nav-pills .nav-link-package {
    font-size: 0.75rem;
    padding: 0.45rem 0.85rem;
  }

  .booking-header h2 {
    font-size: 1.35rem !important;
  }

  .tab-pane h4 {
    font-size: 1.1rem !important;
  }
}

@media (hover: none) and (pointer: coarse) {
  .nav-pills .nav-link-package {
    padding: 0.875rem 1.25rem;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .btn {
    min-height: 44px;
  }

  .carousel-control-custom {
    width: 44px;
    height: 44px;
  }

  .wishlist-btn-size {
    min-width: 44px;
    min-height: 44px;
  }
}

.gallery-modal {
  z-index: 10500 !important;
}

.gallery-modal-dialog {
  margin: 0 !important;
  max-width: 100vw !important;
  width: 100vw !important;
  height: 100vh !important;
}

.gallery-modal-content {
  background: rgba(255, 255, 255, 0.55) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: none !important;
  border-radius: 0 !important;
  height: 100vh !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden;
  animation: galleryFadeIn 0.3s ease;
}

@keyframes galleryFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ---- Header ---- */
.gallery-lightbox-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.75rem;
  background: rgba(255,255,255,0.7);
  border-bottom: 1px solid rgba(0,0,0,0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: relative;
  z-index: 20;
  pointer-events: none;
  flex-shrink: 0;
}

.gallery-header-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  pointer-events: auto;
}



.gallery-header-info {
  display: flex;
  flex-direction: column;
}

.gallery-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #111;
  letter-spacing: 0.3px;
  max-width: 340px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.gallery-subtitle {
  font-size: 0.72rem;
  color: rgba(0,0,0,0.45);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 1px;
}

.gallery-header-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  pointer-events: auto;
}

/* Counter pill in header */
.gallery-counter-pill {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(0,0,0,0.08);
  border: 1px solid rgba(0,0,0,0.15);
  border-radius: 50px;
  padding: 0.4rem 1rem;
  color: rgba(0,0,0,0.75);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  backdrop-filter: blur(12px);
}



.gallery-counter-sep {
  opacity: 0.4;
  margin: 0 0.1rem;
}

/* Close button */
.btn-close-gallery {
  width: 42px;
  height: 42px;
  background: rgba(0,0,0,0.07);
  border: 1px solid rgba(0,0,0,0.15);
  border-radius: 50%;
  color: rgba(0,0,0,0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  font-size: 0.9rem;
  transition: all 0.2s ease;
  backdrop-filter: blur(12px);
}

.btn-close-gallery:hover {
  background: rgba(220, 53, 69, 0.85);
  border-color: rgba(220, 53, 69, 0.6);
  color: #fff;
  transform: scale(1.08) rotate(90deg);
}

/* ---- Main Body ---- */
.gallery-lightbox-body {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Carousel fills the body */
.gallery-lightbox-body .carousel,
.gallery-lightbox-body .carousel-inner,
.gallery-lightbox-body .carousel-item {
  width: 100%;
  height: 100%;
}

/* Image container — uniform fixed size for all images */
.modal-image-container {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 5rem;
}

.modal-image-container img {
  width: 100%;
  height: 100%;
  max-width: 960px;
  max-height: calc(100vh - 180px);
  object-fit: cover;
  border-radius: 12px;
  animation: imageSlideIn 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  display: block;
  flex-shrink: 0;
}

@keyframes imageSlideIn {
  from { opacity: 0; transform: scale(0.96) translateY(8px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* ---- Navigation Arrows ---- */
.gallery-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 30;
  width: 58px;
  height: 58px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 50%;
  color: rgba(0,0,0,0.9);
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.25s ease;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.gallery-nav-btn:hover {
  background: rgba(12, 151, 156, 0.7);
  border-color: rgba(12, 151, 156, 0.8);
  color: #fff;
  box-shadow: 0 0 30px rgba(12, 151, 156, 0.45);
  transform: translateY(-50%) scale(1.08);
}

.gallery-nav-btn:active {
  transform: translateY(-50%) scale(0.96);
}

.gallery-nav-prev {
  left: 1.5rem;
}

.gallery-nav-next {
  right: 1.5rem;
}

.gallery-lightbox-footer {
  padding: 0.85rem 1.5rem;
  flex-shrink: 0;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.gallery-thumb-strip {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  justify-content: center;
}

.gallery-thumb-strip::-webkit-scrollbar {
  display: none;
}

.modal-thumb-item {
  position: relative;
  flex-shrink: 0;
  width: 72px;
  height: 52px;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid rgba(255,255,255,0.12);
  transition: all 0.22s ease;
  opacity: 0.55;
}

.modal-thumb-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.modal-thumb-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.25);
  transition: background 0.2s ease;
}

.modal-thumb-item:hover {
  opacity: 0.85;
  border-color: rgba(255,255,255,0.45);
  transform: translateY(-2px);
}

.modal-thumb-item.active {
  opacity: 1;
  border-color: #0c979c;
  box-shadow: 0 0 0 3px rgba(12, 151, 156, 0.4), 0 4px 16px rgba(12, 151, 156, 0.3);
  transform: translateY(-3px);
}

.modal-thumb-item.active .modal-thumb-overlay {
  background: transparent;
}

/* ---- Mobile: Smart Bottom Sheet ---- */
@media (max-width: 768px) {

  /* Slide up as a centered card */
  .gallery-modal-dialog {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 auto !important;
    max-width: 95vw !important;
    width: 95vw !important;
    height: 100vh !important;
  }

  .gallery-modal-content {
    margin-top: 20px;
    height: 75vh !important;
    border-radius: 16px !important;
    animation: bottomSheetIn 0.3s cubic-bezier(0.22, 1, 0.36, 1) !important;
  }

  @keyframes bottomSheetIn {
    from { transform: scale(0.95); opacity: 0; }
    to   { transform: scale(1);    opacity: 1; }
  }

  /* Remove drag-handle — not needed for centered modal */
  .gallery-lightbox-header::before {
    display: none;
  }

  .gallery-lightbox-header {
    padding: 1.4rem 1rem 0.75rem;
  }

  .gallery-title {
    font-size: 0.85rem;
    max-width: 180px;
  }

  .gallery-counter-pill {
    font-size: 0.75rem;
    padding: 0.35rem 0.75rem;
  }

  .btn-close-gallery {
    width: 36px;
    height: 36px;
    font-size: 0.8rem;
  }

  .modal-image-container {
    padding: 0.75rem 0.75rem;
  }

  .modal-image-container img {
    max-width: 100%;
    max-height: calc(88vh - 160px);
    border-radius: 10px;
  }

  .gallery-nav-btn {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }

  .gallery-nav-prev { left: 0.4rem; }
  .gallery-nav-next { right: 0.4rem; }

  .gallery-lightbox-footer {
    padding: 0.5rem 0.75rem;
  }

  .modal-thumb-item {
    width: 52px;
    height: 38px;
    border-radius: 6px;
  }

}

@media (max-width: 430px) {
  .modal-thumb-item {
    width: 48px;
    height: 36px;
  }

  .gallery-nav-btn {
    width: 38px;
    height: 38px;
    font-size: 1rem;
  }
}

/* Professional Back Button Above Gallery */
.back-nav-container {
  margin-bottom: 1.5rem;
}

.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: white;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0.6rem 1.25rem;
  background: #0c979c;
  border: 1px solid #eee;
  border-radius: 8px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-back-professional:hover {
  background: #fff;
  color: #0c979c;
  border-color: #0c979c;
  transform: translateX(-5px);
  box-shadow: 0 4px 12px rgba(12, 151, 156, 0.1);
}

.btn-back-professional i {
  font-size: 1rem;
}


/* Wishlist Button Styling */
.wishlist-btn i.bi-heart-fill {
  color: #dc3545 !important;
}

.wishlist-btn.active i.bi-heart-fill {
  color: #dc3545 !important;
}
