/* =========================================
   🏗️ تنسيق الأرشيف والتصنيفات (Grid Mode)
   ========================================= */

/* هيرو الأرشيف */
.archive-hero {
    position: relative;
    padding: 100px 0 60px;
    background: var(--primary-dark);
    text-align: center;
    color: #fff;
    margin-bottom: 50px;
}

.archive-title-box h1 {
    font-size: 3rem;
    color: var(--secondary-color);
    margin: 15px 0;
}

/* شبكة الكروت */
.grid-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 كروت في السطر */
    gap: 30px;
    margin-bottom: 50px;
}

.content-card {
    background: #fff;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    transition: 0.4s;
    border-bottom: 4px solid transparent;
}

.content-card:hover {
    transform: translateY(-10px);
    border-bottom-color: var(--secondary-color);
}

/* صورة الكارت */
.card-image img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.placeholder-img {
    height: 220px;
    background: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    color: #ccc;
}

/* نص الكارت */
.card-body {
    padding: 25px;
    text-align: right;
}

.card-title a {
    font-size: 20px;
    color: var(--primary-dark);
    font-weight: 700;
    text-decoration: none;
    line-height: 1.4;
}

.card-excerpt {
    font-size: 15px;
    color: #666;
    margin: 15px 0;
    line-height: 1.6;
    /* 🛡️ حماية ضد الكلام الطويل */
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.card-btn {
    display: inline-block;
    color: var(--secondary-color);
    font-weight: 700;
    text-decoration: none;
    font-size: 14px;
    transition: 0.3s;
}

.card-btn:hover { padding-right: 10px; }

/* الموبايل */
@media (max-width: 992px) {
    .grid-container { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .grid-container { grid-template-columns: 1fr; }
    .archive-hero h1 { font-size: 2rem; }
}