/**
 * GSAP Animations CSS
 *
 * These classes set initial states for GSAP animations
 * to prevent flash of unstyled content (FOUC)
 *
 * @package NCSONO
 */

/* ====================
   Initial States (to prevent FOUC)
   ==================== */

/* Fade Up - Start from bottom */
.gsap-fade-up {
    opacity: 0;
    transform: translateY(60px);
    will-change: transform, opacity;
}

/* Fade Left - Start from left */
.gsap-fade-left {
    opacity: 0;
    transform: translateX(-60px);
    will-change: transform, opacity;
}

/* Fade Right - Start from right */
.gsap-fade-right {
    opacity: 0;
    transform: translateX(60px);
    will-change: transform, opacity;
}

/* Fade In - Simple opacity */
.gsap-fade-in {
    opacity: 0;
    will-change: opacity;
}

/* Scale Up - Start smaller */
.gsap-scale-up {
    opacity: 0;
    transform: scale(0.8);
    will-change: transform, opacity;
}

/* Rotate In - Start rotated */
.gsap-rotate-in {
    opacity: 0;
    transform: rotate(-10deg);
    will-change: transform, opacity;
}

/* Stagger Children - Initial state */
.gsap-stagger-children > * {
    opacity: 0;
    transform: translateY(40px);
    will-change: transform, opacity;
}

/* ====================
   Data Attributes for Delays
   ==================== */

/* Optional: Add visual feedback for delayed elements */
[data-delay] {
    /* You can add custom styles for delayed elements if needed */
}

/* ====================
   Swiper Custom Styles (NCSONO Brand)
   ==================== */

/* Custom pagination bullets */
.swiper-pagination-bullet {
    background: #d1d5db !important; /* gray-300 */
    opacity: 1 !important;
    width: 12px;
    height: 12px;
    transition: all 0.3s ease;
}

.swiper-pagination-bullet-active {
    background: #5D3EF6 !important; /* primary-500 */
    width: 32px;
    border-radius: 6px;
}

/* Custom navigation buttons */
.swiper-button-next,
.swiper-button-prev {
    width: 44px !important;
    height: 44px !important;
    background: #1a1a1a !important; /* dark-500 */
    color: white !important;
    border-radius: 10px !important;
    transition: all 0.3s ease;
}

.swiper-button-next:after,
.swiper-button-prev:after {
    font-size: 20px !important;
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
    background: #5D3EF6 !important; /* primary-500 */
    transform: scale(1.1);
}

.swiper-button-next.swiper-button-disabled,
.swiper-button-prev.swiper-button-disabled {
    opacity: 0.35 !important;
    cursor: not-allowed;
}

/* Container padding for navigation buttons */
.swiper {
    padding-left: 50px;
    padding-right: 50px;
}

@media (max-width: 768px) {
    .swiper {
        padding-left: 20px;
        padding-right: 20px;
    }

    .swiper-button-next,
    .swiper-button-prev {
        width: 36px !important;
        height: 36px !important;
    }

    .swiper-button-next:after,
    .swiper-button-prev:after {
        font-size: 16px !important;
    }
}

/* Hero Swiper specific styles */
.swiper-hero {
    padding: 0 !important;
}

.swiper-hero .swiper-button-next,
.swiper-hero .swiper-button-prev {
    background: rgba(26, 26, 26, 0.8) !important;
}

.swiper-hero .swiper-pagination-bullet {
    background: white !important;
}

.swiper-hero .swiper-pagination-bullet-active {
    background: #5D3EF6 !important;
}

/* Logo carousel - remove padding */
.swiper-logos {
    padding: 0 !important;
}

/* ====================
   Utility Classes
   ==================== */

/* Use this class to disable animations on specific elements */
.no-animate {
    opacity: 1 !important;
    transform: none !important;
}

/* Use this class to force animations to run once */
.animate-once {
    /* Handled by ScrollTrigger toggleActions */
}

/* ====================
   Loading State
   ==================== */

/* Optional: Show a loading state for animated content */
.gsap-loading {
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gsap-loading::after {
    content: '';
    width: 40px;
    height: 40px;
    border: 4px solid #f3f4f6;
    border-top-color: #5D3EF6;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ====================
   Reduced Motion Support
   ==================== */

/* Respect user's reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    .gsap-fade-up,
    .gsap-fade-left,
    .gsap-fade-right,
    .gsap-fade-in,
    .gsap-scale-up,
    .gsap-rotate-in,
    .gsap-stagger-children > * {
        opacity: 1 !important;
        transform: none !important;
        animation: none !important;
        transition: none !important;
    }

    .swiper-button-next,
    .swiper-button-prev {
        transition: none !important;
    }

    .swiper-pagination-bullet {
        transition: none !important;
    }
}
