/* =========================================================================
   evenement.css - النسخة المطوّرة (Clean + Centered + Modern UI)
   ========================================================================= */

@import url('https://fonts.googleapis.com/css2?family=Amiri:wght@400;700&display=swap');

/* =========================
   1. إعدادات عامة
========================= */

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100vh;
    font-family: 'Amiri', serif;
    overflow-x: hidden;
}

/* الخلفية */
body {
    background: linear-gradient(
        rgba(255, 255, 255, 0.85),
        rgba(255, 255, 255, 0.9)
    ),
    url('../photo%20video/photo/zelidj.jpg');

    background-repeat: repeat;
    background-attachment: fixed;
}

/* =========================
   2. العنوان (مسافة محسّنة للهيدر)
========================= */

.section-title {
    width: 100%;
    text-align: center;

    /* مهم جداً: يمنع التداخل مع الرأس */
    padding-top: clamp(110px, 10vw, 140px);
    padding-left: 10px;
    padding-right: 10px;
}

.section-title h1 {
    margin: 0;
    color: #8B4513;

    font-size: clamp(20px, 3vw, 34px);
    line-height: 1.4;
}

/* =========================
   3. البحث (نص + أيقونة أبيض)
========================= */

.search-box {
    width: min(92%, 520px);
    margin: 20px auto 30px auto;

    display: flex;
    align-items: center;

    background: rgba(139, 69, 19, 0.75);
    backdrop-filter: blur(10px);

    border: 1px solid rgba(255,255,255,0.25);
    padding: 12px 18px;

    border-radius: 35px;

    box-shadow: 0 6px 18px rgba(0,0,0,0.15);
}

/* النص + الأيقونة داخل البحث */
.search-box,
.search-box input,
.search-box i {
    color: #ffffff !important;
}

/* input */
.search-box input {
    width: 100%;
    border: none;
    outline: none;

    background: transparent;
    font-size: 16px;

    color: #ffffff;
}

.search-box input::placeholder {
    color: rgba(255,255,255,0.85);
}

/* =========================
   4. الفلاتر
========================= */

.filter-section {
    width: 100%;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;

    gap: 15px;
    margin-bottom: 40px;
}

.filter-group {
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(6px);

    padding: 10px 18px;
    border-radius: 50px;

    border: 1px solid #8B4513;

    display: flex;
    align-items: center;
    justify-content: center;

    cursor: pointer;
    transition: 0.3s ease;

    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}

.filter-group:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(0,0,0,0.12);
}

.filter-group select {
    border: none;
    background: transparent;

    font-weight: 800;
    color: #8B4513;

    font-size: 16px;
    outline: none;
}

/* =========================
   5. العناوين الثانوية
========================= */

.events-group h2 {
    color: #006745;
    text-align: center;

    margin: 40px 0 25px;
    font-weight: 900;

    font-size: clamp(18px, 2.5vw, 26px);
}

/* =========================
   6. الكاروسيل
========================= */

.carousel-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;

    gap: 10px;
    width: 100%;
    padding: 0 10px;
}

.cards-container {
    display: flex;
    gap: 18px;

    width: min(95%, 1100px);
    padding: 10px;

    overflow-x: auto;
    scroll-snap-type: x mandatory;

    scrollbar-width: none;
}

.cards-container::-webkit-scrollbar {
    display: none;
}

/* =========================
   7. الكروت
========================= */

.event-card {
    flex: 0 0 250px;
    height: 320px;

    scroll-snap-align: center;

    background: #fff;
    border-radius: 16px;

    border: 1px solid #e6e6e6;

    box-shadow: 0 6px 15px rgba(0,0,0,0.08);

    display: flex;
    flex-direction: column;

    overflow: hidden;

    transition: all 0.25s ease;
}

.event-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 22px rgba(0,0,0,0.12);
}

.cover-wrapper {
    height: 160px;
    cursor: pointer;
}

.cover-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-info {
    flex: 1;
    padding: 15px;

    display: flex;
    flex-direction: column;
    justify-content: space-between;

    text-align: center;
}

.card-info h3 {
    margin: 0 0 10px;
    font-size: 1.1rem;
    color: #333;
}

/* =========================
   8. الأزرار (تصميم عصري)
========================= */

.view-btn {
    width: 100%;
    padding: 11px 18px;

    border: none;
    border-radius: 12px;

    background: linear-gradient(135deg, #006745, #008a5a);
    color: white;

    font-weight: bold;
    cursor: pointer;

    transition: all 0.3s ease;

    box-shadow: 0 5px 12px rgba(0,103,69,0.25);
}

.view-btn:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, #005037, #006745);
}

/* أزرار التنقل */
.nav-btn {
    width: 45px;
    height: 45px;

    border-radius: 50%;
    border: none;

    background: #8B4513;
    color: white;

    font-size: 1.1rem;
    font-weight: bold;

    cursor: pointer;

    display: flex;
    align-items: center;
    justify-content: center;

    box-shadow: 0 6px 14px rgba(0,0,0,0.2);

    transition: 0.3s ease;
}

.nav-btn:hover {
    transform: scale(1.1);
}

/* =========================
   9. Popup
========================= */

.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;

    width: 100%;
    height: 100%;

    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(8px);

    display: none;
    align-items: center;
    justify-content: center;

    z-index: 9999;

    padding: 15px;
}

.popup-content {
    background: #fff;
    width: min(95%, 500px);

    padding: 25px;
    border-radius: 25px;

    border: 3px solid #006745;

    position: relative;

    max-height: 90vh;
    overflow-y: auto;

    direction: rtl;
    text-align: right;

    box-shadow: 0 10px 30px rgba(0,0,0,0.25);
}

/* زر الإغلاق */
.close-popup {
    position: absolute;
    top: 10px;
    left: 15px;

    font-size: 38px;
    font-weight: 900;

    color: #8B4513;
    cursor: pointer;
}

/* زر القائمة */
.menu-close-btn {
    width: 100%;
    padding: 15px;

    background: #cc0000 !important;
    color: white;

    border: none;
    border-radius: 12px;

    font-size: 18px;
    font-weight: bold;

    cursor: pointer;

    margin-bottom: 20px;

    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

/* =========================
   10. Responsive قوي
========================= */

@media (max-width: 768px) {

    .cards-container {
        width: 100%;
    }

    .event-card {
        flex: 0 0 220px;
        height: 310px;
    }

    .section-title {
        padding-top: 130px;
    }
}

@media (max-width: 600px) {

    .filter-section {
        flex-direction: column;
        align-items: center;
    }

    .search-box {
        width: 92%;
    }

    .nav-btn {
        width: 42px;
        height: 42px;
    }
}

@media (max-width: 400px) {

    .event-card {
        flex: 0 0 200px;
        height: 300px;
    }

    .section-title h1 {
        font-size: 20px;
    }
}