/* =====================================================
   نزهة أبي ربيع — ملف التصميم الرئيسي
   Nuzhat Abi Rabee — Main Stylesheet
   ===================================================== */

/* ---- متغيرات الألوان والخطوط ---- */
:root {
    /* الألوان الرئيسية */
    --clr-primary:       #5C7A4E;   /* أخضر زيتوني */
    --clr-primary-dark:  #3E5636;   /* أخضر داكن */
    --clr-primary-light: #7FA36A;   /* أخضر فاتح */
    --clr-gold:          #C4973B;   /* ذهبي ترابي */
    --clr-gold-light:    #D4AB55;   /* ذهبي فاتح */

    /* خلفيات وألوان محايدة */
    --clr-bg:            #F5F3EC;   /* خلفية عامة */
    --clr-bg-alt:        #EDEAE0;   /* خلفية ثانوية */
    --clr-white:         #FAFAF5;   /* أبيض دافئ */
    --clr-text:          #2C2C2C;   /* نص رئيسي */
    --clr-text-muted:    #7A7A72;   /* نص ثانوي */
    --clr-border:        #D8D3C4;   /* لون الحدود */

    /* ظلال */
    --shadow-sm: 0 2px 8px  rgba(60, 80, 50, 0.08);
    --shadow:    0 4px 18px rgba(60, 80, 50, 0.12);
    --shadow-hover: 0 8px 28px rgba(60, 80, 50, 0.20);

    /* خطوط */
    --font-body:    'Cairo', 'Segoe UI', sans-serif;
    --font-heading: 'Amiri', 'Times New Roman', serif;

    /* أبعاد */
    --radius:    14px;
    --radius-sm: 8px;
    --max-w:     1100px;
    --transition: 0.28s ease;
}

/* =====================================================
   إعادة تعيين عامة
   ===================================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: var(--clr-bg);
    color: var(--clr-text);
    direction: rtl;
    line-height: 1.85;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a  { color: inherit; }
ul { list-style: none; }

/* =====================================================
   الحاوية
   ===================================================== */
.container {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* =====================================================
   شريط التنقل
   ===================================================== */
.navbar {
    position: sticky;
    top: 0;
    z-index: 999;
    background: rgba(245, 243, 236, 0.96);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--clr-border);
}

.nav-container {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0.7rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    text-decoration: none;
}

.logo-img {
    height: 38px;
    width: auto;
}

.nav-brand {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--clr-primary-dark);
    white-space: nowrap;
}

.nav-links {
    display: flex;
    gap: 0.15rem;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--clr-text-muted);
    font-size: 0.9rem;
    padding: 0.4rem 0.85rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    font-weight: 600;
}

