/* أنماط أساسية مشتركة للبطاقات */
.cards-section {
    padding: 60px 0;
    background-color: #f8f9fa;
}

.cards-container {
    padding: 0 15px;
}

.card-item {
    border: none;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
    background: white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    margin-bottom: 30px;
    cursor: pointer;
}

.card-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.15);
}

.card-thumbnail {
    height: 220px;
    background-size: cover;
    background-position: center;
    position: relative;
    border-bottom: 3px solid #166c45;
}

.card-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(135deg, #14573a 0%, #166c45 100%);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 2;
}

.badge-new {
    background: linear-gradient(135deg, #14573a 0%, #166c45 100%);
}

.badge-upcoming {
    background: linear-gradient(135deg, #ff6b35 0%, #ff8c5a 100%);
    right: auto;
    left: 15px;
}

.badge-urgent {
    background: linear-gradient(135deg, #ff4d4d 0%, #ff6666 100%);
    right: auto;
    left: 15px;
}

.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(22, 108, 69, 0);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.card-overlay i {
    font-size: 3rem;
    color: transparent;
    transition: all 0.3s ease;
}

.card-item:hover .card-overlay {
    background: rgba(22, 108, 69, 0.7);
}

.card-item:hover .card-overlay i {
    color: white;
}

.card-content {
    padding: 25px;
}

.card-date {
    color: #166c45;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 10px;
    display: block;
}

.card-date i {
    margin-left: 5px;
}

.card-title {
    color: #333;
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.5;
    margin-bottom: 15px;
    min-height: 60px;
}

.card-read-more {
    display: inline-block;
    background: linear-gradient(135deg, #14573a 0%, #166c45 100%);
    color: white;
    padding: 10px 25px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.card-read-more:hover {
    background: white;
    color: #166c45;
    border-color: #166c45;
    transform: translateX(-5px);
    text-decoration: none;
}

.card-read-more i {
    margin-right: 8px;
    transition: transform 0.3s ease;
}

.card-read-more:hover i {
    transform: translateX(5px);
}

.no-items-message {
    text-align: center;
    padding: 80px 20px;
}

.no-items-icon {
    font-size: 4rem;
    color: #ddd;
    margin-bottom: 20px;
}

.cards-pagination {
    margin-top: 50px;
}

.pagination-custom .page-link {
    color: #166c45;
    border: 1px solid #dee2e6;
    margin: 0 3px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.pagination-custom .page-item.active .page-link {
    background: linear-gradient(135deg, #14573a 0%, #166c45 100%);
    border-color: #166c45;
    color: white;
}

.pagination-custom .page-link:hover {
    background-color: #f1f8f4;
    border-color: #166c45;
}

.pagination-info {
    text-align: center;
    margin-top: 15px;
    color: #666;
    font-size: 0.9rem;
}

.section-header {
    text-align: center;
    margin-bottom: 40px;
}

.section-title {
    color: #166c45;
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 10px;
}

.section-subtitle {
    color: #666;
    font-size: 1.1rem;
}

.hero-header {
    background: linear-gradient(135deg, #14573a 0%, #166c45 100%);
    color: white;
    padding: 60px 0 40px;
    margin-bottom: 40px;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0;
}

.breadcrumb-riyadh {
    background: transparent;
    padding: 0;
    margin-bottom: 0;
}

.breadcrumb-riyadh .breadcrumb-item {
    color: rgba(255, 255, 255, 0.8);
}

.breadcrumb-riyadh .breadcrumb-item a {
    color: white;
    text-decoration: none;
}

.breadcrumb-riyadh .breadcrumb-item.active {
    color: rgba(255, 255, 255, 0.6);
}

.breadcrumb-riyadh .breadcrumb-item + .breadcrumb-item::before {
    color: rgba(255, 255, 255, 0.6);
    content: ">";
}

/* أنماط الوسائط */
.media-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: center;
    align-items: stretch;
}

.media-item {
    flex: 1 1 300px;
    max-width: 400px;
    min-width: 280px;
}

/* لعدد فردي من البطاقات - توزيع جميل */
.media-grid:has(.media-item:nth-child(odd):last-child) {
    justify-content: center;
}

/* لبطاقتين فقط - توزيع متساوي */
.media-grid:has(.media-item:nth-child(2):last-child) {
    justify-content: space-around;
}

/* لبطاقة واحدة - توسيط */
.media-grid:has(.media-item:nth-child(1):last-child) {
    justify-content: center;
}

.media-card {
    border: none;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
    background: white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.media-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.media-card-body {
    padding: 20px;
}

.media-card-title {
    color: #333;
    font-size: 1.2rem;
    font-weight: 700;
    margin-top: 15px;
    min-height: 60px;
}

/* أنماط متجاوبة */
@media (max-width: 768px) {
    .card-thumbnail {
        height: 180px;
    }
    
    .card-title {
        font-size: 1.1rem;
        min-height: auto;
    }
    
    .card-content {
        padding: 20px;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .media-grid {
        gap: 1rem;
    }
    
    .media-item {
        flex: 1 1 100%;
        max-width: 100%;
    }
}