/* =======================================================
   Foundation
   ======================================================= */
:root {
--javo-navy-900: #0f172a;
	--javo-navy-800: #16213a;
	--javo-glass-surface: rgba(255, 255, 255, 0.72);
	--javo-glass-surface-hover: rgba(255, 255, 255, 0.8);
	--javo-glass-surface-strong: rgba(255, 255, 255, 0.86);
	--javo-glass-border: rgba(255, 255, 255, 0.62);
	--javo-glass-border-strong: rgba(255, 255, 255, 0.82);
	--javo-glass-highlight: rgba(255, 255, 255, 0.52);
	--javo-glass-shadow: rgba(15, 23, 42, 0.08);
	--javo-white: #ffffff;
	--javo-white-soft: #f8fafc;
	--javo-ink-strong: #243041;
	--javo-ink-muted: #5f6b7c;
	--javo-ink-faint: #7d8898;
	--javo-accent-blue: #4f7cff;
	--javo-accent-blue-soft: rgba(79, 124, 255, 0.12);
	--javo-accent-gold: #a78657;
	--javo-accent-gold-soft: rgba(167, 134, 87, 0.12);
	--javo-radius-card: 28px;
	--javo-radius-pill: 999px;
	--javo-ease: cubic-bezier(0.16, 1, 0.3, 1);
	--javo-duration-fast: 160ms;
	--javo-duration: 220ms;
}
/* =======================================================
   Card
   ======================================================= */

.javo-episode-card {
	 position: relative;
    direction: rtl;
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    column-gap: 24px;
    row-gap: 18px;
	width: 95%;
	margin-top: 5px;
    margin-right: auto;
    margin-bottom: 10px;
    margin-left: auto;
	padding: 22px 28px;
	background: rgba(248, 248, 248, 0.29);
	backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px); 
    border: 1px solid rgba(255, 255, 255, 0.8);
	border-radius: 35px;
	box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
	overflow: visible;
	transition: border-color var(--javo-duration) var(--javo-ease);
}

.javo-episode-sidebar{

    flex:0 0 10%;

    display:flex;

    flex-direction:column;

    justify-content:center;

    align-items:flex-start;

    gap:12px;
}
/* =======================================================
   Content Grid
   ======================================================= */

.javo-episode-content{
    flex:1;
    display:flex;
    flex-direction:column;
    justify-content:center;
    min-width:0;
}
/* =======================================================
   Actions - play button 
   ======================================================= */
.javo-episode-actions {
	 flex:0 0 12%;
    display:flex;
    align-items:center;
    justify-content:flex-end;
}
/* =======================================================
   Typography
   ======================================================= */
