/* =========================================
   1. VARIABLES & GLOBAL
   ========================================= */
:root {
    /* ألوان CultureArabia */
    --ca-blue: #0A2540;
    --ca-sand: #D6C9A8;
    --ca-gold: #C9A14A;
    --ca-white: #ffffff;
    --bs-body-font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;

    /* إعدادات سلايدر الشعارات (Large Size) */
    --logo-width: 350px;   /* عرض الشريحة */
    --logo-height: 200px;  /* ارتفاع الشريحة */
    --logo-count: 50;      /* العدد الافتراضي للشعارات */
}

body {
    overflow-x: hidden; /* لمنع ظهور شريط تمرير أفقي */
}

a {
    text-decoration: none;
}

/* =========================================
   2. NAVBAR (HEADER)
   ========================================= */
.navbar {
    background-color: var(--ca-white);
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    padding: 10px 0;
}

.navbar-brand img {
    max-height: 50px;
}

.navbar-nav .nav-link {
    color: var(--ca-blue) !important;
    font-weight: 600;
    margin: 0 8px;
    transition: 0.3s;
    font-size: 1rem;
}

.navbar-nav .nav-link:hover, 
.navbar-nav .nav-link.active {
    color: var(--ca-gold) !important;
    position: relative;
}

/* خط صغير تحت الرابط النشط */
.navbar-nav .nav-link.active::after {
    content: '';
    display: block;
    width: 20px;
    height: 2px;
    background: var(--ca-gold);
    margin: 2px auto 0;
}

.btn-join-nav {
    background-color: var(--ca-blue);
    color: white !important;
    border-radius: 50px;
    padding: 8px 25px !important;
    transition: 0.3s;
}

.btn-join-nav:hover {
    background-color: var(--ca-gold);
    color: var(--ca-blue) !important;
}

/* =========================================
   3. HERO SECTION (SLIDER & STATIC)
   ========================================= */
/* Hero Slider Container */
.hero-slider-section {
    min-height: 85vh;
    position: relative;
    overflow: hidden;
    background-color: #333; /* Fallback */
}

/* Individual Slides */
.hero-slider-section .carousel-item {
    height: 100vh; /* يملأ الشاشة */
    min-height: 600px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Overlay Content (Text) */
.hero-content-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 2; /* فوق السلايدر */
    pointer-events: none; /* يسمح بالنقر من خلاله إذا لزم الأمر */
}

.hero-content-overlay .container {
    pointer-events: auto; /* إعادة تفعيل النقر للأزرار */
}

/* Page Header (For Inner Pages like Services) */
.page-header {
    background-size: cover;
    background-position: center;
    position: relative;
}

/* Mobile Responsiveness for Hero */
@media (max-width: 768px) {
    .hero-slider-section, .page-header {
        min-height: 60vh !important;
    }
    .display-3 {
        font-size: 2.5rem;
    }
}

/* =========================================
   4. SECTIONS (ABOUT, STATS, CTA)
   ========================================= */
/* About Section */
.about-img-container {
    position: relative;
    padding: 15px;
}

.about-img-container::before {
    content: "";
    position: absolute;
    top: 0; left: 0;
    width: 100px; height: 100px;
    border-top: 5px solid var(--ca-gold);
    border-left: 5px solid var(--ca-gold);
    z-index: 0;
}

