/* ============================================
   FOTATEK - Advanced Animations CSS
   3D + Parallax + Smooth Reveals
   ============================================ */

/* ===== Scroll Progress Bar ===== */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, #5CC8F5, #A78BFA, #2E8BD8);
    background-size: 200% 100%;
    z-index: 9999;
    width: 0%;
    transition: width 0.1s ease;
    box-shadow: 0 0 15px rgba(92, 200, 245, 0.6);
    animation: progressGradient 3s linear infinite;
}
@keyframes progressGradient {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

/* ===== Custom Cursor ===== */
.custom-cursor {
    position: fixed;
    width: 12px;
    height: 12px;
    background: #5CC8F5;
    border-radius: 50%;
    pointer-events: none;
    z-index: 99999;
    mix-blend-mode: difference;
    transition: transform 0.15s ease, width 0.3s, height 0.3s, background 0.3s;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 20px rgba(92, 200, 245, 0.8);
}
.custom-cursor-ring {
    position: fixed;
    width: 40px;
    height: 40px;
    border: 1.5px solid rgba(92, 200, 245, 0.5);
    border-radius: 50%;
    pointer-events: none;
    z-index: 99998;
    transition: transform 0.3s ease, width 0.4s, height 0.4s, border-color 0.3s;
    transform: translate(-50%, -50%);
}
.custom-cursor.cursor-hover {
    width: 24px;
    height: 24px;
    background: #A78BFA;
}
.custom-cursor-ring.cursor-hover {
    width: 70px;
    height: 70px;
    border-color: rgba(167, 139, 250, 0.6);
}
@media (max-width: 992px) {
    .custom-cursor, .custom-cursor-ring { display: none; }
}

/* ===== Floating Particles Background ===== */
.particles-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
}
.particle {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(92, 200, 245, 0.6), transparent);
    animation: floatParticle linear infinite;
    opacity: 0;
}
@keyframes floatParticle {
    0% {
        transform: translateY(100vh) translateX(0) scale(0);
        opacity: 0;
    }
    10% {
        opacity: 0.8;
        transform: translateY(90vh) scale(1);
    }
    90% {
        opacity: 0.8;
    }
    100% {
        transform: translateY(-10vh) translateX(100px) scale(0.5);
        opacity: 0;
    }
}

/* ===== Hero 3D Tilt + Parallax ===== */
.hero-v5 {
    perspective: 1500px;
}
.hero-v5-content {
    transform-style: preserve-3d;
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}
.hero-v5-title {
    transform-style: preserve-3d;
}
.hero-v5-title .accent {
    background: linear-gradient(135deg, #5CC8F5, #A78BFA, #5CC8F5) !important;
    background-size: 200% 200% !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
    animation: gradientShift 4s ease infinite;
    display: inline-block;
}
@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Parallax slides */
.hero-slide {
    transition: opacity 1.2s ease, transform 0.4s ease-out !important;
    will-change: transform;
}
.hero-slide.active {
    transform: scale(1.05);
}

/* Hero Badge floating */
.hero-v5-badge {
    animation: badgeFloat 3s ease-in-out infinite;
}
@keyframes badgeFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

/* Hero buttons hover boost */
.hero-v5-btns .btn-p {
    position: relative;
    overflow: hidden;
}
.hero-v5-btns .btn-p::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}
.hero-v5-btns .btn-p:hover::before {
    width: 350px;
    height: 350px;
}
.hero-v5-btns .btn-p i {
    transition: transform 0.3s ease;
}
.hero-v5-btns .btn-p:hover i {
    transform: translateX(6px);
}

/* ===== Reveal on Scroll ===== */
.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.8s cubic-bezier(0.23, 1, 0.32, 1),
                transform 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}
