/* =============================================================================
   PODCAST HUB — DESIGN SYSTEM TOKENS
   (mirrors video-hub tokens for visual consistency)
   ============================================================================= */

:root {
    --ph-primary:        #4F46E5;
    --ph-primary-hover:  #4338CA;
    --ph-primary-light:  #EEF2FF;
    --ph-accent:         #7C3AED;
    --ph-audio-color:    #0EA5E9;
    --ph-audio-light:    #E0F2FE;
    --ph-surface:        #FFFFFF;
    --ph-surface-2:      #F8FAFC;
    --ph-border:         #E2E8F0;
    --ph-border-hover:   #CBD5E1;
    --ph-text-primary:   #0F172A;
    --ph-text-secondary: #475569;
    --ph-text-muted:     #94A3B8;
    --ph-shadow-sm:      0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
    --ph-shadow-md:      0 4px 6px -1px rgba(0,0,0,.08), 0 2px 4px -2px rgba(0,0,0,.06);
    --ph-shadow-lg:      0 10px 15px -3px rgba(0,0,0,.08), 0 4px 6px -4px rgba(0,0,0,.06);
    --ph-shadow-hover:   0 20px 25px -5px rgba(0,0,0,.1), 0 8px 10px -6px rgba(0,0,0,.08);
    --ph-radius-sm:      8px;
    --ph-radius-md:      12px;
    --ph-radius-lg:      16px;
    --ph-radius-xl:      24px;
    --ph-transition:     all .2s cubic-bezier(.4,0,.2,1);
    --ph-font:           -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Inter', sans-serif;
}

/* =============================================================================
   BASE RESET
   ============================================================================= */

.ph-page *,
.ph-page *::before,
.ph-page *::after {
    box-sizing: border-box;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

/* Elementor button reset */
.ph-page button,
.ph-page button:hover,
.ph-page button:focus,
.ph-page button:active,
.ph-page button:visited {
    appearance: none;
    -webkit-appearance: none;
    font-family: inherit;
    font-size: inherit;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    text-decoration: none;
    text-align: center;
    vertical-align: middle;
    white-space: nowrap;
    color: inherit;
    background-color: transparent;
    background-image: none;
    border: none;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
    margin: 0;
    width: auto;
    height: auto;
    min-width: 0;
    min-height: 0;
    max-width: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    outline: none;
}

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

.ph-hero {
    background: linear-gradient(135deg, #1E1B4B 0%, #312E81 55%, #4C1D95 100%);
    padding: 72px 24px 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.ph-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 60% 50% at 20% 40%, rgba(124,58,237,.18) 0%, transparent 70%),
        radial-gradient(ellipse 50% 60% at 80% 60%, rgba(79,70,229,.15) 0%, transparent 70%);
    pointer-events: none;
}

.ph-hero__inner {
    position: relative;
    max-width: 680px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.ph-hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.2);
    color: rgba(255,255,255,.9);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .04em;
    padding: 6px 16px;
    border-radius: 100px;
    backdrop-filter: blur(8px);
}

.ph-hero__badge svg {
    width: 14px;
    height: 14px;
    opacity: .8;
}

.ph-hero__title {
    font-size: clamp(28px, 5vw, 44px) !important;
    font-weight: 800 !important;
    color: #fff !important;
    line-height: 1.15 !important;
    letter-spacing: -.02em;
    margin: 0 !important;
}

.ph-hero__tagline {
    font-size: 16px;
    color: rgba(255,255,255,.72);
    line-height: 1.6;
    max-width: 520px;
    margin: 0;
}

.ph-hero__stats {
    display: flex;
    align-items: center;
    gap: 40px;
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.15);
    border-radius: var(--ph-radius-lg);
    padding: 18px 40px;
    backdrop-filter: blur(12px);
    margin-top: 8px;
}

.ph-hero__stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.ph-hero__stat-number {
    font-size: 22px;
    font-weight: 800;
    color: #fff;
    line-height: 1;
}

.ph-hero__stat-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: rgba(255,255,255,.55);
}

.ph-hero__stat-divider {
    width: 1px;
    height: 32px;
    background: rgba(255,255,255,.18);
}

/* =============================================================================
   TOOLBAR
   ============================================================================= */

.ph-toolbar {
    position: sticky;
    top: 0;
    z-index: 5;
    background: rgba(255,255,255,.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--ph-border);
    padding: 14px 15px;
    box-shadow: var(--ph-shadow-sm);
}

.ph-toolbar__inner {
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.ph-search-wrap {
    position: relative;
    flex: 1;
    min-width: 220px;
    max-width: 420px;
}

.ph-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: var(--ph-text-muted);
    pointer-events: none;
}

