/* ============================================
   Section 1: أخبار البورصة - تصميم الجريدة
   Stock News Section - Newspaper Style
   ============================================ */

/* Grid Layout with newspaper grid lines */
.sec1-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    background: var(--bg-secondary);
    border: 1px solid #d4c8b8;
    border-radius: 4px;
    overflow: hidden;
}

/* ============================================
   Card Design - Newspaper Style with Folded Corner
   ============================================ */
.sec1-card {
    position: relative;
    background: #fff;
    border-left: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

/* Remove border from first column */
.sec1-card:nth-child(4n+1) {
    border-left: none;
}

/* Remove border from last row */
.sec1-card:nth-child(n+5) {
    border-bottom: none;
}

/* Folded corner effect */
.sec1-card::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 30px;
    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;
}

/* Folded corner shadow */
.sec1-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 30px;
    background: linear-gradient(-135deg,
            transparent 48%,
            rgba(0, 0, 0, 0.05) 50%,
            transparent 52%);
    z-index: 3;
}

/* Hover effect */
.sec1-card:hover {
    background: #fffdf8;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.03);
}

.sec1-card:hover::before {
    width: 40px;
    height: 40px;
}

.sec1-card-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    color: inherit;
    padding: 20px;
    padding-bottom: 35px;
}

/* ============================================
   Image Section - Newspaper Style
   ============================================ */
.sec1-image {
    position: relative;
    height: 140px;
    overflow: hidden;
    margin-bottom: 15px;
    border: 1px solid #e0d8cc;
}

.sec1-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(30%) contrast(1.1);
    transition: all 0.4s ease;
}

.sec1-card:hover .sec1-image img {
    filter: grayscale(0%) contrast(1);
    transform: scale(1.03);
}

/* Badge - Top Right */
.sec1-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #c41e3a;
    color: #fff;
    padding: 3px 10px;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    z-index: 5;
}

/* Category - Bottom of Image */
.sec1-category {
    position: absolute;
    bottom: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    padding: 4px 12px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* ============================================
   Content Section - Newspaper Typography
   ============================================ */
.sec1-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.sec1-title {
    font-family: var(--font-family);
    font-size: 0.95rem;
    font-weight: 400;
    color: #1a1a1a;
    line-height: 1.7;
    margin: 0 0 auto;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.3s ease;
}

.sec1-card:hover .sec1-title {
    color: var(--primary-dark);
}

.sec1-excerpt {
    display: none;
}

/* ============================================
   Meta Section - Newspaper Style
   ============================================ */
.sec1-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 12px;
    margin-top: 12px;
    border-top: 1px dashed #d4c8b8;
    font-size: 0.6rem;
    color: #666;
    font-family: monospace;
}

.sec1-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
    font-family: var(--font-family);
}

.sec1-meta i {
    font-size: 0.65rem;
    color: #888;
}

/* ============================================
   Newspaper Header Decoration
   ============================================ */
.sec1-stock {
    background: var(--bg-secondary);
}

.sec1-stock .section-header {
    border-bottom: 2px solid #1a1a1a;
    margin-bottom: 0;
    padding-bottom: 10px;
}

.sec1-stock .section-header::before,
.sec1-stock .section-header::after {
    display: none;
}

.sec1-stock .section-title {
    font-family: var(--font-family);
    font-size: 1.6rem;
    font-weight: 900;
    color: #1a1a1a;
    letter-spacing: 1px;
}



/* Double line under header */
.sec1-stock .sec1-grid {
    margin-top: 5px;
}

/* ============================================
   Responsive Styles
   ============================================ */
@media (max-width: 1200px) {
    .sec1-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .sec1-card:nth-child(3n+1) {
        border-left: none;
    }

    .sec1-card:nth-child(n+4) {
        border-bottom: 1px solid var(--border-color);
    }

    .sec1-card:nth-child(n+7) {
        border-bottom: none;
    }
}

@media (max-width: 992px) {
    .sec1-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .sec1-card:nth-child(2n+1) {
        border-left: none;
    }

    .sec1-card {
        border-bottom: 1px solid var(--border-color);
    }

    .sec1-card:nth-child(n+7) {
        border-bottom: none;
    }

    .sec1-image {
        height: 120px;
    }
}

@media (max-width: 768px) {
    .sec1-card-link {
        padding: 15px;
        padding-bottom: 30px;
    }

    .sec1-image {
        height: 110px;
    }

    .sec1-title {
        font-size: 0.85rem;
    }

    .sec1-card::before,
    .sec1-card::after {
        width: 25px;
        height: 25px;
    }
}

@media (max-width: 480px) {
    .sec1-grid {
        grid-template-columns: 1fr;
    }

    .sec1-card {
        border-left: none;
        border-bottom: 1px solid var(--border-color);
    }

    .sec1-card:last-child {
        border-bottom: none;
    }

    .sec1-card-link {
        flex-direction: row;
        gap: 15px;
        padding: 15px;
    }

    .sec1-image {
        width: 100px;
        min-width: 100px;
        height: 80px;
        margin-bottom: 0;
    }

    .sec1-content {
        justify-content: center;
    }

    .sec1-title {
        -webkit-line-clamp: 2;
        line-clamp: 2;
    }

    .sec1-meta {
        font-size: 0.65rem;
        padding-top: 8px;
        margin-top: 8px;
    }

    .sec1-card::before,
    .sec1-card::after {
        display: none;
    }
}

/* ============================================
   Entrance Animation
   ============================================ */
.sec1-animate-ready {
    opacity: 0;
    transform: translateY(20px);
}

.sec1-animate-in {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.4s ease;
}