/* ==========================================================================
   Royal Table - Premium Animations & Micro-interactions
   ========================================================================== */

/* ==========================================================================
   CUSTOM CURSOR
   ========================================================================== */

.cursor-dot {
    width: 8px;
    height: 8px;
    background: var(--gold-light);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 99999;
    transform: translate(-50%, -50%);
    transition: transform 0.1s ease, width 0.2s ease, height 0.2s ease, background 0.2s ease;
    mix-blend-mode: difference;
}

.cursor-outline {
    width: 40px;
    height: 40px;
    border: 2px solid var(--gold-primary);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 99998;
    transform: translate(-50%, -50%);
    transition: transform 0.15s ease-out, width 0.2s ease, height 0.2s ease, border-color 0.2s ease;
    opacity: 0.6;
}

/* Cursor states */
.cursor-hover .cursor-dot {
    transform: translate(-50%, -50%) scale(2);
    background: var(--gold-gradient);
}

.cursor-hover .cursor-outline {
    transform: translate(-50%, -50%) scale(1.5);
    border-color: var(--gold-light);
    opacity: 1;
}

.cursor-click .cursor-dot {
    transform: translate(-50%, -50%) scale(0.5);
}

.cursor-click .cursor-outline {
    transform: translate(-50%, -50%) scale(0.8);
}

/* Hide cursor on mobile */
@media (max-width: 992px) {
    .cursor-dot,
    .cursor-outline {
        display: none !important;
    }
}

/* ==========================================================================
   SMOOTH SCROLL (Lenis overrides)
   ========================================================================== */

html.lenis,
html.lenis body {
    height: auto;
}

.lenis.lenis-smooth {
    scroll-behavior: auto !important;
}

.lenis.lenis-smooth [data-lenis-prevent] {
    overscroll-behavior: contain;
}

.lenis.lenis-stopped {
    overflow: hidden;
}

.lenis.lenis-scrolling iframe {
    pointer-events: none;
}

/* ==========================================================================
   MAGNETIC BUTTONS
   ========================================================================== */

.magnetic-btn {
    position: relative;
    transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

.magnetic-btn::before {
    content: '';
    position: absolute;
    inset: -10px;
    z-index: -1;
}

/* ==========================================================================
   RIPPLE EFFECT
   ========================================================================== */

.ripple-btn {
    position: relative;
    overflow: hidden;
}

.ripple-btn .ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    transform: scale(0);
    animation: ripple-animation 0.6s linear;
    pointer-events: none;
}

@keyframes ripple-animation {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* ==========================================================================
   TILT CARD ENHANCEMENTS
   ========================================================================== */

.tilt-card {
    transform-style: preserve-3d;
    will-change: transform;
}

.tilt-card .card-icon,
.tilt-card .event-card-icon,
.tilt-card .card-title,
.tilt-card h3,
.tilt-card h4 {
    transform: translateZ(30px);
}

.tilt-card .card-text,
.tilt-card p {
    transform: translateZ(20px);
}

.tilt-card .event-card-btn,
.tilt-card .btn {
    transform: translateZ(40px);
}

/* Glare effect from vanilla-tilt */
.js-tilt-glare {
    border-radius: inherit;
}

/* ==========================================================================
   TEXT ANIMATIONS
   ========================================================================== */

/* Split text animation */
.split-text {
    overflow: hidden;
}

.split-text .char {
    display: inline-block;
    opacity: 0;
    transform: translateY(100%);
    animation: char-reveal 0.5s ease forwards;
}

@keyframes char-reveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Text gradient animation */
.text-gradient-animate {
    background: linear-gradient(90deg,
        var(--gold-dark) 0%,
        var(--gold-light) 25%,
        var(--gold-pale) 50%,
        var(--gold-light) 75%,
        var(--gold-dark) 100%
    );
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient-shift 3s linear infinite;
}

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

/* ==========================================================================
   COUNTER ANIMATIONS
   ========================================================================== */

.counter {
    position: relative;
}

.counter::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 60px;
    height: 2px;
    background: var(--gold-gradient);
    transition: transform 0.6s ease;
}

.counter.counted::after {
    transform: translateX(-50%) scaleX(1);
}

/* ==========================================================================
   HOVER EFFECTS
   ========================================================================== */

/* Image hover zoom */
.hover-zoom {
    overflow: hidden;
}

.hover-zoom img {
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.hover-zoom:hover img {
    transform: scale(1.1);
}

/* Card hover lift */
.hover-lift {
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1),
                box-shadow 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.hover-lift:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

/* Icon rotate on hover */
.hover-rotate-icon:hover .card-icon i,
.hover-rotate-icon:hover .event-card-icon i {
    animation: icon-rotate 0.6s ease;
}

@keyframes icon-rotate {
    0% { transform: rotateY(0deg); }
    100% { transform: rotateY(360deg); }
}

/* ==========================================================================
   SCROLL INDICATOR ANIMATION
   ========================================================================== */

.scroll-indicator {
    animation: scroll-bounce 2s ease-in-out infinite;
}

@keyframes scroll-bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-20px);
    }
    60% {
        transform: translateX(-50%) translateY(-10px);
    }
}

