:root {
    --turquoise: #008B9C; 
    --gold: #C5A021;      
    --white: #ffffff;
    --bg-light: #f4f7f8;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

/* 
   إلغاء العرض الثابت وعودة التجاوب الطبيعي المريح للموبايل
*/
body { 
    font-family: 'Cairo', sans-serif; 
    background-color: var(--bg-light); 
    overflow-x: hidden; /* يمنع ظهور شريط التمرير الأفقي المزعج */
    width: 100%;
}

.container { 
    width: 90%; 
    max-width: 1200px; 
    margin: auto; 
    height: 100%; 
    position: relative; 
}

/* اللغات والاتجاهات */
html[lang="en"] .ar { display: none !important; }
html[lang="ar"] .en { display: none !important; }
html[lang="en"] body { direction: ltr; text-align: left; }
html[lang="ar"] body { direction: rtl; text-align: right; }

/* Top Bar */
.top-bar { background: var(--turquoise); color: white; padding: 10px 0; font-size: 13px; font-weight: bold; }
.top-bar-flex { display: flex; justify-content: space-between; align-items: center; }
.lang-switch-btn { background: transparent; border: none; color: white; cursor: pointer; font-weight: bold; font-family: inherit; }

/* Header & Logo */
header { background: white; padding: 15px 0; border-bottom: 2px solid #eee; position: sticky; top: 0; z-index: 1000; box-shadow: 0 2px 10px rgba(0,0,0,0.05); }
.header-flex { display: flex; justify-content: space-between; align-items: center; }

.logo { display: flex; align-items: center; gap: 15px; text-decoration: none; }
.logo img { height: 85px; object-fit: contain; }
.logo-text-wrapper { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.logo-text { font-family: 'Cairo', sans-serif; font-weight: 900; font-size: 20px; color: var(--turquoise); line-height: 1; }
.logo-subtext { font-family: 'Cairo', sans-serif; font-weight: 700; font-size: 14px; color: #666; line-height: 1; }

.nav-links { list-style: none; display: flex; gap: 20px; }
.nav-links a { text-decoration: none; color: #555; font-weight: 700; font-size: 15px; transition: 0.3s; }
.nav-links a:hover, .nav-links li:hover > a, .nav-links a.active { color: var(--turquoise) !important; }

/* السلايدر المحكوم */
.slider-section-bg { padding: 40px 0; }
.contained-split-slider { position: relative; width: 100%; height: 550px; background: #fff; box-shadow: 0 15px 45px rgba(0,0,0,0.1); overflow: hidden; border-radius: 4px; }
.split-slide { position: absolute; width: 100%; height: 100%; display: flex; opacity: 0; transition: opacity 0.8s ease-in-out; }
.split-slide.active { opacity: 1; z-index: 5; }
.slide-img { flex: 1; height: 100%; }
.slide-img img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }

.slide-info { flex: 1; background: var(--turquoise); color: white; padding: 50px; display: flex; flex-direction: column; justify-content: center; }
.tag-gold { background: var(--gold); color: white; padding: 6px 15px; font-size: 13px; font-weight: 900; margin-bottom: 15px; width: fit-content; }
.slide-info h2 { font-size: 24px; line-height: 1.4; margin-bottom: 12px; font-weight: 900; }
.slide-info p { font-size: 14px; line-height: 1.6; margin-bottom: 20px; opacity: 0.9; }

.btn-main { display: inline-block; background: white; color: var(--turquoise); padding: 8px 20px; font-size: 13px; text-decoration: none; font-weight: bold; border-radius: 4px; transition: 0.3s; width: fit-content; }
.btn-main:hover { background: var(--gold); color: white; }

.nav-arrow { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(0,0,0,0.2); color: white; border: none; padding: 15px; cursor: pointer; z-index: 20; font-size: 20px; }
.prev { left: 0; } .next { right: 0; }
.nav-arrow:hover { background: var(--gold); }

/* قسم الكلام */
.simple-about-section { padding: 80px 0; background-color: #fff; text-align: center; }
.simple-content { max-width: 800px; margin: auto; }
.simple-content h2 { color: var(--turquoise); font-size: 30px; font-weight: 900; margin-bottom: 20px; position: relative; }
.simple-content h2::after { content: ''; position: absolute; bottom: -8px; left: 50%; transform: translateX(-50%); width: 40px; height: 3px; background: var(--gold); }
.simple-content p { font-size: 17px; line-height: 1.8; color: #555; margin-bottom: 30px; text-align: center; }
.simple-btn { display: inline-block; background: var(--gold); color: #fff; padding: 10px 30px; text-decoration: none; font-weight: bold; border-radius: 4px; font-size: 14px; transition: 0.3s; }
.simple-btn:hover { background: var(--turquoise); }

/* القسم: مشاريعنا */
.projects-section { padding: 60px 0 80px; background-color: var(--bg-light); }
.projects-header { text-align: center; margin-bottom: 50px; }
.projects-header h2 { color: var(--turquoise); font-size: 32px; font-weight: 900; }
.header-line { width: 60px; height: 3px; background: var(--gold); margin: 15px auto 0; }

.projects-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 30px; }
.project-card { background: #fff; border-radius: 6px; overflow: hidden; box-shadow: 0 5px 20px rgba(0,0,0,0.05); transition: transform 0.3s ease, box-shadow 0.3s ease; display: flex; flex-direction: column; }
.project-card:hover { transform: translateY(-5px); box-shadow: 0 10px 30px rgba(0,0,0,0.15); }
.project-img { height: 220px; overflow: hidden; }
.project-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.project-card:hover .project-img img { transform: scale(1.05); }

.project-content { padding: 25px; display: flex; flex-direction: column; flex-grow: 1; }
.project-content h3 { color: var(--turquoise); font-size: 20px; font-weight: 900; margin-bottom: 12px; }
.project-content p { color: #555; font-size: 15px; line-height: 1.7; margin-bottom: 20px; flex-grow: 1; }

.project-link { display: inline-flex; align-items: center; gap: 8px; color: var(--gold); text-decoration: none; font-weight: bold; font-size: 14px; transition: 0.3s; margin-top: auto; }
.project-link i { font-size: 12px; }
.project-link:hover { color: var(--turquoise); }

/* القسم: خريطة الفروع */
.map-section { padding: 60px 0 80px; background-color: #fff; }
.map-header { margin-bottom: 30px; }
.map-header h2 { color: var(--turquoise); font-size: 32px; font-weight: 900; }
html[lang="en"] .map-header { text-align: left; }
html[lang="ar"] .map-header { text-align: right; }

.map-container { width: 100%; height: 500px; border-radius: 8px; overflow: hidden; box-shadow: 0 5px 20px rgba(0,0,0,0.1); z-index: 1; border: 2px solid var(--turquoise); }
#shorouk-map { width: 100%; height: 100%; }
.leaflet-popup-content-wrapper { border-radius: 4px; }
.leaflet-popup-content b { color: var(--turquoise); font-family: 'Cairo', sans-serif; font-size: 16px; display: block; margin-bottom: 5px; }
.leaflet-popup-content p { font-family: 'Cairo', sans-serif; margin: 0; color: #555; }

/* الإحصائيات */
.stats-section { background: var(--turquoise); color: white; padding: 70px 0; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; text-align: center; }
.stat-item i { font-size: 36px; color: var(--white); opacity: 0.8; margin-bottom: 15px; }
.stat-number { font-size: 45px; font-weight: 900; color: var(--gold); margin-bottom: 5px; line-height: 1; }
.stat-label { font-size: 16px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; }

/* الفوتر الأنيق */
.main-footer { position: relative; background-color: #f0f4f8; color: #444444; padding: 70px 0 40px; border-top: 4px solid var(--turquoise); box-shadow: 0 -10px 30px rgba(0,0,0,0.06); overflow: hidden; }
.main-footer::before { content: ''; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 60%; height: 80%; background-image: url('assets/logo.png'); background-size: contain; background-position: center; background-repeat: no-repeat; opacity: 0.08; z-index: 0; pointer-events: none; }
.main-footer .container { position: relative; z-index: 1; }
.footer-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 50px; } 
.footer-col { display: flex; flex-direction: column; }
.footer-title { color: var(--turquoise); font-size: 19px; font-weight: 900; letter-spacing: 1px; margin-bottom: 12px; text-transform: uppercase; }
.footer-line { width: 100%; height: 1px; background-color: #dcdcdc; margin-bottom: 20px; position: relative; }
.footer-line::after { content: ''; position: absolute; top: 0; width: 50px; height: 2px; background-color: var(--gold); }
html[lang="ar"] .footer-line::after { right: 0; }
html[lang="en"] .footer-line::after { left: 0; }
.footer-col p { font-size: 15px; line-height: 1.8; color: #555555; font-weight: 600; margin-bottom: 20px; }
.mt-4 { margin-top: 30px; }
.contact-widget { display: flex; flex-direction: column; gap: 20px; }
.contact-item-footer { display: flex; align-items: flex-start; gap: 15px; }
.contact-item-footer i { color: var(--gold); font-size: 18px; margin-top: 3px; }
.contact-item-footer h4 { color: var(--turquoise); font-size: 14px; font-weight: 900; margin-bottom: 5px; text-transform: uppercase; }
.contact-item-footer p { margin: 0; font-size: 14px; color: #555555; font-weight: 600; }

/* =========================================
   شاشة التحميل (Loader)
========================================= */
#page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-light);
    z-index: 999999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loader-circle {
    width: 110px;
    height: 110px;
    background-color: #fff;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    position: relative;
}

.loader-circle::before {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border-radius: 50%;
    border: 3px solid transparent;
    border-top-color: var(--turquoise);
    border-bottom-color: var(--gold);
    animation: spin 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
}

.loader-circle img {
    width: 65%;
    object-fit: contain;
    animation: pulse 1.5s ease-in-out infinite; 
}

@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
@keyframes pulse { 0% { transform: scale(0.9); } 50% { transform: scale(1.05); } 100% { transform: scale(0.9); } }
.loader-hidden { opacity: 0; visibility: hidden; }


/* =========================================
   تنسيقات الموبايل والتابلت (المريحة للعين)
========================================= */
@media (max-width: 900px) {
    /* تظبيط شريط التواصل فوق اللوجو */
    .top-bar-flex { flex-direction: column; text-align: center; gap: 8px; }
    .top-item { justify-content: center; width: 100%; font-size: 12px; }
    
    /* تظبيط الهيدر واللوجو */
    .header-flex { flex-direction: column; text-align: center; gap: 15px; }
    .logo { justify-content: center; flex-direction: column; gap: 10px; }
    .logo img { height: 70px; } 
    .logo-text { font-size: 22px; }
    
    /* تظبيط الروابط زي موقع Caritas بالظبط */
    .nav-links { flex-wrap: wrap; justify-content: center; gap: 15px; padding: 10px 0; width: 100%; line-height: 2.2; }
    .nav-links a { font-size: 15px; padding: 5px 10px; display: inline-block; }
    
    /* تظبيط السلايدر عشان يبقى صورة وتحتها كلام */
    .contained-split-slider { height: auto; display: flex; flex-direction: column; }
    .split-slide { position: relative; flex-direction: column; display: none; }
    .split-slide.active { display: flex; }
    .slide-img { height: 280px; width: 100%; }
    .slide-info { padding: 40px 20px; text-align: center; width: 100%; }
    .slide-info h2 { font-size: 22px; }
    .btn-main { margin: 0 auto; }
    
    /* تظبيط شبكات الكروت عشان تبقى كارت واحد بعرض الشاشة */
    .projects-grid { grid-template-columns: 1fr; }
    
    /* تظبيط الإحصائيات */
    .stats-grid { grid-template-columns: 1fr 1fr; gap: 30px 15px; }
    .stat-number { font-size: 35px; }
    .stat-label { font-size: 14px; }
    
    /* تظبيط الخريطة */
    .map-container { height: 300px; }
    
    /* تظبيط الفوتر وتوسيطه */
    .footer-grid { grid-template-columns: 1fr; gap: 40px; text-align: center; }
    .footer-line::after { left: 50%; transform: translateX(-50%); }
    html[lang="ar"] .footer-line::after, html[lang="en"] .footer-line::after { right: auto; left: 50%; transform: translateX(-50%); }
    .contact-item-footer { flex-direction: column; align-items: center; text-align: center; gap: 5px; }
}

/* للموبايلات الصغيرة جداً */
@media (max-width: 400px) {
    .stats-grid { grid-template-columns: 1fr; }
    .nav-links a { font-size: 14px; }
}