/* ============================================
   PISCINAS INCRÍVEIS — ADVANCED ANIMATIONS CSS
   ============================================ */

/* ── SCROLL PROGRESS BAR ── */
#scrollProgressBar {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background: linear-gradient(90deg, var(--gold-dark), var(--gold), var(--gold-light));
  z-index: 9999;
  transition: width 0.1s linear;
  box-shadow: 0 0 8px rgba(184,150,62,0.6);
}

/* ── PAGE TRANSITION OVERLAY ── */
#pageTransitionOverlay {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, var(--deep) 0%, var(--navy) 100%);
  z-index: 99999;
  transform: scaleY(1);
  transform-origin: bottom;
}

/* ── CURSOR ENHANCEMENTS ── */
.cursor-dot {
  transition: transform 0.1s ease, width 0.3s ease, height 0.3s ease;
}
.cursor-dot.hovering {
  transform: translate(-50%, -50%) scale(1.8);
  background: var(--gold-light);
}
.cursor-dot.clicking {
  transform: translate(-50%, -50%) scale(0.6);
}
.cursor-ring {
  mix-blend-mode: difference;
}

/* ── STAGGER CHILDREN ── */
[data-stagger-child] {
  opacity: 0;
  transform: translateY(25px);
  transition: opacity 0.65s ease, transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
}
[data-stagger-child].stagger-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── SCALE IN ── */
.scale-in {
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.scale-in.visible {
  opacity: 1;
  transform: scale(1);
}

/* ── FADE UP (enhanced) ── */
.fade-in {
  opacity: 0;
  transform: translateY(35px);
  transition: opacity 0.85s ease, transform 0.85s cubic-bezier(0.16, 1, 0.3, 1);
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── SLIDE ANIMATIONS ── */
.slide-left {
  opacity: 0;
  transform: translateX(-50px);
  transition: opacity 0.9s ease, transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}
.slide-left.visible { opacity: 1; transform: translateX(0); }

.slide-right {
  opacity: 0;
  transform: translateX(50px);
  transition: opacity 0.9s ease, transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}
.slide-right.visible { opacity: 1; transform: translateX(0); }

/* ── HERO CANVAS RIPPLE ── */
#heroRippleCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 3;
  pointer-events: all;
  cursor: none;
}

/* ── WATER SHIMMER EFFECT on pool images ── */
.water-shimmer {
  position: relative;
  overflow: hidden;
}
.water-shimmer::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    transparent 0%,
    rgba(255,255,255,0.03) 30%,
    rgba(184,150,62,0.04) 50%,
    transparent 70%
  );
  background-size: 200% 200%;
  animation: shimmerMove 4s ease-in-out infinite;
  pointer-events: none;
}
@keyframes shimmerMove {
  0%, 100% { background-position: 0% 0%; }
  50% { background-position: 100% 100%; }
}

/* ── GOLD LINE DRAW ── */
.line-draw {
  position: relative;
  overflow: hidden;
}
.line-draw::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--gold);
  transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.line-draw:hover::after,
.line-draw.visible::after { width: 100%; }

/* ── FLOATING ANIMATION ── */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}
.float { animation: float 4s ease-in-out infinite; }
.float-delay-1 { animation-delay: 0.5s; }
.float-delay-2 { animation-delay: 1s; }

/* ── SPIN SLOW ── */
@keyframes spinSlow {
  to { transform: rotate(360deg); }
}
.spin-slow { animation: spinSlow 15s linear infinite; }

/* ── PULSE GOLD ── */
@keyframes pulseGold {
  0%, 100% { box-shadow: 0 0 0 0 rgba(184,150,62,0.4); }
  50% { box-shadow: 0 0 0 12px rgba(184,150,62,0); }
}
.pulse-gold { animation: pulseGold 2.5s ease infinite; }

/* ── BREATHING BORDER ── */
@keyframes breathBorder {
  0%, 100% { border-color: rgba(184,150,62,0.2); }
  50% { border-color: rgba(184,150,62,0.6); }
}
.breathe-border { animation: breathBorder 3s ease infinite; }