.javo-episode-title {
	margin: 0;
	font-size: 1.0625rem;
	line-height: 1.5;
	font-weight: 700;
	color: var(--javo-ink-strong);
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.javo-episode-description {
	display: none;
}
/* =======================================================
   Meta
   ======================================================= */
.javo-meta-duration{
    display:flex;
    align-items:center;
    font-size:.75rem;
    color:var(--javo-ink-faint);
    line-height:1.4;
}
.javo-meta-date{
    display:flex;
    align-items:center;
    font-size:.75rem;
    color:var(--javo-ink-faint);
    line-height:1.4;
}
/* =======================================================
   Engagement
   ======================================================= */

.javo-episode-engagement {
	display: flex;
	align-items: center;
	gap: 18px;
	font-size: 0.75rem;	
    margin-top:12px;
}
.javo-episode-save-trigger{
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	border: none;
	background: transparent;
	border-radius: 0;
	padding: 4px;
	margin: -4px;
	color: var(--javo-ink-muted);
	font-size: 0.75rem;
	font-weight: 500;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
	transform: translateZ(0);
	will-change: transform;
	transition:
		color var(--javo-duration) var(--javo-ease),
		opacity var(--javo-duration) var(--javo-ease),
		transform var(--javo-duration-fast) var(--javo-ease);
}

.javo-episode-save-trigger .javo-svg-asset,
 .javo-svg-asset {
	width: 18px;
	height: 18px;
	transition: transform var(--javo-duration) var(--javo-ease);
}


@keyframes javo-like-pop {
	0% { transform: scale(0.7); }
	45% { transform: scale(1.28); }
	70% { transform: scale(0.94); }
	100% { transform: scale(1); }
}

.javo-like-count {
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
	transition: color var(--javo-duration) var(--javo-ease);
}

/* =======================================================
   Meta
   ======================================================= */
.javo-meta-date {
display: inline-flex;
	align-items: center;
	color: #7d8898;
	font-size: 0.75rem;
	font-weight: 400;
	letter-spacing: 0.01em;
	white-space: nowrap;
}

/* =======================================================
   Play Button
   ======================================================= */
.javo-episode-play-trigger {
	width:100%;
	max-width:180px;
	height:50px;
	padding:0 18px;
    height:50px;
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	gap: 8px;
	min-width: 112px;
	height: 50px;
	padding: 0 20px;
	font-size: 0.8125rem;
	font-weight: 600;
	border: none;
	border-radius: 30px;
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease;
	/* ظاهر ثابت */
	background-color: #1e3a8a;
	color: #B3E7FF;

}

.javo-episode-play-trigger .javo-state-wrapper-unplayed,
.javo-episode-play-trigger .javo-state-wrapper-listening,
.javo-episode-play-trigger .javo-state-wrapper-completed {
	display: none;
	align-items: center;
	justify-content: center;
	gap: 6px;
	width: 100%;
	color: inherit;
}

.javo-episode-play-trigger .javo-svg-asset {
	width: 16px;
	height: 16px;
	flex-shrink: 0;
	fill: currentColor;
}

/* فقط نمایش وضعیت */

.javo-episode-play-trigger.is-unplayed .javo-state-wrapper-unplayed {
	display: inline-flex;
}

.javo-episode-play-trigger.is-listening .javo-state-wrapper-listening {
	display: inline-flex;
}

.javo-episode-play-trigger.is-completed .javo-state-wrapper-completed {
	display: inline-flex;
}

.javo-episode-play-trigger .javo-btn-progress-value {
	font-weight: 600;
	color: inherit;
}
/* =======================================================
   Accessibility
   ======================================================= */
.javo-episode-play-trigger:focus-visible {
	outline: 2px solid var(--javo-accent-blue);
	outline-offset: 3px;
}
.javo-episode-card:focus-within {
	border-color: var(--javo-glass-border-strong);
}
@media (prefers-reduced-motion: reduce) {
	.javo-episode-card,
	.javo-episode-img,
	.javo-episode-play-trigger,
	.javo-episode-save-trigger {
		transition-duration: 1ms !important;
		animation: none !important;
	}
}
/* ==========================================
   Episode Like Button
========================================== */
.javo-episode-like-trigger{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:6px;
    padding:0;
    margin:0;
    background:none;
    border:0;
    outline:0;
    cursor:pointer;
    color:#0f172a;
    font-size:13px;
    font-weight:600;
    line-height:1;
    transition:
        color .28s cubic-bezier(.4,0,.2,1),
        transform .25s cubic-bezier(.4,0,.2,1);
    -webkit-tap-highlight-color:transparent;
}
.javo-episode-like-trigger:active{
    transform:scale(.96);
}
/* ---------------- Icon ---------------- */
.javo-like-icon-wrap{
    display:flex;
    align-items:center;
    justify-content:center;
    will-change:transform;
}
.javo-heart-svg,
.javo-like-icon-wrap svg{
    transition:
        transform .35s cubic-bezier(.4,0,.2,1);
    transform-origin:center;
}
/* ---------------- Count ---------------- */
.javo-like-count{
    font-variant-numeric:tabular-nums;
    color:inherit;
    transition:
        color .28s cubic-bezier(.4,0,.2,1);
}
/* ==========================================
   Liked
========================================== */
.javo-episode-like-trigger.is-liked{
    color:#ef4444;
}
.javo-episode-like-trigger svg{
    fill:currentColor;
    stroke:currentColor;
}
.javo-episode-like-trigger.is-liked{
    color:#ef4444;
}
/* ==========================================
   Heart Animation
========================================== */
@keyframes javoHeartPop{

    0%{
        transform:scale(1) rotate(0);
    }

    30%{
        transform:scale(1.35) rotate(-10deg);
    }

    55%{
        transform:scale(.88) rotate(8deg);
    }

    75%{
        transform:scale(1.08);
    }

    100%{
        transform:scale(1);
    }

}

.javo-heart-pop .javo-like-icon-wrap{

    animation:javoHeartPop .45s cubic-bezier(.175,.885,.32,1.275);

}
/* =================================================================
   JaVo Episode Save Button
================================================================= */

.javo-episode-save-trigger{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:6px;

    padding:0;
    margin:0;

    background:transparent;
    border:0;
    outline:0;
    box-shadow:none;

    color:#64748b;
    cursor:pointer;

    font-size:13px;
    font-weight:600;
    line-height:1;

    -webkit-tap-highlight-color:transparent;

    transition:
        color .22s cubic-bezier(.4,0,.2,1),
        transform .18s ease;
}


/* Active */

.javo-episode-save-trigger:active{
    transform:scale(.96);
}

/* جلوگیری از پرش آیکون */

.javo-save-icon-wrap{
    display:flex;
    align-items:center;
    justify-content:center;
    flex-shrink:0;

    will-change:transform;
}

/* SVG */

.javo-save-icon-wrap svg{
    display:block;
    width:18px;
    height:18px;

    fill:none;
    stroke:currentColor;

    transition:
        fill .18s linear,
        stroke .18s linear,
        transform .35s cubic-bezier(.4,0,.2,1);
}

/* متن */

.javo-save-text{
    transition:
        color .18s linear,
        opacity .18s linear;
}

/* ==========================================================
   Saved State
========================================================== */

.javo-episode-save-trigger.is-saved{
    color:#3b82f6;
}

.javo-episode-save-trigger.is-saved .javo-save-icon-wrap svg{
    fill:currentColor;
    stroke:currentColor;
}

/* ==========================================================
   Animation
========================================================== */

@keyframes javoBookmarkPop{

    0%{
        transform:scale(1);
    }

    28%{
        transform:scaleX(1.12) scaleY(.82);
    }

    58%{
        transform:scaleX(.88) scaleY(1.18);
    }

    82%{
        transform:scale(1.05);
    }

    100%{
        transform:scale(1);
    }

}

.javo-save-pop .javo-save-icon-wrap{
    animation:javoBookmarkPop .42s cubic-bezier(.175,.885,.32,1.275);
}
/* =================================================================
   Episode Play Counter
================================================================= */

.javo-episode-play-count{
    position:relative;

    display:inline-flex;
    align-items:center;
    justify-content:center;

    gap:5px;

    padding-inline-end:18px;

    color:#3b82f6;

    font-size:13px;
    font-weight:600;
    line-height:normal; /* یا 1.2یا  */

    font-variant-numeric:tabular-nums;

    transition:
        color .22s cubic-bezier(.4,0,.2,1),
        opacity .22s cubic-bezier(.4,0,.2,1);
}
/* SVG */
.javo-episode-play-count svg{

    width:13px;
    height:13px;
	color:#3b82f6;
    display:block;
    flex-shrink:0;
    fill:currentColor;
    transition:
        fill .22s cubic-bezier(.4,0,.2,1),
        transform .25s cubic-bezier(.4,0,.2,1);
}
/* جداکننده */
.javo-episode-play-count::after{

    content:"";

    position:absolute;

    inset-inline-end:0;
    top:50%;

    transform:translateY(-50%);

    width:1px;
    height:13px;

    background:var(--javo-glass-border-strong);

    opacity:.9;

}
/* =================================================================
   Episode number 
================================================================= */
.javo-episode-number{

    display:inline-flex;
    align-items:center;
    color: rgba(66, 87, 98, 0.72);
    font-size:1.45rem;
    font-weight:600;
    line-height:1;
    font-variant-numeric:tabular-nums;
    letter-spacing:-0.04em;
    user-select:none;
}
/* ===============================
Transcript Section
=============================== */
.javo-v2-transcript-section{
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    /* حذف بوردر و پدینگ اولیه برای جلوگیری از بزرگ شدن کارت در حالت بسته */
    border-top: 1px dashed transparent;
    padding-top: 0;
    transition: border-color 0.3s ease, padding 0.3s ease;
}

.javo-episode-transcript-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    color: #64748b; /* رنگ خاکستری مینی‌مال در حالت پیش‌فرض */
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 8px;
    line-height: 1;
    transition: color 0.25s ease, transform 0.25s ease;
}