.reveal-left {
    opacity: 0;
    transform: translateX(-60px);
    transition: opacity 0.9s cubic-bezier(0.23, 1, 0.32, 1),
                transform 0.9s cubic-bezier(0.23, 1, 0.32, 1);
}
.reveal-left.visible {
    opacity: 1;
    transform: translateX(0);
}
.reveal-right {
    opacity: 0;
    transform: translateX(60px);
    transition: opacity 0.9s cubic-bezier(0.23, 1, 0.32, 1),
                transform 0.9s cubic-bezier(0.23, 1, 0.32, 1);
}
.reveal-right.visible {
    opacity: 1;
    transform: translateX(0);
}
.reveal-scale {
    opacity: 0;
    transform: scale(0.85);
    transition: opacity 0.8s cubic-bezier(0.23, 1, 0.32, 1),
                transform 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}
.reveal-scale.visible {
    opacity: 1;
    transform: scale(1);
}
.reveal-3d {
    opacity: 0;
    transform: perspective(1000px) rotateX(25deg) translateY(50px);
    transition: opacity 1s cubic-bezier(0.23, 1, 0.32, 1),
                transform 1s cubic-bezier(0.23, 1, 0.32, 1);
}
.reveal-3d.visible {
    opacity: 1;
    transform: perspective(1000px) rotateX(0) translateY(0);
}

/* ===== Service Cards 3D Tilt ===== */
.svc-card {
    transform-style: preserve-3d;
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1),
                box-shadow 0.4s ease;
    position: relative;
    overflow: hidden;
}
.svc-card::before {
    content: '';
    position: absolute;
    top: var(--mouse-y, 50%);
    left: var(--mouse-x, 50%);
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(92, 200, 245, 0.25), transparent 70%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    z-index: 0;
}
.svc-card:hover::before {
    opacity: 1;
}
.svc-card:hover {
    box-shadow: 0 25px 60px rgba(92, 200, 245, 0.25);
}
.svc-card > * {
    position: relative;
    z-index: 1;
}
.svc-card-icon {
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.svc-card:hover .svc-card-icon {
    transform: translateZ(30px) rotate(360deg) scale(1.15);
}
.svc-card-title,
.svc-card-desc {
    transition: transform 0.4s ease;
}
.svc-card:hover .svc-card-title {
    transform: translateZ(20px);
}
.svc-card:hover .svc-card-desc {
    transform: translateZ(10px);
}
.svc-card-arrow {
    transition: transform 0.3s ease;
}
.svc-card:hover .svc-card-arrow {
    transform: translateZ(15px) translateX(8px);
}

/* ===== Tech Marquee 3D ===== */
.tech-marquee-track {
    perspective: 1000px;
}
.tech-marquee-item {
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.tech-marquee-item:hover {
    transform: translateY(-8px) rotateY(15deg) scale(1.1);
}
.tech-marquee-item:hover .tmi {
    box-shadow: 0 15px 40px rgba(92, 200, 245, 0.4);
}
.tech-marquee-wrap:hover .tech-marquee-track {
    animation-play-state: paused;
}

/* ===== Content Rows Parallax ===== */
.cr-image {
    overflow: hidden;
    position: relative;
}
.cr-image img {
    transition: transform 0.8s cubic-bezier(0.23, 1, 0.32, 1) !important;
    will-change: transform;
}
.cr-image::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent 30%, rgba(92, 200, 245, 0.15) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform 0.8s ease;
    pointer-events: none;
}
.cr-image:hover::after {
    transform: translateX(100%);
}
.cr-image:hover img {
    transform: scale(1.12) !important;
}
.cr-btn {
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
}
.cr-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #2E8BD8, #5CC8F5);
    transition: left 0.4s ease;
    z-index: -1;
}
.cr-btn:hover::before {
    left: 0;
}
.cr-btn:hover {
    border-color: transparent;
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(46, 139, 216, 0.4);
}
.cr-btn i {
    transition: transform 0.3s ease;
}
.cr-btn:hover i {
    transform: translateX(5px);
}