.about-img {
    position: relative;
    z-index: 1;
    border-radius: 5px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

/* Stats Section */
.stats-section {
    background-color: var(--ca-blue);
    color: white;
    /* نقش خفيف اختياري */
    background-image: linear-gradient(rgba(10, 37, 64, 0.9), rgba(10, 37, 64, 0.9)); 
}

.stat-item h3 {
    font-size: 3rem;
    font-weight: 800;
    color: var(--ca-gold);
    margin-bottom: 0;
}

/* CTA Section */
.cta-section {
    background: linear-gradient(90deg, var(--ca-blue) 0%, #1a3c5e 100%);
}

/* =========================================
   5. CARDS (SERVICES & COUNTRIES)
   ========================================= */
/* Country Cards (Home) */
.country-card {
    position: relative;
    height: 250px;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.country-card:hover {
    transform: translateY(-5px);
}

.country-bg {
    width: 100%; height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.5s ease;
}

.country-card:hover .country-bg {
    transform: scale(1.1);
}

.country-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to top, rgba(10,37,64,0.9), transparent);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 20px;
}

.country-name {
    color: white;
    font-weight: 700;
    font-size: 1.25rem;
    border-bottom: 3px solid var(--ca-gold);
    padding-bottom: 5px;
}

/* Service Cards (Modern - Home) */
.service-card-modern {
    background: white;
    padding: 40px 30px;
    border-radius: 10px;
    border: 1px solid #eee;
    transition: 0.3s;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.service-card-modern:hover {
    border-color: var(--ca-gold);
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
}

.service-card-modern::after {
    content: "";
    position: absolute;
    bottom: 0; left: 0;
    width: 0%; height: 4px;
    background-color: var(--ca-gold);
    transition: 0.3s;
}

.service-card-modern:hover::after {
    width: 100%;
}

.service-icon {
    width: 70px; height: 70px;
    background-color: #f8f9fa;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: var(--ca-blue);
    font-size: 1.8rem;
    margin-bottom: 25px;
    transition: 0.3s;
}

.service-card-modern:hover .service-icon {
    background-color: var(--ca-blue);
    color: var(--ca-gold);
}

/* Service Cards (Standard - Services Page) */
.service-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 1rem 3rem rgba(0,0,0,.175)!important;
}

.service-card .icon-box i {
    transition: transform 0.3s ease;
}

.service-card:hover .icon-box i {
    transform: scale(1.1);
    color: var(--ca-gold) !important;
}

/* =========================================
   6. CLIENTS LOGO SLIDER (X-LARGE & SMART)
   ========================================= */
.slider {
    height: 220px; /* ارتفاع الحاوية الكلي */
    margin: auto;
    position: relative;
    width: 100%;
    display: grid;
    place-items: center;
    overflow: hidden;
}

.slide-track {
    display: flex;
    /* حساب العرض تلقائياً بناءً على عدد الشعارات */
    width: calc(var(--logo-width) * var(--logo-count) * 2); 
    
    /* حركة بطيئة جداً (60 ثانية) لتناسب العدد الكبير */
    animation: scroll 60s linear infinite;
}

.slide {
    height: var(--logo-height);
    width: var(--logo-width);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.slide img {
    width: 100%;
    max-height: 180px; /* أقصى ارتفاع للصورة (كبير) */
    object-fit: contain;
    filter: grayscale(100%);
    transition: all 0.3s ease;
    cursor: pointer;
    opacity: 0.8;
}

.slide img:hover {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.15); /* تكبير أكثر عند المرور */
}

.slider:hover .slide-track {
    animation-play-state: paused;
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        /* تحريك الشريط بمقدار نصف طوله (مجموعة واحدة) */
        transform: translateX(calc(var(--logo-width) * var(--logo-count) * -1));
    }
}

/* تجاوب السلايدر مع الجوال */
@media (max-width: 768px) {
    :root {
        --logo-width: 200px; /* تصغير العرض في الجوال */
    }
    .slider {
        height: 120px;
    }
    .slide {
        height: 100px;
        padding: 10px;
    }
    .slide img {
        max-height: 90px;
    }
}

/* =========================================
   7. FOOTER
   ========================================= */
footer {
    background-color: var(--ca-blue);
    color: white;
    padding-top: 70px;
    font-size: 0.95rem;
}

.footer-title {
    color: var(--ca-gold);
    font-weight: bold;
    margin-bottom: 25px;
    font-size: 1.1rem;
    text-transform: uppercase;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: #ddd;
    text-decoration: none;
    transition: 0.3s;
}

.footer-links a:hover {
    color: var(--ca-gold);
    padding-left: 5px;
}

.social-icon {
    width: 40px; height: 40px;
    background: rgba(255,255,255,0.1);
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 50%; 
    margin-right: 10px;
    color: white; transition: 0.3s; text-decoration: none;
}

.social-icon:hover {
    background: var(--ca-gold);
    color: var(--ca-blue);
}

.copyright-bar {
    background-color: rgba(0,0,0,0.2);
    padding: 20px 0;
    margin-top: 50px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 0.85rem;
}
/* =========================================
   CLIENTS GRID PAGE STYLES
   ========================================= */
