/* ============================================
   IMAGE ANIMATIONS - Modern 2026 Effects
   ============================================ */

/* Base Animation Setup */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }

    100% {
        background-position: 1000px 0;
    }
}

@keyframes rotate3D {
    0% {
        transform: perspective(1000px) rotateY(0deg);
    }

    100% {
        transform: perspective(1000px) rotateY(360deg);
    }
}

@keyframes glowPulse {

    0%,
    100% {
        box-shadow: 0 0 20px rgba(56, 189, 248, 0.3);
    }

    50% {
        box-shadow: 0 0 40px rgba(56, 189, 248, 0.6);
    }
}

/* ============================================
   HERO IMAGE ANIMATIONS
   ============================================ */

.hero-visual img {
    animation: fadeInRight 1s ease-out 0.3s both;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.hero-visual:hover img {
    transform: scale(1.05) rotate(2deg);
}

.hero-card {
    animation: scaleIn 0.8s ease-out 0.5s both;
    position: relative;
    overflow: hidden;
}

/* Floating animation for hero card */
.hero-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg,
            transparent 30%,
            rgba(255, 255, 255, 0.1) 50%,
            transparent 70%);
    animation: shimmer 3s infinite;
    pointer-events: none;
}

/* Stats animation */
.stat-item {
    animation: fadeInUp 0.6s ease-out both;
    transition: transform 0.3s ease;
}

.stat-item:nth-child(1) {
    animation-delay: 0.7s;
}

.stat-item:nth-child(2) {
    animation-delay: 0.9s;
}

.stat-item:nth-child(3) {
    animation-delay: 1.1s;
}

.stat-item:hover {
    transform: translateY(-5px) scale(1.05);
}

/* ============================================
   ABOUT SECTION IMAGE
   ============================================ */

.product-visual-wrapper {
    animation: fadeInLeft 1s ease-out both;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
}

.product-visual-wrapper img {
    transition: transform 0.6s ease;
}

.product-visual-wrapper:hover {
    transform: perspective(1000px) rotateY(-5deg) scale(1.05) !important;
    box-shadow: 0 0 80px rgba(56, 189, 248, 0.4) !important;
}

.product-visual-wrapper:hover img {
    transform: scale(1.1);
}

/* Hologram effect animation */
.hologram-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg,
            transparent 0%,
            rgba(56, 189, 248, 0.1) 50%,
            transparent 100%);
    animation: float 4s ease-in-out infinite;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-visual-wrapper:hover .hologram-overlay {
    opacity: 1;
}

/* ============================================
   SERVICE CARDS
   ============================================ */

.service-card {
    animation: fadeInUp 0.6s ease-out both;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(56, 189, 248, 0.1),
            transparent);
    transition: left 0.5s ease;
}

.service-card:hover::before {
    left: 100%;
}

.service-card:nth-child(1) {
    animation-delay: 0.1s;
}

.service-card:nth-child(2) {
    animation-delay: 0.2s;
}

.service-card:nth-child(3) {
    animation-delay: 0.3s;
}

.service-card:nth-child(4) {
    animation-delay: 0.4s;
}

.service-card:nth-child(5) {
    animation-delay: 0.5s;
}

.service-card:nth-child(6) {
    animation-delay: 0.6s;
}

.service-card:hover {
    transform: translateY(-10px) scale(1.02);
}