.ph-search {
    width: 100% !important;
    height: 42px;
    padding: 0 40px 0 38px !important;
    border: 1.5px solid var(--ph-border) !important;
    border-radius: var(--ph-radius-sm) !important;
    background: var(--ph-surface) !important;
    font-size: 14px;
    color: var(--ph-text-primary) !important;
    transition: var(--ph-transition) !important;
    outline: none !important;
}

.ph-search::placeholder { color: var(--ph-text-muted); }

.ph-search:focus {
    border-color: var(--ph-primary) !important;
    box-shadow: 0 0 0 3px rgba(79,70,229,.12) !important;
}

.ph-page .ph-search-clear {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--ph-text-muted);
    padding: 4px;
    border-radius: 4px;
    transition: color .15s, background-color .15s;
}

.ph-page .ph-search-clear:hover {
    color: var(--ph-text-primary);
    background-color: var(--ph-border);
}

.ph-search-clear svg { width: 14px; height: 14px; display: block; }

.ph-select-wrap { position: relative; }

.ph-select {
    height: 42px;
    padding: 0 36px 0 14px;
    border: 1.5px solid var(--ph-border);
    border-radius: var(--ph-radius-sm);
    background: var(--ph-surface);
    font-size: 14px;
    color: var(--ph-text-primary);
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    outline: none;
    transition: var(--ph-transition);
    white-space: nowrap;
}

.ph-select:focus {
    border-color: var(--ph-primary);
    box-shadow: 0 0 0 3px rgba(79,70,229,.12);
}

.ph-select-arrow {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: var(--ph-text-muted);
    pointer-events: none;
}

.ph-results-meta {
    margin-left: auto;
    font-size: 13px;
    color: var(--ph-text-secondary);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 4px;
}

#ph-result-count {
    font-weight: 700;
    color: var(--ph-text-primary);
}

/* =============================================================================
   CONTENT AREA
   ============================================================================= */

/* .ph-content {
    padding: 40px 24px 80px;
}

.ph-container {
    max-width: 1200px;
    margin: 0 auto;
} */

/* =============================================================================
   PODCAST GRID
   ============================================================================= */

.ph-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

@media (max-width: 768px) {
    .ph-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

@media (min-width: 1024px) {
    .ph-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* =============================================================================
   PODCAST CARD
   ============================================================================= */

.ph-card {
    background: var(--ph-surface);
    border: 1px solid var(--ph-border);
    border-radius: var(--ph-radius-md);
    overflow: hidden;
    box-shadow: var(--ph-shadow-sm);
    transition: var(--ph-transition);
    display: flex;
    flex-direction: column;
    position: relative;
}

.ph-card:hover {
    box-shadow: var(--ph-shadow-hover);
    border-color: var(--ph-border-hover);
    transform: translateY(-3px);
}

/* Card Media */
.ph-card__media {
    position: relative;
    flex-shrink: 0;
    overflow: hidden;
}

/* ---- VIDEO CARD MEDIA ---- */
.ph-card--video .ph-card__media {
    aspect-ratio: 16 / 9;
    background: #0F172A;
}

.ph-card__iframe-wrap {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ph-card__thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .4s ease;
}

.ph-card:hover .ph-card__thumb { transform: scale(1.04); }

.ph-card__iframe-wrap iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
    position: absolute;
    inset: 0;
}

/* Play button (video) */
.ph-page .ph-play-btn--video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background-color: transparent;
    transition: var(--ph-transition);
    z-index: 2;
}

.ph-play-btn--video svg {
    width: 56px;
    height: 40px;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,.4));
    transition: var(--ph-transition);
}

.ph-play-btn__bg   { fill: rgba(33,33,33,.85); transition: fill .2s; }
.ph-play-btn__arrow { fill: #fff; }

.ph-page .ph-play-btn--video:hover .ph-play-btn__bg,
.ph-card:hover .ph-play-btn__bg { fill: var(--ph-primary); }

.ph-page .ph-play-btn--video:hover svg,
.ph-card:hover .ph-play-btn--video svg { transform: scale(1.08); }

.ph-card__placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ph-card__placeholder--video {
    background: linear-gradient(135deg, #1E1B4B 0%, #312E81 100%);
    color: rgba(255,255,255,.3);
    font-size: 48px;
}

/* Category badge */
.ph-card__category {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--ph-primary);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    padding: 4px 12px 1px 12px;
    border-radius: 100px;
    z-index: 3;
    pointer-events: none;
    line-height: 1.6;
    box-shadow: 0 2px 6px rgba(79,70,229,.35);
}

/* ---- AUDIO PLAYER ---- */
.ph-audio-player {
    background: linear-gradient(135deg, #0F172A 0%, #1E1B4B 100%);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.ph-audio-player__cover {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: var(--ph-radius-sm);
    overflow: hidden;
    background: rgba(255,255,255,.06);
}

.ph-audio-player__cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .4s ease;
}

.ph-card:hover .ph-audio-player__cover img { transform: scale(1.04); }

.ph-audio-player__cover-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #164E63 0%, #0C4A6E 100%);
    color: rgba(255,255,255,.25);
}

