/* 
 * ملف التأثيرات الحركية والبصرية لموقع مهام لتقنية المعلومات
 * تم إنشاؤه بتاريخ: 27 مايو 2025
 */

/* ===== تأثيرات الظهور والحركة ===== */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.animated {
    opacity: 1;
    transform: translateY(0);
}

.slide-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.slide-up.animated {
    opacity: 1;
    transform: translateY(0);
}

.slide-right {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.slide-right.animated {
    opacity: 1;
    transform: translateX(0);
}

.slide-left {
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.slide-left.animated {
    opacity: 1;
    transform: translateX(0);
}

.zoom-in {
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.zoom-in.animated {
    opacity: 1;
    transform: scale(1);
}

/* تأخير متسلسل للعناصر المتعددة */
.delay-100 { transition-delay: 0.1s; }
.delay-200 { transition-delay: 0.2s; }
.delay-300 { transition-delay: 0.3s; }
.delay-400 { transition-delay: 0.4s; }
.delay-500 { transition-delay: 0.5s; }

/* ===== تأثيرات التحويم ===== */
.hover-lift {
    transition: transform 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-10px);
}

.hover-scale {
    transition: transform 0.3s ease;
}

.hover-scale:hover {
    transform: scale(1.05);
}

.hover-shadow {
    transition: box-shadow 0.3s ease;
}

.hover-shadow:hover {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* ===== تأثيرات الأزرار ===== */
.btn-pulse {
    position: relative;
    overflow: hidden;
}

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

.btn-pulse:hover:after {
    width: 300%;
    height: 300%;
}

.btn-ripple {
    position: relative;
    overflow: hidden;
}

.btn-ripple .ripple {
    position: absolute;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.4);
    transform: scale(0);
    animation: ripple 0.6s linear;
}

@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* ===== تأثيرات الصور ===== */
.img-zoom {
    overflow: hidden;
}

.img-zoom img {
    transition: transform 0.5s ease;
}

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

.img-rotate {
    overflow: hidden;
}

.img-rotate img {
    transition: transform 0.5s ease;
}

.img-rotate:hover img {
    transform: rotate(5deg) scale(1.1);
}

.img-grayscale {
    filter: grayscale(100%);
    transition: filter 0.5s ease;
}

.img-grayscale:hover {
    filter: grayscale(0%);
}

/* ===== تأثيرات النص ===== */
.text-gradient {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}

.text-shadow {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.text-glow {
    text-shadow: 0 0 10px rgba(0, 86, 179, 0.5);
}

/* ===== تأثيرات الخلفية ===== */
.bg-gradient {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

.bg-gradient-light {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
}

.bg-pattern {
    background-color: #ffffff;
    background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%230056b3' fill-opacity='0.05' fill-rule='evenodd'%3E%3Ccircle cx='3' cy='3' r='3'/%3E%3Ccircle cx='13' cy='13' r='3'/%3E%3C/g%3E%3C/svg%3E");
}

/* ===== تأثيرات البطاقات ===== */
.card-3d {
    transition: transform 0.5s ease;
    transform-style: preserve-3d;
}

.card-3d:hover {
    transform: rotateY(5deg) rotateX(5deg);
}

.card-border {
    position: relative;
    border: 1px solid transparent;
    background-clip: padding-box;
}

.card-border:before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: -1;
    margin: -1px;
    border-radius: inherit;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card-border:hover:before {
    opacity: 1;
}

/* ===== تأثيرات الشريط المتحرك ===== */
.marquee {
    white-space: nowrap;
    overflow: hidden;
}

.marquee-content {
    display: inline-block;
    animation: marquee 20s linear infinite;
}

@keyframes marquee {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

/* ===== تأثيرات العد التصاعدي ===== */
.counter-animation {
    display: inline-block;
    position: relative;
}

.counter-animation:after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 1.5s ease;
}

.counter-animation.animated:after {
    width: 100%;
}

/* ===== تأثيرات الشكل المتموج ===== */
.wave-top {
    position: relative;
    padding-top: 100px;
}

.wave-top:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120' preserveAspectRatio='none'%3E%3Cpath d='M321.39,56.44c58-10.79,114.16-30.13,172-41.86,82.39-16.72,168.19-17.73,250.45-.39C823.78,31,906.67,72,985.66,92.83c70.05,18.48,146.53,26.09,214.34,3V0H0V27.35A600.21,600.21,0,0,0,321.39,56.44Z' fill='%23ffffff'/%3E%3C/svg%3E");
    background-size: cover;
    background-position: center bottom;
}

.wave-bottom {
    position: relative;
    padding-bottom: 100px;
}

.wave-bottom:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120' preserveAspectRatio='none'%3E%3Cpath d='M321.39,56.44c58-10.79,114.16-30.13,172-41.86,82.39-16.72,168.19-17.73,250.45-.39C823.78,31,906.67,72,985.66,92.83c70.05,18.48,146.53,26.09,214.34,3V120H0V27.35A600.21,600.21,0,0,0,321.39,56.44Z' fill='%23ffffff'/%3E%3C/svg%3E");
    background-size: cover;
    background-position: center top;
    transform: rotate(180deg);
}

/* ===== تأثيرات الشريط الجانبي ===== */
.sidebar-highlight {
    position: relative;
    padding-left: 15px;
}

.sidebar-highlight:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 0;
    background-color: var(--primary-color);
    transition: height 0.3s ease;
}

.sidebar-highlight:hover:before {
    height: 100%;
}

/* ===== تأثيرات القائمة ===== */
.menu-underline .nav-link {
    position: relative;
}

.menu-underline .nav-link:after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.menu-underline .nav-link:hover:after,
.menu-underline .nav-link.active:after {
    width: 100%;
}

/* ===== تأثيرات الأيقونات ===== */
.icon-spin {
    transition: transform 0.5s ease;
}

.icon-spin:hover {
    transform: rotate(360deg);
}

.icon-bounce {
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

/* ===== تأثيرات الخلفية المتحركة ===== */
.bg-parallax {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

/* ===== تأثيرات التحميل ===== */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-dots {
    display: inline-flex;
}

.loading-dots span {
    width: 8px;
    height: 8px;
    margin: 0 3px;
    background-color: var(--primary-color);
    border-radius: 50%;
    animation: dots 1.4s ease-in-out infinite;
}

.loading-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.loading-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes dots {
    0%, 100% { transform: scale(0.2); opacity: 0.2; }
    50% { transform: scale(1); opacity: 1; }
}

/* ===== تأثيرات الشرائح ===== */
.slide-fade {
    opacity: 0;
    transition: opacity 0.5s ease;
}

.slide-fade.active {
    opacity: 1;
}

/* ===== تأثيرات الخلفية المتدرجة المتحركة ===== */
.bg-gradient-animated {
    background: linear-gradient(-45deg, #0056b3, #00a8e8, #0056b3, #00a8e8);
    background-size: 400% 400%;
    animation: gradient 15s ease infinite;
}

@keyframes gradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ===== تأثيرات الكتابة ===== */
.typing-effect {
    overflow: hidden;
    border-right: 2px solid var(--primary-color);
    white-space: nowrap;
    margin: 0 auto;
    animation: typing 3.5s steps(40, end), blink-caret 0.75s step-end infinite;
}

@keyframes typing {
    from { width: 0 }
    to { width: 100% }
}

@keyframes blink-caret {
    from, to { border-color: transparent }
    50% { border-color: var(--primary-color) }
}
