/* assets/css/custom-style.css */

/* 1. استيراد الخطوط من Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@300;400;500;700;800;900&display=swap');

/* 2. متغيرات الألوان (لوحة ألوان فاخرة وهادئة) */
:root {
    --primary-color: #1a2a4c;     /* أزرق داكن عميق */
    --secondary-color: #b08d57;   /* برونزي ذهبي هادئ */
    --accent-color: #34495e;      /* رمادي أزرق داكن */
    --light-bg: #f7f9fc;          /* خلفية فاتحة جدًا ونظيفة */
    --white-color: #ffffff;
    --dark-color: #2c3e50;
    --gray-color: #ecf0f1;
}

/* 3. تنسيقات عامة */
body {
    font-family: 'Tajawal', sans-serif;
    color: var(--dark-color);
    background-color: var(--light-bg);
    line-height: 1.8;
    font-weight: 400;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1.2rem;
}

/* ======================================================= */
/* == 4. تنسيق الشريط العلوي (Navbar) - مجمع ومنظم == */
/* ======================================================= */
.navbar {
    background-color: rgba(217, 133, 6, 0.399) !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    padding: 1.25rem 0;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border-bottom-left-radius: 25px;
    border-bottom-right-radius: 25px;
}

.navbar-brand {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--primary-color) !important;
    margin-right: 25px;
    transition: all 0.3s ease;
}

.navbar-brand img {
    height: 90px;
    transition: transform 0.3s ease;
}

.navbar-brand img:hover {
    transform: scale(1.1);
}

.navbar-nav .nav-link {
    font-weight: 500;
    color: var(--white-color) !important;
    margin-right: 2rem;
    font-size: 1.05rem;
    transition: color 0.3s ease;
    position: relative;
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 50%;
    background-color: var(--secondary-color);
    transition: all 0.3s ease;
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
    width: 80%;
    left: 10%;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--secondary-color) !important;
}