.nav-links a:hover {
    color: var(--clr-primary);
    background: rgba(92, 122, 78, 0.09);
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
    color: var(--clr-primary-dark);
    padding: 0.3rem 0.5rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.nav-toggle:hover { background: rgba(92, 122, 78, 0.09); }

/* =====================================================
   قسم Hero
   ===================================================== */
.hero {
    min-height: 92vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 5rem 1.5rem 4rem;
    background:
        radial-gradient(ellipse 70% 50% at 80% 20%, rgba(92,122,78,0.07) 0%, transparent 70%),
        radial-gradient(ellipse 60% 50% at 20% 80%, rgba(196,151,59,0.06) 0%, transparent 70%),
        linear-gradient(160deg, #FAFAF5 0%, #F0EDE2 100%);
    position: relative;
    overflow: hidden;
}

.hero-content {
    max-width: 680px;
    position: relative;
    z-index: 1;
}

/* دائرة الشعار */
.hero-logo-wrap {
    margin-bottom: 1.75rem;
}

.hero-logo-img {
    width: 130px;
    height: 130px;
    object-fit: contain;
    border-radius: 50%;
    border: 3px solid var(--clr-gold);
    padding: 10px;
    background: var(--clr-white);
    box-shadow: var(--shadow);
    margin: 0 auto;
    transition: var(--transition);
}

.hero-logo-img:hover {
    transform: scale(1.04);
    box-shadow: var(--shadow-hover);
}

/* العنوان الرئيسي */
.hero-title {
    font-family: var(--font-heading);
    font-size: clamp(2.2rem, 6vw, 3.6rem);
    color: var(--clr-primary-dark);
    line-height: 1.2;
    margin-bottom: 0.3rem;
}

.hero-subtitle {
    font-family: var(--font-body);
    font-size: clamp(0.95rem, 2.5vw, 1.2rem);
    color: var(--clr-gold);
    font-weight: 300;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.hero-name {
    display: inline-block;
    font-size: 0.92rem;
    color: var(--clr-text-muted);
    background: rgba(255,255,255,0.65);
    border: 1px solid var(--clr-border);
    border-radius: 100px;
    padding: 0.35rem 1.2rem;
    margin-bottom: 1.75rem;
}

.hero-tagline {
    font-size: clamp(1rem, 2.5vw, 1.18rem);
    color: var(--clr-text);
    line-height: 2.1;
    margin-bottom: 2.5rem;
    font-weight: 400;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* =====================================================
   الأزرار
   ===================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 2.2rem;
    border-radius: 100px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 700;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    border: 2px solid transparent;
    white-space: nowrap;
}

.btn-primary {
    background: var(--clr-primary);
    color: #fff;
    border-color: var(--clr-primary);
}

.btn-primary:hover {
    background: var(--clr-primary-dark);
    border-color: var(--clr-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(62, 86, 54, 0.32);
}

.btn-secondary {
    background: transparent;
    color: var(--clr-primary);
    border-color: var(--clr-primary);
}

.btn-secondary:hover {
    background: var(--clr-primary);
    color: #fff;
    transform: translateY(-2px);
}

/* زر فتح التطبيق */
.btn-open {
    display: inline-block;
    background: var(--clr-gold);
    color: #fff;
    border: none;
    padding: 0.5rem 1.3rem;
    border-radius: 100px;
    font-family: var(--font-body);
    font-size: 0.88rem;
    font-weight: 700;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    white-space: nowrap;
}

.btn-open:hover {
    background: #A57A22;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(196,151,59,0.35);
}

/* زر معطّل — التطبيق قريبًا */
.btn-disabled {
    display: inline-block;
    background: rgba(122, 122, 114, 0.07);
    color: var(--clr-text-muted);
    border: 1px solid rgba(122, 122, 114, 0.18);
    padding: 0.5rem 1.3rem;
    border-radius: 100px;
    font-family: var(--font-body);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: default;
    white-space: nowrap;
    user-select: none;
}

/* =====================================================
   الأقسام العامة
   ===================================================== */
.section {
    padding: 5.5rem 0;
}

.section-alt {
    background: var(--clr-bg-alt);
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title {
    font-family: var(--font-heading);
    font-size: clamp(1.7rem, 4vw, 2.3rem);
    color: var(--clr-primary-dark);
    margin-bottom: 0.5rem;
    display: inline-block;
    position: relative;
}

/* الخط الذهبي تحت العنوان */
.section-title::after {
    content: '';
    display: block;
    width: 56px;
    height: 3px;
    background: var(--clr-gold);
    border-radius: 2px;
    margin: 0.55rem auto 0;
}

.section-desc {
    color: var(--clr-text-muted);
    font-size: 1rem;
    max-width: 580px;
    margin: 0.5rem auto 0;
    line-height: 2;
}

/* =====================================================
   شبكة البطاقات
   ===================================================== */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.scholars-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

/* =====================================================
   بطاقة التطبيق / المشروع
   ===================================================== */
.app-card {
    background: var(--clr-white);
    border-radius: var(--radius);
    padding: 1.75rem;
    border: 1px solid var(--clr-border);
    border-top: 3px solid transparent;   /* يتلوّن عند hover */
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    transition: var(--transition);
}

.app-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: var(--clr-primary-light);
    border-top-color: var(--clr-primary);
}

.card-header {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
}

/* غلاف دائري للأيقونة */
.card-icon-wrap {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(92,122,78,0.1), rgba(196,151,59,0.07));
    border: 1px solid rgba(92, 122, 78, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: var(--transition);
}

.app-card:hover .card-icon-wrap {
    background: linear-gradient(135deg, rgba(92,122,78,0.16), rgba(196,151,59,0.11));
    border-color: rgba(92, 122, 78, 0.22);
}

.card-icon {
    font-size: 1.7rem;
    line-height: 1;
}

.card-title {
    font-family: var(--font-heading);
    font-size: 1.12rem;
    font-weight: 700;
    color: var(--clr-primary-dark);
    line-height: 1.4;
    flex: 1;
}

.card-desc {
    font-size: 0.9rem;
    color: var(--clr-text-muted);
    line-height: 1.95;
    flex: 1;
}

.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
    padding-top: 0.75rem;
    border-top: 1px solid var(--clr-border);
    margin-top: auto;
}

/* =====================================================
   الشارات — Badge
   ===================================================== */
.badge {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.28rem 0.85rem;
    border-radius: 100px;
    border: 1px solid transparent;
    white-space: nowrap;
}

.badge-ready {
    background: rgba(92, 122, 78, 0.1);
    color: var(--clr-primary);
    border-color: rgba(92, 122, 78, 0.28);
}

.badge-dev {
    background: rgba(196, 151, 59, 0.1);
    color: #8A6514;
    border-color: rgba(196, 151, 59, 0.3);
}

.badge-soon {
    background: rgba(122, 122, 114, 0.08);
    color: var(--clr-text-muted);
    border-color: rgba(122, 122, 114, 0.2);
}

/* =====================================================
   بطاقة الشيخ
   ===================================================== */
.scholar-card {
    background: var(--clr-white);
    border-radius: var(--radius);
    padding: 2rem 1.5rem;
    border: 1px solid var(--clr-border);
    box-shadow: var(--shadow-sm);
    text-align: center;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
}

.scholar-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: var(--clr-gold);
}

/* الدائرة الافتراضية للشيخ */
.scholar-avatar {
    width: 82px;
    height: 82px;
    border-radius: 50%;
    object-fit: cover;
    background: linear-gradient(135deg, var(--clr-primary-light), var(--clr-gold));
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-size: 1.8rem;
    color: #fff;
    margin-bottom: 0.5rem;
    flex-shrink: 0;
}

.scholar-name {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    color: var(--clr-primary-dark);
    font-weight: 700;
}

.scholar-specialty {
    font-size: 0.82rem;
    color: var(--clr-gold);
    font-weight: 700;
}

.scholar-note {
    font-size: 0.88rem;
    color: var(--clr-text-muted);
    line-height: 1.85;
}

/* =====================================================
   بطاقات التواصل
   ===================================================== */
.social-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
    max-width: 900px;
    margin: 0 auto;
}

.social-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: var(--clr-white);
    border-radius: var(--radius);
    border: 1px solid var(--clr-border);
    text-decoration: none;
    color: var(--clr-text);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.social-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
    border-color: var(--clr-primary-light);
}

