


/* ================= RESET ================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ================= VARIABLES ================= */
:root {
    --primary-gold: #d4af37;
    --secondary-gold: #aa8c2c;
    --dark-bg: #121212;
    --card-bg: #1e1e1e;
    --text-main: #f0f0f0;
    --text-muted: #b0b0b0;
    --glow-color: rgba(212, 175, 55, 0.6);
    --border-glow: 0 0 15px var(--glow-color);
    --transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* ================= GLOBAL ================= */
html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI','Times New Roman', Geneva, Verdana, sans-serif;
    background-color: var(--dark-bg);
    color: var(--text-main);
    line-height: 1.7;
    overflow-x: hidden;
}

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

a {
    text-decoration: none;
    color: var(--primary-gold);
    transition: 0.3s;
}

a:hover {
    color: #fdfdfd;
    text-shadow: 0 0 10px var(--primary-gold);
}

/* ================= TYPOGRAPHY & ANIMATIONS ================= */
h1, h2, h3 {
    font-weight: 800;
    letter-spacing: -0.5px;
}

h2 {
    font-size: 2.8rem;
    text-align: center;
    margin-bottom: 60px;
    background: linear-gradient(to right, #fff, var(--primary-gold), #e9dfdf);
    -webkit-background-clip: text;
    color: transparent;
    background-size: 200% auto;
    animation: shine 5s linear infinite;
    position: relative;
    display: inline-block;
    width: 100%;
}

@keyframes shine {
    to { background-position: 200% center; }
}

/* Entrance Animations */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 0.8s ease-out forwards;
}

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ================= HERO SECTION ================= */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at center, #2a1810 0%, #000000 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGNpcmNsZSBjeD0iMSIgY3k9IjEiIHI9IjEiIGZpbGw9InJnYmEoMjU1LDI1NSwyNTUsMC4wNSkiLz48L3N2Zz4=');
    opacity: 0.3;
}

.hero-content {
    text-align: center;
    z-index: 2;
    padding: 20px;
}

/* ================= شعار رئيسي مع تأثيرات وتحريك لطيف ================= */
.logo-container{
    max-width: 160px;  /* الحجم الأقصى */
    margin-bottom: 30px;
    filter: drop-shadow(0 0 25px rgba(255, 215, 0, 0.95)); /* ظل خفيف */
    animation: fadeUp 3s ease-out, gentlePulse 5s infinite ease-in-out; /* دمج الحركة الأصلية مع التكبير والتقلص */
    transform-origin: center; /* تأكد أن التكبير يحدث من مركز الصورة */
}

/* الحركة الخفيفة للتكبير والتقلص */
@keyframes gentlePulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2); /* تكبير 5% */
    }
    100% {
        transform: scale(1);
    }
}


.hero-title {
    font-size: 3rem;
    margin-bottom: 20px;
    text-shadow: 0 5px 15px rgb(6, 55, 190);
    animation: fadeUp 1s ease-out 0.2s forwards;
    opacity: 0;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--text-muted);
    margin-bottom: 50px;
    animation: fadeUp 1s ease-out 0.4s forwards;
    opacity: 0;
}

/* ================= BUTTONS ================= */
.btn {
    display: inline-block;
    padding: 16px 50px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    z-index: 1;
    border: 2px solid var(--primary-gold);
}

.btn-primary {
    background: transparent;
    color: var(--primary-gold);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.1);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background: var(--primary-gold);
    transition: 0.4s ease;
    z-index: -1;
}

.btn-primary:hover {
    color: #000;
    box-shadow: 0 0 30px var(--glow-color);
}

.btn-primary:hover::before {
    width: 100%;
}

.btn-registration {
    background: var(--primary-gold);
    color: #000;
    border: none;
}

.btn-registration:hover {
    background: #f01313bd;
    box-shadow: 0 0 30px rgba(255,255,255,0.5);
    transform: translateY(-5px);
}

/* ================= SECTIONS ================= */
section {
    padding: 120px 0;
    position: relative;
}

/* ================= WELCOME ================= */
.welcome {
    background: var(--card-bg);
    border-bottom: 1px solid #333;
}

.welcome p {
    font-size: 1.2rem;
    color: var(--text-muted);
    max-width: 900px;
    margin: auto;
    text-align: center;
    line-height: 2;
}

/* ================= SPECIALTIES (CARDS) ================= */
.specialties {
    background: #0a0a0a;
}