.service-icon {
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.service-card:hover .service-icon {
    transform: scale(1.3) rotate(10deg);
}

/* ============================================
   PRODUCT CARDS
   ============================================ */

.product-card {
    animation: scaleIn 0.6s ease-out both;
    transition: all 0.4s ease;
    position: relative;
}

.product-card:nth-child(1) {
    animation-delay: 0.2s;
}

.product-card:nth-child(2) {
    animation-delay: 0.4s;
}

.product-card:nth-child(3) {
    animation-delay: 0.6s;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.product-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #38bdf8, #a78bfa);
    transform: scaleX(0);
    transition: transform 0.4s ease;
    transform-origin: left;
}

.product-card:hover::after {
    transform: scaleX(1);
}

/* ============================================
   CLIENT LOGOS
   ============================================ */

.client-logo {
    animation: fadeInUp 0.5s ease-out both;
    transition: all 0.3s ease;
}

.client-logo:nth-child(1) {
    animation-delay: 0.05s;
}

.client-logo:nth-child(2) {
    animation-delay: 0.1s;
}

.client-logo:nth-child(3) {
    animation-delay: 0.15s;
}

.client-logo:nth-child(4) {
    animation-delay: 0.2s;
}

.client-logo:nth-child(5) {
    animation-delay: 0.25s;
}

.client-logo:nth-child(6) {
    animation-delay: 0.3s;
}

.client-logo:nth-child(7) {
    animation-delay: 0.35s;
}

.client-logo:nth-child(8) {
    animation-delay: 0.4s;
}

.client-logo:nth-child(9) {
    animation-delay: 0.45s;
}

.client-logo:nth-child(10) {
    animation-delay: 0.5s;
}

.client-logo:nth-child(11) {
    animation-delay: 0.55s;
}

.client-logo:nth-child(12) {
    animation-delay: 0.6s;
}

.client-logo:nth-child(13) {
    animation-delay: 0.65s;
}

.client-logo img {
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    filter: grayscale(100%) opacity(0.6);
}

.client-logo:hover img {
    filter: grayscale(0%) opacity(1);
    transform: scale(1.15) rotate(3deg);
}

.client-logo:hover {
    transform: translateY(-5px);
}

/* ============================================
   BLOG CARD IMAGE
   ============================================ */

.blog-card {
    animation: fadeInUp 0.8s ease-out both;
    transition: all 0.4s ease;
    overflow: hidden;
}

.blog-card-image {
    overflow: hidden;
    position: relative;
}

.blog-card-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg,
            rgba(56, 189, 248, 0.3),
            rgba(167, 139, 250, 0.3));
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 1;
}

.blog-card:hover .blog-card-image::before {
    opacity: 1;
}

.blog-card-image img {
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.blog-card:hover .blog-card-image img {
    transform: scale(1.15) rotate(2deg);
}

/* ============================================
   EXPERTISE CARDS
   ============================================ */

.expertise-card {
    animation: scaleIn 0.6s ease-out both;
    transition: all 0.3s ease;
}

.expertise-card:nth-child(1) {
    animation-delay: 0.3s;
}

.expertise-card:nth-child(2) {
    animation-delay: 0.5s;
}

.expertise-card:hover {
    transform: translateY(-5px) scale(1.03);
    box-shadow: 0 10px 30px rgba(56, 189, 248, 0.2);
}

.icon-emoji {
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.expertise-card:hover .icon-emoji {
    transform: scale(1.4) rotate(15deg);
}

/* ============================================
   SCROLL-TRIGGERED ANIMATIONS
   ============================================ */

/* Add this class via JavaScript when elements enter viewport */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* ============================================
   LOGO ANIMATION
   ============================================ */

.brand img {
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.brand:hover img {
    transform: scale(1.1);
}

/* ============================================
   BACKGROUND PATTERN ANIMATION
   ============================================ */

.bg-pattern {
    animation: float 20s ease-in-out infinite;
    opacity: 0.03;
}

/* ============================================
   BUTTON ANIMATIONS
   ============================================ */

.btn-primary,
.btn-outline {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-primary::before,
.btn-outline::before {
    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 ease, height 0.6s ease;
}

.btn-primary:hover::before,
.btn-outline:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary:hover,
.btn-outline:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(56, 189, 248, 0.3);
}

/* ============================================
   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;
    }
}

/* ============================================
   PERFORMANCE OPTIMIZATIONS
   ============================================ */

.hero-visual,
.product-visual-wrapper,
.service-card,
.product-card,
.client-logo,
.blog-card {
    will-change: transform;
}

/* Remove will-change after animation completes to save memory */
@media (hover: hover) {

    .hero-visual:not(:hover),
    .product-visual-wrapper:not(:hover),
    .service-card:not(:hover),
    .product-card:not(:hover),
    .client-logo:not(:hover),
    .blog-card:not(:hover) {
        will-change: auto;
    }
}

/* ============================================
   MOBILE OPTIMIZATIONS
   ============================================ */

@media (max-width: 768px) {

    /* Reduce animation intensity on mobile for better performance */
    .hero-visual:hover img,
    .product-visual-wrapper:hover img {
        transform: scale(1.02);
    }

    .service-card:hover,
    .product-card:hover {
        transform: translateY(-5px);
    }

    /* Disable complex animations on mobile */
    .hero-card::after,
    .hologram-overlay {
        display: none;
    }
}

/* ============================================
   DARK MODE SUPPORT
   ============================================ */

@media (prefers-color-scheme: dark) {
    .client-logo img {
        filter: grayscale(100%) opacity(0.4) brightness(1.2);
    }

    .client-logo:hover img {
        filter: grayscale(0%) opacity(1) brightness(1);
    }
}