/**
 * SBB News & Articles Styles
 */

/* Reset untuk section agar tidak terpengaruh styling tema */
.content-area .sbb-news-articles-section,
.sbb-news-articles-section {
    padding: 100px 30px 80px !important;
    background: #ffffff !important;
    position: relative;
    margin: 0 !important;
    width: 100% !important;
    box-sizing: border-box;
    clear: both;
}

/* Reset untuk semua elemen di dalam section */
.sbb-news-articles-section * {
    box-sizing: border-box;
}

/* Override styling dari content-area jika ada */
.content-area .sbb-news-articles-section .sbb-news-header,
.content-area .sbb-news-articles-section .sbb-news-grid,
.content-area .sbb-news-articles-section .sbb-news-footer {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* Reset untuk article card */
.sbb-news-articles-section article,
.sbb-news-card {
    margin: 0 !important;
    padding: 0 !important;
}

.sbb-news-header {
    max-width: 1440px;
    margin: 0 auto 60px;
    text-align: left;
    padding: 0 30px;
}

@media (max-width: 768px) {
    .sbb-news-header {
        padding: 0 20px;
    }
}

.sbb-news-subtitle {
    display: block !important;
    font-size: 13px !important;
    font-weight: 400 !important;
    color: #666666 !important;
    letter-spacing: 0.3px !important;
    margin-bottom: 12px !important;
    text-transform: none !important;
    font-family: 'Signika', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

.sbb-news-title {
    font-size: 36px !important;
    font-weight: 700 !important;
    color: #2c2c2c !important;
    line-height: 1.3 !important;
    margin: 0 0 12px 0 !important;
    letter-spacing: -0.5px !important;
    font-family: 'Signika', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

.sbb-news-grid {
    max-width: 1440px !important;
    margin: 0 auto 50px !important;
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 32px !important;
    padding: 0 30px !important;
    width: 100%;
    box-sizing: border-box;
}

.sbb-news-card {
    background: #ffffff !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex !important;
    flex-direction: column;
    height: 100%;
    min-height: 500px;
    margin: 0;
    padding: 0;
}

.sbb-news-card:hover {
    transform: translateY(0);
    box-shadow: 4px 4px 20px 0px rgba(0, 0, 0, 0.25) !important;
}

.sbb-news-image-wrapper {
    position: relative;
    width: 100% !important;
    height: 300px !important;
    overflow: hidden;
    background: #f5f5f5;
    flex-shrink: 0;
    margin: 0;
    padding: 0;
    border-radius: 0;
}

.sbb-news-image-link {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
}

.sbb-news-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    display: block;
}

.sbb-news-card:hover .sbb-news-image {
    transform: scale(1.05);
}

.sbb-news-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f0f0;
}

.sbb-news-badge {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 128px;
    height: 58px;
    background: #777654;
    color: #ffffff;
    padding: 0;
    border-radius: 0;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    z-index: 2;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    line-height: 58px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 0 100%);
    -webkit-clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.sbb-news-content {
    padding: 24px 28px 28px !important;
    flex: 1;
    display: flex !important;
    flex-direction: column;
    margin: 0;
    width: 100%;
}

.sbb-news-date {
    display: block !important;
    font-size: 13px !important;
    color: #999999 !important;
    margin-bottom: 12px !important;
    font-weight: 400 !important;
    line-height: 1.6 !important;
    font-family: 'Signika', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

.sbb-news-card-title {
    margin: 0 0 14px !important;
    font-size: 19px !important;
    font-weight: 700 !important;
    line-height: 1.45 !important;
    color: #2c2c2c !important;
    font-family: 'Signika', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

.sbb-news-card-title a {
    color: inherit !important;
    text-decoration: none !important;
    transition: color 0.3s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: inherit !important;
    font-weight: inherit !important;
    line-height: inherit !important;
}

.sbb-news-card-title a:hover {
    color: #65644a;
}

.sbb-news-excerpt {
    font-size: 14px !important;
    line-height: 1.75 !important;
    color: #666666 !important;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-family: 'Signika', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    margin: 0 !important;
    padding: 0 !important;
}

.sbb-news-excerpt p {
    margin: 0 !important;
    padding: 0 !important;
}

.sbb-news-footer {
    max-width: 1440px;
    margin: 0 auto;
    text-align: center;
    padding: 0 30px;
}

.sbb-news-view-all {
    display: inline-block;
    color: #8B4513;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s ease;
    padding: 10px 0;
    font-family: 'Signika', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.sbb-news-view-all:hover {
    color: #A0522D;
    text-decoration: underline;
}

.sbb-news-no-posts {
    text-align: center;
    color: #999999;
    padding: 40px 20px;
    max-width: 1440px;
    margin: 0 auto;
}

/* Responsive */
@media (max-width: 1024px) {
    .sbb-news-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
        padding: 0 20px;
    }
    
    .sbb-news-card {
        min-height: auto;
    }
}

@media (max-width: 768px) {
    .sbb-news-articles-section {
        padding: 60px 20px 50px;
    }
    
    .sbb-news-header {
        margin-bottom: 40px;
        padding: 0 20px;
    }
    
    .sbb-news-title {
        font-size: 28px;
    }
    
    .sbb-news-grid {
        grid-template-columns: 1fr;
        gap: 25px;
        padding: 0 20px;
    }
    
    .sbb-news-card {
        min-height: auto;
    }
    
    .sbb-news-image-wrapper {
        height: 240px;
    }
    
    .sbb-news-card {
        border-radius: 0;
    }
    
    .sbb-news-image-wrapper {
        border-radius: 0;
    }
    
    .sbb-news-content {
        padding: 20px;
    }
    
    .sbb-news-footer {
        padding: 0 20px;
    }
}

