/*
 * Khordad podcast cards — a cover-led listening object.
 * Every rule is scoped to podcast cards so video and editorial cards stay intact.
 */

.kh-widget-kh_podcast .kh-card-grid,
.kh-elementor-home-podcasts .kh-card-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
    gap: clamp(16px, 2vw, 22px);
}

.khordad-hello-theme .kh-card--podcast,
.kh-card--podcast {
    --khpc-accent: #ff8a1f;
    --khpc-accent-hover: #ffa24e;
    --khpc-accent-soft: #ffc084;
    --khpc-surface: #17130f;
    --khpc-surface-raised: #211a14;
    --khpc-line: rgba(255, 170, 92, 0.3);
    --khpc-text: #fff8f1;
    --khpc-muted: #d9c9bc;
    background: var(--khpc-surface);
    border: 1px solid var(--khpc-line);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    height: 100%;
    isolation: isolate;
    min-height: 0;
    overflow: hidden;
    position: relative;
    transform: translateY(0);
    transition:
        border-color 220ms ease,
        transform 320ms cubic-bezier(0.16, 1, 0.3, 1);
}

.khordad-hello-theme .kh-card.kh-card--podcast {
    border-radius: 16px;
}

.khordad-hello-theme .kh-card--podcast:hover,
.kh-card--podcast:hover {
    border-color: rgba(255, 156, 65, 0.72);
    transform: translateY(-4px);
}

.khordad-hello-theme .kh-card--podcast:focus-within,
.kh-card--podcast:focus-within {
    border-color: rgba(255, 176, 102, 0.96);
}

.khordad-hello-theme .kh-card--podcast a:focus-visible,
.kh-card--podcast a:focus-visible {
    outline: 3px solid var(--khpc-accent-soft);
    outline-offset: -3px;
}

.khordad-hello-theme .kh-card--podcast .kh-card__media,
.kh-card--podcast .kh-card__media {
    aspect-ratio: 16 / 9;
    background: #090807;
    border-radius: 0;
    box-shadow: inset 0 -1px var(--khpc-line);
    flex: 0 0 auto;
    height: auto;
    margin: 0;
    min-height: 0;
    overflow: hidden;
    position: relative;
    width: 100%;
}

.khordad-hello-theme .kh-card--podcast .kh-card__media::after,
.kh-card--podcast .kh-card__media::after {
    background: linear-gradient(
        180deg,
        rgba(8, 7, 6, 0.03) 38%,
        rgba(8, 7, 6, 0.74) 100%
    );
}

.khordad-hello-theme .kh-card--podcast .kh-card__media img,
.kh-card--podcast .kh-card__media img {
    filter: saturate(0.92) contrast(1.03);
    height: 100%;
    object-fit: cover;
    object-position: center;
    transform: scale(1.01);
    transition:
        filter 360ms ease,
        transform 520ms cubic-bezier(0.16, 1, 0.3, 1);
    width: 100%;
}

.khordad-hello-theme .kh-card--podcast:hover .kh-card__media img,
.kh-card--podcast:hover .kh-card__media img,
.khordad-hello-theme .kh-card--podcast:focus-within .kh-card__media img,
.kh-card--podcast:focus-within .kh-card__media img {
    filter: saturate(1) contrast(1.05);
    transform: scale(1.045);
}

.khordad-hello-theme .kh-card--podcast .kh-card__play,
.kh-card--podcast .kh-card__play {
    align-items: center;
    background: var(--khpc-accent);
    border: 0;
    border-radius: 14px;
    bottom: 14px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.38);
    display: inline-flex;
    height: 54px;
    inset: auto auto 14px 14px;
    justify-content: center;
    transform: translateY(0);
    transition:
        background-color 180ms ease,
        transform 260ms cubic-bezier(0.16, 1, 0.3, 1);
    width: 54px;
    z-index: 4;
}