.scroll-indicator::before {
    content: '';
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 20px;
    background: var(--gold-gradient);
    animation: scroll-line 2s ease-in-out infinite;
}

@keyframes scroll-line {
    0%, 100% { height: 20px; opacity: 1; }
    50% { height: 30px; opacity: 0.5; }
}

/* ==========================================================================
   LOADING ANIMATIONS
   ========================================================================== */

/* Page loader */
.page-loader {
    position: fixed;
    inset: 0;
    background: var(--bg-primary);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.page-loader.loaded {
    opacity: 0;
    visibility: hidden;
}

.loader-crown {
    width: 80px;
    height: 80px;
    animation: loader-pulse 1.5s ease-in-out infinite;
}

@keyframes loader-pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

/* Skeleton loading */
.skeleton {
    background: linear-gradient(90deg,
        var(--bg-tertiary) 25%,
        var(--bg-card) 50%,
        var(--bg-tertiary) 75%
    );
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ==========================================================================
   STAGGER ANIMATIONS (for AOS enhancement)
   ========================================================================== */

[data-aos="stagger-fade"] {
    opacity: 0;
    transform: translateY(30px);
    transition-property: opacity, transform;
}

[data-aos="stagger-fade"].aos-animate {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================================
   PARALLAX EFFECTS
   ========================================================================== */

.parallax-bg {
    will-change: transform;
}

.parallax-element {
    will-change: transform;
    transition: transform 0.1s linear;
}

/* ==========================================================================
   GOLD SHINE EFFECT
   ========================================================================== */

.gold-shine {
    position: relative;
    overflow: hidden;
}

.gold-shine::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 45%,
        rgba(232, 213, 163, 0.3) 50%,
        transparent 55%
    );
    transform: rotate(45deg) translateX(-100%);
    transition: transform 0.6s ease;
}

.gold-shine:hover::after {
    transform: rotate(45deg) translateX(100%);
}

/* ==========================================================================
   FLOATING ANIMATION
   ========================================================================== */

.float {
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.float-slow {
    animation: float 8s ease-in-out infinite;
}

.float-fast {
    animation: float 4s ease-in-out infinite;
}

/* ==========================================================================
   PULSE GLOW
   ========================================================================== */

.pulse-glow {
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(184, 134, 11, 0.3);
    }
    50% {
        box-shadow: 0 0 40px rgba(184, 134, 11, 0.6);
    }
}

/* ==========================================================================
   NAVBAR SCROLL ANIMATION
   ========================================================================== */

.navbar {
    transition: background 0.3s ease,
                padding 0.3s ease,
                box-shadow 0.3s ease,
                transform 0.3s ease;
}

.navbar.scrolled {
    background: rgba(13, 13, 13, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.navbar.nav-hidden {
    transform: translateY(-100%);
}

/* ==========================================================================
   WHATSAPP BUTTON ANIMATION
   ========================================================================== */

.whatsapp-float {
    animation: whatsapp-pulse 2s ease-in-out infinite;
}

@keyframes whatsapp-pulse {
    0%, 100% {
        box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    }
    50% {
        box-shadow: 0 4px 40px rgba(37, 211, 102, 0.6);
    }
}

.whatsapp-float::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid #25D366;
    animation: whatsapp-ring 2s ease-in-out infinite;
    opacity: 0;
}

@keyframes whatsapp-ring {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

/* ==========================================================================
   SECTION TRANSITIONS
   ========================================================================== */

section {
    position: relative;
}

section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg,
        transparent,
        var(--gold-primary) 20%,
        var(--gold-light) 50%,
        var(--gold-primary) 80%,
        transparent
    );
    opacity: 0.2;
}

/* ==========================================================================
   MENU MODAL ANIMATIONS
   ========================================================================== */

.menu-modal {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.menu-modal.active .menu-modal-content {
    animation: modal-slide-in 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

@keyframes modal-slide-in {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.menu-item {
    transition: transform 0.3s ease,
                border-color 0.3s ease,
                background 0.3s ease;
}

.menu-item:hover {
    transform: translateY(-5px);
}

/* ==========================================================================
   FOOTER ANIMATIONS
   ========================================================================== */

.footer-social a {
    transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1),
                box-shadow 0.3s ease;
}

.footer-social a:hover {
    transform: translateY(-5px) scale(1.1);
}

/* ==========================================================================
   RESPONSIVE ANIMATIONS
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .cursor-dot,
    .cursor-outline {
        display: none !important;
    }
}

@media (max-width: 768px) {
    /* Reduce animations on mobile for performance */
    .tilt-card {
        transform: none !important;
    }

    [data-tilt] {
        transform: none !important;
    }

    .parallax-element,
    .parallax-bg {
        transform: none !important;
    }
}
