/* ==========================================================================
   Romistry Travels - Ultra-Premium Motion, Cinematic Dynamics & Physics
   Bespoke Luxury Motion Suite: GPU-Accelerated, Fluid Micro-Interactions,
   Editorial Scroll Blur-Reveals, Bespoke Custom Cursor, and Smooth Springs.
   ========================================================================== */

:root {
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-luxury: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out-smooth: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-soft: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ==========================================================================
   1. GLOBAL READING SCROLL PROGRESS BAR
   ========================================================================== */
#scrollProgressBar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3.5px;
  background: linear-gradient(90deg, #CCA364 0%, #E6D2B5 25%, #C5A059 50%, #ECC880 75%, #A8843E 100%);
  width: 0%;
  z-index: 99999999;
  transition: width 0.06s cubic-bezier(0.25, 1, 0.5, 1);
  box-shadow: 0 0 14px rgba(197, 160, 89, 0.8), 0 0 4px rgba(255, 255, 255, 0.6);
  pointer-events: none;
}



/* ==========================================================================
   3. CINEMATIC HERO ENTRANCE MOTIONS & SHIMMER
   ========================================================================== */
.hero-badge {
  opacity: 0;
  transform: translateY(24px) scale(0.96);
  animation: heroSlideFade 0.85s var(--ease-luxury) 0.15s forwards;
  position: relative;
  overflow: hidden;
}

.hero-badge::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transform: skewX(-20deg);
  animation: badgeGleam 4s infinite 2s ease-in-out;
}

@keyframes badgeGleam {
  0% { left: -100%; }
  30%, 100% { left: 200%; }
}

.hero-title {
  opacity: 0;
  transform: translateY(32px);
  filter: blur(8px);
  animation: heroBlurSlide 1s var(--ease-luxury) 0.32s forwards;
}

