/* --- إعدادات أساسية وخطوط --- */
html {
    scroll-behavior: smooth;
    overflow-x: hidden; /* ضروري جداً لمنع الحركة العرضية */
}

body {
    font-family: 'Cairo', sans-serif;
    background-color: #fffffe;
}

/* --- ألوان الهوية --- */
:root {
    --brand-purple: #4C1D95;
    --brand-purple-light: #6D28D9;
    --brand-gold: #FFC72C;
    --brand-magenta: #C71585;
}

.bg-brand-purple { background-color: var(--brand-purple); }
.text-brand-purple { color: var(--brand-purple); }
.border-brand-purple { border-color: var(--brand-purple); }
.hover\:bg-brand-purple-light:hover { background-color: var(--brand-purple-light); }
.bg-brand-gold { background-color: var(--brand-gold); }
.text-brand-gold { color: var(--brand-gold); }
.border-brand-gold { border-color: var(--brand-gold); }
.text-brand-magenta { color: var(--brand-magenta); }

/* =========================================
   ⭐️⭐️⭐️ قسم الحركات (مُحسن وقوي) ⭐️⭐️⭐️
   ========================================= */

/* الإعدادات العامة للحركة */
.fade-in-up, .fade-in-right, .fade-in-left {
    opacity: 0;
    /* ⭐️ تم تعديل التوقيت والمنحنى لحركة أقوى وأكثر سلاسة ⭐️ */
    transition: opacity 1.2s ease-out, transform 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.fade-in {
    opacity: 0;
    transition: opacity 1.5s ease-in;
}

/* --- إعدادات الشاشات الكبيرة (كمبيوتر وتابلت) --- */
@media (min-width: 768px) {
    /* ⭐️ زيادة المسافة لتقوية التأثير البصري ⭐️ */
    .fade-in-up { transform: translateY(150px); }
    .fade-in-right { transform: translateX(150px); }
    .fade-in-left { transform: translateX(-150px); }
}

/* --- ⭐️⭐️⭐️ إعدادات الجوال (تحويل كل الحركات لتكون من الأسفل فقط) ⭐️⭐️⭐️ --- */
/* هذا يمنع اهتزاز الشاشة عرضياً في الجوال */
@media (max-width: 767px) {
    .fade-in-up, .fade-in-right, .fade-in-left {
        transform: translateY(60px); /* ⭐️ زيادة المسافة قليلاً في الجوال لتكون أوضح */
    }
}

/* أنيميشن الهيرو */
@keyframes appear {
    from { opacity: 0; transform: translateY(50px); }
    to { opacity: 1; transform: translateY(0); }
}
.animate-on-load {
    animation: appear 1.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* كلاس التفعيل */
.is-visible {
    opacity: 1;
    transform: translate(0) !important;
}

/* =========================================
   تصميم العناصر
   ========================================= */

.card-hover {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(76, 29, 149, 0.15);
}

.btn-primary {
    background-color: var(--brand-purple);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 9999px;
    font-weight: 700;
    transition: background-color 0.3s ease, transform 0.3s ease;
}
.btn-primary:hover {
    background-color: var(--brand-purple-light);
    transform: scale(1.03);
}

.btn-secondary {
    background-color: var(--brand-gold);
    color: var(--brand-purple);
    padding: 0.75rem 1.5rem;
    border-radius: 9999px;
    font-weight: 700;
    transition: background-color 0.3s ease, transform 0.3s ease;
}
.btn-secondary:hover {
    background-color: #FFD700;
    transform: scale(1.03);
}

.portfolio-item img {
    transition: transform 0.4s ease;
}
.portfolio-item:hover img {
    transform: scale(1.1);
}
.portfolio-overlay {
    opacity: 0;
    background: linear-gradient(to top, rgba(76, 29, 149, 0.95), rgba(76, 29, 149, 0.5));
    transition: opacity 0.4s ease;
}
.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}
.portfolio-overlay-content {
    transform: translateY(20px);
    transition: transform 0.4s ease;
}
.portfolio-item:hover .portfolio-overlay-content {
    transform: translateY(0);
}

.service-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background-color: var(--brand-gold);
    color: var(--brand-purple);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 10px rgba(255, 199, 44, 0.4);
    transition: transform 0.3s ease;
}
.card-hover:hover .service-icon {
    transform: scale(1.1);
}

.hero-bg {
    background-color: var(--brand-purple);
}

.form-input {
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.form-input:focus {
    border-color: var(--brand-purple);
    box-shadow: 0 0 0 3px rgba(76, 29, 149, 0.2);
    outline: none;
}

.video-container {
    width: 100%;
}
.video-container iframe {
    width: 100%;
    height: 100%;
}

.dropdown {
    position: relative;
    display: inline-block;
}
.dropdown-content {
    display: none;
    position: absolute;
    background-color: #f9f9f9;
    min-width: 220px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1;
    border-radius: 0.5rem;
    overflow: hidden;
    top: 100%;
    right: 0;
}
.dropdown-content a {
    color: var(--brand-purple);
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    text-align: right;
    font-weight: 700;
}
.dropdown-content a:hover {
    background-color: #f1f1f1;
}
.dropdown:hover .dropdown-content {
    display: block;
}
.mobile-dropdown-content {
    display: none;
    background-color: #f0e9ff;
}
.mobile-dropdown-content a {
    padding-right: 2rem;
}

.lightbox {
    display: none;
    position: fixed;
    z-index: 9998;
    padding-top: 50px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
}
.lightbox-content {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    animation: zoomIn 0.4s ease-out;
}
.lightbox-caption {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    text-align: center;
    color: #ccc;
    padding: 10px 0;
    height: 50px;
}
.lightbox-close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    z-index: 9999;
}
.lightbox-close:hover,
.lightbox-close:focus {
    color: #bbb;
    text-decoration: none;
}
.lightbox-nav {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 16px;
    margin-top: -50px;
    color: white;
    font-weight: bold;
    font-size: 2.5rem;
    transition: 0.6s ease;
    user-select: none;
    z-index: 9999;
}
.lightbox-prev {
    left: 0;
    border-radius: 0 3px 3px 0;
}
.lightbox-next {
    right: 0;
    border-radius: 3px 0 0 3px;
}
.lightbox-prev:hover,
.lightbox-next:hover {
    background-color: rgba(255, 255, 255, 0.1);
}
.lightbox-image {
    cursor: pointer;
}
@keyframes zoomIn {
    from {transform: scale(0.8); opacity: 0;}
    to {transform: scale(1); opacity: 1;}
}