.specialties-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 40px;
    perspective: 1000px;
}

.specialty-card {
    background: var(--card-bg);
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.05);
    /* Initial state for animation */
    opacity: 0;
    transform: translateY(50px);
    animation: fadeUp 0.8s ease-out forwards;
}

.specialty-card .specialty-info {
    display: flex;
    flex-direction: column; /* ترتيب العناصر عمودياً */
    align-items: left;    /* وضع العناصر أفقياً في الوسط */
    text-align: center;     /* محاذاة النص في الوسط */
    gap: 10px;              /* مسافة بين العناصر */
}

.specialty-card .btn-details {
    margin-top: 10px;       /* مسافة فوق الزر */
    align-self: center;     /* تأكيد وضع الزر في الوسط */
}


/* Staggered Animation Delays */
.specialty-card:nth-child(1) { animation-delay: 0.1s; }
.specialty-card:nth-child(2) { animation-delay: 0.2s; }
.specialty-card:nth-child(3) { animation-delay: 0.3s; }
.specialty-card:nth-child(4) { animation-delay: 0.4s; }
.specialty-card:nth-child(5) { animation-delay: 0.5s; }
.specialty-card:nth-child(6) { animation-delay: 0.6s; }

/* GLOWING FRAME EFFECT */
.specialty-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 20px;
    padding: 2px;
    background: linear-gradient(45deg, transparent, var(--primary-gold), transparent);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0.5;
    transition: var(--transition);
}

.specialty-card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4), 0 0 30px rgba(212, 175, 55, 0.2);
    border-color: var(--primary-gold);
}

.specialty-card:hover::before {
    opacity: 1;
    background: var(--primary-gold);
    box-shadow: 0 0 0px var(--primary-gold);
}

.specialty-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    filter: grayscale(30%);
    transition: var(--transition);
}

.specialty-card:hover .specialty-image {
    filter: grayscale(0%);
    transform: scale(1.1);
}

.specialty-info {
    padding: 30px;
    position: relative;
    z-index: 2;
}