.ph-audio-player__cover-placeholder svg {
    width: 48px;
    height: 48px;
}

.ph-audio-player__overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,.28);
    transition: background .2s;
}

.ph-card:hover .ph-audio-player__overlay { background: rgba(0,0,0,.38); }

/* Play/Pause button */
.ph-audio-play-pause {
    width: 52px;
    height: 52px;
    border-radius: 50% !important;
    background: rgba(255,255,255,.95) !important;
    box-shadow: 0 4px 16px rgba(0,0,0,.35) !important;
    transition: transform .15s, box-shadow .15s, background .15s !important;
    color: var(--ph-primary) !important;
    flex-shrink: 0;
}

.ph-audio-play-pause:hover {
    transform: scale(1.1) !important;
    box-shadow: 0 6px 20px rgba(0,0,0,.4) !important;
    background: #fff !important;
}

.ph-audio-play-pause svg {
    width: 22px;
    height: 22px;
    display: block;
    flex-shrink: 0;
}

/* Playing state — pulsing ring */
.ph-card.is-playing .ph-audio-play-pause {
    background: var(--ph-primary) !important;
    color: #fff !important;
    animation: ph-pulse-ring .9s ease-out infinite;
}

@keyframes ph-pulse-ring {
    0%   { box-shadow: 0 0 0 0 rgba(79,70,229,.5); }
    70%  { box-shadow: 0 0 0 12px rgba(79,70,229,0); }
    100% { box-shadow: 0 0 0 0 rgba(79,70,229,0); }
}

/* Now playing badge */
.ph-card.is-playing .ph-card__category {
    background: var(--ph-audio-color);
}

.ph-now-playing-badge {
    display: none;
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--ph-audio-color);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 100px;
    z-index: 3;
    align-items: center;
    gap: 5px;
    line-height: 1.6;
}

.ph-card.is-playing .ph-now-playing-badge { display: inline-flex; }

.ph-now-playing-badge .ph-soundwave {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 12px;
}

.ph-soundwave span {
    display: block;
    width: 2px;
    background: #fff;
    border-radius: 1px;
    animation: ph-wave 0.8s ease-in-out infinite alternate;
}

.ph-soundwave span:nth-child(1) { height: 4px;  animation-delay: 0s; }
.ph-soundwave span:nth-child(2) { height: 8px;  animation-delay: .15s; }
.ph-soundwave span:nth-child(3) { height: 12px; animation-delay: .3s; }
.ph-soundwave span:nth-child(4) { height: 6px;  animation-delay: .45s; }

@keyframes ph-wave {
    from { transform: scaleY(.4); }
    to   { transform: scaleY(1); }
}

/* Progress controls */
.ph-audio-player__controls {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ph-audio-player__progress-wrap {
    cursor: pointer;
    padding: 6px 0;
    user-select: none;
}

.ph-audio-player__progress-bg {
    position: relative;
    height: 4px;
    background: rgba(255,255,255,.18);
    border-radius: 100px;
    overflow: visible;
}

.ph-audio-player__progress-fill {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0%;
    background: var(--ph-audio-color);
    border-radius: 100px;
    transition: width .1s linear;
}

.ph-audio-player__progress-thumb {
    position: absolute;
    top: 50%;
    left: 0%;
    width: 12px;
    height: 12px;
    background: #fff;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 1px 4px rgba(0,0,0,.3);
    opacity: 0;
    transition: opacity .15s, left .1s linear;
}

.ph-audio-player__progress-wrap:hover .ph-audio-player__progress-thumb,
.ph-audio-player__progress-wrap:focus .ph-audio-player__progress-thumb {
    opacity: 1;
}

.ph-audio-player__time {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 600;
    color: rgba(255,255,255,.55);
    font-variant-numeric: tabular-nums;
}

.ph-audio-player__sep { opacity: .4; }

.ph-audio-player__current { color: rgba(255,255,255,.9); }

/* =============================================================================
   CARD BODY
   ============================================================================= */

.ph-card__body {
    padding: 18px 20px 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 10px;
}

.ph-card__title {
    font-size: 16px !important;
    font-weight: 700 !important;
    color: var(--ph-text-primary) !important;
    line-height: 1.4;
    margin: 0 !important;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ph-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.ph-card__meta-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: var(--ph-text-secondary);
    font-weight: 500;
}

.ph-card__meta-item svg {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
    opacity: .7;
}

.ph-card__duration { color: var(--ph-primary); }

.ph-card__guest::before {
    content: '·';
    margin-right: 4px;
    opacity: .4;
}

.ph-card__desc {
    font-size: 13.5px;
    color: var(--ph-text-secondary);
    line-height: 1.6;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

/* External links */
.ph-card__links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
}

.ph-ext-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 100px;
    text-decoration: none !important;
    transition: var(--ph-transition);
    border: 1.5px solid transparent;
}