.khordad-hello-theme .kh-card--podcast .kh-card__play-icon,
.kh-card--podcast .kh-card__play-icon {
    color: #17110c;
    font-size: 32px;
}

.khordad-hello-theme .kh-card--podcast .kh-card__media:hover .kh-card__play,
.kh-card--podcast .kh-card__media:hover .kh-card__play {
    background: var(--khpc-accent-hover);
    transform: translateY(-2px);
}

.khordad-hello-theme .kh-card--podcast .kh-card__media:hover .kh-card__play-icon,
.kh-card--podcast .kh-card__media:hover .kh-card__play-icon {
    color: #17110c;
}

.kh-podcast-card__format {
    align-items: center;
    background: rgba(17, 13, 10, 0.92);
    border: 1px solid rgba(255, 196, 141, 0.52);
    border-radius: 9px;
    color: #fff8f1;
    display: inline-flex;
    font-size: 11px;
    font-weight: 850;
    gap: 6px;
    inset: 13px 13px auto auto;
    line-height: 1;
    padding: 8px 10px;
    position: absolute;
    z-index: 4;
}

.kh-podcast-card__format-icon {
    color: var(--khpc-accent-soft);
    font-size: 19px;
}

.khordad-hello-theme .kh-card--podcast .kh-card__body,
.kh-card--podcast .kh-card__body {
    align-content: start;
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-width: 0;
    padding: clamp(16px, 2.2vw, 20px);
}

.khordad-hello-theme .kh-card--podcast .kh-card__eyebrow,
.kh-card--podcast .kh-card__eyebrow {
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    gap: 10px;
    justify-content: space-between;
    margin-bottom: 13px;
    padding-bottom: 11px;
}

.khordad-hello-theme .kh-card--podcast .kh-card__type,
.kh-card--podcast .kh-card__type {
    background: transparent;
    color: var(--khpc-accent-soft);
    font-size: 12px;
    font-weight: 850;
    padding: 0;
}

.khordad-hello-theme .kh-card--podcast .kh-card__type-icon,
.kh-card--podcast .kh-card__type-icon {
    color: var(--khpc-accent);
    font-size: 18px;
}

.khordad-hello-theme .kh-card--podcast .kh-card__date,
.kh-card--podcast .kh-card__date {
    color: var(--khpc-muted);
    font-size: 11px;
    line-height: 1.5;
    text-align: end;
}