/* رپر آیکون سند */
.javo-transcript-icon-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

/* هاور دکمه (فقط تغییر رنگ ملایم به آبی سازمانی بدون جابجایی شدید) */
.javo-episode-transcript-trigger:hover {
    color: #3b82f6;
}

/* ----------------------------------
   وضعیت باز شده (is-open) -> اعمال تغییرات بصری
---------------------------------- */
.javo-v2-transcript-section.is-open {
    border-top-color: rgba(0, 0, 0, 0.06);
    padding-top: 14px;
}
.javo-v2-transcript-section.is-open .javo-episode-transcript-trigger {
    color: #3b82f6;
}
.javo-v2-transcript-section.is-open .javo-transcript-icon-wrap {
    transform: rotate(15deg) scale(1.1);
}
.javo-v2-transcript-content {
    width: 100%;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-8px);
    transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1), 
                opacity 0.25s ease, 
                transform 0.25s ease,
                margin 0.25s ease;
    
    background: rgba(0, 0, 0, 0.012); 
    border-radius: 14px;
    font-size: 0.88rem;
    line-height: 1.85;
    color: #334155;
    box-sizing: border-box;
    padding: 0 16px;
}
.javo-v2-transcript-section.is-open .javo-v2-transcript-content {
    max-height: 100px;
    overflow-y: auto;
    opacity: 1;
    transform: translateY(0);
    margin-top: 12px;
    padding: 14px 16px;
    border: 1px solid rgba(0, 0, 0, 0.015);
}
.javo-v2-transcript-content::-webkit-scrollbar {
    width: 4px;
}
.javo-v2-transcript-content::-webkit-scrollbar-track {
    background: transparent;
}
.javo-v2-transcript-content::-webkit-scrollbar-thumb {
    background: rgba(59, 130, 246, 0.2); /* اسکرول‌بار ملایم با تم آبی سایت */
    border-radius: 10px;
}
.javo-v2-transcript-inner-text {
    padding-bottom: 10px;
}
.javo-v2-transcript-close-sticky {
    position: -webkit-sticky;
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    border: none;
    border-top: 1px dashed rgba(59, 130, 246, 0.15);
    padding: 10px 0;
    margin-top: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    background: linear-gradient(to top, rgba(239, 246, 255, 0.98) 80%, rgba(239, 246, 255, 0));
    color: #3b82f6; 
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
}
.javo-v2-transcript-close-sticky:hover {
    color: #1d4ed8;
    background: linear-gradient(to top, rgba(239, 246, 255, 0.98) 80%, rgba(239, 246, 255, 0));
}
.javo-v2-transcript-section.is-open .javo-v2-transcript-content {
    max-height: 250px; 
    overflow-y: auto;
    position: relative; 
    padding: 14px 16px 0 16px; 
}
/* =======================================================
   Filter 
   ======================================================= */
   .javo-episode-filter{
    display:flex;
    justify-content:center;
    align-items:center;
    gap:6px;
    width:max-content;
    max-width:100%;
    margin:12px auto 18px;
    padding:6px;
    border-radius:999px;
    background:rgba(255,255,255,.82);
    backdrop-filter:blur(16px);
    -webkit-backdrop-filter:blur(16px);
    border:1px solid rgba(15,23,42,.06);
    box-shadow:
        0 8px 24px rgba(15,23,42,.05),
        inset 0 1px 0 rgba(255,255,255,.8);
}
.javo-filter-button{
    appearance:none;
    border:none;
    background:transparent;
    display:flex;
    align-items:center;
    justify-content:center;
    min-height:42px;
    padding:0 18px;
    border-radius:999px;
    font-size:13px;
    font-weight:700;
    color:#64748b;
    white-space:nowrap;
    cursor:pointer;
    transition:
        background .25s,
        color .25s,
        transform .25s,
        box-shadow .25s;
}
.javo-filter-button:hover{
    background:#f8fafc;
    color:#0f172a;
}
.javo-filter-button.is-active{
    background:#b3e7ff;
    color:#075985;
    box-shadow:
        0 8px 20px rgba(179,231,255,.45),
        inset 0 1px 0 rgba(255,255,255,.7);
    transform:translateY(-1px);
}
@media (max-width:640px){
.javo-episode-filter{
    width:calc(100% - 24px);
    max-width:360px;
    gap:4px;
    padding:5px;
}
.javo-filter-button{
    flex:1;
    min-width:0;
    min-height:40px;
    padding:0 10px;
    font-size:12px;
}
}
/* =======================================================
   Mobile Layout
   ======================================================= */

