/*
 * WAQAR EVENT - Custom Styles
 * نظام الألوان والتصميم المخصص
 */

/* ============================================
   1. استيراد الخطوط من Google Fonts
   ============================================ */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;500;600;700;800&family=Inter:wght@300;400;500;600;700&display=swap');

/* ============================================
   2. متغيرات الألوان الجديدة
   ============================================ */
:root {
    /* الألوان الأساسية من شعار WAQAR */
    --primary-blue: #0B5F8C;
    --primary-blue-dark: #084A6E;
    --primary-blue-light: #1A7BA8;

    /* الألوان الثانوية */
    --secondary-gray: #6C757D;
    --secondary-gray-light: #ADB5BD;
    --secondary-gray-dark: #495057;

    /* الخلفيات */
    --bg-white: #FFFFFF;
    --bg-off-white: #FAFBFC;
    --bg-light-gray: #F8F9FA;
    --bg-lighter-gray: #F1F3F5;

    /* ألوان النصوص */
    --text-primary: #212529;
    --text-secondary: #6C757D;
    --text-light: #ADB5BD;
    --text-white: #FFFFFF;

    /* ألوان التفاعل */
    --hover-blue: #1A7BA8;
    --active-blue: #084A6E;
    --focus-blue: rgba(11, 95, 140, 0.25);

    /* الظلال */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);

    /* الخطوط */
    --font-arabic: 'Cairo', sans-serif;
    --font-english: 'Inter', sans-serif;

    /* الانتقالات */
    --transition-fast: 200ms ease-in-out;
    --transition-normal: 300ms ease-in-out;
    --transition-slow: 500ms ease-in-out;
}

/* ============================================
   3. إعادة تعيين الألوان الأساسية
   ============================================ */

/* تحديث لون الخلفية الرئيسية */
body {
    font-family: var(--font-arabic), var(--font-english), sans-serif !important;
    background-color: var(--bg-off-white) !important;
    color: var(--text-primary) !important;
}

/* تحديث الألوان الأساسية للموقع */
.primary-color,
.text-primary-color {
    color: var(--primary-blue) !important;
}

.bg-primary-color {
    background-color: var(--primary-blue) !important;
}

/* ============================================
   4. تحديث ألوان الأزرار
   ============================================ */

/* الأزرار الرئيسية */
.wotn-btn,
.btn-primary,
button[type="submit"] {
    background-color: var(--primary-blue) !important;
    border-color: var(--primary-blue) !important;
    color: var(--text-white) !important;
    transition: all var(--transition-normal) !important;
    box-shadow: var(--shadow-sm);
}

.wotn-btn:hover,
.btn-primary:hover,
button[type="submit"]:hover {
    background-color: var(--hover-blue) !important;
    border-color: var(--hover-blue) !important;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.wotn-btn:active,
.btn-primary:active,
button[type="submit"]:active {
    background-color: var(--active-blue) !important;
    border-color: var(--active-blue) !important;
    transform: translateY(0);
}

/* الأزرار الثانوية */
.btn-outline-secondary {
    border-color: var(--primary-blue) !important;
    color: var(--primary-blue) !important;
    background-color: transparent !important;
}

.btn-outline-secondary:hover {
    background-color: var(--primary-blue) !important;
    color: var(--text-white) !important;
}

/* ============================================
   5. تحديث ألوان العناوين
   ============================================ */

h1,
h2,
h3,
h4,
h5,
h6,
.h1,
.h2,
.h3,
.h4,
.h5,
.h6 {
    color: var(--primary-blue-dark) !important;
    font-family: var(--font-arabic), var(--font-english), sans-serif !important;
    font-weight: 700 !important;
}

h1 span,
h2 span,
h3 span {
    color: var(--primary-blue) !important;
}

/* ============================================
   6. تحديث ألوان الهيدر
   ============================================ */

header,
.header-section,
.navbar {
    background-color: var(--bg-white) !important;
    box-shadow: var(--shadow-sm);
}

.navbar-nav .nav-link {
    color: var(--text-primary) !important;
    transition: color var(--transition-fast) !important;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--primary-blue) !important;
}

/* ============================================
   7. تحديث ألوان الفوتر
   ============================================ */

footer,
.footer-section {
    background-color: var(--primary-blue-dark) !important;
    color: var(--text-white) !important;
}

footer a {
    color: var(--text-white) !important;
    transition: color var(--transition-fast) !important;
}

footer a:hover {
    color: var(--bg-light-gray) !important;
}

.copy-right {
    background-color: var(--active-blue) !important;
    color: var(--text-white) !important;
}

/* ============================================
   8. تحديث ألوان البطاقات والأقسام
   ============================================ */

.service-block,
.proj,
.card {
    background-color: var(--bg-white) !important;
    border: 1px solid var(--bg-lighter-gray) !important;
    border-radius: 12px !important;
    transition: all var(--transition-normal) !important;
    box-shadow: var(--shadow-sm);
}

.service-block:hover,
.proj:hover,
.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-blue) !important;
}

/* ============================================
   9. تحديث ألوان الأيقونات
   ============================================ */

.s-icon,
.icon,
i {
    color: var(--primary-blue) !important;
}

.bx,
.boxicons {
    color: var(--primary-blue) !important;
}

/* ============================================
   10. تحديث الأقسام الداكنة
   ============================================ */

.dark,
section.dark {
    background-color: var(--primary-blue-dark) !important;
    color: var(--text-white) !important;
}