.specialty-info h3 {
    color: var(--primary-gold);
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.specialty-info p {
    color: var(--text-muted);
    font-size: 0.95rem;
}


/* ================= الصور داخل القصاصة ================= */
.modal-body img {
    display: block;          /* يجعل الصورة كتلة لتجنب التداخل مع عناصر أخرى */
    max-width: 100%;         /* عرض الصورة لا يتجاوز عرض نافذة الـ modal */
    height: auto;            /* الارتفاع يتغير تلقائيًا للحفاظ على نسبة العرض إلى الارتفاع */
    max-height: 50vh;        /* الحد الأقصى للارتفاع 50% من ارتفاع الشاشة */
    margin: 0 auto 20px;     /* توسيط الصورة أفقياً وإضافة مسافة أسفلها */
    object-fit: contain;     /* الحفاظ على نسبة الصورة دون قصها */
    border-radius: 10px;     /* حواف دائرية خفيفة لإطلالة أنيقة */
    box-shadow: 0 4px 10px rgba(0,0,0,0.2); /* ظل خفيف لإبراز الصورة */
    transition: transform 0.3s ease; /* تأثير انسيابي عند تكبير أو تصغير */
}

/* تأثير عند تمرير الماوس على الصورة داخل modal */
.modal-body img:hover {
    transform: scale(1.05);  /* تكبير الصورة قليلاً عند المرور عليها */
}




.btn-details {
    margin-top: 20px;
    background: transparent;
    border: 1px solid var(--primary-gold);
    color: var(--primary-gold);
    padding: 10px 20px;
    border-radius: 30px;
    cursor: pointer;
    transition: 0.3s;
    font-weight: 600;
}

.btn-details:hover {
    background: var(--primary-gold);
    color: #f5f5f5;
    box-shadow: 0 0 15px var(--glow-color);
}

/* ================= WHY US ================= */
.why-us {
    background: var(--card-bg);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.feature {
    background: #151515;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    border: 1px solid rgba(255,255,255,0.05);
    transition: var(--transition);
}

.feature:hover {
    transform: translateY(-10px);
    border-color: var(--primary-gold);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.feature-icon {
    font-size: 3.5rem;
    margin-bottom: 25px;
    display: inline-block;
    text-shadow: 0 0 20px rgba(255,255,255,0.2);
}

.feature h3 {
    color: #fff;
    margin-bottom: 15px;
}

/* ================= GALLERY ================= */
/* ===== GRID ===== */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

/* ===== IMAGE WRAPPER ===== */
.gallery-item {
    position: relative;
    border-radius: 18px;
    padding: 4px; /* سماكة الإطار */
    background: #111;
    overflow: hidden;
}

/* ===== ROTATING GOLD BORDER ===== */
.gallery-item::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 20px;
    background: conic-gradient(
        from 0deg,
        transparent 0deg,
        var(--primary-gold) 60deg,
        transparent 120deg
    );
    animation: goldRotate 3.5s linear infinite;
    z-index: 1;
}

/* ===== INNER MASK ===== */
.gallery-item::after {
    content: "";
    position: absolute;
    inset: 3px;
    background: #000;
    border-radius: 15px;
    z-index: 2;
}

/* ===== IMAGE ===== */
.gallery-image {
    position: relative;
    width: 100%;
    height: 500px;
    object-fit: cover;
    border-radius: 14px;
    z-index: 3;
    transition: transform 0.6s ease, filter 0.6s ease;
    filter: brightness(0.9);
}

/* ===== HOVER EFFECT ===== */
.gallery-item:hover .gallery-image {
    transform: scale(1.07);
    filter: brightness(1.15);
}

/* ===== STRONGER GLOW ON HOVER ===== */
.gallery-item:hover::before {
    filter: blur(1.5px);
}

/* ===== ROTATION ANIMATION ===== */
@keyframes goldRotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}


/* ================= REGISTRATION ================= */
.registration {
    background: linear-gradient(45deg, #1a1008, #3d2817);
    text-align: center;
    border-top: 1px solid #333;
}

.registration h2 {
    color: var(--primary-gold);
}

.registration p {
    color: #fafafa;
    font-size: 1.2rem;
    margin-bottom: 40px;
}

/* ================= FOOTER ================= */
.footer {
    background: #000;
    padding: 50px 0;
    text-align: center;
    border-top: 2px solid var(--primary-gold);
}

.footer p {
    color: #666;
}

/* ================= MODAL ================= */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: var(--card-bg);
    margin: 5% auto;
    padding: 20px; /* أضفنا حشو داخلي مناسب */
    border: 1px solid var(--primary-gold);
    width: 80%;
    max-width: 800px;
    border-radius: 20px;
    box-shadow: 0 0 50px rgba(212, 175, 55, 0.2);
    animation: modalZoom 0.3s ease-out;

    /* التعديلات الجديدة */
    max-height: 90vh; /* لا تتجاوز 90% من ارتفاع الشاشة */
    overflow-y: auto; /* شريط تمرير إذا كان النص كبير */
    box-sizing: border-box; /* ليشمل الحشو ضمن الأبعاد */
}


@keyframes modalZoom {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.close-button {
    color: var(--primary-gold);
    float: left;
    font-size: 35px;
    font-weight: bold;
    margin: 15px 25px;
    cursor: pointer;
    transition: 0.3s;
}

.close-button:hover {
    color: #fff;
    text-shadow: 0 0 10px var(--primary-gold);
}

.modal-body {
    padding: 40px;
    color: var(--text-main);
}

#modal-title {
    color: var(--primary-gold);
    font-size: 2rem;
    border-bottom: 1px solid #333;
    padding-bottom: 5px;
}

#modal-details h4 {
    color: #fff;
    margin-top: 5px;
}

