/* common.css - الأنماط المشتركة لجميع الصفحات */

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

html, body {
    overflow-x: hidden;
    width: 100%;
}

body {
    font-family: 'Cairo', sans-serif;
    background-color: #fafaf5;
}

/* ========================================
   شاشة التحميل (Splash Screen)
   ======================================== */
#splashScreen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1b4d3e 0%, #2d6a4f 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.splash-logo {
    text-align: center;
    animation: pulse 1.5s ease-in-out infinite;
    padding: 0 20px;
}

    .splash-logo i {
        font-size: 80px;
        color: #a7e3c4;
    }

    .splash-logo h1 {
        font-size: 2rem;
        color: white;
        margin-top: 1rem;
    }

    .splash-logo p {
        color: #a7e3c4;
        margin-top: 0.5rem;
        font-size: 1rem;
    }

.splash-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255,255,255,0.2);
    border-top: 4px solid #a7e3c4;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-top: 2rem;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

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

    100% {
        transform: rotate(360deg);
    }
}

/* ========================================
   زر العودة للأعلى
   ======================================== */
.back-to-top {
    position: fixed;
    bottom: 25px;
    right: 25px;
    background-color: #2d6a4f;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    border: none;
}

    .back-to-top:hover {
        background-color: #1b4d3e;
        transform: scale(1.1);
    }

    .back-to-top i {
        font-size: 20px;
    }

/* ========================================
   تأثيرات البطاقات
   ======================================== */
.card-hover {
    transition: all 0.3s ease;
}

    .card-hover:hover {
        transform: translateY(-5px);
        box-shadow: 0 15px 30px -12px rgba(0,0,0,0.15);
    }

/* ========================================
   تنسيق شريط التمرير
   ======================================== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #e5e7eb;
}

::-webkit-scrollbar-thumb {
    background: #2d6a4f;
    border-radius: 10px;
}

    ::-webkit-scrollbar-thumb:hover {
        background: #1b4d3e;
    }

/* ========================================
   تحسينات اللمس للأجهزة اللوحية والموبايل
   ======================================== */
button, a {
    -webkit-tap-highlight-color: transparent;
}

/* ========================================
   تنسيق الموبايل فقط (شاشات أقل من 768px)
   ======================================== */
@media (max-width: 768px) {
    .splash-logo i {
        font-size: 55px;
    }

    .splash-logo h1 {
        font-size: 1.5rem;
    }

    .splash-logo p {
        font-size: 0.85rem;
    }

    .splash-spinner {
        width: 40px;
        height: 40px;
        margin-top: 1.5rem;
    }

    .back-to-top {
        width: 42px;
        height: 42px;
        bottom: 15px;
        right: 15px;
    }

        .back-to-top i {
            font-size: 16px;
        }

    /* إلغاء تأثير hover على الموبايل */
    .card-hover:hover {
        transform: none;
    }
}

/* ========================================
   تنسيق سطح المكتب (شاشات أكبر من 768px)
   ======================================== */
@media (min-width: 769px) {
    .container {
        max-width: 1280px !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }
}
