/* 
 * Custom CSS for LMS SMKN 3 Soppeng Landing Page
 * Additional styling beyond Tailwind CSS
 */

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

@keyframes wave {
    0% {
        transform: translateX(0) translateZ(0) scaleY(1);
    }
    50% {
        transform: translateX(-25%) translateZ(0) scaleY(0.55);
    }
    100% {
        transform: translateX(-50%) translateZ(0) scaleY(1);
    }
}

/* Fade In Up Animation */
.fade-in-up {
    animation: fadeInUp 1s ease-out;
}

/* Floating Animation */
.floating {
    animation: float 6s ease-in-out infinite;
}

/* Wave Animation for Hero Background */
.wave {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 200%;
    height: 100%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    border-radius: 1000px;
}

.wave1 {
    animation: wave 25s linear infinite;
    z-index: 1;
    opacity: 0.3;
}

.wave2 {
    animation: wave 20s linear infinite;
    z-index: 2;
    opacity: 0.2;
    animation-delay: -5s;
}

.wave3 {
    animation: wave 30s linear infinite;
    z-index: 3;
    opacity: 0.1;
    animation-delay: -2s;
}

/* Navbar Scroll Effect */
#navbar.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* Feature Card Hover Effect */
.feature-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.feature-card:hover {
    transform: translateY(-8px) scale(1.02);
}

/* Counter Animation */
.counter {
    transition: all 0.5s ease-out;
}

/* Stat Item Animation */
.stat-item {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease-out;
}

.stat-item.animated {
    opacity: 1;
    transform: translateY(0);
}

/* Back to Top Button */
#back-to-top {
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease-in-out;
}

#back-to-top.show {
    opacity: 1;
    visibility: visible;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

/* Smooth Transitions for Links */
a {
    transition: all 0.3s ease;
}

/* Mobile Menu Transition */
#mobile-menu {
    transition: all 0.3s ease-in-out;
    max-height: 0;
    overflow: hidden;
}

#mobile-menu.active {
    max-height: 500px;
}

/* Gradient Text Effect */
.gradient-text {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Box Shadow Hover Effect */
.shadow-hover {
    transition: box-shadow 0.3s ease;
}

.shadow-hover:hover {
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

/* Button Pulse Effect */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

.btn-pulse {
    animation: pulse 2s ease-in-out infinite;
}

/* Loading Animation */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading {
    animation: spin 1s linear infinite;
}

/* Responsive Typography */
@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
        line-height: 1.2;
    }
    
    h2 {
        font-size: 1.75rem;
        line-height: 1.3;
    }
    
    h3 {
        font-size: 1.25rem;
        line-height: 1.4;
    }
}

/* Focus Styles for Accessibility */
a:focus,
button:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Selection Color */
::selection {
    background-color: #667eea;
    color: white;
}

::-moz-selection {
    background-color: #667eea;
    color: white;
}

/* Prevent FOUC (Flash of Unstyled Content) */
.no-js {
    opacity: 0;
}

.js {
    opacity: 1;
    transition: opacity 0.3s ease-in;
}

/* Print Styles */
@media print {
    nav,
    footer,
    #back-to-top {
        display: none;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
    }
}

/* Utilities */
.text-shadow {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.backdrop-filter-blur {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Custom Gradients */
.gradient-purple {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.gradient-blue {
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
}

/* Image Optimization */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Lazy Loading Placeholder */
.lazy-loading {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Performance Optimizations */
.gpu-accelerated {
    transform: translateZ(0);
    will-change: transform;
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