.ph-ext-link svg { width: 14px; height: 14px; flex-shrink: 0; }

.ph-ext-link--spotify {
    background: #F0FFF4;
    color: #16803C;
    border-color: rgba(22,128,60,.2);
}

.ph-ext-link--spotify:hover {
    background: #DCFCE7;
    border-color: rgba(22,128,60,.4);
    color: #14532D;
    transform: translateY(-1px);
}

.ph-ext-link--apple {
    background: #FDF2F8;
    color: #9D174D;
    border-color: rgba(157,23,77,.2);
}

.ph-ext-link--apple:hover {
    background: #FCE7F3;
    border-color: rgba(157,23,77,.4);
    color: #831843;
    transform: translateY(-1px);
}

/* =============================================================================
   NO RESULTS
   ============================================================================= */

.ph-no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 24px;
    color: var(--ph-text-muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.ph-no-results svg { width: 56px; height: 56px; opacity: .35; }
.ph-no-results p   { font-size: 15px; margin: 0; }

/* =============================================================================
   SKELETON LOADER
   ============================================================================= */

.ph-skeleton {
    background: var(--ph-surface);
    border: 1px solid var(--ph-border);
    border-radius: var(--ph-radius-md);
    overflow: hidden;
    box-shadow: var(--ph-shadow-sm);
    display: flex;
    flex-direction: column;
}

.ph-skeleton__media {
    aspect-ratio: 16 / 9;
    background: var(--ph-border);
    animation: ph-shimmer 1.5s infinite linear;
    background-size: 200% 100%;
    background-image: linear-gradient(90deg, #F1F5F9 25%, #E2E8F0 37%, #F1F5F9 63%);
}

.ph-skeleton__body {
    padding: 18px 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ph-skeleton__line {
    height: 12px;
    border-radius: 4px;
    animation: ph-shimmer 1.5s infinite linear;
    background-size: 200% 100%;
    background-image: linear-gradient(90deg, #F1F5F9 25%, #E2E8F0 37%, #F1F5F9 63%);
}

.ph-skeleton__line--title  { height: 16px; width: 85%; }
.ph-skeleton__line--meta   { height: 11px; width: 55%; }
.ph-skeleton__line--desc   { height: 11px; }
.ph-skeleton__line--desc2  { height: 11px; width: 75%; }

@keyframes ph-shimmer {
    0%   { background-position: -200% 0; }
    100% { background-position:  200% 0; }
}

/* =============================================================================
   LOADING STATE
   ============================================================================= */

.ph-grid.is-loading {
    opacity: 0;
    pointer-events: none;
}

.ph-grid.is-entering {
    animation: ph-fade-in .25s ease forwards;
}

@keyframes ph-fade-in {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* =============================================================================
   ACTIVE FILTER PILLS
   ============================================================================= */

.ph-active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.ph-filter-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--ph-primary-light);
    color: var(--ph-primary);
    border: 1px solid rgba(79,70,229,.2);
    font-size: 12px;
    font-weight: 600;
    padding: 4px 12px 4px 10px;
    border-radius: 100px;
}

.ph-page .ph-filter-pill button { color: inherit; opacity: .7; transition: opacity .15s; }
.ph-page .ph-filter-pill button:hover { opacity: 1; }

/* =============================================================================
   RESPONSIVE
   ============================================================================= */

@media (max-width: 600px) {
    .ph-hero { padding: 56px 16px 60px; }

    .ph-hero__stats {
        gap: 28px;
        padding: 16px 24px;
    }

    .ph-toolbar { padding: 12px 16px; }
    .ph-toolbar__inner { gap: 8px; }

    .ph-search-wrap { min-width: 100%; }

    .ph-results-meta {
        margin-left: 0;
        font-size: 12px;
    }

    .ph-content { padding: 24px 16px 56px; }

    .ph-card__body { padding: 14px 16px 16px; }
}

@media (max-width: 400px) {
    .ph-select { font-size: 13px; }
}