/* =========================================
   CLIENTS GRID PAGE STYLES (UPDATED)
   ========================================= */
.client-box {
    background: white;
    height: 160px; /* زيادة الارتفاع قليلاً */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 25px;
    
    /* الحواف الدائرية */
    border-radius: 12px;
    
    /* الإطار الخفيف (الظل) */
    /* هذا الظل يعطي إيحاء بالإطار الناعم دون أن يكون خطاً حاداً */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05); 
    border: 1px solid rgba(0, 0, 0, 0.03); /* خط حدودي شبه شفاف */
    
    transition: all 0.3s ease;
}

.client-box img {
    max-width: 100%;
    max-height: 100px;
    object-fit: contain;
    filter: grayscale(100%); /* رمادي */
    opacity: 0.6;
    transition: all 0.3s ease;
}

/* --- تأثير التحويم (Hover) --- */
.client-box:hover {
    /* عند الماوس: يزداد الظل ويرتفع الصندوق ويصبح الإطار ذهبياً */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
    transform: translateY(-7px);
    border-color: var(--ca-gold); /* تغيير لون الإطار للذهبي */
}

.client-box:hover img {
    filter: grayscale(0%); /* عودة الألوان */
    opacity: 1;
    transform: scale(1.1); /* تكبير طفيف للشعار */
}
/* =========================================
   TEAM PAGE STYLES (ELEGANT FRAMED VERSION)
   ========================================= */

.team-card {
    background: white;
    border-radius: 12px; /* زوايا أنعم للبطاقة ككل */
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    height: 100%;
    border: 1px solid rgba(0,0,0,0.05); /* حدود خفيفة جداً للبطاقة */
}

.team-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.12);
}

/* --- 1. حاوية الصورة (الإطار الجديد) --- */
.team-img-container {
    position: relative;
    overflow: hidden;
    
    /* الأبعاد الجديدة: أصغر ومحددة */
    width: 200px; 
    height: 230px;
    
    /* توسيط الإطار داخل البطاقة مع مسافات */
    margin: 35px auto 15px; 
    
    /* الإطار الخفيف حول الصورة (Padding + Border) */
    padding: 8px; /* المسافة البيضاء بين الصورة والإطار الخارجي */
    background-color: #fff; /* خلفية بيضاء للإطار */
    border: 1px solid rgba(0,0,0,0.08); /* لون الإطار الرمادي الخفيف */
    border-radius: 8px; /* تدوير خفيف لزوايا الإطار */
    box-shadow: 0 4px 10px rgba(0,0,0,0.05); /* ظل خفيف للإطار نفسه */
}

/* --- 2. الشريط العلوي الملون (Beautiful Top Border) --- */
/* نستخدم ::before لإنشاء الشريط الملون فوق الإطار */
.team-img-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px; /* سُمك الشريط العلوي */
    
    /* التدرج اللوني الجميل (من الأزرق للذهبي) */
    background: linear-gradient(90deg, var(--ca-blue), var(--ca-gold));
    z-index: 2;
}

/* --- 3. الصورة نفسها --- */
.team-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px; /* تدوير خفيف جداً للصورة لتناسب الإطار */
    transition: 0.5s ease;
    filter: grayscale(20%); /* تقليل الألوان قليلاً لزيادة الوقار (اختياري) */
}

/* تأثير التكبير عند الماوس */
.team-card:hover .team-img-container img {
    transform: scale(1.08); /* تكبير هادئ */
    filter: grayscale(0%); /* عودة الألوان كاملة */
}

/* --- 4. أيقونات التواصل الاجتماعي --- */
.team-social {
    position: absolute;
    /* تعديل المكان ليتناسب مع الإطار الجديد */
    bottom: -50px; 
    left: 8px; /* محاذاة مع الـ padding */
    width: calc(100% - 16px); /* عرض مناسب داخل الإطار */
    
    background: rgba(10, 37, 64, 0.9);
    padding: 10px 0;
    display: flex;
    justify-content: center;
    transition: 0.4s ease;
    border-bottom-left-radius: 4px;
    border-bottom-right-radius: 4px;
    z-index: 3;
}

.team-social a {
    color: white;
    margin: 0 10px;
    font-size: 1.1rem;
    transition: 0.3s;
}