/* ===== Portfolio 3D Cards ===== */
.portfolio-card-slider {
    transform-style: preserve-3d;
    transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}
.portfolio-image-slider {
    overflow: hidden;
    position: relative;
}
.portfolio-image-slider img {
    transition: transform 0.8s cubic-bezier(0.23, 1, 0.32, 1) !important;
    will-change: transform;
}
.portfolio-card-slider:hover .portfolio-image-slider img {
    transform: scale(1.15) !important;
}
.portfolio-overlay-slider {
    transition: all 0.4s ease !important;
    backdrop-filter: blur(0px);
}
.portfolio-card-slider:hover .portfolio-overlay-slider {
    backdrop-filter: blur(2px);
}
.overlay-btn {
    transform: translateY(30px);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.1s;
}
.portfolio-card-slider:hover .overlay-btn {
    transform: translateY(0);
    opacity: 1;
}
.portfolio-title-slider {
    transition: color 0.3s ease;
}
.portfolio-card-slider:hover .portfolio-title-slider {
    color: #5CC8F5;
}

/* ===== Filter Buttons ===== */
.filter-btn {
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
}
.filter-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: linear-gradient(135deg, #5CC8F5, #A78BFA);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.5s, height 0.5s;
    z-index: -1;
}
.filter-btn:hover::before,
.filter-btn.active::before {
    width: 300px;
    height: 300px;
}

/* ===== Stats Counter ===== */
.stat-card {
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform-style: preserve-3d;
}
.stat-card:hover {
    transform: translateY(-12px) rotateX(5deg);
}
.stat-icon {
    animation: statPulse 2.5s ease-in-out infinite;
    transition: transform 0.4s ease;
}
.stat-card:hover .stat-icon {
    animation: statShake 0.5s ease;
    transform: scale(1.2);
}
@keyframes statPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(92, 200, 245, 0.4);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 15px rgba(92, 200, 245, 0);
    }
}
@keyframes statShake {
    0%, 100% { transform: scale(1.2) rotate(0); }
    25% { transform: scale(1.2) rotate(-10deg); }
    75% { transform: scale(1.2) rotate(10deg); }
}
.stat-number {
    background: linear-gradient(135deg, #5CC8F5, #A78BFA);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== Stats Background Grid ===== */
.stats-section {
    position: relative;
    overflow: hidden;
}
.stats-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(92, 200, 245, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(92, 200, 245, 0.08) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: gridMove 20s linear infinite;
    pointer-events: none;
    opacity: 0.5;
}
@keyframes gridMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

/* ===== Testimonials Float ===== */
.testimonial-card {
    transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    animation: cardFloat 6s ease-in-out infinite;
}
.testimonial-card:nth-child(2) { animation-delay: 1.5s; }
.testimonial-card:nth-child(3) { animation-delay: 3s; }
.testimonial-card:hover {
    animation-play-state: paused;
    transform: translateY(-10px) scale(1.02);
}
@keyframes cardFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}
.testimonial-rating i {
    display: inline-block;
    animation: starPop 0.5s ease backwards;
}
.testimonial-card.visible .testimonial-rating i:nth-child(1) { animation-delay: 0.1s; }
.testimonial-card.visible .testimonial-rating i:nth-child(2) { animation-delay: 0.2s; }
.testimonial-card.visible .testimonial-rating i:nth-child(3) { animation-delay: 0.3s; }
.testimonial-card.visible .testimonial-rating i:nth-child(4) { animation-delay: 0.4s; }
.testimonial-card.visible .testimonial-rating i:nth-child(5) { animation-delay: 0.5s; }
@keyframes starPop {
    0% { transform: scale(0) rotate(-180deg); opacity: 0; }
    100% { transform: scale(1) rotate(0); opacity: 1; }
}

/* ===== Section Headers ===== */
.section-title {
    position: relative;
    display: inline-block;
}
.section-subtitle {
    position: relative;
    display: inline-block;
    overflow: hidden;
}
.section-subtitle::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #5CC8F5, transparent);
    animation: sublineMove 3s ease-in-out infinite;
}
@keyframes sublineMove {
    0%, 100% { transform: translateX(-100%); }
    50% { transform: translateX(100%); }
}

