/* ============================================
   Section 5: مقالات أخرى - 9 articles grid
   Other Articles Section - Newspaper Style
   ============================================ */

/* Main Grid - 3x3 Layout */
.sec5-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    background: transparent;
}

/* ============================================
   Card Style - Newspaper Design
   ============================================ */
.sec5-card {
    display: flex;
    flex-direction: column;
    background: var(--bg-primary);
    border: 1px solid #d4c8b8;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
}

.sec5-card:hover {
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transform: translateY(-3px);
}

.sec5-card-link {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    height: 100%;
}

/* Card Image */
.sec5-card-image {
    position: relative;
    height: 150px;
    overflow: hidden;
}

.sec5-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(20%);
    transition: all 0.4s ease;
}

.sec5-card:hover .sec5-card-image img {
    filter: grayscale(0%);
    transform: scale(1.03);
}

/* Card Content */
.sec5-card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 15px;
    background: #fff;
    border-top: 1px solid var(--border-color);
}

.sec5-card-category {
    display: inline-block;
    align-self: flex-start;
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    padding: 3px 10px;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
    border-right: 3px solid var(--primary-dark);
}

.sec5-card-title {
    font-family: var(--font-family);
    font-size: 0.9rem;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.6;
    margin: 0 0 auto;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.3s ease;
}

.sec5-card:hover .sec5-card-title {
    color: var(--primary-dark);
}

.sec5-card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.65rem;
    color: #888;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px dashed #e0d8cc;
    font-family: var(--font-family);
}

.sec5-card-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.sec5-card-meta i {
    color: var(--primary-dark);
    font-size: 0.6rem;
}

/* Folded corner effect */
.sec5-card::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 18px;
    height: 18px;
    background: linear-gradient(-135deg,
            transparent 50%,
            var(--border-color) 50%,
            var(--border-dark) 52%,
            var(--bg-secondary) 100%);
    z-index: 2;
    transition: all 0.3s ease;
}

.sec5-card:hover::before {
    width: 24px;
    height: 24px;
}

/* ============================================
   Section Header Theme
   ============================================ */
.sec5-articles .section-header::after,
.sec5-articles .section-header::before {
    background: var(--primary-dark);
}

/* ============================================
   Responsive Styles
   ============================================ */
@media (max-width: 992px) {
    .sec5-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .sec5-card-image {
        height: 140px;
    }
}

@media (max-width: 768px) {
    .sec5-grid {
        grid-template-columns: 1fr 1fr;
    }

    .sec5-card-image {
        height: 130px;
    }

    .sec5-card-title {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .sec5-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .sec5-card {
        flex-direction: row;
        border-radius: 3px;
    }

    .sec5-card:hover {
        transform: none;
    }

    .sec5-card-link {
        flex-direction: row;
        width: 100%;
    }

    .sec5-card-image {
        width: 110px;
        min-width: 110px;
        height: 90px;
        flex-shrink: 0;
    }

    .sec5-card-content {
        border-top: none;
        border-right: 1px solid var(--border-color);
        padding: 10px 12px;
        justify-content: center;
    }

    .sec5-card-category {
        font-size: 0.55rem;
        padding: 2px 8px;
        margin-bottom: 6px;
    }

    .sec5-card-title {
        font-size: 0.78rem;
        -webkit-line-clamp: 2;
        line-clamp: 2;
    }

    .sec5-card-meta {
        margin-top: 8px;
        padding-top: 6px;
        font-size: 0.6rem;
        gap: 8px;
    }

    .sec5-card::before {
        display: none;
    }
}

/* ============================================
   Entrance Animation
   ============================================ */
.sec5-animate-ready {
    opacity: 0;
    transform: translateY(20px);
}

.sec5-animate-in {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.4s ease;
}