/* ================================================================
   TRE – RSS Feed
   File: assets/css/rss-feed.css
   ================================================================ */

.tre-rss {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    font-family: Arial, Helvetica, sans-serif;
    box-sizing: border-box;
}
.tre-rss *,
.tre-rss *::before,
.tre-rss *::after {
    box-sizing: border-box;
}

/* ── Header ── */
.tre-rss__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.tre-rss__title {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 6px;
    line-height: 1.2;
}
.tre-rss__title-main      { color: #2053a5; }
.tre-rss__title-highlight { color: #f0a500; }
.tre-rss__subtitle {
    font-size: 13px;
    color: #555;
    margin: 0;
    max-width: 500px;
    line-height: 1.5;
}
.tre-rss__view-all {
    font-size: 13px;
    font-weight: 600;
    color: #2053a5;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.tre-rss__view-all:hover { text-decoration: underline; }

/* ── Body ── */
.tre-rss__body {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

/* ── Left list — fixed height, 3 items visible, scrollable ── */
.tre-rss__list {
    flex: 0 0 270px;
    width: 270px;
    max-height: 630px;        /* approx 3 items */
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    scroll-behavior: smooth;
    /* Custom scrollbar */
    scrollbar-width: thin;
    scrollbar-color: #2053a5 #e8ecf4;
}
.tre-rss__list::-webkit-scrollbar       { width: 4px; }
.tre-rss__list::-webkit-scrollbar-track { background: #e8ecf4; border-radius: 2px; }
.tre-rss__list::-webkit-scrollbar-thumb { background: #2053a5; border-radius: 2px; }

/* ── List items ── */
.tre-rss__list-item {
    padding: 14px 8px 14px 10px;
    border-bottom: 1px solid #eee;
    border-left: 3px solid transparent;
    cursor: pointer;
    flex-shrink: 0;
    transition: border-color .2s, background .2s;
}
.tre-rss__list-item:first-child { padding-top: 0; }
.tre-rss__list-item:last-child  { border-bottom: none; }
.tre-rss__list-item:hover       { background: #f8f9ff; }
.tre-rss__list-item.is-active   {
    border-left-color: #2053a5;
    background: #f0f4ff;
}

.tre-rss__category {
    display: inline-block;
    background: #f0a500;
    color: #ffffff;
    font-size: 9px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 3px;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: .4px;
}

.tre-rss__list-title {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #2053a5;
    text-decoration: none;
    line-height: 1.4;
    margin-bottom: 8px;
    pointer-events: none;
}
.tre-rss__list-item.is-active .tre-rss__list-title { color: #163d80; }

.tre-rss__list-meta {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}
.tre-rss__list-thumb {
    width: 64px;
    height: 48px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}
.tre-rss__list-desc {
    font-size: 11px;
    color: #666;
    line-height: 1.5;
    margin: 0;
}

/* ── Right featured ── */
.tre-rss__featured {
    flex: 1;
    min-width: 0;
}
.tre-rss__featured-image-link {
    display: block;
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 14px;
    text-decoration: none;
}
.tre-rss__featured-image {
    width: 100%;
    height: 310px;
    object-fit: cover;
    display: block;
    transition: opacity .3s ease;
}
.tre-rss__featured-image.is-loading      { opacity: 0; }
.tre-rss__featured-image-placeholder {
    width: 100%;
    height: 310px;
    background: #e0e4ee;
    display: block;
}
.tre-rss__featured-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}
.tre-rss__featured-image-link:hover .tre-rss__featured-play circle {
    fill: rgba(255,255,255,0.4);
}

.tre-rss__featured-body { padding: 0 2px; }
.tre-rss__featured-title {
    display: block;
    font-size: 17px;
    font-weight: 700;
    color: #2053a5;
    text-decoration: none;
    margin-bottom: 8px;
    line-height: 1.4;
    transition: color .2s;
}
.tre-rss__featured-title:hover { color: #163d80; text-decoration: underline; }
.tre-rss__featured-desc {
    font-size: 13px;
    color: #444;
    line-height: 1.6;
    margin: 0 0 10px;
}
.tre-rss__featured-more {
    font-size: 13px;
    font-weight: 600;
    color: #2053a5;
    text-decoration: underline;
    display: inline-block;
}
.tre-rss__featured-more:hover { color: #163d80; }

/* ── Nav buttons ── */
.tre-rss__nav {
    display: flex;
    justify-content: space-between;
    margin-top: 18px;
}
.tre-rss__nav-btn {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    border: none;
    background: #2053a5;
    color: #fff;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background .2s;
    line-height: 1;
}
.tre-rss__nav-btn:hover    { background: #163d80; }
.tre-rss__nav-btn:disabled { background: #ccc; cursor: default; }

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 900px) {
    .tre-rss__body {
        flex-direction: column;
    }
    .tre-rss__list {
        flex: none;
        width: 100%;
        max-height: 260px;   /* ~2 items on mobile */
    }
    .tre-rss__featured-image,
    .tre-rss__featured-image-placeholder { height: 220px; }
}
@media (max-width: 600px) {
    .tre-rss             { padding: 0 16px; }
    .tre-rss__title      { font-size: 22px; }
    .tre-rss__header     { flex-direction: column; }
    .tre-rss__featured-image,
    .tre-rss__featured-image-placeholder { height: 180px; }
}