/* Shimmering Metallic Gold Text for Highlight */
.hero-title span {
  display: inline-block;
  background: linear-gradient(135deg, #FFF1D0 0%, #ECC880 25%, #C5A059 50%, #ECC880 75%, #FFFFFF 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: heroGoldShine 6s linear infinite;
  text-shadow: 0 0 28px rgba(197, 160, 89, 0.3);
}

@keyframes heroGoldShine {
  0% { background-position: 0% center; }
  100% { background-position: 200% center; }
}

.hero-subtitle {
  opacity: 0;
  transform: translateY(28px);
  animation: heroSlideFade 0.9s var(--ease-luxury) 0.5s forwards;
}

.hero-cta-group {
  opacity: 0;
  transform: translateY(24px);
  animation: heroSlideFade 0.9s var(--ease-luxury) 0.68s forwards;
}

.hero-search-wrapper {
  opacity: 0;
  transform: translateY(36px) scale(0.98);
  animation: heroSearchEntrance 1s var(--ease-luxury) 0.85s forwards;
}

/* Hero Keyframes */
@keyframes heroSlideFade {
  0% {
    opacity: 0;
    transform: translateY(26px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes heroBlurSlide {
  0% {
    opacity: 0;
    transform: translateY(32px);
    filter: blur(8px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

@keyframes heroSearchEntrance {
  0% {
    opacity: 0;
    transform: translateY(36px) scale(0.98);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    box-shadow: 0 24px 60px rgba(5, 19, 41, 0.35);
  }
}

/* Animated Ambient Glow in Hero */
.hero-overlay-glow {
  animation: auraBreathe 8s infinite ease-in-out;
}

@keyframes auraBreathe {
  0%, 100% {
    opacity: 0.2;
  }
  50% {
    opacity: 0.4;
  }
}

/* Hero Scroll-to-Explore Animated Cue */
.hero-scroll-cue {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: #F8E2B2;
  text-decoration: none;
  margin: 30px auto 0;
  transition: all 0.3s ease;
  cursor: pointer;
  z-index: 10;
  padding: 8px 18px;
  border-radius: 30px;
  background: rgba(4, 15, 30, 0.65);
  border: 1px solid rgba(212, 175, 55, 0.35);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5), 0 0 15px rgba(197, 160, 89, 0.15);
}

.hero-scroll-cue:hover {
  color: #FFFFFF;
  border-color: rgba(236, 200, 128, 0.7);
  background: rgba(4, 15, 30, 0.85);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.6), 0 0 20px rgba(197, 160, 89, 0.3);
}

.hero-scroll-mouse {
  width: 22px;
  height: 36px;
  border: 2px solid rgba(236, 200, 128, 0.85);
  border-radius: 14px;
  display: flex;
  justify-content: center;
  padding-top: 6px;
  box-shadow: 0 0 12px rgba(197, 160, 89, 0.35);
}

.hero-scroll-dot {
  width: 4px;
  height: 7px;
  background: #ECC880;
  border-radius: 2px;
  animation: mouseWheelSlide 2s infinite ease-in-out;
}

@keyframes mouseWheelSlide {
  0% {
    opacity: 1;
    transform: translateY(0);
  }
  60% {
    opacity: 0.2;
    transform: translateY(11px);
  }
  100% {
    opacity: 0;
    transform: translateY(14px);
  }
}

.hero-scroll-text {
  font-size: 0.74rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 700;
  color: #ECC880;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.95);
}

.hero-scroll-chevron {
  font-size: 0.75rem;
  color: #ECC880;
  animation: chevronBounce 2s infinite ease-in-out;
}

@keyframes chevronBounce {
  0%, 100% { transform: translateY(0); opacity: 0.6; }
  50% { transform: translateY(4px); opacity: 1; }
}

/* ==========================================================================
   4. EDITORIAL SCROLL REVEAL SUITE (BLUR & SPRING PHYSICS)
   ========================================================================== */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(36px);
  filter: blur(8px);
  transition: opacity 0.85s var(--ease-luxury),
              transform 0.85s var(--ease-luxury),
              filter 0.85s var(--ease-luxury);
  will-change: opacity, transform, filter;
}

.reveal-on-scroll.revealed {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

/* Staggered Delay Tokens */
.reveal-delay-1 { transition-delay: 0.06s; }
.reveal-delay-2 { transition-delay: 0.13s; }
.reveal-delay-3 { transition-delay: 0.20s; }
.reveal-delay-4 { transition-delay: 0.27s; }
.reveal-delay-5 { transition-delay: 0.34s; }
.reveal-delay-6 { transition-delay: 0.41s; }
.reveal-delay-7 { transition-delay: 0.48s; }
.reveal-delay-8 { transition-delay: 0.55s; }

/* Scale Entrance Variant */
.reveal-scale {
  opacity: 0;
  transform: scale(0.92);
  filter: blur(6px);
  transition: opacity 0.8s var(--ease-luxury),
              transform 0.8s var(--ease-luxury),
              filter 0.8s var(--ease-luxury);
}

.reveal-scale.revealed {
  opacity: 1;
  transform: scale(1);
  filter: blur(0);
}

/* Lateral Directional Variants */
.reveal-left {
  opacity: 0;
  transform: translateX(-40px);
  filter: blur(6px);
  transition: opacity 0.9s var(--ease-luxury),
              transform 0.9s var(--ease-luxury),
              filter 0.9s var(--ease-luxury);
}
.reveal-left.revealed {
  opacity: 1;
  transform: translateX(0);
  filter: blur(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(40px);
  filter: blur(6px);
  transition: opacity 0.9s var(--ease-luxury),
              transform 0.9s var(--ease-luxury),
              filter 0.9s var(--ease-luxury);
}
.reveal-right.revealed {
  opacity: 1;
  transform: translateX(0);
  filter: blur(0);
}

/* ==========================================================================
   5. LIVE NUMBER COUNTER ANIMATION DYNAMICS
   ========================================================================== */
.stat-number,
.stat-num,
.gallery-stat-num {
  display: inline-flex;
  align-items: baseline;
  transition: transform 0.35s var(--ease-spring), color 0.3s ease;
}

.stat-counter-item {
  transition: transform 0.35s var(--ease-luxury), box-shadow 0.35s ease;
}

.stat-counter-item:hover {
  transform: translateY(-4px);
}

.stat-counter-item:hover .stat-number {
  color: #ECC880;
  transform: scale(1.04);
}

/* Counter completed subtle pulse */
.stat-number.counter-done {
  animation: counterPop 0.45s var(--ease-spring);
}

@keyframes counterPop {
  0% { transform: scale(1); }
  50% { transform: scale(1.08); color: #ECC880; }
  100% { transform: scale(1); }
}

/* ==========================================================================
   6. 3D CARD TILT, GLOSS SWEEP & ZOOM MOTIONS
   ========================================================================== */
.tour-card,
.dest-card,
.feature-card,
.testimonial-card,
.blog-card,
.gallery-card,
.value-card,
.team-card {
  position: relative;
  transition: transform 0.45s var(--ease-luxury),
              box-shadow 0.45s var(--ease-luxury),
              border-color 0.3s ease;
  will-change: transform, box-shadow;
  overflow: hidden;
}

/* Smooth Image Parallax Zoom inside Card */
.tour-thumb-wrap,
.dest-card-image,
.blog-card-thumb,
.gallery-card-thumb {
  overflow: hidden;
  position: relative;
}

.tour-thumb,
.dest-card-image img,
.blog-card-thumb img,
.gallery-card-thumb img {
  transition: transform 0.75s var(--ease-luxury), filter 0.5s ease;
  will-change: transform;
}

.tour-card:hover .tour-thumb,
.dest-card:hover .dest-card-image img,
.blog-card:hover .blog-card-thumb img,
.gallery-card:hover .gallery-card-thumb img {
  transform: scale(1.07);
}

/* Luxury Diagonal Gloss Sheen Sweep */
.tour-card::before,
.dest-card::before,
.feature-card::before,
.gallery-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -120%;
  width: 70%;
  height: 200%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.08) 40%,
    rgba(255, 255, 255, 0.22) 50%,
    rgba(255, 255, 255, 0.08) 60%,
    transparent 100%
  );
  transform: rotate(28deg);
  pointer-events: none;
  transition: left 0.9s cubic-bezier(0.19, 1, 0.22, 1);
  z-index: 5;
}

.tour-card:hover::before,
.dest-card:hover::before,
.feature-card:hover::before,
.gallery-card:hover::before {
  left: 180%;
}

/* Subtle Floating Lift on Badges */
.tour-badge-top,
.dest-tour-count,
.tour-duration-badge {
  transition: transform 0.35s var(--ease-spring), box-shadow 0.35s ease;
}

.tour-card:hover .tour-badge-top {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 6px 16px rgba(197, 160, 89, 0.45);
}

/* Destination Card Content Floating Rise */
.dest-card-content {
  transition: transform 0.45s var(--ease-luxury);
}

.dest-card:hover .dest-card-content {
  transform: translateY(-4px);
}

/* 3D Tilt Reactivity on Desktop */
@media (min-width: 992px) {
  .tilt-card {
    transform-style: preserve-3d;
    transition: transform 0.16s ease-out, box-shadow 0.3s ease;
    will-change: transform;
  }
}

/* ==========================================================================
   7. BUTTON MICRO-MOTIONS & LIQUID GOLD RIPPLE
   ========================================================================== */
.btn,
.btn-gold,
.btn-primary,
.btn-outline-gold,
.btn-outline-white,
.btn-outline-primary {
  position: relative;
  overflow: hidden;
  transition: transform 0.28s var(--ease-luxury),
              box-shadow 0.28s var(--ease-luxury),
              background 0.25s ease,
              color 0.25s ease,
              border-color 0.25s ease;
  will-change: transform, box-shadow;
}

.btn:hover,
.btn-gold:hover,
.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(11, 37, 69, 0.25);
}

.btn-gold:hover {
  box-shadow: 0 10px 26px rgba(197, 160, 89, 0.45);
}

.btn:active,
.btn-gold:active {
  transform: translateY(-1px) scale(0.97);
}

/* Liquid Expanding Ripple Element */
.ripple-circle {
  position: absolute;
  border-radius: 50%;
  transform: scale(0);
  animation: liquidRipple 0.65s cubic-bezier(0.1, 0.8, 0.3, 1);
  background: radial-gradient(circle, rgba(255, 255, 255, 0.4) 0%, rgba(255, 255, 255, 0.1) 70%, transparent 100%);
  pointer-events: none;
}

.btn-outline-primary .ripple-circle,
.btn-outline-gold .ripple-circle {
  background: radial-gradient(circle, rgba(197, 160, 89, 0.45) 0%, rgba(197, 160, 89, 0.15) 70%, transparent 100%);
}

@keyframes liquidRipple {
  0% {
    transform: scale(0);
    opacity: 0.8;
  }
  100% {
    transform: scale(3.5);
    opacity: 0;
  }
}

/* ==========================================================================
   8. AMBIENT WHATSAPP CONCIERGE SONAR PULSE
   ========================================================================== */
.wa-float-btn {
  position: relative;
  transition: transform 0.35s var(--ease-spring), box-shadow 0.35s ease;
}

.wa-float-btn:hover {
  transform: scale(1.1) rotate(4deg);
}

/* Sonar Radar Wave Rings */
.wa-float-btn::before,
.wa-float-btn::after {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid rgba(37, 211, 102, 0.6);
  opacity: 0;
  animation: sonarWave 2.8s infinite cubic-bezier(0.25, 1, 0.5, 1);
  pointer-events: none;
}

.wa-float-btn::after {
  animation-delay: 1.4s;
}

@keyframes sonarWave {
  0% {
    transform: scale(0.9);
    opacity: 0.8;
  }
  60% {
    transform: scale(1.45);
    opacity: 0.2;
  }
  100% {
    transform: scale(1.8);
    opacity: 0;
  }
}

/* ==========================================================================
   9. INTERACTIVE ITINERARY ACCORDION FLUID PHYSICS
   ========================================================================== */
.itinerary-day-card {
  transition: box-shadow 0.4s var(--ease-luxury),
              border-color 0.35s ease,
              transform 0.3s ease;
}

.itinerary-day-card:hover {
  border-color: rgba(197, 160, 89, 0.5);
}

.itinerary-day-card.active {
  border-color: #C5A059;
  box-shadow: 0 12px 32px rgba(11, 37, 69, 0.08), 0 0 0 1px rgba(197, 160, 89, 0.25);
  transform: translateY(-2px);
}

.itinerary-day-body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.48s var(--ease-luxury), opacity 0.38s ease;
  overflow: hidden;
  opacity: 0;
}

.itinerary-day-card.active .itinerary-day-body {
  grid-template-rows: 1fr;
  opacity: 1;
}

.itinerary-body-inner {
  min-height: 0;
}

.itinerary-toggle-icon {
  transition: transform 0.42s var(--ease-spring);
}

.itinerary-day-card.active .itinerary-toggle-icon {
  transform: rotate(180deg);
}

.itinerary-day-card .day-badge {
  transition: background 0.3s ease, color 0.3s ease, transform 0.35s var(--ease-spring);
}

.itinerary-day-card.active .day-badge {
  background: var(--gold-gradient);
  color: #051329;
  transform: scale(1.06);
}

/* ==========================================================================
   10. MODAL DIALOG ELASTIC 3D POP PHYSICS
   ========================================================================== */
.modal-overlay {
  transition: opacity 0.36s cubic-bezier(0.2, 0.9, 0.3, 1),
              visibility 0.36s ease,
              backdrop-filter 0.36s ease;
}

.modal-overlay .modal-dialog {
  transform: perspective(1000px) rotateX(4deg) scale(0.94) translateY(24px);
  transition: transform 0.46s var(--ease-spring), opacity 0.34s ease;
  opacity: 0;
  will-change: transform, opacity;
}

.modal-overlay.active .modal-dialog {
  transform: perspective(1000px) rotateX(0deg) scale(1) translateY(0);
  opacity: 1;
}

.modal-close-btn {
  transition: transform 0.35s var(--ease-spring), background 0.2s ease, color 0.2s ease;
}

.modal-close-btn:hover {
  transform: rotate(90deg) scale(1.12);
  color: #C5A059;
}

/* ==========================================================================
   11. BACK TO TOP BUTTON WITH SMOOTH GLOW SCALE
   ========================================================================== */
.back-to-top-btn {
  position: fixed;
  bottom: 85px;
  right: 28px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--primary, #0B2545);
  color: var(--accent-gold, #C5A059);
  border: 1.5px solid rgba(197, 160, 89, 0.5);
  box-shadow: 0 8px 24px rgba(11, 37, 69, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  cursor: pointer;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px) scale(0.85);
  transition: opacity 0.35s var(--ease-out-expo),
              visibility 0.35s ease,
              transform 0.4s var(--ease-spring),
              background 0.25s ease,
              box-shadow 0.25s ease;
}

.back-to-top-btn.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.back-to-top-btn:hover {
  background: var(--gold-gradient);
  color: #051329;
  transform: translateY(-4px) scale(1.1);
  box-shadow: 0 12px 28px rgba(197, 160, 89, 0.55);
}

.back-to-top-btn:active {
  transform: translateY(-1px) scale(0.96);
}

@media (max-width: 767px) {
  .back-to-top-btn {
    bottom: 82px;
    right: 18px;
    width: 44px;
    height: 44px;
    font-size: 1rem;
  }
}

/* ==========================================================================
   12. SECTION TAG & BADGE FLOWING GOLD GLEAM
   ========================================================================== */
.section-tag {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
}

.section-tag::after {
  content: '';
  position: absolute;
  top: 0;
  left: -80%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(197, 160, 89, 0.35), transparent);
  animation: tagShimmer 5s infinite;
}

@keyframes tagShimmer {
  0% { left: -80%; }
  35%, 100% { left: 160%; }
}

/* ==========================================================================
   13. FORM INPUT FOCUS GLOW PULSE
   ========================================================================== */
.form-control,
.search-field select,
.search-field input,
.filter-select,
.inquiry-form input,
.inquiry-form select,
.inquiry-form textarea {
  transition: border-color 0.25s ease,
              box-shadow 0.3s var(--ease-luxury),
              background 0.2s ease;
}

.form-control:focus,
.search-field select:focus,
.inquiry-form input:focus,
.inquiry-form select:focus,
.inquiry-form textarea:focus {
  border-color: #C5A059 !important;
  box-shadow: 0 0 0 3.5px rgba(197, 160, 89, 0.22) !important;
}

/* ==========================================================================
   14. REDUCED MOTION ACCESSIBILITY (WCAG AAA)
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal-on-scroll,
  .reveal-scale,
  .reveal-left,
  .reveal-right,
  .hero-badge,
  .hero-title,
  .hero-subtitle,
  .hero-cta-group,
  .hero-search-wrapper {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }
  #scrollProgressBar {
    display: none !important;
  }
}