@media (max-width:768px){

    .javo-episode-card{

        width:100%;
        margin:8px 0;
        padding:8px 10px;

        display:grid;

        grid-template-columns:1fr;
        grid-template-areas:

            "sidebar"
            "content"
            "actions"
            "transcript";

        row-gap:12px;

        border-radius:28px;
    }


    /* ---------------- Sidebar ---------------- */

    .javo-episode-sidebar{

        grid-area:sidebar;

        width:100%;

        display:flex;
        flex-direction:row;

        align-items:center;
        justify-content:space-between;

        gap:8px;
    }

    .javo-episode-number{

        font-size:1.35rem;  
        font-weight:500;
    }

    .javo-meta-date,
    .javo-meta-duration{

        font-size:.68rem;
        white-space:nowrap;
    }


    /* ---------------- Content ---------------- */

    .javo-episode-content{

        grid-area:content;

        width:100%;
    }

    .javo-episode-title{

         font-size:.92rem;
        line-height:1.55;

        -webkit-line-clamp:2;
    }


    /* ---------------- Engagement ---------------- */

    .javo-episode-engagement{

        flex-wrap:wrap;

        gap:10px; 

        margin-top:10px;

        justify-content:flex-start;
    }

    .javo-episode-play-count,
    .javo-episode-like-trigger,
    .javo-episode-save-trigger{

        font-size:12px;
    }


    /* ---------------- Play Button ---------------- */

    .javo-episode-actions{

        grid-area:actions;

        width:100%;

        justify-content:stretch;
    }

    .javo-episode-play-trigger{

        width:100%;
        max-width:none;
         height:46px; 
        border-radius:999px;
         font-size:.84rem;
        font-weight:700;
    }


    /* ---------------- Transcript ---------------- */

    .javo-v2-transcript-section{
        grid-area:transcript;
        margin-top:0;
        width:100%;
    }

    .javo-episode-transcript-trigger{
        width:100%;
        justify-content:center;
         padding:7px 10px;
         font-size:.72rem;
    }


    /* ---------------- Summary ---------------- */

    .javo-v2-transcript-content{

        font-size:.82rem;

        line-height:2;
    }

}
