@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;600;700;900&display=swap');

* { margin:0; padding:0; box-sizing:border-box; }
body {
    font-family: 'Cairo', sans-serif;
    background: #0f0f1a;
    color: #fff;
    line-height: 1.7;
    overflow-x: hidden;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    padding: 20px 0;
    transition: all 0.4s;
    background: rgba(15, 15, 26, 0.95);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

header.scrolled {
    padding: 15px 0;
    background: rgba(15, 15, 26, 0.98);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    height: 90px;
    transition: all 0.4s;
    filter: drop-shadow(0 0 20px rgba(255, 80, 80, 0.6));
    cursor: pointer;
}

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

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    /* تدرج لوني داكن لمنح تباين أفضل في الوضع الداكن */
    background: linear-gradient(135deg, #001f3f 0%, #0074D9 100%);
    background-size: 400% 400%;
    animation: gradient 15s ease infinite;
    overflow: hidden;
}

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

.hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    /* شعار الشركة كخلفية شفافة داخل قسم الهيرو */
    background-image: url('../logo_transparent.png');
    background-repeat: no-repeat;
    background-position: center;
    background-size: 60%;
    opacity: 0.06;
    pointer-events: none;
}

.hero-content h1 {
    font-size: 4.5rem;
    font-weight: 900;
    margin-bottom: 20px;
    /* لون ثابت لعنوان الهيرو لضمان وضوحه في جميع الأوضاع */
    color: #ffffff;
    text-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.hero-content p {
    font-size: 1.8rem;
    margin-bottom: 40px;
    opacity: 0.9;
    color: rgba(255, 255, 255, 0.9);
}

/* Portfolio Section */
.portfolio {
    padding: 120px 0;
    background: #0f0f1a;
}

.section-title {
    text-align: center;
    font-size: 3.5rem;
    margin-bottom: 60px;
    /* تدرج لوني جديد للعناوين مع درجات الأزرق والأخضر الهادئة */
    background: linear-gradient(45deg, #36D1DC, #5B86E5);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 70px;
}

.filter-btn {
    background: rgba(255,255,255,0.05);
    border: 2px solid transparent;
    color: #fff;
    padding: 12px 28px;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.4s;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

.filter-btn:hover, .filter-btn.active {
    background: linear-gradient(45deg, #36D1DC, #5B86E5);
    border-color: transparent;
    transform: translateY(-5px);
    /* ظل أخف مع اللون الجديد */
    box-shadow: 0 15px 35px rgba(54, 209, 220, 0.4);
}

/* زر عرض المزيد - تنسيق مماثل للأزرار، مع تدرج لوني وتناسق عام */
.show-more-btn {
    background: linear-gradient(45deg, #36D1DC, #5B86E5);
    color: #fff;
    padding: 14px 32px;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.4s;
    box-shadow: 0 12px 30px rgba(54, 209, 220, 0.4);
}

.show-more-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(54, 209, 220, 0.6);
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 35px;
}

.item {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
    transition: all 0.5s;
    background: #1a1a2e;
}

.item:hover {
    transform: translateY(-20px) scale(1.03);
    box-shadow: 0 30px 60px rgba(231, 76, 60, 0.5);
}

.item img, .item video {
    width: 100%;
    height: 300px;
    object-fit: cover;
    transition: all 0.5s;
}

.item:hover img, .item:hover video {
    transform: scale(1.1);
}

.overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.9));
    padding: 40px 20px 25px;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.5s;
}

.item:hover .overlay {
    transform: translateY(0);
    opacity: 1;
}

.overlay h3 {
    font-size: 1.6rem;
    margin-bottom: 8px;
    color: #feca57;
}

.overlay p {
    font-size: 1rem;
    opacity: 0.9;
}

/* Footer */
footer {
    background: #0a0a14;
    padding: 80px 20px 40px;
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.whatsapp-btn {
    display: inline-flex;
    align-items: center;
    gap: 15px;
    background: #25D366;
    color: white;
    padding: 18px 40px;
    border-radius: 50px;
    font-size: 1.4rem;
    font-weight: bold;
    text-decoration: none;
    box-shadow: 0 15px 35px rgba(37, 211, 102, 0.4);
    transition: all 0.4s;
}

.whatsapp-btn:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 50px rgba(37, 211, 102, 0.6);
}

.whatsapp-btn img {
    width: 40px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0; top: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.95);
    backdrop-filter: blur(10px);
    justify-content: center;
    align-items: center;
    overflow: auto; 
}