/* ================= RESPONSIVE ================= */
@media (max-width: 768px) {
    .hero-title { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    .btn { padding: 12px 35px; font-size: 1rem; }
}



.footer-icons {
    display: flex;
    justify-content: center;
    gap: 25px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.footer-icon {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #d4af37;
    text-decoration: none;
    font-weight: 600;
    padding: 8px 15px;
    border-radius: 8px;
    background: rgba(212, 175, 55, 0.1);
    transition: all 0.3s ease;
}

.footer-icon:hover {
    transform: scale(1.1);
    background: rgba(212, 175, 55, 0.2);
    color: #fff;
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}


/* ===============================
   1. إعدادات عامة
================================ */
:root {
    --primary-gold: #ffd700;
    --glow-color: rgba(255, 215, 0, 0.7);
}

/* ===============================
   2. تصميم البطاقة
================================ */
.card {
    position: relative;
    padding-bottom: 70px;
}

/* ===============================
   3. تصميم الأزرار
================================ */
.btn {
    margin-top: 20px;
    background: transparent;
    border: 1px solid var(--primary-gold);
    color: var(--primary-gold);
    padding: 10px 25px;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-secondary {
    background: var(--primary-gold);
    color: #000;
    box-shadow: 0 0 15px var(--glow-color);
    animation: pulse 2s infinite;
}

.btn-secondary:hover {
        background: #df0e0eaf;
    box-shadow: 0 0 30px rgba(255,255,255,0.5);
    transform: translateY(-5px);
}

/* ===============================
   5. موضع الزر داخل البطاقة
================================ */
.card .btn {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
}


/* ===== HEADER ===== */
.top-header {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 50px;
    background: transparent;
    z-index: 1000;

    pointer-events: none; /* ⛔ تعطيل النقر على كامل الشريط */
}

.menu-icon {
    pointer-events: auto; /* ✅ تفعيل النقر فقط على الزر */

    font-size: 32px;
    cursor: pointer;
    padding: 10px 16px;
    display: inline-block; /* مهم لتحديد مساحة الزر بدقة */

    background: linear-gradient(
        45deg,
        #d4af37,
        #fff3b0,
        #aa8c2c
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;

    transition:
        transform 0.25s ease,
        text-shadow 0.25s ease;
}

/* عند وضع الفأرة فوق الزر فقط */
.menu-icon:hover {
    transform: translateY(-6px) scale(0.96);
    text-shadow:
        0 0 6px #fff3b0,
        0 0 14px #d4af37;
}

/* عند الضغط */
.menu-icon:active {
    transform: translateY(-2px) scale(0.9);
}

/* ===== SIDE MENU ===== */
.side-menu {
    position: fixed;
    top: 0;
    right: -320px;
    width: 300px;
    height: 100%;
    background: linear-gradient(
        180deg,
        #0e0e0e,
        #161616
    );
    color: #ffffff;
    padding: 24px 20px;
    transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2000;

    border-left: 2px solid #d4af37;
    box-shadow:
        -0 0 15px rgba(212, 175, 55, 0.7),
        -10px 0 30px rgba(0, 0, 0, 0.6);
}

/* عنوان القائمة */
.side-menu h2 {
    margin: 50px 0 25px;
    text-align: center;
    font-size: 22px;
    letter-spacing: 1px;
    color: #d4af37;
    text-shadow: 0 0 12px rgba(212, 175, 55, 0.7);
}

/* النص */
.side-menu p {
    line-height: 1.9;
    font-size: 15px;
    opacity: 0.9;
}

/* زر الإغلاق */
.close-btn {
    position: absolute;
    top: 14px;
    left: 16px;
    font-size: 28px;
    cursor: pointer;
    color: #d4af37;
    transition: transform 0.25s ease, color 0.25s ease, text-shadow 0.25s ease;
}

.close-btn:hover {
    transform: rotate(90deg) scale(1.1);
    color: #fff3b0;
    text-shadow: 0 0 8px #d4af37, 0 0 14px #fff3b0;
}

/* الروابط */
.menu-link {
    display: block;
    margin: 14px 0;
    padding: 14px;
    text-align: center;
    text-decoration: none;

    background: transparent;
    color: #d4af37;
    border: 1px solid rgba(212, 175, 55, 0.7);
    border-radius: 12px;

    font-size: 17px;
    font-weight: 500;
    letter-spacing: 0.5px;

    transition:
        background 0.3s ease,
        color 0.3s ease,
        transform 0.3s ease,
        box-shadow 0.3s ease;
}

.menu-link:hover {
    background: linear-gradient(
        45deg,
        #d4af37,
        #fff3b0
    );
    color: #121212;
    transform: translateY(-4px) scale(1.02);

    box-shadow:
        0 0 12px #d4af37,
        0 8px 20px rgba(212, 175, 55, 0.4);
}

/* تحسين التمرير */
html {
    scroll-behavior: smooth;
}

/* الرسائل */
.popup-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0); /* مخفية افتراضيًا */
    background-color: #121212;
    color: #FFD700;
    padding: 30px 40px;
    max-width: 550px;
    width: auto;
    border: 3px solid #FFD700;
    border-radius: 15px;
    box-shadow: 0 0 20px #FFD700;
    z-index: 3000;
    text-align: center; /* توسيط النصوص */
    transition: transform 0.4s ease, opacity 0.4s ease;
    opacity: 0;
}

/* عند إظهار الرسالة */
.popup-message.show {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

/* العنوان الألماسي */
.popup-title {
    font-size: 22px;
    font-weight: bold;
    background: linear-gradient(90deg, #ffffff, #e0e0e0, #ffffff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 5px #ffffff, 0 0 10px #ccc;
    margin-bottom: 15px;
}

.popup-title2 {
    font-size: 18px;
    font-weight: bold;
    background: linear-gradient(90deg, #ffffff, #e0e0e0, #ffffff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 5px #ffffff, 0 0 10px #ccc;
    margin-bottom: 15px;
}

.popup-title3 {
    font-size: 16px;
    font-weight: bold;
    background: linear-gradient(90deg, #ffffff, #e0e0e0, #ffffff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 4px #ffffff, 0 0 10px #ccc;

    /* الأهم لتعديل الحجم حسب النص */
    display: inline-block; /* أو block حسب التصميم */
    white-space: pre-wrap; /* يحافظ على الأسطر الجديدة */
    word-wrap: break-word; /* يكسر الكلمات الطويلة إن لزم */
    line-height: 1.0; /* يسهّل التحكم بالمسافة بين الأسطر */
    margin-bottom: 10px;
}



/* نصوص الرسالة */
.popup-message p {
    font-size: 18px;
    color: #FFD700; /* ذهبي لامع */
    line-height: 1.7;
    margin-bottom: 20px;
}

/* زر داخل الرسالة */
.popup-button {
    display: inline-block;
    margin-top: 20px;
    padding: 12px 25px;
    font-size: 16px;
    font-weight: bold;
    color: #121212;
    background-color: #FFD700;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    box-shadow: 0 0 15px #FFD700;
    animation: pulse 1.2s infinite alternate, vibrate 1.0s infinite;
    transition: all 0.3s ease;
}

/* اهتزاز الزر */
@keyframes vibrate {
    0% { transform: translateX(0); }
    25% { transform: translateX(-1px); }
    50% { transform: translateX(1px); }
    75% { transform: translateX(-1px); }
    100% { transform: translateX(1px); }
}

/* وميض خفيف للزر */
@keyframes pulse {
    0% { box-shadow: 0 0 15px #FFD700; }
    50% { box-shadow: 0 0 25px #FFD700; }
    100% { box-shadow: 0 0 15px #FFD700; }
}

/* زر الإغلاق */
.close-popup {
    position: absolute;
    top: 8px;
    right: 12px;
    cursor: pointer;
    font-size: 22px;
    color: #FFD700;
    font-weight: bold;
}

.close-popup:hover {
    color: #fff;
}

#faqFloatingBtn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    padding: 15px 20px;
    font-size: 16px;
    font-weight: bold;
    color: #121212;
    background: linear-gradient(270deg, #FFD700, #FF8C00, #FF4500, #FF69B4);
    background-size: 800% 800%;
    border: 2px solid #FFD700;
    border-radius: 25px;
    cursor: pointer;
    box-shadow: 0 0 15px #FFD700, 0 0 30px #FFD700;
    z-index: 5000;
    transition: all 0.3s ease;
    animation: animateGradient 5s ease infinite, pulseBtn 1.2s infinite alternate;
}

/* حركة التدرج */
@keyframes animateGradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}


/* منع تحديد النص */
body {
    user-select: none;       /* معظم المتصفحات */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* منع النقر الأيمن على النص */
body {
    -webkit-touch-callout: none; /* iOS */
}


/* منع سحب الصور */
img {
    -webkit-user-drag: none;
    user-drag: none;
    pointer-events: none; /* يمنع السحب على معظم المتصفحات */
}


/* الزر */
#faqFloatingBtn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 10px 18px;
    cursor: pointer;
}

/* النافذة */
.popup-message {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);

    width: 92%;
    max-width: 480px;

    /* خلفية حديثة مع ذهبي لامع */
    background:
        linear-gradient(135deg,
            #FFB7C5,
            #BAE1EF,
            #CCEBC5
        ),
        radial-gradient(circle at top right,
            rgba(212, 175, 55, 0.25), /* ذهبي */
            transparent 60%
        ),
        radial-gradient(circle at bottom left,
            rgba(255, 215, 0, 0.18), /* ذهبي لامع */
            transparent 65%
        );

    border-radius: 26px;
    padding: 32px 28px;

    /* إطار ذهبي خفيف */
    border: 3px solid rgb(255, 210, 64);

    /* ظل فاخر */
    box-shadow:
        0 35px 80px rgba(2, 6, 23, 0.9),
        0 0 25px rgba(212, 175, 55, 0.15);

    z-index: 9999;

    max-height: 80vh;
    overflow-y: auto;

    transition:
        opacity 0.4s ease,
        transform 0.4s ease;

    opacity: 0;

    font-family: "Inter", "Segoe UI", sans-serif;
    color: #f8fafc;
    line-height: 1.85;
    text-align: center;
}

/* عند الظهور */
.popup-message.active {
    display: block;
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.popup-message h3 {
    font-size: 1.35rem;
    margin-bottom: 16px;
    background: linear-gradient(
        90deg,
        #f5d061,
        #d4af37,
        #ffd700
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.popup-message hr {
    border: none;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(212, 175, 55, 0.7),
        transparent
    );
    margin: 18px 0;
}

.popup-title {
    color: #0d1f2d; /* لون داكن هادئ يعطي تركيز وثقة */
    font-weight: 600;
}

.faq-question {
    color: #1e3a5f; /* أزرق داكن يعطي وضوح وهدوء */
    font-weight: 500;
}

.faq-answer {
    color: #6A7F73; /* رمادي متوسط مريح للعين عند القراءة الطويلة */
}

.faq-answer {
    display: none;
    margin-top: 8px;
    line-height: 1.6;
}

.faq-item.active .faq-answer {
    display: block;
}

.faq-arrow {
    display: inline-block;
    transition: transform 0.3s ease;
    font-size: 14px;
}

/* عند فتح السؤال */
.faq-item.active .faq-arrow {
    transform: rotate(180deg);
}
.faq-arrow {
    display: inline-block;
    font-size: 14px;
    transition: transform 0.3s ease;
}

/* عند الفتح */
.faq-item.active .faq-arrow {
    transform: rotate(180deg);
    animation: arrowShake 0.3s ease;
}

.faq-question:active .faq-arrow {
    animation: arrowShake 0.25s ease;
}


/* تنسيق الزر العائم */
/* تنسيق الزر العائم */
#faqFloatingBtn2 {
    position: fixed;
    bottom: 30px;
    left: 30px;
    padding: 15px 25px;
    background: linear-gradient(135deg, #4A90E2, #2C3E50);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 5px 20px rgba(44, 62, 80, 0.3);
    transition: all 0.3s ease;
    z-index: 1000;
    font-family: 'Arial', sans-serif;
    letter-spacing: 0.5px;
}

#faqFloatingBtn2:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(44, 62, 80, 0.4);
    background: linear-gradient(135deg, #5D9CEC, #34495E);
}

/* الرسالة الأساسية */
.popup-message2 {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.message-container {
    background: linear-gradient(135deg, #ffffff, #f8f9fa);
    width: 90%;
    max-width: 400px;
    border-radius: 20px;
    padding: 40px 30px;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    animation: messageAppear 0.5s ease;
    border: 1px solid #e0e0e0;
    position: relative;
    overflow: hidden;
}

@keyframes messageAppear {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.message-container:before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(to right, #4A90E2, #2C3E50);
}

.message-content h2 {
    color: #2C3E50;
    margin-bottom: 15px;
    font-size: 28px;
}

.message-content p {
    color: #666;
    margin-bottom: 30px;
    font-size: 16px;
    line-height: 1.6;
}

/* زر فتح الرسالة */
.open-message-btn {
    display: inline-block;
    padding: 12px 30px;
    background: linear-gradient(135deg, #4A90E2, #2C3E50);
    color: white;
    border-radius: 50px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(74, 144, 226, 0.3);
    position: relative;
    overflow: hidden;
}

.open-message-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(74, 144, 226, 0.4);
}

.open-message-btn:active {
    transform: translateY(0);
}

/* الورقة المنبثقة */
.paper-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
    z-index: 3000;
}

.paper-content {
    background: #fff8e1;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    border-radius: 2px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
    transform: scale(0.8) translateY(50px);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid #ffecb3;
}

.paper-content.paper-open {
    transform: scale(1) translateY(0);
    opacity: 1;
    animation: paperShake 0.5s ease 0.3s;
}

@keyframes paperShake {
    0%, 100% { transform: scale(1) translateY(0); }
    25% { transform: scale(1.02) translateY(-5px); }
    50% { transform: scale(0.98) translateY(5px); }
    75% { transform: scale(1.01) translateY(-3px); }
}

/* تأثير الورق القديم */
.paper-content:before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        linear-gradient(90deg, transparent 95%, rgba(139, 69, 19, 0.1) 100%),
        linear-gradient(0deg, transparent 95%, rgba(139, 69, 19, 0.1) 100%);
    pointer-events: none;
    opacity: 0.3;
}

/* زر إغلاق الورقة */
.close-paper {
    position: absolute;
    top: 15px;
    left: 20px;
    font-size: 36px;
    color: #8B4513;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    z-index: 10;
    background: rgba(255, 255, 255, 0.9);
}

.close-paper:hover {
    color: white;
    background-color: #8B4513;
    transform: rotate(90deg);
}

/* رأس الورقة */
.paper-header {
    text-align: center;
    padding: 30px 40px 20px;
    border-bottom: 2px solid #8B4513;
    background: linear-gradient(to bottom, #fff8e1, #ffecb3);
    position: relative;
}

.letter-icon {
    font-size: 40px;
    margin-bottom: 10px;
}

.paper-header h2 {
    color: #5D4037;
    margin: 10px 0;
    font-size: 24px;
    font-weight: bold;
}

.paper-date {
    color: #795548;
    font-size: 14px;
    margin-top: 5px;
}

/* جسم الورقة */
.paper-body {
    padding: 30px 40px;
    overflow-y: auto;
    max-height: 60vh;
}

.paper-intro {
    color: #5D4037;
    font-size: 16px;
    line-height: 1.8;
    margin-bottom: 30px;
    text-align: right;
}

/* قائمة القوانين في الورقة */
.paper-rules {
    list-style: none;
    padding: 0;
    margin: 0;
}

.paper-rules li {
    padding: 15px 20px;
    margin-bottom: 15px;
    background: white;
    border-right: 3px solid #8B4513;
    border-radius: 5px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.paper-rules li:hover {
    transform: translateX(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.paper-rules li:before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 5px;
    background: linear-gradient(to bottom, #8B4513, #D2691E);
}

.rule-number {
    background: #8B4513;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-left: 15px;
    flex-shrink: 0;
}

.rule-text {
    color: #5D4037;
    font-size: 16px;
    flex-grow: 1;
    text-align: right;
}

/* تذييل الورقة */
.paper-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px dashed #8B4513;
}

.signature {
    text-align: left;
}


.signature p {
    color: #5D4037;
    font-size: 14px;
    margin: 0;
}

/* ضع الطابع في أقصى اليسار */
.stamp {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
}

.stamp-circle {
    width: 80px;
    height: 80px;
    border: 2px solid #D32F2F;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #D32F2F;
    font-size: 12px;
    font-weight: bold;
    transform: rotate(-15deg);
    background: rgba(255, 255, 255, 0.9);
}

.paper-footer {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px dashed #8B4513;
    min-height: 100px;
}

/* تحسينات للهواتف */
@media (max-width: 768px) {
    #faqFloatingBtn2 {
        bottom: 20px;
        left: 20px;
        padding: 12px 20px;
        font-size: 16px;
    }
    
    .message-container {
        width: 95%;
        padding: 30px 20px;
    }
    
    .paper-content {
        width: 95%;
        max-height: 85vh;
    }
    
    .paper-header,
    .paper-body {
        padding: 20px;
    }
    
    .paper-header h2 {
        font-size: 20px;
    }
    
    .rule-text {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    #faqFloatingBtn2 {
        bottom: 15px;
        left: 15px;
        padding: 10px 15px;
        font-size: 14px;
    }
    
    .message-content h2 {
        font-size: 22px;
    }
    
    .paper-footer {
        flex-direction: column;
        gap: 20px;
        align-items: center;
    }
    
    .signature {
        text-align: center;
    }
}

.signature-container {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
    padding: 10px;
    background: linear-gradient(to right, #fff8e1, #ffecb3);
    border-radius: 8px;
    border-right: 3px solid #8B4513;
}

.signature-label {
    color: #5D4037;
    font-weight: bold;
    font-size: 16px;
    white-space: nowrap;
    padding: 5px 10px;
    background: white;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.signature-line {
    color: #8B4513;
    font-size: 18px;
    font-weight: bold;
    font-family: 'Arial', sans-serif;
    padding: 8px 20px;
    border-bottom: 3px dashed #8B4513;
    min-width: 180px;
    text-align: center;
    direction: rtl;
    background: white;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(139, 69, 19, 0.2);
}