:root {
    --primary: #E60027;
    --primary-dark: #b3001e;
    --bg-main: #0B1220;
    --bg-card: #121A2A;
    --text-main: #ffffff;
    --text-muted: #94a3b8;
    --gradient: linear-gradient(135deg, #E60027 0%, #8a0018 100%);
    --font-ar: 'Cairo', sans-serif;
    --font-en: 'Roboto', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: var(--font-ar);
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
}

body[dir="ltr"] { font-family: var(--font-en); }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* Header & Nav */
.sticky-header {
    background: rgba(11, 18, 32, 0.95);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding: 0.8rem 0;
}

.header-content { display: flex; justify-content: space-between; align-items: center; }

.brand-area { display: flex; align-items: center; gap: 15px; }
.nav-logo { height: 40px; width: auto; }
.divider { width: 1px; height: 25px; background: rgba(255,255,255,0.2); }
.logo-text { font-weight: 700; color: var(--primary); font-size: 1.1rem; }

nav a {
    color: var(--text-main);
    text-decoration: none;
    margin: 0 10px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: color 0.3s;
}
nav a:hover { color: var(--primary); }

/* Language Switcher */
.lang-switcher {
    display: inline-flex;
    background: rgba(255,255,255,0.1);
    border-radius: 20px;
    padding: 2px;
    margin-inline-start: 15px;
    vertical-align: middle;
}

.lang-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 4px 10px;
    font-size: 0.75rem;
    cursor: pointer;
    border-radius: 15px;
    font-weight: 700;
    transition: all 0.3s;
}

.lang-btn.active { background: var(--primary); color: white; }

/* Hero Section */
.hero {
    min-height: 85vh;
    background: url('assets/img/cover/cover.jpg') no-repeat center center/cover;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: 60px;
}

.hero-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(0deg, var(--bg-main) 5%, rgba(11,18,32,0.3) 100%);
}

.hero-content { position: relative; z-index: 2; width: 100%; }

.hero h1 { font-size: 2.5rem; margin-bottom: 10px; line-height: 1.3; }
.hero p { font-size: 1.2rem; color: #cbd5e1; margin-bottom: 30px; }

.badge {
    background: var(--primary);
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 20px;
    display: inline-block;
    letter-spacing: 0.5px;
}

/* Logos Areas */
.participation-area, .sponsor-area { margin: 25px 0; }
.label-text {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.logos-wrapper { display: flex; justify-content: center; gap: 20px; flex-wrap: wrap; }

/* Circular Chamber Logos */
.chambers .logo-item img {
    width: 85px; height: 85px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #fff;
    box-shadow: 0 5px 15px rgba(0,0,0,0.4);
    background: #fff;
    transition: transform 0.3s;
}
.chambers .logo-item img:hover { transform: scale(1.1); border-color: var(--primary); }

/* Rectangular Sequa Logo */
.sequa-box {
    background: white;
    padding: 8px 15px;
    border-radius: 6px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    transition: transform 0.3s;
}
.sequa-img { height: 35px; width: auto; display: block; }
.sequa-box:hover { transform: translateY(-3px); }

/* Sections */
.section { padding: 60px 0; }
.bg-darker { background-color: #080d16; }

.section-title {
    font-size: 1.8rem; margin-bottom: 40px;
    border-inline-start: 4px solid var(--primary);
    padding-inline-start: 15px;
}

/* Stats */
.stats-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; margin-bottom: 40px;
}
.stat-card {
    background: var(--bg-card); padding: 25px; border-radius: 10px; text-align: center;
    border: 1px solid rgba(255,255,255,0.05);
}
.stat-number { font-size: 2.5rem; color: var(--primary); font-weight: 700; }

/* Team Grid */
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 25px; }
.team-card {
    background: var(--bg-card); border-radius: 12px; padding: 25px 15px; text-align: center;
    border: 1px solid rgba(255,255,255,0.05); transition: transform 0.3s;
}
.team-card:hover { transform: translateY(-5px); border-color: rgba(230,0,39,0.3); }
.avatar {
    width: 90px; height: 90px; border-radius: 50%; object-fit: cover;
    margin-bottom: 15px; border: 2px solid var(--primary);
}

/* Map (Day Mode Fix) */
#map {
    height: 450px; width: 100%; border-radius: 12px;
    border: 2px solid rgba(255,255,255,0.2);
}

/* Timeline */
.timeline-item {
    background: var(--bg-card); margin-bottom: 25px; padding: 20px;
    border-radius: 10px; border-inline-start: 4px solid var(--primary);
}
.day-header { border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 10px; margin-bottom: 15px; }
.event-row { display: flex; gap: 15px; margin-bottom: 15px; }
.event-icon { color: var(--primary); font-size: 1.2rem; }

/* Footer */
footer { background: #05080f; padding: 30px 0; text-align: center; color: var(--text-muted); font-size: 0.9rem; }

/* Mobile */
@media (max-width: 768px) {
    .hero h1 { font-size: 1.8rem; }
    .header-content { flex-direction: column; gap: 15px; }
    nav { flex-wrap: wrap; justify-content: center; gap: 10px; }
    .chambers .logo-item img { width: 65px; height: 65px; }
}

/* --- Timeline Creative Mini-Gallery --- */
/* --- Studio Grid Gallery (بدلاً من الشريط الصغير) --- */
.mini-gallery-strip {
    display: grid;
    /* هذا السطر يجعل الصور تترتب تلقائياً بحجم لا يقل عن 150 بكسل */
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
    margin-top: 20px;
}

.gallery-thumb {
    width: 100%;
    height: 150px; /* جعلنا الصورة أكبر وأوضح */
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
}

.gallery-thumb:hover {
    transform: scale(1.03);
    border-color: var(--primary);
    box-shadow: 0 8px 15px rgba(230, 0, 39, 0.4);
    z-index: 2;
}

/* --- Fullscreen Modal Fixes --- */
.modal {
    display: none;
    position: fixed;
    z-index: 99999; /* رفعنا الطبقة لتكون فوق كل شيء */
    padding-top: 30px;
    left: 0; top: 0;
    width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.95); /* خلفية سوداء داكنة جداً للتركيز */
    backdrop-filter: blur(8px);
}

.modal-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 85vh; /* لضمان عدم خروج الصورة عن الشاشة */
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 0 50px rgba(0,0,0,0.8);
    animation: zoomIn 0.3s ease;
}

/* للموبايل */
@media (max-width: 768px) {
    .mini-gallery-strip {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }
    .gallery-thumb { height: 100px; }
}