/**
 * Reusable Components
 * Article cards, grids, badges, etc.
 *
 * @package TBC_News
 */

 /* ===================================
   RELATED POSTS
   =================================== */

.related-posts {
    background: #fff;
    padding: 24px ;
    margin-bottom: 40px;
 
}


.related-posts-header {
         display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom-color: 3px solid var(--tbc-text);
}

.related-posts-title {
    font-size: 32px;
    font-weight: 900;
    color: var(--tbc-text);
    margin: 0;
}

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

/* ===================================
   BREADCRUMBS
   =================================== */

.breadcrumbs {
    padding: 16px 0 ;
    font-size: 13px;
    color: #666666;
}

.breadcrumbs-inner {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.breadcrumbs a {
    color: var(--tbc-text);
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumbs a:hover {
    color: var(--tbc-secondary);
}

.breadcrumbs .separator {
    color: #cccccc;
}

/* ===================================
   ARTICLE CARD COMPONENT
   =================================== */

.article-card {
    position: relative;
    background: #ffffff;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.article-card:hover {
    transform: translateY(-2px);
}

.article-card-image {
    position: relative;
    overflow: hidden;
    background-color: #f0f0f0;
}

.article-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.article-card:hover .article-card-image img {
    transform: scale(1.05);
}

.article-card-image::after {
    content: '';
    display: block;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.3), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.article-card:hover .article-card-image::after {
    opacity: 1;
}

/* Image aspect ratios */
.article-card-image.ratio-16-9 {
    aspect-ratio: 16 / 9;
}

.article-card-image.ratio-4-3 {
    aspect-ratio: 4 / 3;
}

.article-card-image.ratio-1-1 {
    aspect-ratio: 1 / 1;
}

.article-card-content {
    padding: 16px 0;
}

.article-card.has-padding .article-card-content {
    padding: 16px;
}

/* Category Badge */
.category-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 10px;
    margin-bottom: 8px;
    background-color: var(--tbc-text);
    color: #ffffff;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.category-badge:hover {
    background-color: #333333;
}

/* Category colors */
.category-badge.cat-news { background-color: #bb1919; }
.category-badge.cat-sport { background-color: #ffde30; color: #000; }
.category-badge.cat-business { background-color: #009fdb; }
.category-badge.cat-innovation { background-color: #8e44ad; }
.category-badge.cat-culture { background-color: #e74c3c; }
.category-badge.cat-travel { background-color: #27ae60; }

/* Article Title */
.article-card-title {
    margin: 8px 0;
}

.article-card-title a {
    color: var(--tbc-text);
    text-decoration: none;
    font-size: 18px;
    line-height: 1.4;
    font-weight: 700;
    display: block;
    transition: color 0.3s ease;
}

.article-card-title a:hover {
    color: #666666;
}

/* Article Excerpt */
.article-card-excerpt {
    color: #5a5a5a;
    font-size: 14px;
    line-height: 1.6;
    margin: 8px 0;
}

/* Article Meta */
.article-card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: #767676;
    margin-top: 8px;
}

.article-card-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.article-card-meta .author {
    font-weight: 600;
    color: var(--tbc-text);
}

.article-card-meta .separator {
    width: 3px;
    height: 3px;
    background-color: #767676;
    border-radius: 50%;
}

/* ===================================
   GRID LAYOUTS
   =================================== */

.articles-grid {
    display: grid;
    gap: 24px;
}

/* 2 Column Grid */
.articles-grid.grid-2-col {
    grid-template-columns: repeat(2, 1fr);
}

/* 3 Column Grid */
.articles-grid.grid-3-col {
    grid-template-columns: repeat(3, 1fr);
}

/* 4 Column Grid */
.articles-grid.grid-4-col {
    grid-template-columns: repeat(4, 1fr);
}

/* Mixed Grid (1 large + 2 small) */
.articles-grid.grid-mixed {
    grid-template-columns: 2fr 1fr;
    gap: 24px;
}

/* ===================================
   SECTION HEADERS
   =================================== */

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 3px solid var(--tbc-text);
}

.section-title {
    font-size: 28px;
    font-weight: 900;
    color: var(--tbc-text);
    margin: 0;
    text-transform: capitalize;
}

.section-link {
    font-size: 14px;
    font-weight: 600;
    color: var(--tbc-text);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: opacity 0.3s ease;
}

.section-link:hover {
    opacity: 0.7;
}

.section-link i {
    font-size: 12px;
}

/* ===================================
   HOMEPAGE SECTIONS
   =================================== */

.homepage-section {
    margin-bottom: 48px;
}

.homepage-section:last-child {
    margin-bottom: 0;
}

/* ===================================
   RESPONSIVE
   =================================== */



@media (max-width: 768px) {
    .section-title {
        font-size: 24px;
    }
    
    .article-card-title a {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .homepage-section {
        margin-bottom: 32px;
    }
    
    .section-header {
        margin-bottom: 16px;
    }
    
    .articles-grid {
        gap: 16px;
    }
}









/* ===================================
   VIDEO CARD
   =================================== */

.video-card .video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    transition: background 0.3s ease;
}

.video-card:hover .video-overlay {
    background: rgba(0, 0, 0, 0.5);
}

.video-card .video-overlay i {
    font-size: 64px;
    color: #ffffff;
    opacity: 0.9;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.video-card:hover .video-overlay i {
    transform: scale(1.1);
    opacity: 1;
}

.category-badge.cat-video {
    background-color: #c0392b;
}










/* ===============================
   SIDEBAR MIXED FEATURED WIDGET
   =============================== */

.sidebar-featured-mix {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 20px;
}

/* BIG FIRST ITEM */
.sidebar-featured-big .featured-thumb img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 6px;
    display: block;

}

.sidebar-featured-big .featured-content {
    margin-top: 10px;
}

.featured-category {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--tbc-primary);
}

.featured-title {
    font-size: 18px;
    margin: 6px 0;
}

.featured-title a {
    color: var(--tbc-text);
    text-decoration: none;
}

.featured-excerpt {
    font-size: 14px;
    color: #555;
    line-height: 1.4;
}

/* SMALL ITEMS */
.sidebar-featured-small {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.sidebar-featured-small .small-thumb {
    flex: 0 0 70px;
}

.sidebar-featured-small .small-thumb img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 4px;
    display: block;
}

.small-title {
    font-size: 14px;
    margin: 0 0 4px;
}

.small-title a {
    color: var(--tbc-text);
    text-decoration: none;
}

.small-meta {
    font-size: 12px;
    color: #888;
}

/* MOBILE */
@media (max-width: 768px) {
    .sidebar-featured-small {
        gap: 10px;
    }

    .sidebar-featured-small .small-thumb img {
        width: 60px;
        height: 60px;
    }
}




@media (max-width: 1024px) {
    .articles-grid.grid-4-col {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .articles-grid.grid-3-col {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 998px) {
    .articles-grid.grid-4-col,
    .articles-grid.grid-3-col,
    .articles-grid.grid-2-col {
        grid-template-columns:  1fr;
    }
    
    .articles-grid.grid-mixed {
        grid-template-columns:  1fr;
    }
    .single-wrapper{
        width: 100%;
        display: flex;
        flex-direction: column;
    }
.related-posts-grid {
    grid-template-columns: repeat(2, 1fr);
}
}
@media (max-width: 768px) {
    .articles-grid.grid-4-col,
    .articles-grid.grid-3-col,
    .articles-grid.grid-2-col {
        grid-template-columns: 2fr, 1fr;
    }
    
    .articles-grid.grid-mixed {
        grid-template-columns: 2fr, 1fr;
    }
.related-posts-grid {
    grid-template-columns: repeat(2, 1fr);
}
}
@media (max-width: 620px) {
    .articles-grid.grid-4-col,
    .articles-grid.grid-3-col,
    .articles-grid.grid-2-col {
        grid-template-columns:  1fr;
    }
    
    .articles-grid.grid-mixed {
        grid-template-columns: 1fr;
    }
    .related-posts-grid {
    grid-template-columns: 1fr;
}
  
}