/* ── IMAGE HOVER ZOOM ── */
.img-hover-zoom {
  overflow: hidden;
}
.img-hover-zoom img {
  transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.img-hover-zoom:hover img {
  transform: scale(1.06);
}

/* ── HORIZONTAL SCROLL GALLERY ── */
.h-scroll-container {
  overflow: hidden;
  position: relative;
}
.h-scroll-track {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 1rem 0 2rem;
}
.h-scroll-track::-webkit-scrollbar { display: none; }
.h-scroll-item {
  flex: 0 0 auto;
  scroll-snap-align: start;
  width: 340px;
  position: relative;
  overflow: hidden;
  border-radius: 4px;
}
.h-scroll-item img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}
.h-scroll-item:hover img { transform: scale(1.05); }
.h-scroll-item-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1.2rem;
  background: linear-gradient(to top, rgba(5,13,20,0.95), transparent);
  transform: translateY(100%);
  transition: transform 0.4s ease;
}
.h-scroll-item:hover .h-scroll-item-overlay { transform: translateY(0); }
.h-scroll-item-label {
  font-family: var(--font-serif);
  font-size: 1rem;
  color: white;
  font-style: italic;
}

/* ── SCROLL INDICATOR DOTS ── */
.scroll-dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
}
.scroll-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--glass-border);
  transition: all 0.3s ease;
  cursor: pointer;
}
.scroll-dot.active {
  width: 24px;
  border-radius: 3px;
  background: var(--gold);
}

/* ── AWARD BADGE ANIMATION ── */
/* ── SECTION REVEAL DECORATIVE LINE ── */
.section-line {
  position: relative;
  padding-top: 2rem;
}
.section-line::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  transition: width 1s ease;
}
.section-line.visible::before { width: 120px; }

/* ── GOLD GLOW TEXT ── */
.glow-text {
  text-shadow:
    0 0 20px rgba(184,150,62,0.3),
    0 0 40px rgba(184,150,62,0.1);
  transition: text-shadow 0.3s ease;
}
.glow-text:hover {
  text-shadow:
    0 0 20px rgba(184,150,62,0.6),
    0 0 40px rgba(184,150,62,0.3);
}

/* ── CARD TILT EFFECT ── */
.tilt-card {
  transform-style: preserve-3d;
  transition: transform 0.15s ease;
}
.tilt-card:hover { transform: perspective(800px) rotateX(3deg) rotateY(-3deg); }

/* ── TYPEWRITER CURSOR ── */
#typewriterText::after {
  content: '|';
  animation: blink 0.8s step-end infinite;
  color: var(--gold);
  margin-left: 2px;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* ── NOISE TEXTURE OVERLAY ── */
.noise-overlay::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  opacity: 0.04;
  pointer-events: none;
  z-index: 1;
}

/* ── DECORATIVE CORNER ── */
.corner-deco {
  position: relative;
}
.corner-deco::before,
.corner-deco::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  border-color: var(--gold);
  border-style: solid;
  opacity: 0.5;
  transition: all 0.3s ease;
}
.corner-deco::before {
  top: -6px;
  left: -6px;
  border-width: 1px 0 0 1px;
}
.corner-deco::after {
  bottom: -6px;
  right: -6px;
  border-width: 0 1px 1px 0;
}
.corner-deco:hover::before,
.corner-deco:hover::after {
  width: 30px;
  height: 30px;
  opacity: 1;
}

/* ── REVEAL CLIP ── */
.clip-reveal {
  clip-path: inset(0 100% 0 0);
  transition: clip-path 1s cubic-bezier(0.16, 1, 0.3, 1);
}
.clip-reveal.visible {
  clip-path: inset(0 0% 0 0);
}

/* ── RESPONSIVE ADJUSTMENTS ── */
@media (max-width: 768px) {
  .h-scroll-item { width: 280px; }
  .h-scroll-item img { height: 200px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .cursor-dot, .cursor-ring { display: none; }
}
