/* ============================================================
   Academic Podcasts Library — Page Styles
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600;700&family=Source+Sans+3:wght@300;400;600&display=swap');

:root {
    --red:       #c0392b;
    --red-dark:  #962d22;
    --text-dark: #1a1a1a;
    --text-mid:  #555;
    --text-light:#888;
    --border:    #ddd;
    --bg-light:  #f6f6f6;
    --white:     #ffffff;
    --radius:    4px;
    --nav-bg:    #1a1a1a;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Source Sans 3', sans-serif;
    color: var(--text-dark);
    background: var(--white);
    font-size: 14px;
    line-height: 1.6;
}

/* ============================================================
   HERO BANNER
   ============================================================ */

.hero-banner {
    position: relative;
    height: 160px;
    background: url('/images/hero-bg.jpg') center/cover no-repeat;
    background-color: #2c2c2c;
    display: flex;
    align-items: flex-end;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(0,0,0,0.72) 40%, rgba(0,0,0,0.3));
}

.hero-content {
    position: relative;
    z-index: 1;
    padding: 0 32px 24px;
}

.hero-content h1 {
    font-family: 'Playfair Display', serif;
    font-size: 1.9rem;
    font-weight: 700;
    color: var(--white);
    letter-spacing: 0.01em;
}

/* ============================================================
   BREADCRUMB
   ============================================================ */
.breadcrumb-bar {
    padding: 10px 32px;
    font-size: 2rem;
    color: var(--text-light);
    border-bottom: 1px solid var(--border);
}

.breadcrumb-bar a {
    color: var(--text-light);
    text-decoration: none;
}

.breadcrumb-bar a:hover {
    color: var(--red);
    text-decoration: underline;
}

.breadcrumb-bar .active-crumb {
    color: var(--red);
}

/* ============================================================
   PAGE HEADING
   ============================================================ */
.page-heading {
    /*    padding: 18px 32px 14px;
    border-bottom: 2px solid var(--border);*/
    position: relative;
    padding-left: 30px; /* space for line */
    font-size: 20rem;
}
    .page-heading::before {
        content: "";
        position: absolute;
        left: 10px;
        padding-left: 5px;
/*        top: px;*/
        width: 4px;
        border-radius: 2px;
        height: 60px; /* adjust height as needed */
        background-color: #f4c542; /* yellow color */
    }
.page-heading h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 3px;
}

.tagline {
    font-size: 1.5rem;
    color: var(--text-light);
    font-style: italic;
    letter-spacing: 0.03em;
}

/* ============================================================
   MAIN LAYOUT: Sidebar + Content
   ============================================================ */
.podcasts-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 0;
    max-width: 1500px;
    margin: 0 auto;
    padding: 0;
    align-items: start;
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.filter-sidebar {
    border-right: 1px solid var(--border);
    padding: 18px 16px 20px;
    min-height: 600px;
    display: flex;
    flex-direction: column;
    gap: 0;
    width:auto;
}

/* Filter Group */
.filter-group {
    border-bottom: 1px solid var(--border);
    padding-bottom: 12px;
    margin-bottom: 0;
}

.filter-group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 11px 0 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1.85rem;
    color: var(--text-dark);
    user-select: none;
}

.chevron {
    font-size: 1.5rem;
    color: var(--text-light);
}

.filter-group-body {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding-bottom: 4px;
}

.filter-option {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 1.75rem;
    color: var(--text-mid);
    cursor: pointer;
    line-height: 1.4;
}

.filter-option input[type="checkbox"] {
    margin-top: 2px;
    accent-color: var(--red);
    flex-shrink: 0;
    width: 13px;
    height: 13px;
    cursor: pointer;
}