.dark h1,
.dark h2,
.dark h3,
.dark h4,
.dark h5,
.dark h6 {
    color: var(--text-white) !important;
}

.dark h1 span,
.dark h2 span,
.dark h3 span {
    color: var(--bg-light-gray) !important;
}

.dark p {
    color: var(--bg-light-gray) !important;
}

/* ============================================
   11. تحديث النماذج والإدخالات
   ============================================ */

.form-control,
input[type="text"],
input[type="email"],
input[type="tel"],
textarea {
    border: 2px solid var(--bg-lighter-gray) !important;
    border-radius: 8px !important;
    transition: all var(--transition-fast) !important;
    font-family: var(--font-arabic), var(--font-english), sans-serif !important;
}

.form-control:focus,
input:focus,
textarea:focus {
    border-color: var(--primary-blue) !important;
    box-shadow: 0 0 0 3px var(--focus-blue) !important;
    outline: none !important;
}

/* ============================================
   12. تحسينات الحركة والانتقالات
   ============================================ */

/* إضافة انتقالات ناعمة لجميع العناصر التفاعلية */
a,
button,
.btn,
.card,
.service-block {
    transition: all var(--transition-normal) !important;
}

/* تأثير Fade In للعناصر عند التمرير */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   13. تحسينات التجاوب
   ============================================ */

/* للشاشات الصغيرة (الجوال) */
@media (max-width: 767px) {
    h1 {
        font-size: 32px !important;
    }

    h2 {
        font-size: 28px !important;
    }

    h3 {
        font-size: 24px !important;
    }

    .service-block,
    .proj {
        margin-bottom: 20px;
    }
}

/* للشاشات المتوسطة (التابلت) */
@media (min-width: 768px) and (max-width: 1024px) {
    h1 {
        font-size: 42px !important;
    }

    h2 {
        font-size: 36px !important;
    }

    h3 {
        font-size: 28px !important;
    }
}

/* للشاشات الكبيرة (الكمبيوتر) */
@media (min-width: 1025px) {
    h1 {
        font-size: 56px !important;
    }

    h2 {
        font-size: 48px !important;
    }

    h3 {
        font-size: 32px !important;
    }
}

/* ============================================
   14. تحسينات RTL
   ============================================ */

[dir="rtl"] body {
    text-align: right !important;
}

[dir="rtl"] .text-left {
    text-align: right !important;
}

[dir="rtl"] .text-right {
    text-align: left !important;
}

/* ============================================
   15. ألوان إضافية للعناصر الخاصة
   ============================================ */

/* قسم Hero */
.hero-section {
    background: linear-gradient(135deg, var(--bg-off-white) 0%, var(--bg-light-gray) 100%);
}

/* قسم الخدمات */
.services-section {
    background-color: var(--bg-white) !important;
}

/* قسم المشاريع */
.projects {
    background-color: var(--bg-light-gray) !important;
}

.projects.dark {
    background-color: var(--primary-blue-dark) !important;
}

/* قسم الاتصال */
.ready-next {
    background: linear-gradient(135deg, var(--primary-blue-dark) 0%, var(--primary-blue) 100%);
}

/* ============================================
   16. تحسينات الأداء
   ============================================ */

/* تحسين أداء الصور */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* تحسين أداء الخطوط */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   17. إصلاحات إضافية
   ============================================ */

/* إزالة الخطوط الزرقاء من الروابط */
a {
    text-decoration: none !important;
}

a:hover {
    text-decoration: none !important;
}

/* تحسين مظهر الأزرار */
button {
    cursor: pointer;
    border: none;
    outline: none;
}

button:focus {
    outline: none;
    box-shadow: 0 0 0 3px var(--focus-blue);
}

/* ============================================
   18. شاشة التحميل (Preloader)
   ============================================ */

/* Note: Core styles are inline in HTML for faster render, 
   these are supplementary or overrides if needed */

#preloader {
    background-color: var(--bg-white);
}

.loading-text {
    color: var(--primary-blue);
}

.spinner {
    border-top-color: var(--primary-blue);
    border-right-color: transparent;
    /* Optional: adds a different spin effect */
}

/* Blog Styles - Added for Blog Reactivation */
.page-header {
    position: relative;
    background: linear-gradient(135deg, var(--primary-blue-dark) 0%, #0b1a27 100%);
    padding: 180px 0 100px;
    color: #fff;
    overflow: hidden;
    text-align: center;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('img/pattern-dot.png');
    opacity: 0.1;
    pointer-events: none;
}

.blog-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: all 0.4s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.blog-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.blog-img-wrapper {
    position: relative;
    height: 240px;
    overflow: hidden;
}

.blog-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.blog-card:hover .blog-img-wrapper img {
    transform: scale(1.1);
}

.blog-date-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.95);
    padding: 8px 15px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 700;
    color: var(--primary-blue);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.blog-content {
    padding: 30px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.blog-title {
    font-size: 22px;
    margin-bottom: 15px;
    line-height: 1.4;
    font-weight: 700;
}

.blog-title a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s;
}

.blog-title a:hover {
    color: var(--primary-blue);
}

.blog-excerpt {
    color: var(--text-secondary);
    font-size: 16px;
    line-height: 1.7;
    margin-bottom: 25px;
    flex-grow: 1;
}

.blog-footer {
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    padding-top: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.read-more-btn {
    color: var(--primary-blue);
    font-weight: 700;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: gap 0.3s;
}

.read-more-btn:hover {
    gap: 12px;
    color: var(--primary-blue-dark);
}