/* =============================================
   WEBENSI - Animations Stylesheet
   ============================================= */

/* ---- Keyframes ---- */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(40px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.85);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes scrollBounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(10px);
    }
}

@keyframes pulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(30, 144, 255, 0.4);
    }

    50% {
        box-shadow: 0 0 0 12px rgba(30, 144, 255, 0);
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-12px);
    }
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

@keyframes rotateSlow {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

@keyframes counterUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }

    50% {
        opacity: 1;
        transform: scale(1.05);
    }

    70% {
        transform: scale(0.95);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes typewriter {
    from {
        width: 0;
    }

    to {
        width: 100%;
    }
}

@keyframes blink {

    0%,
    100% {
        border-color: transparent;
    }

    50% {
        border-color: var(--accent);
    }
}

@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 1;
    }

    100% {
        transform: scale(4);
        opacity: 0;
    }
}

@keyframes waveFloat {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    33% {
        transform: translateY(-8px) rotate(1deg);
    }

    66% {
        transform: translateY(4px) rotate(-1deg);
    }
}

@keyframes glow {

    0%,
    100% {
        box-shadow: 0 0 12px rgba(30, 144, 255, 0.3);
    }

    50% {
        box-shadow: 0 0 30px rgba(30, 144, 255, 0.6);
    }
}

/* ---- Hero Animations ---- */
.animate-fade-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 0.8s forwards;
}

.delay-1 {
    animation-delay: 0.2s;
}

.delay-2 {
    animation-delay: 0.4s;
}

.delay-3 {
    animation-delay: 0.6s;
}

.delay-4 {
    animation-delay: 0.8s;
}

.delay-5 {
    animation-delay: 1s;
}

/* Slide active state triggers animations */
.slide.active .animate-fade-up {
    animation-play-state: running;
}

.slide:not(.active) .animate-fade-up {
    animation-play-state: paused;
    opacity: 0;
    transform: translateY(30px);
}

/* ---- AOS - Scroll Animations (handled via JS) ---- */
[data-aos] {
    opacity: 0;
    transition: opacity 0.7s ease, transform 0.7s ease;
}

[data-aos="fade-up"] {
    transform: translateY(40px);
}

[data-aos="fade-down"] {
    transform: translateY(-40px);
}

[data-aos="fade-left"] {
    transform: translateX(40px);
}

[data-aos="fade-right"] {
    transform: translateX(-40px);
}

[data-aos="zoom-in"] {
    transform: scale(0.85);
}

[data-aos="zoom-out"] {
    transform: scale(1.15);
}

[data-aos].aos-animate {
    opacity: 1;
    transform: none;
}

/* ---- Floating Elements ---- */
.float-anim {
    animation: float 4s ease-in-out infinite;
}

.float-anim-d1 {
    animation: float 4.5s ease-in-out 0.5s infinite;
}

.float-anim-d2 {
    animation: float 5s ease-in-out 1s infinite;
}

/* ---- Pulse on CTAs ---- */
.btn-primary:focus,
.wa-float {
    animation: pulse 2.5s infinite;
}

/* ---- Shimmer Loading Effect ---- */
.shimmer {
    background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

/* ---- Page Transition ---- */
.page-enter {
    animation: fadeIn 0.5s ease forwards;
}

/* ---- Card Reveal ---- */
.card-reveal {
    animation: slideInUp 0.6s ease forwards;
}

/* ---- Stat Counter ---- */
.stat-item.counting .stat-number {
    animation: counterUp 0.5s ease forwards;
}

/* ---- Hero decorative shapes ---- */
.hero-shape {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.hero-shape-1 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(30, 144, 255, 0.1), transparent 70%);
    top: 10%;
    right: 5%;
    animation: waveFloat 8s ease-in-out infinite;
}

.hero-shape-2 {
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(255, 107, 0, 0.07), transparent 70%);
    bottom: 15%;
    right: 20%;
    animation: waveFloat 6s ease-in-out 2s infinite;
}

.hero-shape-3 {
    width: 120px;
    height: 120px;
    border: 2px solid rgba(30, 144, 255, 0.12);
    border-radius: 50%;
    top: 30%;
    right: 10%;
    animation: rotateSlow 20s linear infinite;
}

/* ---- Gradient animated background utility ---- */
.grad-animate {
    background-size: 200% 200%;
    animation: gradientShift 6s ease infinite;
}

/* ---- Glow effects ---- */
.glow-blue {
    animation: glow 3s ease-in-out infinite;
}

.glow-btn:hover {
    animation: glow 1.5s ease-in-out infinite;
}

/* ---- Ripple effect on buttons ---- */
.ripple-container {
    position: relative;
    overflow: hidden;
}

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

/* ---- Typewriter ---- */
.typewriter-wrap {
    display: inline-block;
    overflow: hidden;
    white-space: nowrap;
    border-right: 3px solid var(--accent);
    animation: typewriter 3s steps(40, end) forwards, blink 0.75s step-end infinite;
}

/* ---- Nav underline hover ---- */
.nav-link::after {
    content: '';
    display: block;
    height: 2px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
    margin-top: 2px;
    border-radius: 2px;
}

.nav-link:not(.btn-book):hover::after,
.nav-link.active::after {
    transform: scaleX(1);
}

/* ---- Preloader ---- */
#preloader {
    position: fixed;
    inset: 0;
    background: var(--primary);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

#preloader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-logo {
    font-family: 'Poppins', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
}

.loader-logo span {
    color: #1E90FF;
}

.loader-bar {
    width: 200px;
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.loader-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--orange));
    border-radius: 3px;
    animation: loaderAnim 1.8s ease forwards;
    width: 0%;
}

@keyframes loaderAnim {
    0% {
        width: 0%;
    }

    60% {
        width: 70%;
    }

    100% {
        width: 100%;
    }
}

/* Reduced motion accessibility */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}