/* Sidebar Buttons */
.sidebar-actions {
    display: flex;
    gap: 8px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.btn-clear {
    padding: 7px 12px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-family: 'Source Sans 3', sans-serif;
    font-size: 1.5rem;
    color: var(--text-mid);
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.btn-clear:hover {
    background: var(--bg-light);
}

.btn-apply {
    padding: 7px 14px;
    background: var(--red);
    border: none;
    border-radius: var(--radius);
    font-family: 'Source Sans 3', sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--white);
    cursor: pointer;
    transition: background 0.2s;
}

.btn-apply:hover {
    background: var(--red-dark);
}

/* Sidebar Pagination */
.sidebar-pagination {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.page-btn {
    min-width: 28px;
    height: 28px;
    padding: 0 6px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 1.78rem;
    color: var(--text-mid);
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.page-btn:hover {
    background: var(--bg-light);
    color: var(--red);
    border-color: var(--red);
}

.page-btn.active {
    background: var(--red);
    color: var(--white);
    border-color: var(--red);
    font-weight: 700;
}

.next-btn {
    padding: 0 10px;
    font-size: 1.78rem;
}

/* ============================================================
   MAIN CONTENT
   ============================================================ */
.podcasts-main {
    padding: 18px 24px;
}

/* ---- Filter Bar ---- */
.filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
    gap: 12px;
    flex-wrap: wrap;
}

.filter-tabs {
    display: flex;
    align-items: center;
    gap: 4px;
}

.filter-label {
    font-size: 1.82rem;
    color: var(--text-light);
    margin-right: 4px;
}

.ftab {
    padding: 5px 14px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 2px;
    font-family: 'Source Sans 3', sans-serif;
    font-size: 1.78rem;
    color: var(--text-mid);
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.ftab:hover {
    background: var(--bg-light);
    color: var(--red);
    border-color: var(--red);
}

.ftab.active {
    background: var(--red);
    color: var(--white);
    border-color: var(--red);
    font-weight: 600;
}

.sort-by {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.82rem;
    color: var(--text-light);
}

.sort-by select {
    padding: 4px 8px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-family: 'Source Sans 3', sans-serif;
    font-size: 1.8rem;
    color: var(--text-dark);
    background: var(--white);
    cursor: pointer;
    outline: none;
}

.sort-by select:focus {
    border-color: var(--red);
}

/* ---- Podcast Cards ---- */
.podcast-cards {
    display: flex;
    flex-direction: column;
    gap: 0;
    
}

.podcast-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 18px 0;
    border-bottom: 1px solid var(--border);
    transition: background 0.15s;
    width: auto;
}

.podcast-card:hover {
    background: var(--bg-light);
    padding-left: 6px;
    border-radius: var(--radius);
}

.podcast-card-info {
    flex: 1;
    min-width: 0;
}

.podcast-card-title {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    font-weight: 600;
    color: var(--red);
    text-decoration: none;
    display: block;
    margin-bottom: 6px;
    line-height: 1.35;
}

.podcast-card-title:hover {
    color: var(--red-dark);
    text-decoration: underline;
}

.podcast-card-desc {
    font-size: 1.83rem;
    color: var(--text-light);
    line-height: 1.5;
    margin-bottom: 8px;
}

.podcast-card-meta {
    font-size: 1.78rem;
    color: var(--text-light);
}

.tag-link {
    color: var(--red);
    font-weight: 600;
    cursor: pointer;
}

.tag-link:hover {
    text-decoration: underline;
}

.podcast-card-thumb {
    width: 160px;
    height: 100px;
    flex-shrink: 0;
    border-radius: var(--radius);
    overflow: hidden;
    position: relative;
    background: #d0d0d0;
}

.podcast-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.podcast-card:hover .podcast-card-thumb img {
    transform: scale(1.05);
}

.play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(192, 57, 43, 0.88);
    color: var(--white);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    padding-left: 3px;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}

.play-btn:hover {
    background: var(--red-dark);
    transform: translate(-50%, -50%) scale(1.12);
}
/* ── Layout ── */
.ap-page {
    display: grid;
    grid-template-columns: 230px 1fr;
    align-items: start;
    min-height: 70vh;
    font-family: 'Segoe UI', sans-serif;
    font-size: 14px;
    padding: 20px; /* inner spacing */
    margin: 20px auto; /* outer spacing (top/bottom + center horizontally) */
    max-width: 1400px; /* keeps layout centered and clean */
    box-sizing: border-box;
}

/* ── Sidebar ── */
.ap-sidebar {
    border-right: 1px solid #e0e0e0;
    background: #fff;
    position: sticky;
    top: 0;
    max-height: 100vh;
    overflow-y: auto;
    padding-bottom: 20px;
    width: auto;
}

.fg {
    border-bottom: 1px solid #efefef;
}

.fg-hdr {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.8rem;
    font-weight: 700;
    color: #222;
    text-align: left;
}

    .fg-hdr:hover {
        background: #fdf5f5;
    }

.fg-caret {
    color: #aaa;
    font-size: 1.2rem;
    transition: transform 0.2s;
}

.fg.collapsed .fg-body {
    display: none;
}

.fg.collapsed .fg-caret {
    transform: rotate(180deg);
}

.fg-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 4px 16px 12px;
}

.fg-scroll {
    max-height: 180px;
    overflow-y: auto;
}

.fg-opt {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 1.2rem;
    color: #555;
    cursor: pointer;
    padding: 3px 0;
    line-height: 1.4;
}

    .fg-opt input {
        margin-top: 2px;
        accent-color: #c0392b;
        cursor: pointer;
        flex-shrink: 0;
    }

.fg-actions {
    padding: 16px 16px 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.btn-clear-all {
    background: none;
    border: 1px solid #ddd;
    border-radius: 3px;
    padding: 7px 12px;
    font-size: 1.8rem;
    color: #666;
    cursor: pointer;
}

    .btn-clear-all:hover {
        background: #f5f5f5;
    }

.btn-apply {
    background: #c0392b;
    border: none;
    border-radius: 3px;
    padding: 8px 14px;
    font-size: 1.8rem;
    font-weight: 700;
    color: #fff;
    cursor: pointer;
}

    .btn-apply:hover {
        background: #962d22;
    }

/* ── Main ── */
.ap-main {
    padding: 0 24px 40px;
}

.ap-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0 12px;
    border-bottom: 2px solid #c0392b;
    margin-bottom: 18px;
    flex-wrap: wrap;
    gap: 8px;
}