.team-social a:hover {
    color: var(--ca-gold);
}

/* إظهار الأيقونات عند الماوس */
.team-card:hover .team-social {
    bottom: 8px; /* تتوقف عند حافة الـ padding السفلية */
}

/* --- نصوص البطاقة --- */
.team-content {
    padding: 15px 25px 30px; /* تقليل المسافات العلوية */
    text-align: center;
}

.team-role {
    color: var(--ca-gold);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 8px;
    letter-spacing: 1px;
}

.team-name {
    color: var(--ca-blue);
    font-weight: 800;
    font-size: 1.4rem;
    margin-bottom: 15px;
}

.team-bio {
    color: #777;
    font-size: 0.9rem;
    line-height: 1.7;
    margin-bottom: 0;
}
/* =========================================
   RESOURCES PAGE STYLES
   ========================================= */

/* --- Filters --- */
.btn-filter {
    border: none;
    background: transparent;
    color: #666;
    font-weight: 600;
    transition: 0.3s;
}

.btn-filter:hover, .btn-filter.active {
    background-color: var(--ca-blue);
    color: white;
}

/* --- Resource Card --- */
.resource-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    height: 100%;
    border: 1px solid #eee;
}

.resource-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
    border-color: var(--ca-gold);
}

/* Thumbnail Area */
.resource-thumb {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.resource-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.5s ease;
}

.resource-card:hover .resource-thumb img {
    transform: scale(1.1);
}

/* Badges (PDF, Video, etc.) */
.badge-type {
    position: absolute;
    top: 15px;
    left: 15px;
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    color: white;
    text-transform: uppercase;
    z-index: 2;
}

.badge-type.pdf { background-color: #dc3545; } /* Red for PDF */
.badge-type.video { background-color: #0d6efd; } /* Blue for Video */
.badge-type.article { background-color: var(--ca-gold); color: var(--ca-blue); } /* Gold for Article */

/* Card Body */
.resource-body {
    padding: 25px;
    display: flex;
    flex-direction: column;
    height: calc(100% - 200px); /* لملء باقي الارتفاع */
}

.resource-date {
    font-size: 0.8rem;
    color: #999;
    margin-bottom: 10px;
    display: block;
}

.resource-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--ca-blue);
    margin-bottom: 15px;
    line-height: 1.4;
}

.resource-desc {
    font-size: 0.95rem;
    color: #666;
    margin-bottom: 20px;
    flex-grow: 1; /* يدفع الزر للأسفل */
}

.btn-read-more {
    color: var(--ca-blue);
    font-weight: 700;
    text-decoration: none;
    font-size: 0.9rem;
    transition: 0.3s;
    border-top: 1px solid #eee;
    padding-top: 15px;
    display: block;
}

.btn-read-more:hover {
    color: var(--ca-gold);
    padding-left: 5px;
}
/* =========================================
   CONTACT PAGE STYLES
   ========================================= */

/* --- Info Icons --- */
.contact-info-item {
    transition: transform 0.3s ease;
}

.contact-info-item:hover {
    transform: translateX(10px); /* حركة بسيطة لليمين عند التحويم */
}

.contact-info-item .icon-box {
    width: 60px;
    height: 60px;
    background-color: rgba(10, 37, 64, 0.05); /* خلفية زرقاء فاتحة جداً */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ca-gold); /* لون الأيقونة ذهبي */
    transition: 0.3s;
}

.contact-info-item:hover .icon-box {
    background-color: var(--ca-blue);
    color: white;
}

/* --- Form Styles --- */
.contact-form-wrapper {
    position: relative;
    /* ظل قوي للنموذج لإبرازه */
    box-shadow: 0 20px 40px rgba(0,0,0,0.1) !important; 
}

.form-floating > .form-control {
    border: 1px solid #eee;
    background-color: #f9f9f9;
}

.form-floating > .form-control:focus {
    background-color: white;
    border-color: var(--ca-gold);
    box-shadow: 0 0 0 0.25rem rgba(201, 161, 74, 0.25);
}

.form-floating > label {
    color: #999;
}

/* --- Map --- */
.map-section iframe {
    filter: grayscale(20%); /* تقليل تشبع الألوان للخريطة لتناسب الموقع */
    display: block;
}