﻿/* ==========================================================================
   custom-animations.css
   انیمیشن‌ها و جلوه‌های پویای اضافه شده برای سایت رهپویان فیدار آپادانا
   این فایل را بعد از main.css در <head> لینک کنید:
   <link href="~/assets/css/custom-animations.css" rel="stylesheet">
   ========================================================================== */

/* ---------- 1) نوار پیشرفت اسکرول بالای صفحه ---------- */
.scroll-progress-bar {
    position: fixed;
    top: 0;
    right: 0;
    height: 4px;
    width: 0%;
    background: linear-gradient(90deg, #2c4964, #47b2e4);
    z-index: 9999;
    transition: width 0.1s ease-out;
}

/* ---------- 2) هدر: افکت شیشه‌ای هنگام اسکرول ---------- */
#header {
    transition: background-color 0.4s ease, box-shadow 0.4s ease, padding 0.3s ease;
}

    #header.scrolled {
        background-color: rgba(15, 20, 30, 0.85) !important;
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
        padding-top: 6px;
        padding-bottom: 6px;
    }

/* ---------- 3) لینک‌های منو: زیرخط متحرک ---------- */
.navmenu ul li a {
    position: relative;
}

    .navmenu ul li a::after {
        content: "";
        position: absolute;
        right: 0;
        bottom: -4px;
        width: 0;
        height: 2px;
        background: currentColor;
        transition: width 0.3s ease;
    }

    .navmenu ul li a:hover::after,
    .navmenu ul li a.active::after {
        width: 100%;
    }

/* ---------- 4) دکمه‌ها: افکت درخشش + ریپل ---------- */
.btn-getstarted,
.cta-btn,
form button[type="submit"] {
    position: relative;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

    .btn-getstarted:hover,
    .cta-btn:hover,
    form button[type="submit"]:hover {
        transform: translateY(-3px);
        box-shadow: 0 8px 20px rgba(71, 178, 228, 0.35);
    }

.ripple-effect {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    transform: scale(0);
    animation: ripple-anim 0.6s linear;
    pointer-events: none;
}

@keyframes ripple-anim {
    to {
        transform: scale(3);
        opacity: 0;
    }
}

/* ---------- 5) آیکون‌باکس‌های هیرو: شناور و درخشان ---------- */
.hero .icon-box {
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

    .hero .icon-box:hover {
        transform: translateY(-8px) scale(1.05);
    }

    .hero .icon-box i {
        transition: transform 0.4s ease, color 0.4s ease;
    }

    .hero .icon-box:hover i {
        transform: rotate(8deg) scale(1.15);
    }

@keyframes float-y {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.hero .icon-box {
    animation: float-y 4s ease-in-out infinite;
}

.hero .col-xl-2:nth-child(2) .icon-box {
    animation-delay: 0.3s;
}

.hero .col-xl-2:nth-child(3) .icon-box {
    animation-delay: 0.6s;
}

.hero .col-xl-2:nth-child(4) .icon-box {
    animation-delay: 0.9s;
}

.hero .col-xl-2:nth-child(5) .icon-box {
    animation-delay: 1.2s;
}

/* ---------- 6) کارت‌های سرویس: تیلت سه‌بعدی + سایه پویا ---------- */
.service-item {
    transition: transform 0.35s ease, box-shadow 0.35s ease;
    transform-style: preserve-3d;
    will-change: transform;
}

    .service-item:hover {
        box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
    }

    .service-item .icon {
        transition: transform 0.4s ease;
    }

    .service-item:hover .icon {
        transform: scale(1.15) rotate(-6deg);
    }

/* ---------- 7) تصاویر نمونه‌کار: زوم نرم ---------- */
.portfolio-item img {
    transition: transform 0.5s ease;
    overflow: hidden;
}

.portfolio-item {
    overflow: hidden;
    border-radius: 8px;
}

    .portfolio-item:hover img {
        transform: scale(1.08);
    }

/* ---------- 8) کارت تیم: چرخش ملایم لوگوهای اجتماعی ---------- */
.team-member .social a {
    transition: transform 0.3s ease, background-color 0.3s ease;
}

    .team-member .social a:hover {
        transform: translateY(-4px) rotate(6deg);
    }

/* ---------- 9) شمارنده‌های آماری: پالس هنگام ورود به دید ---------- */
@keyframes pulse-in {
    0% {
        transform: scale(0.85);
        opacity: 0;
    }

    60% {
        transform: scale(1.05);
        opacity: 1;
    }

    100% {
        transform: scale(1);
    }
}

.stats-item.in-view span.purecounter {
    animation: pulse-in 0.6s ease forwards;
}

/* ---------- 10) بک‌گراند پارتیکل هیرو ---------- */
#hero-particles {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

#hero.hero {
    position: relative;
    overflow: hidden;
}

/* ---------- 11) دکمه اسکرول‌تاپ: پالس ---------- */
.scroll-top {
    transition: transform 0.3s ease, background-color 0.3s ease;
}

    .scroll-top:hover {
        transform: translateY(-5px) scale(1.1);
    }

/* ---------- 12) افکت تایپینگ برای عنوان هیرو ---------- */
.hero h2 .typing-cursor {
    display: inline-block;
    width: 2px;
    margin-inline-start: 3px;
    background: currentColor;
    animation: blink-cursor 0.8s step-end infinite;
}

@keyframes blink-cursor {
    50% {
        opacity: 0;
    }
}

/* ---------- 13) کاهش انیمیشن برای کاربرانی که ترجیح می‌دهند حرکت کمتر ببینند ---------- */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}body {
}
