/**
 * Global Solutions - Enhanced Animations & UI/UX
 * Modern animations for better user experience
 */

/* ============================================
   SCROLL ANIMATIONS
   ============================================ */

.animate-on-scroll {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

/* Only hide if JavaScript is enabled and element hasn't been animated yet */
.js-enabled .animate-on-scroll:not(.animated) {
    opacity: 0;
    transform: translateY(30px);
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

.animate-child {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-child.animated {
    opacity: 1;
    transform: translateY(0);
}

/* Fade In Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@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);
    }
}

/* Scale Animations */
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes scaleUp {
    from {
        transform: scale(1);
    }
    to {
        transform: scale(1.05);
    }
}

/* ============================================
   HERO SECTION ENHANCEMENTS
   ============================================ */

.s_cover.parallax {
    transition: transform 0.1s ease-out;
}

.s_cover .container {
    animation: fadeInUp 1s ease-out;
}

.s_cover h1 {
    animation: fadeInUp 1.2s ease-out;
}

.s_cover .lead {
    animation: fadeInUp 1.4s ease-out;
}

.s_cover .btn {
    animation: fadeInUp 1.6s ease-out;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.s_cover .btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 10px 25px rgba(165, 74, 123, 0.4);
}

/* Partner Logos Animation */
.s_references .partner-logo-wrapper-re {
    transition: transform 0.3s ease, opacity 0.3s ease;
    animation: fadeInUp 1.8s ease-out;
}

.s_references .partner-logo-wrapper-re:hover {
    transform: translateY(-5px) scale(1.1);
}

.s_references .partner-logo-wrapper-re img {
    transition: filter 0.3s ease;
}

.s_references .partner-logo-wrapper-re:hover img {
    filter: brightness(1.1);
}

/* ============================================
   ABOUT BOOK SECTION ENHANCEMENTS
   ============================================ */

.about-book {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.js-enabled .about-book:not(.animated) {
    opacity: 0;
    transform: translateY(50px);
}

.about-book.animated {
    opacity: 1;
    transform: translateY(0);
}

.about-page {
    animation: fadeIn 0.5s ease;
}

.about-page.active {
    animation: scaleIn 0.5s ease;
}

.flip-btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.flip-btn:hover {
    transform: scale(1.15) rotate(5deg);
    box-shadow: 0 8px 20px rgba(165, 74, 123, 0.5);
}

.flip-btn:active {
    transform: scale(0.95);
}

/* ============================================
   COUNTERS SECTION ENHANCEMENTS
   ============================================ */

.custom-counters-wrapper {
    animation: fadeInUp 0.8s ease-out;
}

.custom-counters-wrapper .counter-box {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    animation: fadeInUp 0.6s ease-out;
}

.custom-counters-wrapper .counter-box:hover {
    transform: translateY(-8px) scale(1.05);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
    background: rgba(255, 255, 255, 0.12);
}

.custom-counters-wrapper .number {
    transition: transform 0.3s ease;
}

.custom-counters-wrapper .counter-box:hover .number {
    transform: scale(1.1);
}

/* ============================================
   VIDEO SECTION ENHANCEMENTS
   ============================================ */

.video-section-wrapper {
    opacity: 1;
    transition: opacity 0.8s ease-out;
}

.js-enabled .video-section-wrapper:not(.animated) {
    opacity: 0;
}

.video-section-wrapper.animated {
    opacity: 1;
}

.video-text-content {
    animation: fadeInLeft 0.8s ease-out;
}

.video-embed-wrapper {
    animation: fadeInRight 0.8s ease-out;
}

.video-container {
    transition: transform 0.3s ease;
}

.video-container:hover {
    transform: scale(1.02);
}

.button-hover {
    position: relative;
    overflow: hidden;
}

.button-hover::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.button-hover:hover::before {
    width: 300px;
    height: 300px;
}

/* ============================================
   PARTNERS SECTION ENHANCEMENTS
   ============================================ */

.scroll-track {
    position: relative;
}

.scroll-content img {
    transition: transform 0.3s ease, filter 0.3s ease;
    filter: grayscale(0.3);
}

.scroll-content img:hover {
    transform: scale(1.1);
    filter: grayscale(0);
}

/* ============================================
   BUTTON ENHANCEMENTS
   ============================================ */

.btn, .button-hover, .footer-action-btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn::after, .button-hover::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::after, .button-hover:hover::after {
    width: 300px;
    height: 300px;
}

.btn:active, .button-hover:active {
    transform: translateY(0) scale(0.98);
}

/* ============================================
   LOADING STATES
   ============================================ */

/* Removed overflow: hidden to allow scrolling */
body.loading::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--brand-dark-purple), var(--brand-purple));
    z-index: 9999;
    animation: fadeOut 0.5s ease-out 0.3s forwards;
    pointer-events: none;
}

@keyframes fadeOut {
    to {
        opacity: 0;
        visibility: hidden;
    }
}

/* ============================================
   SMOOTH TRANSITIONS
   ============================================ */

* {
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

a, button, .btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

img {
    transition: transform 0.3s ease, filter 0.3s ease;
}

/* ============================================
   NAVBAR ENHANCEMENTS
   ============================================ */

.o_header_standard {
    transition: all 0.3s ease;
}

/* Navigation link styles moved to style.css to avoid conflicts */

/* ============================================
   SHINY TEXT ENHANCEMENT
   ============================================ */

.shiny-text {
    animation: shine 2.5s linear infinite, fadeInUp 1s ease-out;
}

/* ============================================
   RESPONSIVE ANIMATIONS
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

@media (max-width: 768px) {
    .animate-on-scroll {
        transform: translateY(20px);
    }
    
    .video-text-content,
    .video-embed-wrapper {
        animation: fadeInUp 0.6s ease-out;
    }
}

/* ============================================
   MICRO-INTERACTIONS
   ============================================ */

.card, .counter-box, .partner-logo-wrapper-re {
    cursor: pointer;
}

.card:active, .counter-box:active {
    transform: scale(0.98);
}

/* Focus states for accessibility */
.btn:focus-visible,
a:focus-visible {
    outline: 3px solid var(--brand-purple);
    outline-offset: 2px;
}

/* ============================================
   STAGGER ANIMATIONS
   ============================================ */

.animate-stagger > * {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-stagger.animated > *:nth-child(1) { transition-delay: 0.1s; }
.animate-stagger.animated > *:nth-child(2) { transition-delay: 0.2s; }
.animate-stagger.animated > *:nth-child(3) { transition-delay: 0.3s; }
.animate-stagger.animated > *:nth-child(4) { transition-delay: 0.4s; }
.animate-stagger.animated > *:nth-child(5) { transition-delay: 0.5s; }
.animate-stagger.animated > *:nth-child(6) { transition-delay: 0.6s; }

.animate-stagger.animated > * {
    opacity: 1;
    transform: translateY(0);
}