.social-icon {
    font-size: 1.9rem;
    line-height: 1;
    flex-shrink: 0;
}

.social-info { flex: 1; min-width: 0; }

.social-platform {
    font-size: 0.75rem;
    color: var(--clr-text-muted);
    margin-bottom: 0.1rem;
}

.social-handle {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--clr-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* =====================================================
   Placeholder
   ===================================================== */
.placeholder-wrap {
    display: flex;
    justify-content: center;
}

.placeholder-card {
    background: var(--clr-white);
    border: 2px dashed var(--clr-border);
    border-radius: var(--radius);
    padding: 3rem 4rem;
    text-align: center;
    color: var(--clr-text-muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.placeholder-icon {
    font-size: 2.5rem;
    opacity: 0.55;
}

/* =====================================================
   الفوتر
   ===================================================== */
.footer {
    background: var(--clr-primary-dark);
    color: rgba(255,255,255,0.85);
    text-align: center;
    padding: 3.5rem 1.5rem 2.5rem;
}

.footer-brand {
    font-family: var(--font-heading);
    font-size: 1.7rem;
    color: #fff;
    margin-bottom: 0.2rem;
}

.footer-name {
    font-size: 0.92rem;
    color: var(--clr-gold-light);
    margin-bottom: 2rem;
}

.footer-quote {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-style: italic;
    line-height: 2.1;
    max-width: 580px;
    margin: 0 auto 2rem;
    color: rgba(255,255,255,0.72);
    border-right: 3px solid var(--clr-gold);
    padding-right: 1.25rem;
    text-align: right;
}

.footer-copy {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.4);
}

/* =====================================================
   استجابة الجوال
   ===================================================== */
@media (max-width: 768px) {
    /* قائمة الجوال */
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        right: 0;
        left: 0;
        background: var(--clr-white);
        flex-direction: column;
        padding: 0.75rem 1rem;
        border-bottom: 1px solid var(--clr-border);
        box-shadow: var(--shadow);
        gap: 0.1rem;
    }

    .nav-links.open { display: flex; }

    .nav-links a {
        padding: 0.65rem 0.9rem;
        border-radius: var(--radius-sm);
        display: block;
    }

    .nav-toggle { display: block; }

    .nav-container { position: relative; }

    /* Hero */
    .hero { min-height: 85vh; padding: 3.5rem 1rem 3rem; }
    .hero-logo-img { width: 100px; height: 100px; }

    .hero-buttons { flex-direction: column; align-items: center; }
    .btn { width: 100%; max-width: 280px; }

    /* أقسام */
    .section { padding: 3.5rem 0; }

    /* شبكات */
    .cards-grid,
    .scholars-grid { grid-template-columns: 1fr; }

    .social-grid { grid-template-columns: 1fr; }

    /* placeholder */
    .placeholder-card { padding: 2.5rem 1.5rem; }

    /* اقتباس الفوتر */
    .footer-quote {
        border-right: none;
        border-top: 2px solid var(--clr-gold);
        padding-right: 0;
        padding-top: 1rem;
        text-align: center;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .cards-grid { grid-template-columns: repeat(2, 1fr); }
    .scholars-grid { grid-template-columns: repeat(3, 1fr); }
    .social-grid { grid-template-columns: repeat(3, 1fr); }
}

/* =====================================================
   مبدّل اللغة — Lang Switcher
   ===================================================== */
.lang-switcher {
    display: flex;
    align-items: center;
    gap: 0.15rem;
    background: rgba(92, 122, 78, 0.07);
    border: 1px solid var(--clr-border);
    border-radius: 100px;
    padding: 0.2rem 0.25rem;
    flex-shrink: 0;
}

.lang-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 0.28rem 0.7rem;
    border-radius: 100px;
    color: var(--clr-text-muted);
    transition: var(--transition);
    font-family: var(--font-body);
    letter-spacing: 0.5px;
    line-height: 1;
}

.lang-btn.active {
    background: var(--clr-primary);
    color: #fff;
    box-shadow: 0 1px 4px rgba(62, 86, 54, 0.25);
}

.lang-btn:hover:not(.active) {
    background: rgba(92, 122, 78, 0.12);
    color: var(--clr-primary);
}

/* =====================================================
   الفرع الهولندي — Dutch Bridge Section
   ===================================================== */
.dutch-bridge {
    background:
        linear-gradient(to bottom, var(--clr-bg-alt) 0%, var(--clr-bg) 100%);
    border-top:    2px solid rgba(196, 151, 59, 0.18);
    border-bottom: 2px solid rgba(196, 151, 59, 0.18);
}

.dutch-bridge-intro {
    text-align: center;
    max-width: 680px;
    margin: 0 auto 3rem;
}

.bridge-icon {
    font-size: 2.4rem;
    margin-bottom: 1rem;
    display: block;
}

/* صندوق النص التفسيري */
.bridge-desc {
    margin-top: 1.25rem;
    padding: 1.2rem 1.5rem;
    background: rgba(196, 151, 59, 0.06);
    border: 1px solid rgba(196, 151, 59, 0.22);
    border-radius: var(--radius);
    font-size: 0.97rem;
    color: var(--clr-text);
    line-height: 2.1;
    text-align: right;
    /* الخط الجانبي الذهبي — يتبع الاتجاه */
    border-right: 4px solid var(--clr-gold);
}

.nl-apps-header {
    text-align: center;
    margin-bottom: 2rem;
}

.section-subtitle {
    font-family: var(--font-heading);
    font-size: clamp(1.2rem, 3vw, 1.55rem);
    color: var(--clr-primary-dark);
    display: inline-block;
    position: relative;
    margin-bottom: 0.25rem;
}

.section-subtitle::after {
    content: '';
    display: block;
    width: 38px;
    height: 2px;
    background: var(--clr-gold);
    border-radius: 2px;
    margin: 0.4rem auto 0;
}

/* =====================================================
   تعديلات LTR (وضع الهولندية)
   ===================================================== */

/* اتجاه الصفحة عند تفعيل الهولندية */
[dir="ltr"] body {
    direction: ltr;
}

/* قلب الخط الجانبي في اقتباس الفوتر */
[dir="ltr"] .footer-quote {
    border-right: none;
    border-left: 3px solid var(--clr-gold);
    padding-right: 0;
    padding-left: 1.25rem;
    text-align: left;
}

/* قلب الخط الجانبي في صندوق الجسر */
[dir="ltr"] .bridge-desc {
    border-right: 1px solid rgba(196, 151, 59, 0.22);
    border-left: 4px solid var(--clr-gold);
    text-align: left;
}

/* الجوال: اقتباس الفوتر في LTR */
@media (max-width: 768px) {
    [dir="ltr"] .footer-quote {
        border-left: none;
        border-top: 2px solid var(--clr-gold);
        padding-left: 0;
        padding-top: 1rem;
        text-align: center;
    }
}
