/* ========================================
   PREMIUM ANIMATIONS & EFFECTS
   Heritage International School
   ======================================== */

/* ========================================
   1. SCROLL REVEAL ANIMATIONS
   ======================================== */

/* Base Transition for Animated Elements */
.fade-in-up,
.fade-in,
.slide-in-left,
.slide-in-right,
.zoom-in,
.scale-in {
    opacity: 0;
    transition: opacity 0.8s cubic-bezier(0.25, 1, 0.5, 1),
        transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
    will-change: opacity, transform;
}

/* Fade Up (Standard Content Entrance) */
.fade-in-up {
    transform: translateY(40px);
}

.fade-in-up.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Fade In (Simple) */
.fade-in {
    opacity: 0;
}

.fade-in.is-visible {
    opacity: 1;
}

/* Slide In Left */
.slide-in-left {
    transform: translateX(-60px);
}

.slide-in-left.is-visible {
    opacity: 1;
    transform: translateX(0);
}

/* Slide In Right */
.slide-in-right {
    transform: translateX(60px);
}

.slide-in-right.is-visible {
    opacity: 1;
    transform: translateX(0);
}

/* Zoom In / Scale In */
.zoom-in,
.scale-in {
    transform: scale(0.9);
}

.zoom-in.is-visible,
.scale-in.is-visible {
    opacity: 1;
    transform: scale(1);
}

/* Stagger Delays for Sequential Animations */
.delay-100 {
    transition-delay: 100ms;
}

.delay-200 {
    transition-delay: 200ms;
}

.delay-300 {
    transition-delay: 300ms;
}

.delay-400 {
    transition-delay: 400ms;
}

.delay-500 {
    transition-delay: 500ms;
}

.delay-600 {
    transition-delay: 600ms;
}

.delay-700 {
    transition-delay: 700ms;
}

.delay-800 {
    transition-delay: 800ms;
}


/* ========================================
   2. FLOATING & HOVER ANIMATIONS
   ======================================== */

/* Floating Animation */
@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-15px);
    }
}

.floating {
    animation: float 4s ease-in-out infinite;
}

/* Gentle Float (Subtle) */
@keyframes floatGentle {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-8px);
    }
}

.float-gentle {
    animation: floatGentle 3s ease-in-out infinite;
}

/* Pulse Animation */
@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.05);
        opacity: 0.9;
    }
}

.pulse {
    animation: pulse 2s ease-in-out infinite;
}

/* Subtle Pulse */
@keyframes pulseSubtle {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.02);
    }
}

.pulse-subtle {
    animation: pulseSubtle 3s ease-in-out infinite;
}


/* ========================================
   3. GRADIENT ANIMATIONS
   ======================================== */

/* Animated Gradient Background */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.gradient-animated {
    background-size: 200% 200%;
    animation: gradientShift 8s ease infinite;
}

/* Shimmer Effect */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }

    100% {
        background-position: 1000px 0;
    }
}

.shimmer {
    background: linear-gradient(90deg,
            transparent 0%,
            rgba(255, 255, 255, 0.2) 50%,
            transparent 100%);
    background-size: 1000px 100%;
    animation: shimmer 3s infinite;
}


/* ========================================
   4. BUTTON & CTA ANIMATIONS
   ======================================== */

/* Button Hover Lift */
.btn-hover-lift {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-hover-lift:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.btn-hover-lift:active {
    transform: translateY(-1px);
}

/* Button Ripple Effect */
@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 1;
    }

    100% {
        transform: scale(4);
        opacity: 0;
    }
}

.btn-ripple {
    position: relative;
    overflow: hidden;
}

.btn-ripple::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-ripple:active::after {
    width: 300px;
    height: 300px;
}

/* Glow Effect */
@keyframes glow {

    0%,
    100% {
        box-shadow: 0 0 5px rgba(255, 153, 0, 0.5),
            0 0 10px rgba(255, 153, 0, 0.3);
    }

    50% {
        box-shadow: 0 0 20px rgba(255, 153, 0, 0.8),
            0 0 30px rgba(255, 153, 0, 0.5);
    }
}

.glow {
    animation: glow 2s ease-in-out infinite;
}


/* ========================================
   5. CARD ANIMATIONS
   ======================================== */

/* Card Hover Lift with Shadow - SIMPLIFIED for school website */
.card-hover-lift {
    transition: all 0.3s ease;
}

.card-hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

/* Removed 3D tilt - too flashy for educational website */

/* Card Shine Effect */
@keyframes cardShine {
    0% {
        left: -100%;
    }

    100% {
        left: 100%;
    }
}

.card-shine {
    position: relative;
    overflow: hidden;
}

