/* ================================================================
   The Colonel's Homestay – Animations & Effects
   ================================================================ */

/* ── Parallax ──────────────────────────────────────────────── */
.parallax-section {
  background-attachment: fixed;
  background-size: cover;
  background-position: center;
}

/* ── Glass Morphism ────────────────────────────────────────── */
.glass-card {
  background: rgba(255, 253, 248, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 8px 32px rgba(11, 59, 46, 0.1);
}

/* ── Hover Ripple ──────────────────────────────────────────── */
.ripple-effect {
  position: relative;
  overflow: hidden;
}
.ripple-effect::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  transform: scale(0);
  animation: ripple 0.6s linear;
  background: rgba(255, 255, 255, 0.3);
}
@keyframes ripple {
  to { transform: scale(4); opacity: 0; }
}

/* ── Shimmer Loading ───────────────────────────────────────── */
.shimmer {
  background: linear-gradient(
    -45deg,
    #e8e0d0 25%,
    #f3e8d0 50%,
    #e8e0d0 75%
  );
  background-size: 400% 400%;
  animation: shimmer 1.5s ease infinite;
}
@keyframes shimmer {
  0%   { background-position: 0%   50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0%   50%; }
}

/* ── Floating Animation ────────────────────────────────────── */
.float-anim {
  animation: floatUpDown 4s ease-in-out infinite;
}
@keyframes floatUpDown {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-12px); }
}

/* ── Rotate Animation (for icons) ─────────────────────────── */
.rotate-anim { animation: slowRotate 20s linear infinite; }
@keyframes slowRotate { to { transform: rotate(360deg); } }

/* ── Counter Number ────────────────────────────────────────── */
.counter-number {
  display: inline-block;
  transition: all 0.3s ease;
}

/* ── Gold Line Draw ────────────────────────────────────────── */
.line-draw {
  position: relative;
  overflow: hidden;
}
.line-draw::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-gold);
  transition: width 0.5s ease;
}
.line-draw:hover::after,
.line-draw.aos-animate::after { width: 100%; }

/* ── Image Reveal ──────────────────────────────────────────── */
.img-reveal {
  position: relative;
  overflow: hidden;
}
.img-reveal::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--color-primary);
  transform-origin: right;
  transition: transform 0.8s cubic-bezier(0.7, 0, 0.3, 1);
}
.img-reveal.revealed::after { transform: scaleX(0); }

/* ── Card Tilt on Hover ────────────────────────────────────── */
.tilt-card { transition: transform 0.3s ease, box-shadow 0.3s ease; }
.tilt-card:hover { transform: perspective(1000px) rotateY(-3deg) rotateX(2deg) scale(1.02); }

/* ── Stagger Items ─────────────────────────────────────────── */
.stagger-item:nth-child(1) { animation-delay: 0.1s; }
.stagger-item:nth-child(2) { animation-delay: 0.2s; }
.stagger-item:nth-child(3) { animation-delay: 0.3s; }
.stagger-item:nth-child(4) { animation-delay: 0.4s; }
.stagger-item:nth-child(5) { animation-delay: 0.5s; }
.stagger-item:nth-child(6) { animation-delay: 0.6s; }
.stagger-item:nth-child(7) { animation-delay: 0.7s; }
.stagger-item:nth-child(8) { animation-delay: 0.8s; }

/* ── Text Gradient ─────────────────────────────────────────── */
.text-gradient {
  background: linear-gradient(135deg, var(--color-primary), var(--color-gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Scroll-triggered fade ─────────────────────────────────── */
[data-aos="fade-up-custom"] {
  transform: translateY(40px);
  opacity: 0;
  transition-property: transform, opacity;
}
[data-aos="fade-up-custom"].aos-animate {
  transform: translateY(0);
  opacity: 1;
}

/* ── Swiper Custom Styles ──────────────────────────────────── */
.swiper-pagination-bullet { background: var(--color-gold); opacity: 0.5; }
.swiper-pagination-bullet-active { opacity: 1; width: 24px; border-radius: 4px; }
.swiper-button-next,
.swiper-button-prev {
  width: 48px; height: 48px;
  background: var(--color-gold);
  border-radius: 50%;
  color: white !important;
}
.swiper-button-next::after,
.swiper-button-prev::after { font-size: 1rem !important; font-weight: 900; }
.swiper-button-next:hover,
.swiper-button-prev:hover { background: var(--color-primary); }

/* ── Section Divider Leaf ──────────────────────────────────── */
.section-divider {
  text-align: center;
  line-height: 0;
  margin: -1px 0;
}
.section-divider svg { display: block; width: 100%; }

/* ── Highlight Box ─────────────────────────────────────────── */
.highlight-box {
  background: linear-gradient(135deg, var(--color-accent), #fff);
  border-left: 4px solid var(--color-gold);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 20px 24px;
  font-style: italic;
}

/* ── Timeline (Family Section) ─────────────────────────────── */
.timeline { position: relative; padding-left: 30px; }
.timeline::before {
  content: '';
  position: absolute;
  left: 8px; top: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--color-gold), transparent);
}
.timeline-item { position: relative; margin-bottom: 24px; }
.timeline-item::before {
  content: '';
  position: absolute;
  left: -26px; top: 6px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--color-gold);
  border: 2px solid white;
}
.timeline-year {
  font-family: var(--font-btn); font-size: .75rem; font-weight: 700;
  color: var(--color-gold); text-transform: uppercase; letter-spacing: 1px;
  margin-bottom: 4px;
}
.timeline-text { color: rgba(255,255,255,.75); font-size: .85rem; line-height: 1.6; }

/* ── Decorative Leaf Motion ─────────────────────────────────── */
@keyframes leafGoldSway {
  0%, 100% {
    transform: rotate(-6deg) translate3d(0, 0, 0);
  }
  50% {
    transform: rotate(4deg) translate3d(0, -10px, 0);
  }
}

@keyframes leafGreenSway {
  0%, 100% {
    transform: rotate(5deg) translate3d(0, 0, 0);
  }
  35% {
    transform: rotate(8deg) translate3d(5px, -8px, 0);
  }
  70% {
    transform: rotate(2deg) translate3d(-4px, -4px, 0);
  }
}

@keyframes playLeafGoldSway {
  0%, 100% { transform: rotate(-15deg) translate3d(0, 0, 0); }
  50% { transform: rotate(-10deg) translate3d(0, -5px, 0); }
}

@keyframes playLeafGreenSway {
  0%, 100% { transform: rotate(20deg) translate3d(0, 0, 0); }
  50% { transform: rotate(24deg) translate3d(3px, -4px, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .about-leaf,
  .about-hero-leaf,
  .play-box-leaf {
    animation: none !important;
  }

  .about-leaf-gold,
  .about-hero-leaf--gold {
    transform: rotate(-6deg);
  }

  .about-image-wrap .about-leaf-green,
  .about-hero-leaf--green,
  .about-intro-section .about-leaf-green {
    transform: rotate(5deg);
  }

  .play-box-leaf-gold { transform: rotate(-15deg); }
  .play-box-leaf-green { transform: rotate(20deg); }

  .why-section .feature-card:hover,
  .why-section .feature-card:hover .feature-icon {
    transform: none;
  }

  .why-section .feature-card:hover .feature-icon i {
    animation: none;
  }
}
