/* =========================================================
   الصفحة الرئيسية المخصصة - منظمة رصد التراث
   ========================================================= */

   .mahd-front-wrapper {
    background: #f8f9fa;
    font-family: 'Tajawal', 'Cairo', -apple-system, sans-serif;
    padding-bottom: 60px;
}

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

/* ============ عناوين الأقسام ============ */
.mahd-section {
    padding: 50px 0;
}

.mahd-section--reports {
    background: #fff;
    padding-top: 60px;
}


.mahd-section--events {
    background: #fff;
}

.mahd-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 3px solid #1a5490;
    position: relative;
}
.mahd-section-header-report {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1 px solid #1a5490;
    position: relative;
}


.mahd-section-header::before {
    content: '';
    position: absolute;
    bottom: -3px;
    right: 0;
    width: 80px;
    height: 3px;
    background: #dc2626;
}

.mahd-section-title {
    font-size: 28px;
    font-weight: 800;
    color: #1a1a1a;
    margin: 0;
}

.mahd-section-link {
    color: #1a5490;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: color 0.2s;
}

.mahd-section-link:hover {
    color: #dc2626;
}

/* ============ الشبكات ============ */
.mahd-grid {
    display: grid;
    gap: 24px;
}

.mahd-grid--3 {
    grid-template-columns: repeat(3, 1fr);
}

.mahd-grid--5 {
    grid-template-columns: repeat(5, 1fr);
    gap: 18px;
}

/* ============ البطاقات ============ */
.mahd-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.mahd-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.mahd-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.mahd-card-media {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #e9ecef;
}

.mahd-card--small .mahd-card-media {
    aspect-ratio: 4 / 3;
}

.mahd-card-media img,
.mahd-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.mahd-card:hover .mahd-thumb {
    transform: scale(1.08);
}

.mahd-no-thumb {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e9ecef;
    color: #adb5bd;
    font-size: 14px;
}

.mahd-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #dc2626;
    color: #fff;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
}

.mahd-card-body {
    padding: 18px;
}

.mahd-card--small .mahd-card-body {
    padding: 14px;
}

.mahd-card-title {
    font-size: 19px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 10px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.mahd-card--small .mahd-card-title {
    font-size: 15px;
    -webkit-line-clamp: 3;
}

.mahd-card-excerpt {
    color: #6b7280;
    font-size: 14px;
    line-height: 1.6;
    margin: 0 0 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.mahd-card-meta {
    display: flex;
    gap: 10px;
    font-size: 12px;
    color: #9ca3af;
    border-top: 1px solid #f0f2f5;
    padding-top: 10px;
}

/* ============ الفعاليات (قائمة) ============ */
.mahd-events-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mahd-event-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    border-bottom: 1px solid #f0f2f5;
    transition: background 0.2s ease, box-shadow 0.2s ease;
    border-radius: 8px;
}

.mahd-event-item:hover {
    background: #f8f9fa;
}
/* الفيديو داخل بطاقة الفعالية */
.mahd-event-item video .mahd-event-title{
    display: block;
    width: 100%;
    max-width: 480px;
    aspect-ratio: 16 / 9;
    object-fit: contain;
    border-radius: 8px;
    background: #000;
}
/* حاوية الفيديو إن وُجدت */
.mahd-event-item .mahd-event-video .mahd-event-title{
    flex: 0 0 45%;
    max-width: 480px;
    min-width: 0;
}

/* مساحة النص */
.mahd-event-item .mahd-event-info {
    flex: 1;
    min-width: 0;
}

/* الشاشات الصغيرة */
@media (max-width: 768px) {
    .mahd-event-item {
        flex-direction: column;
        gap: 14px;
        padding: 16px;
    }

    .mahd-event-item .mahd-event-video .mahd-event-title{
        flex: 1 1 auto;
        width: 100%;
        max-width: 100%;
    }

    .mahd-event-item video .mahd-event-title{
        max-width: 100%;
    }
}

.mahd-event-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a5490, #2c7be5);
    color: #fff;
    border-radius: 10px;
    width: 70px;
    height: 70px;
    flex-shrink: 0;
}

.mahd-event-day {
    font-size: 24px;
    font-weight: 800;
    line-height: 1;
}

.mahd-event-month {
    font-size: 12px;
    text-transform: uppercase;
    margin-top: 3px;
    opacity: 0.9;
}

.mahd-event-info {
    flex: 1;
}

.mahd-event-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 6px;
}

.mahd-event-title a {
    color: #1a1a1a;
    text-decoration: none;
    transition: color 0.2s;
}

.mahd-event-title a:hover {
    color: #1a5490;
}

.mahd-event-excerpt {
    color: #6b7280;
    font-size: 14px;
    margin: 0;
    line-height: 1.5;
}

.mahd-event-arrow {
    font-size: 22px;
    color: #1a5490;
    transition: transform 0.3s;
}

.mahd-event-item:hover .mahd-event-arrow {
    transform: translateX(-8px);
}

/* ============ رسالة فارغة ============ */
.mahd-empty {
    text-align: center;
    color: #9ca3af;
    padding: 40px;
    font-size: 16px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 2px dashed #e5e7eb;
}

/* ============ استجابة للشاشات ============ */
@media (max-width: 1024px) {
    .mahd-grid--3 { grid-template-columns: repeat(2, 1fr); }
    .mahd-grid--5 { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
    .mahd-grid--3,
    .mahd-grid--5 { grid-template-columns: 1fr; }

    .mahd-section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .mahd-section-title { font-size: 22px; }

    .mahd-event-item {
        flex-direction: column;
        text-align: center;
    }

    .mahd-event-arrow { display: none; }
}