.modal-content {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    padding: 50px;
    border-radius: 20px;
    width: 90%;
    max-width: 450px;
    text-align: center;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 20px 60px rgba(0,0,0,0.6);
    overflow-y: auto; 
    
}

.modal-content h2 {
    background: linear-gradient(45deg, #e74c3c, #f39c12);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 30px;
    font-size: 2rem;
}

.modal-content input {
    width: 100%;
    padding: 18px;
    margin: 15px 0;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 15px;
    color: white;
    font-size: 1.1rem;
}

#loginBtn {
    width: 100%;
    padding: 18px;
    background: linear-gradient(45deg, #e74c3c, #f39c12);
    border: none;
    border-radius: 15px;
    color: white;
    font-size: 1.3rem;
    cursor: pointer;
    margin-top: 20px;
    transition: all 0.3s;
}

#loginBtn:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(231, 76, 60, 0.5);
}

/* Responsive */
@media (max-width: 768px) {
    .hero-content h1 { font-size: 3rem; }
    .hero-content p { font-size: 1.4rem; }
    .grid { grid-template-columns: 1fr; }
    .filters { gap: 10px; }
    .filter-btn { padding: 10px 20px; font-size: 0.9rem; }
}

/* Extra small screen adjustments */
@media (max-width: 576px) {
    /* Reduce overall text and element sizes for very small screens */
    header {
        padding: 12px 0;
    }
    .logo {
        height: 60px;
    }
    .logo-title h1 {
        font-size: 1.2rem;
    }
    .section-title {
        font-size: 2rem;
        margin-bottom: 40px;
    }
    .hero-content h1 {
        font-size: 2.5rem;
    }
    .hero-content p {
        font-size: 1.2rem;
    }
    .hero-btn {
        font-size: 0.9rem;
        padding: 10px 20px;
    }
    .services {
        padding: 80px 0;
    }
    .service-card h3 {
        font-size: 1.1rem;
    }
    .service-card p {
        font-size: 0.85rem;
    }
    .request-modal input,
    .request-modal select,
    .request-modal textarea {
        font-size: 0.85rem;
        padding: 10px;
    }

    /* Display testimonial items in two columns on very small screens */
    .testimonials-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 16px;
    }

    /* Tweak FAQ section for small devices */
    .faq .section-title {
        font-size: 2rem;
    }
    .faq-question {
        padding: 12px 16px;
        font-size: 0.9rem;
    }
    .faq-toggle {
        font-size: 1rem;
    }
    .faq-answer {
        font-size: 0.85rem;
        padding: 0 16px;
    }

    /* Scale down overall font sizes across the site for very small screens */
    html {
        font-size: 12px;
    }

    /* Reduce overall base font size on very small screens */
    body {
        font-size: 14px;
    }

    /* Grid layout for portfolio section */
    .portfolio .grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 16px;
    }
    .portfolio .item {
        width: 100%;
    }
    .portfolio .item img,
    .portfolio .item video {
        height: 160px;
    }

    /* Reduce vertical padding of testimonials section and adjust card height */
    .testimonials {
        padding: 60px 0;
    }
    .testimonial-item {
        /* Make testimonial cards square using padding trick */
        position: relative;
        width: 100%;
        padding-top: 100%;
        height: 0;
    }
    .testimonial-item img {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    /* Arrange contact buttons side by side on small screens */
    .contact-methods {
        flex-wrap: nowrap;
        justify-content: center;
        gap: 16px;
    }
    .contact-btn {
        flex: 0 0 calc(50% - 12px);
        justify-content: center;
        font-size: 1rem;
        padding: 12px 20px;
    }

    /* Further reduce header logo text size on extra small screens */
    .logo-title h1 {
        font-size: 1rem;
    }

    /* Force testimonial cards to be perfect squares */
    .testimonials-grid .testimonial-item {
        width: 100% !important;
        padding-top: 100% !important;
        height: 0 !important;
        position: relative;
    }
    .testimonials-grid .testimonial-item img {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
}

/* Ensure service request modal is scrollable on small screens with an indicator */
.request-modal {
    max-height: 90vh;
    overflow-y: auto;
}

.request-modal form {
    position: relative;
}

@media (max-width: 768px) {
    /* Removed the arrow indicator for scrolling in forms on mobile */
    .request-modal form::after {
        content: none;
    }
}

/* ------------------------------------------------------ */
/* العناصر المضافة حديثاً */

/* تنسيق الحاوية داخل الهيدر حتى تتوزع العناصر أفقياً */
.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* تنسيق كتلة الشعار والنص داخل الهيدر */
.logo-title {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-title h1 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #feca57;
    margin: 0;
}

/* تنسيقات شريط التنقل */
.navbar ul {
    display: flex;
    list-style: none;
    gap: 30px;
}

.navbar a {
    color: #fff;
    font-weight: 500;
    text-decoration: none;
    position: relative;
    transition: color 0.3s;
}

.navbar a::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -4px;
    height: 2px;
    background: linear-gradient(45deg, #e74c3c, #f39c12);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s;
}

.navbar a:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* زر تبديل الوضع */
.theme-toggle {
    background: none;
    border: none;
    color: #feca57;
    font-size: 1.5rem;
    cursor: pointer;
    margin-left: 25px;
}

.theme-toggle span {
    pointer-events: none;
}

body.light-mode .theme-toggle {
    color: #e74c3c;
}

/* تأثير الكشف عند التمرير */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* iOS Safari fix: أحياناً الصور داخل عناصر عليها transform/opacity animations بتفضل فاضية.
   بنعطّل تأثير reveal على iOS Safari فقط (JS بيضيف class ios-safari على <html>). */
.ios-safari .reveal {
    opacity: 1 !important;
    transform: none !important;
}

/* iOS Safari: تحسين رسم الـ thumbs */
.ios-safari .portfolio .item img,
.ios-safari .portfolio .item video {
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* قسم من نحن */
.about {
    padding: 100px 0;
    background: #0a0a14;
}

body.light-mode .about {
    background: #f7f9fc;
}

.about .about-text {
    max-width: 900px;
    margin: 0 auto;
    font-size: 1.4rem;
    line-height: 2;
    text-align: center;
    opacity: 0.9;
}



/* قسم آراء العملاء */
.testimonials {
    padding: 160px 0 120px 0;
    background: linear-gradient(
        to bottom,
        rgba(3, 3, 10, 0.0) 0%,
        rgba(3, 3, 15, 0.35) 25%,
        #050510 70%
    );
}

body.light-mode .testimonials {
    background: #ffffff;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 320px));
    justify-content: center;
    gap: 30px;
    margin-top: 20px;
}

.testimonial-item {
    background: radial-gradient(circle at top left, rgba(255,255,255,0.12), rgba(0,0,0,0.85));
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 22px 55px rgba(0,0,0,0.65);
    width: 320px;
    height: 380px;
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    transform: translateY(16px);
    opacity: 0;
    transition: transform 0.45s ease, box-shadow 0.35s ease, background 0.35s ease, opacity 0.45s ease;
}

.testimonials.visible .testimonial-item {
    transform: translateY(0);
    opacity: 1;
}

.testimonials.visible .testimonial-item:nth-child(1) { transition-delay: 0.02s; }
.testimonials.visible .testimonial-item:nth-child(2) { transition-delay: 0.05s; }
.testimonials.visible .testimonial-item:nth-child(3) { transition-delay: 0.08s; }
.testimonials.visible .testimonial-item:nth-child(4) { transition-delay: 0.11s; }
.testimonials.visible .testimonial-item:nth-child(5) { transition-delay: 0.14s; }

.testimonial-item::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(54,209,220,0.18), rgba(91,134,229,0.05));
    opacity: 0;
    transition: opacity 0.35s ease;
    pointer-events: none;
}

