/* Section 5 Wrapper */
.section-5-wrapper {
    background-color: #f2f5f8;
    padding: 30px 0 50px 0;
    margin-bottom: 15px;
}

/* Header */
.s5-main-header {
    margin-bottom: 20px;
    border-bottom: 1px solid #d1d5db;
    padding-bottom: 8px;
}

.s5-main-header h2 {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
    padding-left: 10px;
    border-left: 4px solid var(--primary-color);
    line-height: 1.2;
}

.s5-main-header h2 a {
    color: var(--text-color);
    text-decoration: none;
}

/* Grid Container */
.s5-grid-container {
    display: grid;
    grid-template-columns: 1.3fr 2fr;
    gap: 25px;
}

.s5-lists-wrapper {
    display: flex;
    flex-direction: column;
}

.s5-lists-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    flex-grow: 1;
}

/* Column Dividers */
.s5-col-left,
.s5-col-mid {
    border-right: 1px solid #d1d5db;
    padding-right: 25px;
}

/* Lead Post (Left Col) */
.s5-lead-post {
    display: flex;
    flex-direction: column;
}

.s5-lead-image {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 */
    overflow: hidden;
    margin-bottom: 15px;
}

.s5-lead-image a {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
}

.s5-lead-image img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.s5-lead-post:hover .s5-lead-image img {
    transform: scale(1.05);
}

.s5-lead-title {
    font-size: 24px;
    line-height: 1.4;
    margin: 0 0 10px 0;
}

.s5-lead-title a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s;
}

.s5-lead-title a:hover {
    color: var(--primary-color);
}

.s5-lead-excerpt {
    font-size: 15px;
    color: #555;
    line-height: 1.6;
}

.s5-lead-excerpt::after {
    content: "";
    display: table;
    clear: both;
}

.s5-lead-read-more {
    float: right;
    color: var(--primary-color);
    font-weight: 600;
    margin-left: 10px;
    text-decoration: none;
    transition: color 0.3s;
}

.s5-lead-read-more:hover {
    color: #111;
}

.s5-lead-read-more i {
    font-size: 12px;
    margin-left: 2px;
}

/* List Posts (Mid & Right Cols) */
.s5-list-item {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 15px;
    border-bottom: 1px solid #d1d5db;
    padding-bottom: 15px;
    margin-bottom: 15px;
}

.s5-list-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}

.s5-list-title {
    font-size: 16px;
    line-height: 1.4;
    margin: 0;
    font-weight: 600;
}

.s5-list-title a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s;
}

.s5-list-title a:hover {
    color: var(--primary-color);
}

.s5-list-image {
    position: relative;
    width: 100%;
    padding-top: 66.66%; /* 3:2 roughly */
    overflow: hidden;
}

.s5-list-image a {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
}

.s5-list-image img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.s5-list-item:hover .s5-list-image img {
    transform: scale(1.05);
}

/* Post Meta (Date/Time) */
.s5-post-meta {
    font-size: 13px;
    color: #777;
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Bottom Ad */
.s5-bottom-ad {
    grid-column: 1 / -1;
    text-align: center;
    margin-top: 0;
    padding-top: 20px;
    border-top: 1px solid #d1d5db;
}

.s5-bottom-ad img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* Responsive */
@media (max-width: 1024px) {
    .s5-grid-container {
        grid-template-columns: 1fr;
    }
    
    .s5-lists-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .s5-col-left {
        border-right: none;
        padding-right: 0;
        border-bottom: 1px solid #d1d5db;
        padding-bottom: 25px;
        margin-bottom: 25px;
    }
}

@media (max-width: 768px) {
    .s5-lists-grid {
        grid-template-columns: 1fr;
    }
    
    .s5-col-mid {
        border-right: none;
        padding-right: 0;
        border-bottom: 1px solid #d1d5db;
        padding-bottom: 15px;
        margin-bottom: 15px;
    }
    
    .s5-list-item {
        grid-template-columns: 1fr 100px;
    }
}