.khordad-hello-theme .kh-card--podcast .kh-card__body h3,
.kh-card--podcast .kh-card__body h3 {
    display: -webkit-box;
    font-size: clamp(17px, 1.5vw, 19px);
    font-weight: 850;
    line-height: 1.75;
    margin: 0;
    min-height: 3.5em;
    overflow: hidden;
    text-wrap: balance;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.khordad-hello-theme .kh-card--podcast .kh-card__body h3 a,
.kh-card--podcast .kh-card__body h3 a {
    color: var(--khpc-text);
}

.kh-podcast-card__listen {
    align-items: center;
    color: var(--khpc-accent-soft);
    display: flex;
    gap: 10px;
    margin: 11px 0 15px;
    min-height: 28px;
}

.kh-podcast-card__wave {
    align-items: center;
    display: inline-flex;
    direction: ltr;
    gap: 3px;
    height: 24px;
}

.kh-podcast-card__wave i {
    background: var(--khpc-accent);
    border-radius: 2px;
    display: block;
    height: var(--khpc-bar-height);
    opacity: 0.9;
    transform-origin: center;
    width: 3px;
}

.kh-podcast-card__listen-label {
    font-size: 11px;
    font-weight: 850;
    white-space: nowrap;
}

.khordad-hello-theme .kh-card--podcast:hover .kh-podcast-card__wave i,
.kh-card--podcast:hover .kh-podcast-card__wave i,
.khordad-hello-theme .kh-card--podcast:focus-within .kh-podcast-card__wave i,
.kh-card--podcast:focus-within .kh-podcast-card__wave i {
    animation: khpc-wave 680ms ease-in-out infinite alternate;
    animation-delay: calc(var(--khpc-bar-index) * -58ms);
}

@keyframes khpc-wave {
    to {
        opacity: 1;
        transform: scaleY(0.48);
    }
}

.khordad-hello-theme .kh-card--podcast .kh-card__meta,
.kh-card--podcast .kh-card__meta {
    align-items: flex-start;
    background: transparent;
    border: 0;
    border-radius: 0;
    color: var(--khpc-muted);
    display: flex;
    flex-wrap: wrap;
    font-size: 11px;
    gap: 7px 14px;
    margin-top: auto;
    padding: 0;
}

.khordad-hello-theme .kh-card--podcast .kh-card__meta-item,
.kh-card--podcast .kh-card__meta-item {
    align-items: flex-start;
    display: inline-flex;
    line-height: 1.6;
    min-height: 0;
    min-width: 0;
}

.khordad-hello-theme .kh-card--podcast .kh-card__meta-item:first-child,
.kh-card--podcast .kh-card__meta-item:first-child {
    color: #f7e3d0;
    font-weight: 800;
}

.khordad-hello-theme .kh-card--podcast .kh-card__meta-item:last-child:nth-child(n + 3),
.kh-card--podcast .kh-card__meta-item:last-child:nth-child(n + 3) {
    flex-basis: 100%;
}

.khordad-hello-theme .kh-card--podcast .kh-card__meta-item + .kh-card__meta-item::before,
.kh-card--podcast .kh-card__meta-item + .kh-card__meta-item::before {
    display: none;
}

.khordad-hello-theme .kh-card--podcast .kh-card__meta-icon,
.kh-card--podcast .kh-card__meta-icon {
    color: var(--khpc-accent-soft);
    flex: 0 0 auto;
    font-size: 17px;
    margin-top: 1px;
}

@media (max-width: 420px) {
    .kh-widget-kh_podcast .kh-card-grid,
    .kh-elementor-home-podcasts .kh-card-grid {
        gap: 16px;
    }

    .khordad-hello-theme .kh-card--podcast .kh-card__body,
    .kh-card--podcast .kh-card__body {
        padding: 16px;
    }

    .khordad-hello-theme .kh-card--podcast .kh-card__body h3,
    .kh-card--podcast .kh-card__body h3 {
        font-size: 17px;
        line-height: 1.7;
    }

    .khordad-hello-theme .kh-card--podcast .kh-card__play,
    .kh-card--podcast .kh-card__play {
        bottom: 12px;
        height: 52px;
        inset: auto auto 12px 12px;
        width: 52px;
    }

    .kh-podcast-card__format {
        inset: 11px 11px auto auto;
    }
}

@media (hover: none) {
    .khordad-hello-theme .kh-card--podcast:hover,
    .kh-card--podcast:hover {
        transform: none;
    }

    .khordad-hello-theme .kh-card--podcast:hover .kh-card__media img,
    .kh-card--podcast:hover .kh-card__media img {
        transform: scale(1.01);
    }
}

@media (pointer: coarse) {
    .khordad-hello-theme .kh-card--podcast .kh-card__play,
    .kh-card--podcast .kh-card__play {
        min-height: 52px;
        min-width: 52px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .khordad-hello-theme .kh-card--podcast,
    .kh-card--podcast,
    .khordad-hello-theme .kh-card--podcast *,
    .kh-card--podcast * {
        animation-duration: 1ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 1ms !important;
    }
}

@media (forced-colors: active) {
    .khordad-hello-theme .kh-card--podcast,
    .kh-card--podcast,
    .kh-podcast-card__format,
    .khordad-hello-theme .kh-card--podcast .kh-card__play,
    .kh-card--podcast .kh-card__play {
        border: 1px solid CanvasText;
    }
}