.ap-timebtns {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

.ap-lbl {
    font-size: 2rem;
    color: #888;
    margin-right: 4px;
}

.ap-tbtn {
    padding: 5px 14px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 2px;
    font-size: 2rem;
    color: #555;
    cursor: pointer;
    transition: all 0.18s;
}

    .ap-tbtn:hover, .ap-tbtn.active {
        background: #c0392b;
        color: #fff;
        border-color: #c0392b;
        font-weight: 600;
    }

.ap-sortby {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 2rem;
    color: #666;
}

    .ap-sortby select {
        padding: 4px 8px;
        border: 1px solid #ddd;
        border-radius: 3px;
        font-size: 2rem;
        color: #333;
        background: #fff;
        cursor: pointer;
    }

   .ap-sortby select:focus {
            border-color: #c0392b;
            outline: none;
   }

/* ── Cards ── */
.ap-card {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    padding: 20px 0;
    border-bottom: 1px solid #efefef;
    transition: background 0.15s;
}

    .ap-card:hover {
        background: #fdf5f5;
        padding-left: 6px;
        border-radius: 3px;
    }

.ap-thumb {
    width: 160px;
    height: 100px;
    flex-shrink: 0;
    border-radius: 3px;
    overflow: hidden;
    position: relative;
    background: #ddd;
}

    .ap-thumb img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
        transition: transform 0.3s;
    }

.ap-card:hover .ap-thumb img {
    transform: scale(1.05);
}

.ap-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%,-50%);
    width: 38px;
    height: 38px;
    background: rgba(192,57,43,0.88);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: none;
    transition: background 0.2s, transform 0.2s;
}

    .ap-play:hover {
        background: #962d22;
        transform: translate(-50%,-50%) scale(1.1);
    }

    .ap-play img {
        width: 16px;
        height: 16px;
    }

.ap-info {
    flex: 1;
    min-width: 0;
}
.ap-video-btn {
    background: #c0392b;
}
.ap-title {
    font-size: 2rem;
    font-weight: 700;
    color: #c0392b;
    text-decoration: none;
    display: block;
    margin-bottom: 6px;
    line-height: 1.35;
}

    .ap-title:hover {
        color: #962d22;
        text-decoration: underline;
    }

.ap-desc {
    font-size: 1.81rem;
    color: #888;
    line-height: 1.55;
    margin-bottom: 8px;
}

.ap-meta {
    font-size: 1.77rem;
    color: #aaa;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.ap-badge {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 2px;
    font-size: 1.72rem;
    font-weight: 600;
    letter-spacing: 0.04em;
}

.badge-video {
    background: #ffeaea;
    color: #c0392b;
}

.badge-audio {
    background: #eaf5ea;
    color: #2e7d32;
}

.badge-ugpg {
    background: #f0f0f0;
    color: #555;
}

/* ── Pagination ── */
.ap-pagination {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 24px 0 8px;
    flex-wrap: wrap;
}

.ap-pg {
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 3px;
    font-size: 1.5rem;
    color: #555;
    cursor: pointer;
    transition: all 0.15s;
}

    .ap-pg:hover {
        border-color: #c0392b;
        color: #c0392b;
    }

    .ap-pg.active {
        background: #c0392b;
        border-color: #c0392b;
        color: #fff;
        font-weight: 700;
    }

.ap-count {
    margin-top: 8px;
    font-size: 1.75rem;
    color: #bbb;
}

.ap-loading {
    padding: 40px;
    text-align: center;
    color: #aaa;
    font-size: 0.9rem;
}

.ap-empty {
    padding: 40px;
    text-align: center;
    color: #bbb;
    font-size: 4rem;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
    .podcasts-layout {
        grid-template-columns: 1fr;
    }

    .filter-sidebar {
        border-right: none;
        border-bottom: 1px solid var(--border);
    }

    .podcast-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .podcast-card-thumb {
        width: 100%;
        height: 180px;
    }
/*    .ap-page {
        grid-template-columns: 1fr;
    }*/
    .ap-page {
        grid-template-columns: 1fr;
        margin: 10px;
        padding: 15px;
    }

    .ap-sidebar {
        position: static;
        border-right: none;
        border-bottom: 2px solid #eee;
        max-height: none;
    }

    .ap-card {
        flex-direction: column;
    }

    .ap-thumb {
        width: 100%;
        height: 180px;
    }

    .ap-main {
        padding: 0 14px 30px;
    }

/*    .top-nav ul {
        flex-wrap: wrap;
        justify-content: flex-start;
    }*/
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 1.4rem;
    }

    .page-heading,
    .breadcrumb-bar {
        padding-left: 16px;
        padding-right: 16px;
    }
}
