/* ============================================
   Section 4: أخبار العملات - تصميم الجريدة
   Currency News Section - Newspaper Style
   ============================================ */

/* Main Grid - 2 Featured + 4 Small */
.sec4-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: auto auto;
    gap: 15px;
    background: transparent;
}

/* ============================================
   Featured Cards (Top Row - 2 Cards)
   ============================================ */
.sec4-featured {
    background: var(--bg-primary);
    border: 1px solid #d4c8b8;
    overflow: hidden;
    transition: all 0.3s ease;
}

.sec4-featured:hover {
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.sec4-featured-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.sec4-featured-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.sec4-featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(20%);
    transition: all 0.4s ease;
}

.sec4-featured:hover .sec4-featured-image img {
    filter: grayscale(0%);
    transform: scale(1.03);
}

.sec4-featured-content {
    padding: 18px;
    background: #fff;
}

.sec4-featured-category {
    display: inline-block;
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    padding: 4px 12px;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    border-right: 3px solid var(--primary-dark);
}

.sec4-featured-title {
    font-family: var(--font-family);
    font-size: 1.1rem;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.6;
    margin: 0 0 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.3s ease;
}

.sec4-featured:hover .sec4-featured-title {
    color: var(--primary-dark);
}

.sec4-featured-excerpt {
    font-size: 0.85rem;
    color: #666;
    line-height: 1.7;
    margin: 0 0 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sec4-featured-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 0.7rem;
    color: #888;
    padding-top: 12px;
    border-top: 1px dashed #e0d8cc;
    font-family: var(--font-family);
}

.sec4-featured-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.sec4-featured-meta i {
    color: var(--primary-dark);
    font-size: 0.65rem;
}

/* ============================================
   Small Cards Row (Bottom - 4 Cards)
   ============================================ */
.sec4-small-row {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.sec4-small {
    background: var(--bg-primary);
    border: 1px solid #d4c8b8;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
    border-radius: 3px;
}

/* Folded corner */
.sec4-small::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 20px;
    height: 20px;
    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;
}

.sec4-small:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.sec4-small:hover::before {
    width: 25px;
    height: 25px;
}

.sec4-small-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.sec4-small-image {
    position: relative;
    height: 130px;
    overflow: hidden;
}

.sec4-small-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(25%);
    transition: all 0.3s ease;
}

.sec4-small:hover .sec4-small-image img {
    filter: grayscale(0%);
    transform: scale(1.03);
}

.sec4-small-content {
    padding: 12px 15px 20px;
    background: #fff;
}

.sec4-small-title {
    font-family: var(--font-family);
    font-size: 0.85rem;
    font-weight: 600;
    color: #1a1a1a;
    line-height: 1.6;
    margin: 0 0 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.3s ease;
}

.sec4-small:hover .sec4-small-title {
    color: var(--primary-dark);
}

.sec4-small-meta {
    font-size: 0.65rem;
    color: #999;
    font-family: var(--font-family);
}

.sec4-small-meta i {
    margin-left: 4px;
    color: var(--primary-dark);
}

/* ============================================
   Section Header Theme
   ============================================ */
.sec4-currency .section-header::after,
.sec4-currency .section-header::before {
    background: var(--primary-dark);
}

/* ============================================
   Responsive Styles
   ============================================ */
@media (max-width: 1200px) {
    .sec4-small-row {
        grid-template-columns: repeat(2, 1fr);
    }

    .sec4-featured-image {
        height: 180px;
    }
}

@media (max-width: 992px) {
    .sec4-grid {
        grid-template-columns: 1fr;
    }

    .sec4-featured-image {
        height: 200px;
    }

    .sec4-small-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .sec4-featured-image {
        height: 180px;
    }

    .sec4-featured-title {
        font-size: 1rem;
    }

    .sec4-small-row {
        grid-template-columns: 1fr 1fr;
    }

    .sec4-small-image {
        height: 110px;
    }
}

@media (max-width: 480px) {
    .sec4-featured-image {
        height: 160px;
    }

    .sec4-featured-title {
        font-size: 0.95rem;
    }

    .sec4-featured-content {
        padding: 15px;
    }

    .sec4-small-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .sec4-small {
        display: flex;
        flex-direction: row;
        border-radius: 3px;
    }

    .sec4-small-link {
        display: flex;
        flex-direction: row;
        width: 100%;
    }

    .sec4-small-image {
        width: 110px;
        min-width: 110px;
        height: 85px;
        flex-shrink: 0;
    }

    .sec4-small-content {
        padding: 10px 12px;
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .sec4-small-title {
        font-size: 0.78rem;
        margin-bottom: 6px;
        -webkit-line-clamp: 2;
        line-clamp: 2;
    }

    .sec4-small-meta {
        font-size: 0.6rem;
    }

    .sec4-small::before {
        display: none;
    }
}

/* ============================================
   Entrance Animation
   ============================================ */
.sec4-animate-ready {
    opacity: 0;
    transform: translateY(20px);
}

.sec4-animate-in {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.5s ease;
}