/* ==========================================================================
   Podcast Styles
   Conditionally loaded on podcast archive + single episode pages.
   Single episode pages use the block template (single-podcast_episode.html)
   and inherit all theme.json typography/spacing/colors automatically.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Archive: Subscribe Links (Hero)
   -------------------------------------------------------------------------- */

.podcast-subscribe-links {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}

.podcast-subscribe-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.25rem;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 6px;
    text-decoration: none;
    transition: opacity 0.2s, transform 0.2s;
    color: #fff;
}

.podcast-subscribe-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    color: #fff;
}

.podcast-subscribe-btn--youtube { background: #c4302b; }
.podcast-subscribe-btn--linkedin { background: #0a66c2; }

/* --------------------------------------------------------------------------
   Archive: Featured Episode (Latest)
   -------------------------------------------------------------------------- */

.podcast-episode-featured {
    display: block;
    text-decoration: none;
    color: inherit;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--wp--preset--color--accent-6, rgba(255,255,255,0.08));
}

.podcast-episode-featured__thumbnail {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: 12px;
    overflow: hidden;
    background: var(--wp--preset--color--accent-6, rgba(255,255,255,0.05));
    margin-bottom: 1.5rem;
}

.podcast-episode-featured__thumbnail img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.3s ease;
}

.podcast-episode-featured:hover .podcast-episode-featured__thumbnail img {
    transform: scale(1.02);
}

.podcast-episode-featured__content { max-width: 700px; }

