/* Section 3 Wrapper */
.section-3-wrapper {
    background-color: #f4f6f8;
    padding: 30px 0;
    margin-bottom: 15px;
}

.s3-layout {
    display: grid;
    grid-template-columns: 73% 25%;
    gap: 2%;
    align-items: start;
}

/* Left: Main Content */
.s3-header {
    margin-bottom: 20px;
    border-bottom: 1px solid #d1d5db;
    padding-bottom: 8px;
}

.s3-header h2 {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
    padding-left: 10px;
    border-left: 4px solid var(--primary-color);
    line-height: 1.2;
}

.s3-header h2 a {
    color: var(--text-color);
    text-decoration: none;
}

.s3-main-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 20px;
}

/* Lead Post */
.s3-lead-post {
    padding-right: 20px;
    border-right: 1px solid #d1d5db;
}

.s3-lead-image {
    width: 100%;
    position: relative;
    padding-top: 56.25%;
    overflow: hidden;
    margin-bottom: 15px;
}

.s3-lead-image a {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
}

.s3-lead-image img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.s3-lead-post:hover .s3-lead-image img {
    transform: scale(1.05);
}

.s3-lead-title {
    font-size: 26px;
    line-height: 1.4;
    margin: 0 0 5px 0;
}

.s3-post-time {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 10px;
}

.s3-post-time i {
    color: var(--primary-color);
    margin-right: 4px;
}

.s3-lead-title a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.s3-lead-title a:hover {
    color: var(--primary-color);
}

.s3-lead-excerpt {
    font-size: 14px;
    color: #555;
    line-height: 1.5;
}

.s3-lead-read-more {
    display: inline-block;
    color: var(--primary-color);
    font-weight: 600;
    margin-left: 5px;
    text-decoration: none;
    transition: color 0.3s;
}

.s3-lead-read-more:hover {
    color: #111;
}

.s3-lead-read-more i {
    font-size: 12px;
    margin-left: 2px;
}

.s3-lead-ad {
    margin-top: 20px;
    width: 100%;
}

.s3-lead-ad img {
    width: 100%;
    height: auto;
    display: block;
}

/* List Posts */
.s3-list-posts {
    display: flex;
    flex-direction: column;
}

.s3-list-item {
    display: grid;
    grid-template-columns: 1fr 100px;
    gap: 15px;
    padding-bottom: 15px;
    margin-bottom: 15px;
    border-bottom: 1px solid #d1d5db;
}

.s3-list-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.s3-list-title {
    font-size: 19.504px;
    line-height: 1.4;
    margin: 0 0 8px 0;
}

.s3-list-title a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s;
}

.s3-list-title a:hover {
    color: var(--primary-color);
}

.s3-list-image {
    width: 100%;
    height: 70px;
    overflow: hidden;
}

.s3-list-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Right: Sidebar Tabs */
.s3-sidebar {
    background: transparent;
}

.s3-tabs-box {
    background: #ffffff;
    border: 1px solid #d1d5db;
    padding: 20px;
    border-radius: 4px;
}

.s3-tabs {
    display: flex;
    flex-direction: column;
}

.s3-tab-nav {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0 0 10px 0;
    background: #e2e8f0;
}

.s3-tab-nav li {
    flex: 1;
    text-align: center;
    padding: 12px 10px;
    cursor: pointer;
    font-weight: 600;
    font-size: 16px;
    color: #555;
    transition: all 0.3s ease;
    border-top: 3px solid transparent;
}

.s3-tab-nav li.active {
    background: #f4f6f8; /* Match section background */
    color: var(--text-color);
    border-top: 3px solid var(--primary-color);
}

.s3-tab-content-container {
    background: transparent;
    border-top: 1px solid #d1d5db;
    padding-top: 15px;
}

.s3-tab-pane {
    display: none;
    flex-direction: column;
}

.s3-tab-pane.active {
    display: flex;
}

.s3-tab-item {
    display: grid;
    grid-template-columns: 1fr 80px;
    gap: 15px;
    padding-bottom: 12px;
    margin-bottom: 12px;
    border-bottom: 1px solid #d1d5db;
}

.s3-tab-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.s3-tab-title {
    font-size: 15px;
    line-height: 1.4;
    margin: 0;
}

.s3-tab-title a {
    color: var(--text-color);
    text-decoration: none;
}

.s3-tab-title a:hover {
    color: var(--primary-color);
}

.s3-tab-image {
    width: 100%;
    height: 60px;
    overflow: hidden;
}

.s3-tab-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.s3-tab-more-btn {
    display: block;
    width: 100%;
    background-color: var(--primary-color);
    color: #ffffff;
    text-align: center;
    padding: 10px 0;
    margin-top: 15px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.3s ease;
}

.s3-tab-more-btn:hover {
    background-color: #111;
    color: #ffffff;
}

/* Responsive */
@media (max-width: 1024px) {
    .s3-layout {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .s3-main-grid {
        grid-template-columns: 1fr;
    }
    .s3-lead-post {
        padding-right: 0;
        border-right: none;
        border-bottom: 1px solid #d1d5db;
        padding-bottom: 20px;
        margin-bottom: 20px;
    }
}