/* ===== Contact Section ===== */
.contact-item {
    transition: transform 0.4s ease;
}
.contact-item:hover {
    transform: translateX(10px);
}
.contact-icon {
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.contact-item:hover .contact-icon {
    transform: rotate(360deg) scale(1.1);
}
.contact-map {
    overflow: hidden;
    transition: transform 0.5s ease;
}
.contact-map:hover {
    transform: scale(1.02);
}

/* ===== Footer Social Icons 3D ===== */
.social-icon {
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
    transform-style: preserve-3d;
}
.social-icon:hover {
    transform: translateY(-8px) rotateY(360deg) !important;
    box-shadow: 0 10px 25px rgba(92, 200, 245, 0.4);
}
.footer-links a {
    transition: all 0.3s ease;
    display: inline-block;
}
.footer-links a:hover {
    transform: translateX(8px);
    color: #5CC8F5 !important;
}
.footer-links a i {
    transition: transform 0.3s ease;
}
.footer-links a:hover i {
    transform: rotate(90deg);
}

/* ===== Floating Action Buttons ===== */
.whatsapp-float,
.support-float {
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
    animation: btnPulse 2s ease-in-out infinite;
}
.support-float {
    animation-delay: 1s;
}
.whatsapp-float:hover,
.support-float:hover {
    transform: scale(1.15) rotate(15deg) !important;
    animation-play-state: paused;
}
@keyframes btnPulse {
    0%, 100% {
        box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    }
    50% {
        box-shadow: 0 4px 25px rgba(37, 211, 102, 0.7), 0 0 0 12px rgba(37, 211, 102, 0);
    }
}

/* ===== Header Scroll Effect ===== */
.header {
    transition: all 0.4s ease !important;
}
.header.scrolled {
    background: rgba(12, 30, 53, 0.95) !important;
    backdrop-filter: blur(20px);
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.3);
}
.nav-links a {
    position: relative;
    transition: color 0.3s ease !important;
}
.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #5CC8F5, #A78BFA);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}
.nav-links a:hover::after,
.nav-links a.active::after {
    width: 80%;
}

/* ===== Logo Hover ===== */
.logo {
    transition: transform 0.4s ease;
    display: inline-block;
}
.logo:hover {
    transform: scale(1.05);
}
.logo img {
    transition: filter 0.4s ease;
}
.logo:hover img {
    filter: drop-shadow(0 0 15px rgba(92, 200, 245, 0.6));
}

/* ===== Stagger Children Animation ===== */
.stagger-children > * {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.stagger-children.visible > *:nth-child(1) { transition-delay: 0.1s; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(2) { transition-delay: 0.2s; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(3) { transition-delay: 0.3s; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(4) { transition-delay: 0.4s; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(5) { transition-delay: 0.5s; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(6) { transition-delay: 0.6s; opacity: 1; transform: translateY(0); }

/* ===== Glow Pulse for Accent Elements ===== */
@keyframes accentGlow {
    0%, 100% { filter: drop-shadow(0 0 5px rgba(92, 200, 245, 0.3)); }
    50% { filter: drop-shadow(0 0 20px rgba(92, 200, 245, 0.6)); }
}

/* ===== Smooth Scroll Behavior ===== */
html {
    scroll-behavior: smooth;
}

/* ===== Reduced Motion Accessibility ===== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ===== Mobile Optimizations ===== */
@media (max-width: 768px) {
    .particles-bg { display: none; }
    .stats-section::before { background-size: 30px 30px; }
    .svc-card:hover .svc-card-icon { transform: scale(1.1) rotate(360deg); }
    .testimonial-card { animation: none; }
}