.podcast-episode-featured__badge {
    display: inline-block;
    font-size: 0.7rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.1em;
    padding: 0.2rem 0.6rem; border-radius: 4px;
    background: var(--wp--preset--color--accent, #F2AB44);
    color: var(--wp--preset--color--primary, #082935);
    margin-bottom: 0.5rem; margin-right: 0.75rem;
}

.podcast-episode-featured__title {
    font-size: 1.75rem; font-weight: 700; line-height: 1.25;
    margin: 0.5rem 0 0.75rem;
}

.podcast-episode-featured__teaser {
    font-size: 1rem; line-height: 1.6;
    opacity: 0.6; margin: 0 0 0.75rem;
}

/* --------------------------------------------------------------------------
   Archive: Play Icon Overlay
   -------------------------------------------------------------------------- */

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

.podcast-episode-row:hover .podcast-play-overlay,
.podcast-episode-featured:hover .podcast-play-overlay,
.podcast-ep-extras__related-card:hover .podcast-play-overlay {
    opacity: 1;
}

.podcast-play-overlay__icon {
    width: 56px; height: 56px; border-radius: 50%;
    background: rgba(0,0,0,0.6); backdrop-filter: blur(4px);
    display: flex; align-items: center; justify-content: center;
    color: #fff; transition: transform 0.2s, background 0.2s;
}

.podcast-play-overlay--sm .podcast-play-overlay__icon { width: 40px; height: 40px; }

.podcast-episode-row:hover .podcast-play-overlay__icon,
.podcast-episode-featured:hover .podcast-play-overlay__icon,
.podcast-ep-extras__related-card:hover .podcast-play-overlay__icon {
    transform: scale(1.1);
    background: var(--wp--preset--color--accent, #F2AB44);
    color: var(--wp--preset--color--primary, #082935);
}

/* --------------------------------------------------------------------------
   Archive: Episode Row Layout
   -------------------------------------------------------------------------- */

.podcast-container { max-width: 900px; margin: 0 auto; }

.podcast-episode-row {
    display: flex; gap: 1.5rem; padding: 1.5rem 0;
    border-bottom: 1px solid var(--wp--preset--color--accent-6, rgba(255,255,255,0.08));
    text-decoration: none; color: inherit; transition: opacity 0.2s;
}
.podcast-episode-row:hover { opacity: 0.85; }

.podcast-episode-row__thumbnail {
    position: relative; flex-shrink: 0; width: 280px;
    aspect-ratio: 16/9; border-radius: 8px; overflow: hidden;
    background: var(--wp--preset--color--accent-6, rgba(255,255,255,0.05));
}
.podcast-episode-row__thumbnail img { width: 100%; height: 100%; object-fit: cover; }

.podcast-episode-row__thumbnail-placeholder {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    opacity: 0.2;
}

.podcast-episode-row__content {
    display: flex; flex-direction: column; justify-content: center; min-width: 0;
}

.podcast-episode-row__number {
    font-size: 0.75rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.08em;
    color: var(--wp--preset--color--primary-3, #2B7C8F);
    margin-bottom: 0.25rem;
}

.podcast-episode-row__title {
    font-size: 1.25rem; font-weight: 600; line-height: 1.3;
    margin: 0 0 0.5rem;
}

.podcast-episode-row__teaser {
    font-size: 0.9rem; line-height: 1.5; opacity: 0.6; margin: 0 0 0.5rem;
}

.podcast-episode-row__meta {
    display: flex; flex-wrap: wrap; gap: 0.75rem;
    font-size: 0.8rem; opacity: 0.4;
}
.podcast-episode-row__meta span:not(:last-child)::after {
    content: "\00b7"; margin-left: 0.75rem;
}

.podcast-empty { text-align: center; padding: 3rem 0; opacity: 0.5; }

.podcast-pagination {
    margin-top: 3rem; padding-top: 2rem;
    border-top: 1px solid var(--wp--preset--color--accent-6, rgba(255,255,255,0.08));
}

/* --------------------------------------------------------------------------
   Single Episode: Header Block (podcast-episode-header)
   -------------------------------------------------------------------------- */

.podcast-ep-header__video { margin-bottom: 1.5rem; }

.podcast-ep-header__video-wrap {
    position: relative; padding-bottom: 56.25%; height: 0;
    overflow: hidden; border-radius: 12px; background: #000;
}
.podcast-ep-header__video-wrap iframe {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
}

.podcast-ep-header__meta-row {
    display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem;
    font-size: 0.85rem; opacity: 0.5;
    margin-bottom: 0.5rem;
}
.podcast-ep-header__meta-row span:not(:last-child)::after {
    content: "\00b7"; margin-left: 0.75rem;
}

.podcast-ep-header__ep-badge {
    font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em;
    color: var(--wp--preset--color--primary-3, #2B7C8F);
    opacity: 1;
}

.podcast-ep-header__share {
    display: flex; gap: 0.5rem; margin-bottom: 1rem;
}

.podcast-ep-header__share-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 32px; height: 32px; border-radius: 6px;
    background: var(--wp--preset--color--accent-6, rgba(255,255,255,0.06));
    border: 1px solid var(--wp--preset--color--accent-6, rgba(255,255,255,0.08));
    color: inherit; opacity: 0.5;
    text-decoration: none; cursor: pointer; transition: all 0.2s;
}
.podcast-ep-header__share-btn:hover {
    opacity: 1; color: var(--wp--preset--color--primary-3, #2B7C8F);
}
.podcast-ep-header__share-btn.copied {
    background: var(--wp--preset--color--primary-3, #2B7C8F);
    color: #fff; opacity: 1;
}

/* --------------------------------------------------------------------------
   Single Episode: Teaser callout (inside post-content)
   -------------------------------------------------------------------------- */

.podcast-teaser {
    border-left: 3px solid var(--wp--preset--color--primary-3, #2B7C8F);
    padding: 1.25rem 1.5rem;
    margin: 0 0 2rem;
    background: color-mix(in srgb, var(--wp--preset--color--primary-3, #2B7C8F) 5%, transparent);
    border-radius: 0 8px 8px 0;
}
.podcast-teaser em { font-style: normal; }

.podcast-source-link { font-size: 0.85rem; opacity: 0.4; margin-top: 2rem; }

/* --------------------------------------------------------------------------
   Single Episode: Extras Block (podcast-episode-extras)
   -------------------------------------------------------------------------- */

/* Chapters */
.podcast-ep-extras__chapters {
    margin: 2rem 0;
    padding: 1.5rem;
    background: var(--wp--preset--color--accent-6, rgba(255,255,255,0.03));
    border: 1px solid var(--wp--preset--color--accent-6, rgba(255,255,255,0.06));
    border-radius: 12px;
    position: relative;
}
.podcast-ep-extras__chapters::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
    background: linear-gradient(90deg, var(--wp--preset--color--primary-3, #2B7C8F), transparent);
    border-radius: 12px 12px 0 0;
}
.podcast-ep-extras__chapters h2 { margin: 0 0 1rem; }

.podcast-ep-extras__chapter-list { list-style: none; padding: 0; margin: 0; }
.podcast-ep-extras__chapter-list li {
    border-bottom: 1px solid var(--wp--preset--color--accent-6, rgba(255,255,255,0.05));
}
.podcast-ep-extras__chapter-list li:last-child { border-bottom: none; }

.podcast-ep-extras__chapter-link {
    display: flex; gap: 1rem; align-items: baseline;
    padding: 0.6rem 0; text-decoration: none;
    color: inherit; opacity: 0.7; transition: opacity 0.2s;
}
.podcast-ep-extras__chapter-link:hover {
    opacity: 1; color: var(--wp--preset--color--primary-3, #2B7C8F);
}
.podcast-ep-extras__chapter-time {
    flex-shrink: 0; font-family: var(--wp--preset--font-family--monospace, monospace);
    font-size: 0.85rem; min-width: 60px;
    color: var(--wp--preset--color--primary-3, #2B7C8F);
}

/* Participants */
.podcast-ep-extras__participants { margin: 2rem 0; }
.podcast-ep-extras__participants h2 { margin: 0 0 1.25rem; }

.podcast-ep-extras__participant-grid { display: flex; flex-direction: column; gap: 1rem; }

.podcast-ep-extras__participant {
    display: flex; gap: 1rem; padding: 1.25rem;
    background: var(--wp--preset--color--accent-6, rgba(255,255,255,0.03));
    border: 1px solid var(--wp--preset--color--accent-6, rgba(255,255,255,0.06));
    border-radius: 10px;
}
.podcast-ep-extras__participant--guest {
    border-left: 3px solid var(--wp--preset--color--primary-3, #2B7C8F);
}

.podcast-ep-extras__participant-avatar {
    flex-shrink: 0; width: 52px; height: 52px; border-radius: 50%;
    background: var(--wp--preset--color--accent-6, rgba(255,255,255,0.06));
    display: flex; align-items: center; justify-content: center; opacity: 0.3;
}
.podcast-ep-extras__participant--guest .podcast-ep-extras__participant-avatar {
    opacity: 0.7; color: var(--wp--preset--color--primary-3, #2B7C8F);
}

.podcast-ep-extras__participant-name {
    font-weight: 600; display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap;
}
.podcast-ep-extras__participant-name a {
    color: inherit; text-decoration: none; transition: color 0.2s;
}
.podcast-ep-extras__participant-name a:hover {
    color: var(--wp--preset--color--primary-3, #2B7C8F);
}

.podcast-ep-extras__role-badge {
    display: inline-block; font-size: 0.65rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.06em;
    padding: 0.1rem 0.4rem; border-radius: 4px;
    background: var(--wp--preset--color--accent-6, rgba(255,255,255,0.08));
    opacity: 0.5;
}

.podcast-ep-extras__participant-title { font-size: 0.85rem; opacity: 0.5; margin-top: 0.15rem; }
.podcast-ep-extras__participant-bio { font-size: 0.9rem; line-height: 1.5; opacity: 0.6; margin: 0.5rem 0 0; }

/* Episode Navigation */
.podcast-ep-extras__nav {
    display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 2rem 0;
}
.podcast-ep-extras__nav-link {
    display: flex; flex-direction: column; gap: 0.3rem;
    padding: 1.25rem;
    background: var(--wp--preset--color--accent-6, rgba(255,255,255,0.03));
    border: 1px solid var(--wp--preset--color--accent-6, rgba(255,255,255,0.06));
    border-radius: 10px;
    text-decoration: none; color: inherit; transition: background 0.2s, border-color 0.2s;
}
.podcast-ep-extras__nav-link:hover {
    background: color-mix(in srgb, var(--wp--preset--color--accent-6, rgba(255,255,255,0.05)) 150%, transparent);
    border-color: var(--wp--preset--color--primary-3, #2B7C8F);
}
.podcast-ep-extras__nav-link--prev { grid-column: 1; }
.podcast-ep-extras__nav-link--next { grid-column: 2; text-align: right; }

.podcast-ep-extras__nav-dir {
    display: flex; align-items: center; gap: 0.3rem;
    font-size: 0.7rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.06em; opacity: 0.4;
}
.podcast-ep-extras__nav-link--next .podcast-ep-extras__nav-dir { justify-content: flex-end; }

.podcast-ep-extras__nav-title { font-size: 0.95rem; font-weight: 600; line-height: 1.3; }
.podcast-ep-extras__nav-ep {
    font-size: 0.75rem; font-weight: 700;
    color: var(--wp--preset--color--primary-3, #2B7C8F);
    margin-right: 0.3rem;
}
.podcast-ep-extras__nav-link--next .podcast-ep-extras__nav-ep { margin-right: 0; margin-left: 0.3rem; }

/* CTA */
.podcast-ep-extras__cta {
    text-align: center; padding: 3rem 2rem; margin: 2rem 0;
    background: var(--wp--preset--color--accent-6, rgba(255,255,255,0.03));
    border: 1px solid var(--wp--preset--color--accent-6, rgba(255,255,255,0.06));
    border-radius: 12px;
}
.podcast-ep-extras__cta h2 { margin: 0 0 0.5rem; }
.podcast-ep-extras__cta p { opacity: 0.6; margin: 0 0 1.5rem; }

.podcast-ep-extras__cta-btn {
    display: inline-block; padding: 0.75rem 2rem;
    font-size: 1rem; font-weight: 600;
    color: var(--wp--preset--color--primary, #082935);
    background: var(--wp--preset--color--accent, #F2AB44);
    border-radius: 6px; text-decoration: none; transition: opacity 0.2s;
}
.podcast-ep-extras__cta-btn:hover { opacity: 0.9; }

/* Related Episodes */
.podcast-ep-extras__related { margin: 2rem 0; }
.podcast-ep-extras__related h2 { margin: 0 0 1.25rem; }

.podcast-ep-extras__related-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem;
}

.podcast-ep-extras__related-card {
    display: flex; flex-direction: column;
    text-decoration: none; color: inherit;
    background: var(--wp--preset--color--accent-6, rgba(255,255,255,0.03));
    border: 1px solid var(--wp--preset--color--accent-6, rgba(255,255,255,0.06));
    border-radius: 10px; overflow: hidden;
    transition: border-color 0.2s, transform 0.2s;
}
.podcast-ep-extras__related-card:hover {
    border-color: var(--wp--preset--color--primary-3, #2B7C8F);
    transform: translateY(-2px);
}

.podcast-ep-extras__related-thumb {
    position: relative; width: 100%; aspect-ratio: 16/9; overflow: hidden;
    background: var(--wp--preset--color--accent-6, rgba(255,255,255,0.05));
}
.podcast-ep-extras__related-thumb img { width: 100%; height: 100%; object-fit: cover; }
.podcast-ep-extras__thumb-placeholder {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center; opacity: 0.2;
}

.podcast-ep-extras__related-info { padding: 1rem; }
.podcast-ep-extras__related-ep {
    font-size: 0.7rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.08em;
    color: var(--wp--preset--color--primary-3, #2B7C8F);
}
.podcast-ep-extras__related-info h3 {
    font-size: 0.95rem; font-weight: 600; line-height: 1.3; margin: 0.25rem 0 0.5rem;
}
.podcast-ep-extras__related-meta {
    display: flex; flex-wrap: wrap; gap: 0.5rem;
    font-size: 0.75rem; opacity: 0.4;
}
.podcast-ep-extras__related-meta span:not(:last-child)::after {
    content: "\00b7"; margin-left: 0.5rem;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 781px) {
    .podcast-episode-row { flex-direction: column; gap: 1rem; }
    .podcast-episode-row__thumbnail { width: 100%; }
    .podcast-episode-featured__title { font-size: 1.35rem; }
    .podcast-ep-extras__nav { grid-template-columns: 1fr; }
    .podcast-ep-extras__nav-link--next { grid-column: 1; text-align: left; }
    .podcast-ep-extras__nav-link--next .podcast-ep-extras__nav-dir { justify-content: flex-start; }
    .podcast-ep-extras__related-grid { grid-template-columns: 1fr; }
    .podcast-ep-extras__participant { flex-direction: column; text-align: center; }
    .podcast-ep-extras__participant-avatar { margin: 0 auto; }
    .podcast-ep-extras__participant-name { justify-content: center; }
    .podcast-ep-extras__cta { padding: 2rem 1.5rem; }
}