.card-shine::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.2),
            transparent);
    transition: left 0.6s;
}

.card-shine:hover::before {
    left: 100%;
}


/* ========================================
   6. LOADING & SKELETON ANIMATIONS
   ======================================== */

/* Skeleton Loading */
@keyframes skeleton {
    0% {
        background-position: -200px 0;
    }

    100% {
        background-position: calc(200px + 100%) 0;
    }
}

.skeleton {
    background: linear-gradient(90deg,
            #f0f0f0 0px,
            #e0e0e0 40px,
            #f0f0f0 80px);
    background-size: 200px 100%;
    animation: skeleton 1.5s infinite;
}

/* Spinner */
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.spinner {
    animation: spin 1s linear infinite;
}


/* ========================================
   7. TEXT ANIMATIONS
   ======================================== */

/* Typing Effect */
@keyframes typing {
    from {
        width: 0;
    }

    to {
        width: 100%;
    }
}

.typing {
    overflow: hidden;
    white-space: nowrap;
    border-right: 2px solid;
    animation: typing 3s steps(40, end);
}

/* Text Gradient Animation */
@keyframes textGradient {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

.text-gradient-animated {
    background: linear-gradient(90deg,
            var(--primary-blue),
            var(--accent-gold),
            var(--primary-blue));
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: textGradient 3s ease infinite;
}

/* Underline Expand */
.underline-expand {
    position: relative;
    display: inline-block;
}

.underline-expand::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--accent-gold);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.underline-expand:hover::after {
    width: 100%;
}


/* ========================================
   8. BACKGROUND ANIMATIONS
   ======================================== */

/* Animated Background Orbs */
@keyframes orbFloat1 {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(30px, -30px) scale(1.1);
    }

    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }
}

@keyframes orbFloat2 {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(-40px, 30px) scale(0.9);
    }

    66% {
        transform: translate(20px, -20px) scale(1.1);
    }
}

@keyframes orbFloat3 {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(0, -40px) scale(1.05);
    }
}

.ambient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.3;
    pointer-events: none;
}

.orb-1 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--accent-gold), transparent);
    top: 10%;
    right: 10%;
    animation: orbFloat1 20s ease-in-out infinite;
}

.orb-2 {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, var(--primary-blue-light), transparent);
    bottom: 20%;
    left: 15%;
    animation: orbFloat2 25s ease-in-out infinite;
}

.orb-3 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, var(--accent-orange), transparent);
    top: 50%;
    left: 50%;
    animation: orbFloat3 15s ease-in-out infinite;
}

/* Particle Effect */
@keyframes particleFloat {
    0% {
        transform: translateY(0) translateX(0);
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        transform: translateY(-100vh) translateX(50px);
        opacity: 0;
    }
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--accent-gold);
    border-radius: 50%;
    animation: particleFloat 10s linear infinite;
}


/* ========================================
   9. ICON ANIMATIONS
   ======================================== */

/* Icon Bounce */
@keyframes iconBounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.icon-bounce:hover {
    animation: iconBounce 0.6s ease;
}

/* Icon Rotate */
@keyframes iconRotate {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.icon-rotate:hover {
    animation: iconRotate 0.6s ease;
}

/* Icon Pulse */
.icon-pulse:hover {
    animation: pulse 0.6s ease;
}


/* ========================================
   10. SCROLL PROGRESS INDICATOR
   ======================================== */

@keyframes progressBar {
    from {
        width: 0%;
    }
}

.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-gold), var(--accent-orange));
    z-index: 9999;
    animation: progressBar 1s ease-out;
}


/* ========================================
   11. PARALLAX EFFECTS
   ======================================== */

.parallax-slow {
    transform: translateY(var(--parallax-offset-slow, 0));
    transition: transform 0.1s ease-out;
}

.parallax-medium {
    transform: translateY(var(--parallax-offset-medium, 0));
    transition: transform 0.1s ease-out;
}

.parallax-fast {
    transform: translateY(var(--parallax-offset-fast, 0));
    transition: transform 0.1s ease-out;
}


/* ========================================
   12. SMOOTH SCROLL
   ======================================== */

html {
    scroll-behavior: smooth;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary-blue), var(--accent-gold));
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--primary-blue-dark), var(--accent-orange));
}


/* ========================================
   13. RESPONSIVE ANIMATIONS
   ======================================== */

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Disable complex animations on mobile for performance */
@media (max-width: 768px) {

    .parallax-slow,
    .parallax-medium,
    .parallax-fast {
        transform: none !important;
    }

    .ambient-orb {
        display: none;
    }

    .particle {
        display: none;
    }
}