/* ============================================
   SNOP School Portal - Animations
   ============================================ */

/* === Scroll Reveal Animations === */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}
.reveal.active {
    opacity: 1;
    transform: translateY(0);
}
.reveal-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}
.reveal-left.active {
    opacity: 1;
    transform: translateX(0);
}
.reveal-right {
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}
.reveal-right.active {
    opacity: 1;
    transform: translateX(0);
}
.reveal-scale {
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.reveal-scale.active {
    opacity: 1;
    transform: scale(1);
}

/* === Hero Slideshow === */
.hero-slideshow {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
}
.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1.2s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
}
.hero-slide.active {
    opacity: 1;
}
.hero-slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.85), rgba(30, 64, 175, 0.9));
}
.hero-slide:nth-child(1)::before {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.85), rgba(15, 23, 42, 0.9));
}
.hero-slide:nth-child(2)::before {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.85), rgba(6, 78, 59, 0.9));
}
.hero-slide:nth-child(3)::before {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.85), rgba(120, 53, 15, 0.9));
}
.hero-slide:nth-child(4)::before {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.85), rgba(55, 48, 163, 0.9));
}
.hero-slide-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
    max-width: 800px;
    padding: 0 20px;
}
.hero-slide-content h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    animation: fadeInUp 1s ease;
}
.hero-slide-content p {
    font-size: 1.3rem;
    margin-bottom: 30px;
    opacity: 0.95;
    animation: fadeInUp 1s ease 0.2s both;
}
.hero-slide-content .btn {
    animation: fadeInUp 1s ease 0.4s both;
}

/* === Slideshow Indicators === */
.slideshow-indicators {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    gap: 12px;
}
.slideshow-indicators .dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: rgba(255,255,255,0.4);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid rgba(255,255,255,0.6);
}
.slideshow-indicators .dot.active {
    background: white;
    transform: scale(1.2);
    box-shadow: 0 0 10px rgba(255,255,255,0.5);
}

/* === Stats Counter Slideshow === */
.stats-slideshow {
    position: relative;
    overflow: hidden;
    min-height: 120px;
}
.stats-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    transition: opacity 0.8s ease;
    display: flex;
    justify-content: center;
    gap: 60px;
    flex-wrap: wrap;
}
.stats-slide.active {
    opacity: 1;
}

/* === Features Slideshow === */
.features-slideshow {
    position: relative;
    overflow: hidden;
    min-height: 300px;
}
.features-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    transition: opacity 0.8s ease, transform 0.8s ease;
    transform: translateY(20px);
}
.features-slide.active {
    opacity: 1;
    transform: translateY(0);
}

/* === Testimonials Slideshow === */
.testimonial-slideshow {
    position: relative;
    overflow: hidden;
    min-height: 200px;
}
.testimonial-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    transition: opacity 0.8s ease;
}
.testimonial-slide.active {
    opacity: 1;
}

/* === Typewriter Effect === */
.typewriter {
    display: inline-block;
    border-right: 3px solid white;
    animation: blink 0.7s step-end infinite;
    overflow: hidden;
    white-space: nowrap;
}

/* === Keyframe Animations === */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}
@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.5);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}
@keyframes blink {
    from, to { border-color: transparent; }
    50% { border-color: white; }
}
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}
@keyframes spin {
    to { transform: rotate(360deg); }
}
@keyframes slideInFromBottom {
    from { transform: translateY(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
@keyframes countUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}
@keyframes gradientMove {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* === Utility Animation Classes === */
.animate-fade-in { animation: fadeInUp 0.6s ease both; }
.animate-fade-in-down { animation: fadeInDown 0.6s ease both; }
.animate-fade-in-left { animation: fadeInLeft 0.6s ease both; }
.animate-fade-in-right { animation: fadeInRight 0.6s ease both; }
.animate-scale-in { animation: scaleIn 0.5s ease both; }
.animate-pulse { animation: pulse 2s infinite; }
.animate-float { animation: float 3s ease-in-out infinite; }
.animate-spin { animation: spin 1s linear infinite; }

/* Stagger delays */
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }
.delay-6 { animation-delay: 0.6s; }

/* === Loading Spinner === */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.9);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease;
}
.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255,255,255,0.2);
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* === Toast Notifications === */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 16px 24px;
    border-radius: 12px;
    color: white;
    font-weight: 500;
    z-index: 10000;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideInFromBottom 0.5s ease;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    max-width: 400px;
}
.toast:hover {
    transform: translateX(-5px);
}
.toast-success { background: linear-gradient(135deg, #10b981, #059669); }
.toast-error { background: linear-gradient(135deg, #ef4444, #dc2626); }
.toast-info { background: linear-gradient(135deg, #2563eb, #1d4ed8); }
.toast-warning { background: linear-gradient(135deg, #f59e0b, #d97706); }
.toast i { font-size: 1.2rem; }

/* === Smooth Page Transitions === */
.page-content {
    animation: fadeInUp 0.5s ease both;
}

/* === Hover Effects === */
.hover-lift {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.12);
}

/* === Card Hover Glow === */
.hover-glow:hover {
    box-shadow: 0 0 30px rgba(37, 99, 235, 0.15);
    border-color: rgba(37, 99, 235, 0.3);
}

/* === Parallax Sections === */
.parallax-section {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    position: relative;
}
.parallax-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.9), rgba(15, 23, 42, 0.95));
}

/* === Responsive Animations === */
@media (max-width: 768px) {
    .hero-slide-content h1 { font-size: 2rem; }
    .hero-slide-content p { font-size: 1rem; }
    .stats-slide { gap: 20px; }
}
