/* Contents Page Styles */

/* 1. Sticky Bar (Wrap Tabs & Filter) */
.contents-sticky-bar {
    position: sticky;
    top: 80px;
    /* PC Header Height */
    z-index: 90;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
    /* Removed margin-bottom to reduce gap */
    margin-bottom: 10px;
    /* Minimal gap */
    gap: 20px;
    transition: top 0.3s;
}

/* Category Tabs (Left Side) */
.contents-category-tabs {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0;
    margin: 0;
    border: none;
}

.cat-tab {
    display: inline-block;
    padding: 8px 16px;
    font-size: 15px;
    font-weight: 500;
    color: #666;
    background: #f5f5f5;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.2s;
    border: none;
    white-space: nowrap;
}

.cat-tab:hover {
    background: #e9e9e9;
    color: #333;
}

.cat-tab.active {
    background: #556B2F;
    /* Primary Green */
    color: #fff;
    font-weight: 700;
}

/* Filter Wrapper (Right Side) */
.filter-wrapper {
    position: relative;
    flex-shrink: 0;
    margin-top: 0px;
}

/* Toggle Button */
.filter-toggle-btn {
    height: 38px;
    width: 38px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.filter-toggle-btn:hover {
    background: #f9f9f9;
    border-color: #ccc;
}

/* Dropdown */
.filter-dropdown {
    position: absolute;
    right: 0;
    top: 45px;
    width: 200px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    padding: 15px;
    z-index: 100;
    display: none;
}

.f-section {
    margin-bottom: 12px;
    border-bottom: 1px solid #f5f5f5;
    padding-bottom: 8px;
}

.f-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.f-section h4 {
    font-size: 11px;
    color: #999;
    font-weight: 700;
    margin: 0 0 6px;
    text-transform: uppercase;
}

.f-options {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.f-radio {
    display: flex;
    align-items: center;
    font-size: 13px;
    color: #333;
    cursor: pointer;
}

.f-radio input {
    margin-right: 6px;
    accent-color: #556B2F;
}

.apply-btn {
    width: 100%;
    padding: 8px;
    background: #111;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 5px;
}

.apply-btn:hover {
    background: #333;
}

/* 2. Split Layout */
.contents-split-layout {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

/* Left Column (Featured) */
.contents-featured-section {
    width: 38%;
    flex-shrink: 0;
    min-width: 0;
}

/* Right Column (List) */
.contents-list-section {
    flex: 1;
    min-width: 0;
}

/* 3. Featured Slider (PC & Mobile) */
.featured-slider-wrapper {
    position: relative;
    width: 100%;
    /* Ensure minimal margin bottom to adhere to gap request? */
    /* No, user said: "Filter menu and global header gap". 
       Also "Scroll to past... attach continuously". */
}

.featured-slider {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 0;
    padding-bottom: 0px;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.featured-slider::-webkit-scrollbar {
    display: none;
}

.featured-slide {
    flex: 0 0 100%;
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    position: relative;
}

.f-thumb-link {
    display: block;
    overflow: hidden;
    border-radius: 6px;
    margin-bottom: 10px;
    position: relative;
    width: 100%;
}


.f-thumb {
    width: 100%;
    padding-bottom: 56.25%;
    /* 16:9 */
    background-size: cover;
    background-position: center;
    transition: transform 0.3s;
}

.f-thumb-link:hover .f-thumb {
    transform: scale(1.05);
}

.f-info {
    display: flex;
    flex-direction: column;
}

/* If container padding is needed in PC only */
.container-padding {
    /* PC: No extra padding usually, just flow */
}

.f-cat {
    font-size: 11px;
    color: #556B2F;
    font-weight: 700;
    margin-bottom: 4px;
    text-transform: uppercase;
}

.f-title {
    font-size: 18px;
    font-weight: 700;
    color: #111;
    line-height: 1.35;
    margin-bottom: 6px;
    word-break: keep-all;
}

.f-sub {
    font-size: 14px;
    color: #555;
    margin-bottom: 8px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.f-meta {
    font-size: 12px;
    color: #999;
    margin-top: auto;
}

/* Indicators */
.featured-indicators {
    position: absolute;
    bottom: 20px;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 10;
    height: auto;
    bottom: auto;
}

.f-dot {
    width: 6px;
    height: 6px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
}

.f-dot.active {
    background: #fff;
    height: 16px;
    /* Elongated */
    border-radius: 4px;
}

/* 4. List Items */
.content-list-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.content-list-item {
    display: flex;
    gap: 20px;
    padding: 20px 0;
    border-bottom: 1px solid #f0f0f0;
    align-items: flex-start;
}

.l-thumb-link {
    width: 140px;
    flex-shrink: 0;
}

.l-thumb {
    width: 100%;
    height: 95px;
    background-size: cover;
    background-position: center;
    border-radius: 4px;
}

.l-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.l-top {
    margin-bottom: 4px;
    display: flex;
    align-items: center;
}

.l-cat {
    font-size: 10px;
    color: #666;
    background: #eee;
    padding: 2px 6px;
    border-radius: 3px;
    margin-right: 8px;
    font-weight: 600;
}

.l-date {
    font-size: 11px;
    color: #bbb;
}

.l-title {
    font-size: 16px;
    font-weight: 700;
    color: #111;
    margin: 0 0 4px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.l-sub {
    font-size: 13px;
    color: #888;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}

.l-author {
    font-size: 12px;
    color: #555;
}

.l-views {
    color: #999;
    font-size: 11px;
    margin-left: 6px;
}

/* LOAD MORE BUTTON */
.load-more-container {
    text-align: center;
    margin-top: 40px;
    margin-bottom: 40px;
    min-height: 50px;
}

.load-more-btn {
    display: inline-block;
    padding: 12px 30px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 30px;
    color: #333;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.load-more-btn:hover {
    border-color: #556B2F;
    color: #556B2F;
    background: #f9f9f9;
}


/* =========================================
   MOBILE RESPONSIVE
   ========================================= */
@media (max-width: 900px) {

    /* Sticky Bar: Tabs + Filter */
    .contents-sticky-bar {
        top: 60px;
        /* Mobile Header */
        padding: 5px 15px;
        /* Reduced vertical padding */
        gap: 10px;
        margin-bottom: 0px;
        border-bottom: none;
        align-items: flex-start;
        flex-wrap: nowrap;
    }

    .contents-category-tabs {
        flex-wrap: wrap;
    }

    .cat-tab {
        padding: 6px 12px;
        font-size: 13px;
    }

    /* Stack Split Layout */
    .contents-split-layout {
        flex-direction: column;
        gap: 20px;
        margin-top: 0;
    }

    /* FULL FLUSH MOBILE SLIDER */
    .contents-featured-section {
        width: 100%;
    }

    .featured-slider-wrapper {
        width: 100vw;
        margin-left: -50vw;
        left: 50%;
        position: relative;
    }

    .featured-slider {
        width: 100%;
        gap: 0;
    }

    .featured-slide {
        flex: 0 0 100vw;
        width: 100vw;
        border-radius: 0;
    }

    .f-thumb-link {
        border-radius: 0;
        margin-bottom: 0;
    }

    .f-thumb {
        padding-bottom: 60%;
        border-radius: 0;
    }

    /* Mobile Text Overlay */
    .f-info {
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        padding: 20px;
        background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
        color: #fff;
        z-index: 5;
    }

    .f-cat {
        color: #ffaa00;
    }

    .f-title {
        color: #fff;
        font-size: 20px;
    }

    .f-sub {
        display: none;
    }

    .f-meta {
        color: rgba(255, 255, 255, 0.6);
        font-size: 11px;
    }

    /* Indicators */
    .featured-indicators {
        top: 50%;
        right: 15px;
        transform: translateY(-50%);
    }

    /* Mobile List Layout */
    .content-list-item {
        padding: 15px 0;
    }

    .l-thumb-link {
        width: 100px;
        flex-shrink: 0;
    }

    .l-thumb {
        height: 75px;
    }

    .l-title {
        font-size: 15px;
    }
}