/* كلاس الحالة عند التمرير للأسفل (Scrolled) */
.navbar-scrolled {
    background-color: rgba(176, 141, 87, 0.85) !important;
    backdrop-filter: blur(15px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

body .navbar-scrolled .navbar-brand {
    color: var(--primary-color) !important;
}

body .navbar-scrolled .navbar-nav .nav-link {
    color: var(--primary-color) !important;
}

body .navbar-scrolled .navbar-nav .nav-link:hover {
    color: var(--white-color) !important;
}

/* ======================================================= */
/* == 5. تنسيق قسم الهيرو (Hero Section) == */
/* ======================================================= */
.hero-section {
    position: relative;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: var(--white-color);
    padding: 120px 0;
    margin-top: -130px;
    overflow: hidden;
}

.hero-container {
    position: relative;
    z-index: 2;
}

.hero-content-wrapper h1 {
    font-size: 3.8rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.1;
    color: var(--white-color);
}

.hero-content-wrapper .lead {
    font-size: 1.4rem;
    font-weight: 400;
    margin-bottom: 2.5rem;
    color: #e0e0e0;
}

.hero-image-wrapper img {
    max-width: 85%;
    height: auto;
    border-radius: 20px;
    box-shadow: 0 25px 50px rgba(0,0,0,0.4);
    border: 6px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.5s ease-in-out, box-shadow 0.5s ease-in-out;
}

.hero-image-wrapper img:hover {
    transform: scale(1.03);
    box-shadow: 0 30px 60px rgba(0,0,0,0.5);
}

/* ======================================================= */
/* == 6. تنسيق قسم "نبذة عني" == */
/* ======================================================= */
.author-bio-section {
    padding: 80px 0;
}

.author-bio-section img {
    max-width: 280px;
    border: 8px solid var(--white-color);
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.author-bio-section img:hover {
    transform: translateY(-10px);
}

.author-bio-section h2 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.author-bio-section .lead {
    font-size: 1.2rem;
    color: var(--accent-color);
    font-weight: 400;
}

/* تنسيق خاص لصورة الكاتب في الصفحة الرئيسية */
.author-homepage-img {
    max-width: 300px;
    border: 8px solid var(--white-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.author-homepage-img:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

@media (max-width: 991.98px) {
    .author-bio-section .row {
        text-align: center;
    }
    .author-bio-section h2 {
        margin-top: 1.5rem;
    }
}

/* ======================================================= */
/* == 7. تنسيق الأقسام العامة == */
/* ======================================================= */
.section-padding {
    padding: 80px 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--accent-color);
    max-width: 600px;
    margin: 0 auto 3rem auto;
}

/* ======================================================= */
/* == 8. تنسيق الأزرار (موحدة ومتناسقة وقوية) == */
/* ======================================================= */

/* --- الأزرار الرئيسية (ممتلئة) --- */
/* استخدام محددات أكثر تحديداً و !important للتغلب على خصائص Bootstrap */
.btn.btn-primary {
    background: linear-gradient(45deg, var(--primary-color), #2a3f5f) !important;
    border: none !important;
    font-weight: 600;
    padding: 14px 35px;
    border-radius: 50px;
    transition: all 0.4s ease;
    box-shadow: 0 4px 15px rgba(26, 42, 76, 0.3) !important;
    color: var(--white-color) !important;
}

.btn.btn-primary:hover {
    background: linear-gradient(45deg, var(--secondary-color), #c5a568) !important;
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(176, 141, 87, 0.4) !important;
    color: var(--white-color) !important;
}

/* الزر الثانوي (بني) - للتحميل والأفعال المهمة */
.btn.btn-secondary {
    background: linear-gradient(45deg, var(--secondary-color), #c5a568) !important;
    border: none !important;
    font-weight: 600;
    padding: 14px 35px;
    border-radius: 50px;
    transition: all 0.4s ease;
    box-shadow: 0 4px 15px rgba(176, 141, 87, 0.3) !important;
    color: var(--white-color) !important;
}

.btn.btn-secondary:hover {
    background: linear-gradient(45deg, var(--primary-color), #2a3f5f) !important;
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(26, 42, 76, 0.4) !important;
    color: var(--white-color) !important;
}

/* --- الأزرار المحددة (Outline) --- */
.btn.btn-outline-primary, .btn.btn-outline-secondary, .btn.btn-outline-success, .btn.btn-outline-info {
    color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    font-weight: 600;
    border-radius: 50px;
    padding: 12px 30px;
    transition: all 0.3s ease;
}

.btn.btn-outline-primary:hover, .btn.btn-outline-secondary:hover, .btn.btn-outline-success:hover, .btn.btn-outline-info:hover {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    transform: translateY(-2px);
    color: var(--white-color) !important;
}

/* ======================================================= */
/* == 9. تنسيق البطاقات (Cards) == */
/* ======================================================= */
.card {
    border: none;
    border-radius: 16px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
    background: var(--white-color);
}

.card:hover {
    transform: translateY(-12px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.card-img-top {
    border-radius: 16px 16px 0 0;
    height: 260px;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.card:hover .card-img-top {
    transform: scale(1.08);
}

.card-title {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1.2rem;
}

.card-body {
    padding: 1.5rem;
}

/* ======================================================= */
/* == 10. تنسيق الفوتر == */
/* ======================================================= */
footer {
    background-color: var(--primary-color);
    color: var(--light-bg);
    padding: 4rem 0;
    text-align: center;
}

footer h3 {
    color: var(--white-color);
    font-weight: 700;
}

footer .social-links a {
    color: var(--light-bg);
    font-size: 1.8rem;
    margin: 0 20px;
    transition: all 0.3s ease;
}

footer .social-links a:hover {
    color: var(--secondary-color);
}

/* ======================================================= */
/* == 11. تصميم متجاوب للهيرو == */
/* ======================================================= */
@media (max-width: 768px) {
    .hero-section {
        padding: 80px 0;
        text-align: center;
    }
    .hero-image-wrapper {
        margin-bottom: 2rem;
    }
    .hero-image-wrapper img {
        max-width: 70%;
    }
    .hero-content-wrapper {
        padding-left: 15px;
        padding-right: 15px;
        align-items: center;
    }
    .hero-content-wrapper h1 {
        font-size: 2.5rem;
    }
    .hero-content-wrapper .lead {
        font-size: 1.2rem;
    }
}

/* ======================================================= */
/* == 12. CSS للغة الإنجليزية (LTR) == */
/* ======================================================= */
html[dir="ltr"] .navbar-brand {
    margin-right: 0;
    margin-left: 25px;
}

html[dir="ltr"] .navbar-nav {
    margin-left: auto;
    margin-right: 0;
}

html[dir="ltr"] .navbar-nav .nav-link {
    margin-right: 0;
    margin-left: 2rem;
}

/* ======================================================= */
/* == 13. تنسيقات لمفتاح تبديل اللغة المنسدل == */
/* ======================================================= */
.lang-switcher-dropdown .dropdown-toggle {
    color: var(--white-color);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    transition: all 0.3s ease;
}

.lang-switcher-dropdown .dropdown-toggle:hover {
    color: var(--secondary-color);
    background-color: rgba(255, 255, 255, 0.1);
}

.lang-switcher-dropdown .dropdown-item.active {
    font-weight: bold;
    color: var(--primary-color);
    background-color: #e9ecef;
}

.lang-switcher-dropdown .dropdown-menu {
    z-index: 1050;
}
/* ======================================================= */
/* == 8. تنسيق الأزرار (موحدة ومتناسقة وقوية) - مصححة == */
/* ======================================================= */

/* --- الأزرار الرئيسية (ممتلئة) --- */

/* الزر الأساسي (الآن باللون البني حسب طلبك) */
.btn.btn-primary {
    background: linear-gradient(45deg, var(--secondary-color), #c5a568) !important;
    border: none !important;
    font-weight: 600;
    padding: 14px 35px;
    border-radius: 50px;
    transition: all 0.4s ease;
    box-shadow: 0 4px 15px rgba(176, 141, 87, 0.3) !important;
    color: var(--white-color) !important;
}

.btn.btn-primary:hover {
    background: linear-gradient(45deg, var(--primary-color), #2a3f5f) !important;
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(26, 42, 76, 0.4) !important;
    color: var(--white-color) !important;
}

/* الزر الثانوي (الآن باللون الأزرق) */
.btn.btn-secondary {
    background: linear-gradient(45deg, var(--primary-color), #2a3f5f) !important;
    border: none !important;
    font-weight: 600;
    padding: 14px 35px;
    border-radius: 50px;
    transition: all 0.4s ease;
    box-shadow: 0 4px 15px rgba(26, 42, 76, 0.3) !important;
    color: var(--white-color) !important;
}

.btn.btn-secondary:hover {
    background: linear-gradient(45deg, var(--secondary-color), #c5a568) !important;
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(176, 141, 87, 0.4) !important;
    color: var(--white-color) !important;
}

/* --- الأزرار المحددة (Outline) --- */
/* جميع الأزرار المحددة تستخدم نفس اللون (الآن البني) */
.btn.btn-outline-primary, .btn.btn-outline-secondary, .btn.btn-outline-success, .btn.btn-outline-info {
    color: var(--secondary-color) !important;
    border-color: var(--secondary-color) !important;
    font-weight: 600;
    border-radius: 50px;
    padding: 12px 30px;
    transition: all 0.3s ease;
}

.btn.btn-outline-primary:hover, .btn.btn-outline-secondary:hover, .btn.btn-outline-success:hover, .btn.btn-outline-info:hover {
    background-color: var(--secondary-color) !important;
    border-color: var(--secondary-color) !important;
    transform: translateY(-2px);
    color: var(--white-color) !important;
}

/* ======================================================= */
/* == نهاية قسم تنسيق الأزرار == */
/* ======================================================= */