/* ============================================
   Podcasts Discovery Page
   public/pages/podcasts/index.php
   ============================================ */

/* ---- Page Header ---- */
.podcasts-page-header {
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 1rem;
}

.podcasts-page-header h1 {
    font-weight: 700;
    color: #1a1a2e;
}

/* ---- Nav Pills (Tabs) ---- */
.nav-pills-podcasts {
    gap: 0.25rem;
}

.nav-pills-podcasts .nav-link {
    color: #6c757d;
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: 20px;
    padding: 0.4rem 1rem;
    transition: all 0.2s ease;
}

.nav-pills-podcasts .nav-link:hover {
    color: #495057;
    background: #f0f0f5;
}

.nav-pills-podcasts .nav-link.active {
    color: #fff;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.nav-pills-podcasts .nav-link .badge {
    font-size: 0.7rem;
    font-weight: 600;
}

.nav-pills-podcasts .nav-link.active .badge {
    background: rgba(255,255,255,0.25) !important;
    color: #fff !important;
}

/* ---- Podcast Card ---- */
.podcast-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid #f0f0f5;
}

.podcast-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

/* ---- Card Banner ---- */
.podcast-card-banner {
    position: relative;
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.podcast-card-platform-icon {
    font-size: 3rem;
    color: rgba(255,255,255,0.2);
}

.podcast-card-platform-badge {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    background: rgba(0,0,0,0.35);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.podcast-card-duration {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: rgba(0,0,0,0.5);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: 8px;
    backdrop-filter: blur(4px);
}

/* Play overlay */
.podcast-card-play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0);
    transition: background 0.25s ease;
    opacity: 0;
}

.podcast-card:hover .podcast-card-play-overlay {
    opacity: 1;
    background: rgba(0,0,0,0.3);
}

.podcast-card-play-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255,255,255,0.95);
    color: #667eea;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.podcast-card-play-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
    color: #764ba2;
}

a.podcast-card-play-btn {
    color: #667eea;
}
a.podcast-card-play-btn:hover {
    color: #764ba2;
}

/* ---- Card Body ---- */
.podcast-card-body {
    padding: 0.85rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.podcast-card-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #1a1a2e;
    margin: 0 0 0.35rem 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.podcast-card-desc {
    font-size: 0.78rem;
    color: #6c757d;
    line-height: 1.4;
    margin: 0 0 0.5rem 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.podcast-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.72rem;
    color: #adb5bd;
    margin-top: auto;
}

.podcast-card-meta i {
    margin-right: 0.15rem;
}

.podcast-card-author,
.podcast-card-source,
.podcast-card-date {
    display: flex;
    align-items: center;
    gap: 0.2rem;
}

/* ---- Card Footer ---- */
.podcast-card-footer {
    padding: 0.5rem 0.85rem 0.85rem;
}

.podcast-card-footer .btn {
    font-size: 0.8rem;
    font-weight: 500;
    border-radius: 8px;
}

/* ---- External Source Section ---- */
.external-source-section {
    background: #f8f9fc;
    border-radius: 12px;
    padding: 1.25rem;
    border: 1px solid #e9ecef;
}

.external-source-header {
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e9ecef;
}

.external-source-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    object-fit: cover;
}

.external-source-icon-placeholder {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1rem;
}

/* ---- External card variant ---- */
.podcast-card--external .podcast-card-banner {
    height: 130px;
}

/* ---- Floating Audio Player ---- */
.podcast-audio-player {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1060;
    background: #1a1a2e;
    color: #fff;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.2);
}

.podcast-audio-player-inner {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.5rem 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

.podcast-audio-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
    flex-shrink: 1;
}

.podcast-audio-info i {
    color: #667eea;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.podcast-audio-title {
    font-size: 0.82rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 250px;
}

.podcast-audio-player audio {
    flex: 1;
    min-width: 0;
    height: 36px;
}

.podcast-audio-close {
    background: none;
    border: none;
    color: rgba(255,255,255,0.6);
    font-size: 1rem;
    cursor: pointer;
    padding: 0.25rem;
    transition: color 0.2s;
    flex-shrink: 0;
}

.podcast-audio-close:hover {
    color: #fff;
}

/* ---- Responsive ---- */
@media (max-width: 767.98px) {
    .podcast-card-banner {
        height: 120px;
    }

    .podcast-card--external .podcast-card-banner {
        height: 110px;
    }

    .podcast-audio-player-inner {
        flex-wrap: wrap;
        gap: 0.5rem;
        padding: 0.5rem 0.75rem;
    }

    .podcast-audio-info {
        flex: 1;
    }

    .podcast-audio-title {
        max-width: 180px;
    }

    .podcast-audio-player audio {
        width: 100%;
        order: 3;
    }

    .external-source-section {
        padding: 0.75rem;
    }

    .nav-pills-podcasts .nav-link {
        font-size: 0.78rem;
        padding: 0.3rem 0.7rem;
    }

    .podcasts-page-header h1 {
        font-size: 1.2rem;
    }
}

@media (max-width: 575.98px) {
    .podcast-card-play-overlay {
        opacity: 1;
        background: rgba(0,0,0,0.15);
    }

    .podcast-card-play-btn {
        width: 40px;
        height: 40px;
        font-size: 0.9rem;
    }
}