.testimonial-item:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 26px 70px rgba(0,0,0,0.8);
}

.testimonial-item:hover::before {
    opacity: 1;
}

.testimonial-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 18px;
}
/* قسم التواصل */
.contact {
    padding: 100px 0;
    background: #0f0f1a;
}

body.light-mode .contact {
    background: #ffffff;
}

.contact-methods {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    margin-top: 40px;
}

.contact-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255,255,255,0.05);
    padding: 15px 30px;
    border-radius: 50px;
    color: #fff;
    font-size: 1.2rem;
    text-decoration: none;
    transition: all 0.4s;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}

.contact-btn img {
    width: 30px;
    height: 30px;
}

.contact-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(231, 76, 60, 0.4);
    background: linear-gradient(45deg, #e74c3c, #f39c12);
}

body.light-mode .contact-btn {
    background: rgba(0,0,0,0.05);
    color: #222;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

body.light-mode .contact-btn:hover {
    box-shadow: 0 20px 40px rgba(231, 76, 60, 0.2);
    color: #fff;
}

/* تعديلات الوضع الفاتح */
body.light-mode {
    background: #f7f9fc;
    color: #222;
}

body.light-mode header {
    background: rgba(255,255,255,0.9);
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

body.light-mode header .logo {
    filter: drop-shadow(0 0 10px rgba(0,0,0,0.2));
}

/* لون خاص لعنوان الهيرو في الوضع الفاتح لضمان التباين */
body.light-mode .hero-content h1 {
    color: #1a237e;
}

/* لون النص الفاتح في الهيرو في الوضعين */
body.light-mode .hero-content p {
    color: #555;
}

body.light-mode .hero {
    /* تدرج فاتح للغاية مناسب للوضع الفاتح */
    background: linear-gradient(135deg, #e8f0ff 0%, #f7fbff 100%);
}

body.light-mode .portfolio {
    background: #ffffff;
}

body.light-mode .item {
    background: #f2f2f7;
    box-shadow: 0 20px 40px rgba(0,0,0,0.05);
}

body.light-mode .item:hover {
    box-shadow: 0 30px 60px rgba(231,76,60,0.3);
}

body.light-mode .section-title {
    -webkit-text-fill-color: transparent;
    background: linear-gradient(45deg, #e74c3c, #f39c12);
}

body.light-mode footer {
    background: #f8f8f8;
    color: #444;
    border-top: 1px solid rgba(0,0,0,0.05);
}

body.light-mode .whatsapp-btn {
    box-shadow: 0 15px 35px rgba(37,211,102,0.2);
}

body.light-mode .whatsapp-btn:hover {
    box-shadow: 0 25px 50px rgba(37,211,102,0.3);
}

/* استجابات لعناصر التنقل على الشاشات الصغيرة */
@media (max-width: 768px) {
    .navbar ul {
        gap: 15px;
    }
    .logo-title h1 {
        font-size: 1.4rem;
    }
    /* تصغير حجم أزرار الهيرو على الشاشات الصغيرة */
    .hero-btn {
        font-size: 1rem;
        padding: 12px 20px;
    }
}

/* ------------------------------------------------------ */
/* أزرار الواجهة الرئيسية */

/* زر النداء للعمل (CTA) في الهيرو */
.cta-btn {
    margin-top: 40px;
    display: inline-block;
    padding: 18px 50px;
    background: linear-gradient(45deg, #36D1DC, #5B86E5);
    border-radius: 50px;
    font-size: 1.4rem;
    color: #fff;
    text-decoration: none;
    box-shadow: 0 15px 35px rgba(0,0,0,0.3);
    transition: all 0.4s;
}

.cta-btn:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

/* أزرار التنقل الموضوعة وسط الصفحة في قسم الهيرو */
.hero-buttons {
    margin-top: 40px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
}

.hero-btn {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 50px;
    background: linear-gradient(45deg, #36D1DC, #5B86E5);
    color: #fff;
    font-size: 1.2rem;
    text-decoration: none;
    box-shadow: 0 15px 30px rgba(0,0,0,0.2);
    transition: transform 0.3s, box-shadow 0.3s;
}

.hero-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

/* وضع الفاتح لزر النداء للعمل وأزرار الهيرو */
body.light-mode .cta-btn,
body.light-mode .hero-btn {
    background: linear-gradient(45deg, #5B86E5, #36D1DC);
    color: #fff;
}

/* قسم الخدمات */
.services {
    padding: 120px 0;
    background: #050510;
}

.services .section-title {
    margin-bottom: 40px;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 25px;
    margin-top: 10px;
}

.service-card {
    background: rgba(255,255,255,0.03);
    border-radius: 20px;
    padding: 25px;
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 15px 35px rgba(0,0,0,0.6);
    transition: all 0.4s ease;
}

.service-card h3 {
    margin: 0 0 10px;
    font-size: 1.3rem;
    color: #feca57;
}

.service-card p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.7;
    color: rgba(255,255,255,0.9);
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 45px rgba(0,0,0,0.8);
}

/* زر أساسي موحّد */
.primary-btn {
    background: linear-gradient(45deg, #36D1DC, #5B86E5);
    color: #fff;
    padding: 14px 32px;
    border-radius: 50px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.4s ease;
}

.primary-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(54,209,220,0.6);
}

/* مودال طلب خدمة */
.request-modal {
    position: relative;
}

.close-modal {
    position: absolute;
    top: 15px;
    left: 20px;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 1.6rem;
    cursor: pointer;
}

.request-modal input,
.request-modal select,
.request-modal textarea {
    width: 100%;
    margin: 10px 0;
    padding: 14px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.05);
    color: #fff;
    font-size: 0.95rem;
}

.request-modal input::placeholder,
.request-modal textarea::placeholder {
    color: rgba(255,255,255,0.7);
}

.modal-subtitle {
    font-size: 0.95rem;
    margin-bottom: 15px;
    color: rgba(255,255,255,0.8);
}

.status-msg {
    margin-top: 12px;
    font-size: 0.9rem;
}

/* صف رقم الهاتف (كود دولة + رقم) */
.phone-row {
    display: flex;
    gap: 10px;
    margin: 10px 0;
}

.phone-row select {
    max-width: 150px;
    flex-shrink: 0;
}

.phone-row input {
    flex: 1;
}

/* بطاقة PDF في الأعمال */
.pdf-card {
    background: rgba(255,255,255,0.03);
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    border: 1px solid rgba(255,255,255,0.08);
}

.pdf-icon {
    font-weight: 700;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.open-pdf-link {
    display: inline-block;
    margin-top: 5px;
    padding: 8px 16px;
    border-radius: 999px;
    background: rgba(255,255,255,0.08);
    color: #fff;
    text-decoration: none;
    font-size: 0.9rem;
}

.open-pdf-link:hover {
    background: rgba(255,255,255,0.15);
}

/* بطاقة Audio في الأعمال */
.audio-card {
    background: rgba(255,255,255,0.03);
    border-radius: 16px;
    padding: 16px;
    text-align: center;
    border: 1px solid rgba(255,255,255,0.08);
}

.audio-icon {
    font-weight: 700;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

/* فيديو في الجاليري */
.thumb-wrapper video {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 12px;
}

/* مودال عرض الأعمال */
.media-modal-content {
    max-width: 900px;
}

.media-container {
    text-align: center;
    margin-bottom: 15px;
    /* مهم: لو الـ PDF طويل أو الفيديو كبير، نعمل سكرول جوه الإطار نفسه */
    max-height: 75vh;
    overflow: auto;
    padding: 6px;
}

/* شريط أدوات PDF (سابق/التالي) يفضل ظاهر أثناء السكرول */
.pdf-controls {
    position: sticky;
    top: 0;
    z-index: 5;
    padding: 10px 0;
    background: rgba(10, 10, 25, 0.85);
    backdrop-filter: blur(6px);
    border-radius: 12px;
}

.pdf-canvas {
    display: block;
    margin: 0 auto;
}

.media-container img,
.media-container video {
    max-width: 100%;
    max-height: 70vh;
    border-radius: 12px;
}

.media-title {
    margin: 0 0 6px;
}

.media-desc {
    margin: 0;
    font-size: 0.95rem;
    opacity: 0.9;
}


.optional-label{
    display:block;
    margin-top:10px;
    margin-bottom:4px;
    font-size:0.85rem;
    color:#b0b0ff;
}
body.light-mode .optional-label{
    color:#444;
}

/* قسم الأسئلة الشائعة */
.faq {
    padding: 130px 0 140px 0;
    background: linear-gradient(
        to bottom,
        rgba(3,3,10,0.0) 0%,
        rgba(3,3,15,0.35) 25%,
        #050510 70%
    );
}
.faq::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(to right,
        rgba(255,255,255,0),
        rgba(0,255,255,0.45),
        rgba(255,255,255,0));
    opacity: 0.4;
}

body.light-mode .faq {
    background: #ffffff;
}

.faq .section-title,
.faq .faq-list,
.faq .faq-empty {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}

.faq.visible .section-title,
.faq.visible .faq-list,
.faq.visible .faq-empty {
    opacity: 1;
    transform: translateY(0);
}
.faq-list {
    max-width: 900px;
    margin: 30px auto 0;
}

.faq-item {
    background: rgba(255,255,255,0.04);
    border-radius: 18px;
    margin-bottom: 12px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.08);
    transform: translateY(12px);
    opacity: 0;
    transition: transform 0.45s ease, opacity 0.45s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.faq.visible .faq-item {
    transform: translateY(0);
    opacity: 1;
}

.faq.visible .faq-item:nth-child(1) { transition-delay: 0.02s; }
.faq.visible .faq-item:nth-child(2) { transition-delay: 0.05s; }
.faq.visible .faq-item:nth-child(3) { transition-delay: 0.08s; }
.faq.visible .faq-item:nth-child(4) { transition-delay: 0.11s; }
.faq.visible .faq-item:nth-child(5) { transition-delay: 0.14s; }

.faq-item:hover {
    box-shadow: 0 18px 40px rgba(0,0,0,0.65);
    background: rgba(255,255,255,0.06);
}
.faq-question {
    width: 100%;
    background: transparent;
    border: none;
    padding: 18px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    color: #fff;
    font-size: 1rem;
}

.faq-toggle {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    padding: 0 20px;
}

.faq-item.active .faq-answer {
    max-height: 300px;
    padding-bottom: 15px;
}

.faq-item.active .faq-toggle {
    transform: rotate(45deg);
}

body.light-mode .faq-item {
    background: #f7f7f7;
    border-color: #e0e0e0;
}

body.light-mode .faq-question {
    color: #111;
}


/* أسئلة شائعة - لوحة التحكم */
.faq-admin-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
}

.faq-admin-item {
    background: #070716;
    border-radius: 14px;
    padding: 12px 16px;
    border: 1px solid rgba(255,255,255,0.08);
}

.faq-admin-q {
    font-weight: 600;
    margin-bottom: 6px;
}

.faq-admin-a {
    font-size: 0.9rem;
    opacity: 0.85;
}

body.light-mode .faq-admin-item {
    background: #f5f5f5;
    border-color: #e0e0e0;
}

/* ============================================================= */
/* أزرار التمرير لأعلى وأسفل الصفحة */
/*
 * تمت إضافة زرين ثابتين يسمحان للمستخدم بالانتقال إلى أعلى الصفحة أو
 * إلى القسم التالي. تظهر الأزرار في الزاوية السفلية اليمنى مع
 * خلفية شبه شفافة وحواف مستديرة. يتم تصغير حجمها على الشاشات الصغيرة
 * لتلائم الهواتف الذكية. */

.scroll-btn {
    position: fixed;
    right: 20px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: #36D1DC;
    border: 2px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    font-size: 1.6rem;
    line-height: 48px;
    text-align: center;
    cursor: pointer;
    z-index: 1000;
    transition: background 0.3s, transform 0.3s;
}

.scroll-btn:hover {
    background: rgba(54, 209, 220, 0.3);
    transform: translateY(-4px);
}

.scroll-btn.scroll-up {
    bottom: 90px;
}

.scroll-btn.scroll-down {
    bottom: 30px;
}

@media (max-width: 768px) {
    .scroll-btn {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
        line-height: 40px;
        right: 15px;
    }
    .scroll-btn.scroll-up {
        bottom: 80px;
    }
    .scroll-btn.scroll-down {
        bottom: 25px;
    }
}
