/* Tarhestan — Single course page.
 * Minimal: white surfaces, thin borders, brand maroon for actions.
 * Scoped to body.single-lp_course. Our own classes (tcs-*) are used for the cards, the instructor
 * section and the related courses, so the theme's course grid and carousel styles do not apply to them. */

.single-lp_course{
	--cs-brand:#82151d;
	--cs-brand-hi:#bf1e2e;
	--cs-ink:#1f1518;
	--cs-text:#3a2f32;
	--cs-muted:#6b5a5d;
	--cs-line:#ecdfe0;
	--cs-soft:#fbf6f6;
	--cs-radius:18px;
	/* Every button on this page uses the same look. */
	--cs-btn-bg:rgba(130,21,29,.81);
	--cs-btn-grad:linear-gradient(to right,rgba(130,21,29,.81) 0%,rgb(191,30,46) 50%,rgba(130,21,29,.81) 100%);
	--cs-btn-text:#fff;
}

#learn-press-course-description .thim-course-content, #tab-course-description .thim-course-content, #tab-overview .thim-course-content{
	width: 100%!important;
	padding-left: 25px;
}

.tcs{
	max-width:var(--th-max,1320px);margin:0 auto;padding:clamp(1.5rem,3vw,2.5rem) 1rem clamp(2.5rem,5vw,4rem);
	color:var(--cs-text);line-height:1.9;
}
.tcs *,.tcs *::before,.tcs *::after{box-sizing:border-box}

/* ---------- Layout ---------- */
.tcs-grid{display:grid;grid-template-columns:minmax(0,1fr) 340px;gap:clamp(1.5rem,3vw,2.5rem);align-items:start}
.tcs-main{min-width:0}
.tcs-side{display:grid;gap:1rem;min-width:0}

/* ---------- Thumbnail ---------- */
.tcs-thumb{margin:0 0 1.5rem;overflow:hidden;border-radius:var(--cs-radius);background:var(--cs-soft)}
.tcs-thumb__img{display:block;width:100%;height:auto;aspect-ratio:16/7;}

/* ---------- Tabs ---------- */
/* Without JavaScript the nav is hidden and every panel is shown in order. */
.tcs-tabs__nav{display:none}
.tcs-tabs.is-js .tcs-tabs__nav{
	display:flex;gap:.25rem;margin:0 0 1.25rem;padding:.25rem;
	background:var(--cs-soft);border:1px solid var(--cs-line);border-radius:14px;
	overflow-x:auto;scrollbar-width:none;
}
.tcs-tabs__nav::-webkit-scrollbar{display:none}
.tcs-tabs__btn{
	flex:1 0 auto;min-height:44px;padding:0 1.1rem;margin:0;border:0;border-radius:10px;
	background:transparent;color:var(--cs-muted);font:inherit;font-weight:700;font-size:.95rem;white-space:nowrap;cursor:pointer;
	transition:background-color .2s ease,color .2s ease;
}
.tcs-tabs__btn:hover{color:var(--cs-ink)}
.tcs-tabs__btn.is-active{
	background-color:var(--cs-btn-bg);background-image:var(--cs-btn-grad);color:var(--cs-btn-text);
	box-shadow:0 6px 16px -10px rgba(130,21,29,.7);
}
.tcs-tabs__btn.is-active:hover{color:var(--cs-btn-text);filter:brightness(1.1)}
.tcs-tabs__btn:focus-visible{outline:2px solid var(--cs-brand-hi);outline-offset:2px}

.tcs-panel{min-width:0;color:var(--cs-text);font-size:.97rem}
.tcs-tabs.is-js .tcs-panel:not(.is-active){display:none}
.tcs-panel a{color:var(--cs-brand);text-decoration:none}
.tcs-panel a:hover{color:var(--cs-brand-hi);text-decoration:underline}
.tcs-panel img{max-width:100%;height:auto}

/* ---------- Overview: the page content, no extra box ---------- */
.tcs-panel--overview{padding:0 .25rem}
.tcs-panel--overview h2,.tcs-panel--overview h3{color:var(--cs-ink);font-weight:800;line-height:1.6}
.tcs-panel--overview .vc_row{margin-left:0!important;margin-right:0!important}
.tcs-panel--overview .vc_column-inner{padding-left:0!important;padding-right:0!important}
.tcs-panel--overview img{border-radius:14px}

/* ---------- Curriculum (برنامه تحصیلی): own markup, tcs-cur-* ---------- */
.tcs-cur{display:grid;gap:1rem}
.tcs-cur__summary{display:flex;flex-wrap:wrap;align-items:center;gap:.5rem;justify-content:space-between}
.tcs-cur__stat{display:inline-flex;align-items:center;min-height:34px;padding:0 .9rem;border-radius:999px;background:var(--cs-soft);border:1px solid var(--cs-line);font-size:.85rem;font-weight:700;color:var(--cs-ink)}
.tcs-cur__all{
	min-height:38px;margin:0 auto 0 0;padding:0 1.1rem;border:0;border-radius:10px;cursor:pointer;
	background-color:var(--cs-btn-bg);background-image:var(--cs-btn-grad);color:var(--cs-btn-text);font:inherit;font-size:.88rem;font-weight:800;
	transition:filter .2s ease;
}
.tcs-cur__all:hover{filter:brightness(1.1)}
.tcs-cur__list{display:grid;gap:.75rem}
.tcs-cur__section{background:#fff;border:1px solid var(--cs-line);border-radius:14px;overflow:hidden}
.tcs-cur__head{margin:0}
.tcs-cur__toggle{
	display:flex;align-items:center;gap:.75rem;width:100%;min-height:58px;margin:0;padding:.75rem 1.1rem;
	border:0;background:var(--cs-soft);color:var(--cs-ink);font:inherit;text-align:right;cursor:pointer;
}
.tcs-cur__toggle:focus-visible{outline:2px solid var(--cs-brand-hi);outline-offset:-3px}
.tcs-cur__num{
	flex:none;display:grid;place-items:center;width:32px;height:32px;border-radius:50%;
	background-color:var(--cs-btn-bg);background-image:var(--cs-btn-grad);color:var(--cs-btn-text);font-size:.85rem;font-weight:800;
}
.tcs-cur__title{flex:1;min-width:0;font-size:1rem;font-weight:800;line-height:1.6}
.tcs-cur__count{flex:none;font-size:.82rem;color:var(--cs-muted);white-space:nowrap}
.tcs-cur__chev{
	flex:none;width:9px;height:9px;margin-inline-start:.25rem;
	border-left:2px solid var(--cs-brand);border-bottom:2px solid var(--cs-brand);
	transform:rotate(-45deg);transition:transform .25s ease;
}
.tcs-cur__section.is-open .tcs-cur__chev{transform:rotate(135deg)}
.tcs-cur__body{display:none;border-top:1px solid var(--cs-line)}
.tcs-cur__section.is-open .tcs-cur__body{display:block}
.tcs-cur__desc{margin:0;padding:.85rem 1.1rem 0;font-size:.9rem;color:var(--cs-muted)}
.tcs-cur__items{list-style:none;margin:0;padding:0}
.tcs-cur__item{border-top:1px solid var(--cs-line)}
.tcs-cur__item:first-child{border-top:0}
.tcs-cur__link{
	display:grid;grid-template-columns:auto minmax(0,1fr) auto auto;align-items:center;gap:.75rem;
	padding:.7rem 1.1rem;color:var(--cs-text);text-decoration:none;transition:background-color .2s ease;
}
.tcs-cur__link:hover{background:var(--cs-soft);color:var(--cs-brand)}
.tcs-cur__type{
	padding:.15rem .6rem;border-radius:999px;background:var(--cs-soft);border:1px solid var(--cs-line);
	font-size:.74rem;font-weight:700;color:var(--cs-muted);white-space:nowrap;
}
.tcs-cur__name{min-width:0;font-size:.93rem;line-height:1.7;color:var(--cs-ink)}
.tcs-cur__dur{font-size:.8rem;color:var(--cs-muted);white-space:nowrap}
.tcs-cur__state{font-size:.74rem;font-weight:700;white-space:nowrap}
.tcs-cur__state--preview{color:var(--cs-brand)}
.tcs-cur__state--locked{color:var(--cs-muted)}
.tcs-cur__item.is-locked .tcs-cur__name{color:var(--cs-muted)}
.tcs-cur__empty{margin:0;padding:1rem 1.1rem;font-size:.9rem;color:var(--cs-muted)}
@media (max-width:575px){
	.tcs-cur__link{grid-template-columns:minmax(0,1fr) auto;row-gap:.35rem}
	.tcs-cur__type{display:none}
}

/* ---------- Curriculum: LearnPress markup (fallback when the own markup has no data) ---------- */
.tcs-panel--curriculum .course-curriculum{display:grid;gap:.75rem}
.tcs-panel--curriculum .course-section{
	background:#fff;border:1px solid var(--cs-line);border-radius:14px;overflow:hidden;
}
.tcs-panel--curriculum .course-section-header{
	display:flex;align-items:center;justify-content:space-between;gap:.75rem;
	min-height:56px;padding:.75rem 1.1rem;cursor:pointer;background:var(--cs-soft);
}
.tcs-panel--curriculum .course-section__title{font-size:1rem;font-weight:800;color:var(--cs-ink);line-height:1.6}
.tcs-panel--curriculum .section-count-items{font-size:.82rem;color:var(--cs-muted);white-space:nowrap}
.tcs-panel--curriculum .course-item{
	display:flex;flex-direction:row;align-items:center;justify-content:space-between;gap:.75rem;
	padding:.7rem 1.1rem;border-top:1px solid var(--cs-line);
}
.tcs-panel--curriculum .course-item__title,
.tcs-panel--curriculum .course-item-title{font-size:.93rem;color:var(--cs-text);line-height:1.7}
.tcs-panel--curriculum .duration{flex:none;font-size:.8rem;color:var(--cs-muted);white-space:nowrap}
.tcs-panel--curriculum .course-item-ico.locked{opacity:.45}
.tcs-panel--curriculum .course-item-ico.preview{color:var(--cs-brand)}
.tcs-panel--curriculum .course-item-order.lp-hidden{display:none}

/* ---------- Instructor tab (own markup: tcs-instructor) ---------- */
.tcs-instructor{display:grid;gap:1.5rem}
.tcs-instructor__profile{
	display:flex;align-items:center;gap:1.25rem;padding:1.25rem 1.4rem;
	background:var(--cs-soft);border:1px solid var(--cs-line);border-radius:14px;
}
.tcs-instructor__avatar{flex:none;width:96px;height:96px;border-radius:50%;object-fit:cover;background:#fff;border:3px solid #fff;box-shadow:0 6px 16px -10px rgba(31,21,24,.4)}
.tcs-instructor__info{min-width:0}
.tcs-instructor__label{margin:0;font-size:.8rem;color:var(--cs-muted)}
.tcs-instructor__name{margin:.1rem 0 0;font-size:1.15rem;font-weight:900;color:var(--cs-ink);line-height:1.5}
.tcs-instructor__bio{margin:.4rem 0 0;font-size:.92rem;color:var(--cs-text);line-height:1.8}

/* ---------- Section subtitles ---------- */
.tcs-subhead{
	margin:0 0 1rem;padding-bottom:.75rem;border-bottom:1px solid var(--cs-line);
	font-size:1.2rem;font-weight:900;color:var(--cs-ink);line-height:1.6;
}

/* ---------- Course cards (tcs-course-grid / tcs-card-course) ---------- */
/* ---------- Carousel (course cards) ---------- */
.tcs-carousel{--tcs-cols:3;--tcs-gap:1.25rem;min-width:0}
.tcs-carousel__head{display:flex;align-items:center;justify-content:space-between;gap:1rem}
.tcs-carousel__head .tcs-subhead{flex:1;min-width:0;margin-bottom:1.25rem}
.tcs-carousel__nav{display:none;gap:.5rem;margin-bottom:1.25rem}
.tcs-carousel.is-ready .tcs-carousel__nav{display:flex}
.tcs-carousel__arrow{
	display:grid;place-items:center;width:42px;height:42px;margin:0;padding:0;border:0;border-radius:50%;
	background-color:var(--cs-btn-bg);background-image:var(--cs-btn-grad);color:var(--cs-btn-text);cursor:pointer;
	box-shadow:0 8px 18px -10px rgba(130,21,29,.7);transition:filter .2s ease,opacity .2s ease;
}
.tcs-carousel__arrow:hover{filter:brightness(1.1)}
.tcs-carousel__arrow:disabled{opacity:.35;cursor:default;filter:none}
.tcs-carousel__arrow--prev .th-i{transform:scaleX(-1)}
.tcs-carousel__arrow:focus-visible{outline:2px solid var(--cs-brand-hi);outline-offset:3px}
.tcs-carousel__track{
	display:flex;gap:var(--tcs-gap);overflow-x:auto;scroll-snap-type:x mandatory;scroll-behavior:smooth;
	scrollbar-width:none;padding:.4rem .2rem 1.1rem;
}
.tcs-carousel__track::-webkit-scrollbar{display:none}
.tcs-carousel__track > *{
	flex:0 0 calc((100% - (var(--tcs-cols) - 1) * var(--tcs-gap)) / var(--tcs-cols));
	min-width:0;scroll-snap-align:start;
}
.tcs-carousel__dots{display:none;justify-content:center;flex-wrap:wrap;gap:.5rem;margin-top:.25rem}
.tcs-carousel.is-ready .tcs-carousel__dots{display:flex}
.tcs-carousel__dot{position:relative;width:10px;height:10px;margin:0;padding:0;border:0;border-radius:999px;background:#d9c4c6;cursor:pointer;transition:width .3s ease,background-color .3s ease}
.tcs-carousel__dot::before{content:"";position:absolute;inset:-10px -6px}
.tcs-carousel__dot[aria-current="true"]{width:28px;background-color:var(--cs-btn-bg);background-image:var(--cs-btn-grad)}
.tcs-carousel__dot:focus-visible{outline:2px solid var(--cs-brand-hi);outline-offset:3px}
.tcs-card-course{
	position:relative;display:flex;flex-direction:column;min-width:0;height:100%;overflow:hidden;
	background:#fff;border:1px solid var(--cs-line);border-radius:18px;
	box-shadow:0 10px 28px -22px rgba(31,21,24,.35);
	transition:transform .25s ease,box-shadow .25s ease,border-color .25s ease;
}
.tcs-card-course:hover{
	transform:translateY(-4px);border-color:color-mix(in srgb,var(--cs-brand) 25%,var(--cs-line));
	box-shadow:0 22px 40px -24px rgba(130,21,29,.45);
}
.tcs-card-course__media{position:relative;overflow:hidden;aspect-ratio:16/10;background:var(--cs-soft)}
.tcs-card-course__img{display:block;width:100%;height:100%;object-fit:cover;transition:transform .4s ease}
.tcs-card-course:hover .tcs-card-course__img{transform:scale(1.03)}
.tcs-card-course__placeholder{display:block;width:100%;height:100%;background:linear-gradient(135deg,var(--cs-soft),#f1e4e5)}
.tcs-card-course__body{display:flex;flex-direction:column;gap:.5rem;flex:1;padding:1.05rem 1.2rem .95rem}
.tcs-card-course__teacher{display:flex;align-items:center;gap:.45rem;margin:0;font-size:.82rem;color:var(--cs-muted);line-height:1.6}
.tcs-card-course__avatar{flex:none;width:24px;height:24px;border-radius:50%;object-fit:cover}
.tcs-card-course__title{margin:0;font-size:1rem;font-weight:800;line-height:1.6}
.tcs-card-course__title a{
	color:var(--cs-ink);text-decoration:none;
	display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;
}
/* The title link covers the whole card, so the card is clickable. */
.tcs-card-course__title a::after{content:"";position:absolute;inset:0;z-index:1}
.tcs-card-course__title a:hover{color:var(--cs-brand)}
.tcs-card-course__excerpt{
	margin:0;font-size:.88rem;line-height:1.8;color:var(--cs-muted);
	display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;
}
.tcs-card-course__foot{
	margin-top:auto;display:flex;align-items:center;justify-content:space-between;gap:.75rem;
	padding-top:.8rem;border-top:1px solid var(--cs-line);font-size:.82rem;color:var(--cs-muted);
}
.tcs-card-course__price{font-size:.98rem;font-weight:900;color:var(--cs-brand);white-space:nowrap}
.tcs-card-course__price .woocommerce-Price-amount,
.tcs-card-course__price .price{font-size:inherit;font-weight:inherit;color:inherit}

/* ---------- Related courses ---------- */
.tcs-related{margin-top:clamp(2.5rem,5vw,4rem)}
.tcs-related .tcs-subhead{font-size:1.35rem}

/* ---------- Side cards ---------- */
.tcs-card{padding:1.5rem;background:#fff;border:1px solid var(--cs-line);border-radius:var(--cs-radius)}
.tcs-share{padding:1.1rem 1.5rem}

/* Course features (from the theme's thim-course-info block) */
.tcs-features .thim-course-info .title{margin:0 0 .9rem;padding-bottom:.75rem;border-bottom:1px solid var(--cs-line);font-size:1.05rem;font-weight:900;color:var(--cs-ink)}
.tcs-features .thim-course-info ul{list-style:none;margin:0;padding:0}
.tcs-features .thim-course-info li{display:flex;align-items:center;gap:.6rem;padding:.55rem 0;border-bottom:1px dashed var(--cs-line);font-size:.92rem;color:var(--cs-text)}
.tcs-features .thim-course-info li:last-child{border-bottom:0}
.tcs-features .thim-course-info i{color:var(--cs-brand);font-size:1rem}
.tcs-features .thim-course-info .value{margin-inline-start:auto;font-weight:800;color:var(--cs-ink)}
.tcs-side .course-payment{margin-top:1rem}

/* Price */
.tcs-side .course-price{margin-bottom:.75rem}
.tcs-side .origin-price{color:var(--cs-muted);text-decoration:line-through;font-size:.9rem;margin-inline-end:.5rem}
.tcs-side .price{font-size:1.5rem;font-weight:900;color:var(--cs-ink)}

/* Buttons */
.tcs-side .lp-button,
.tcs-side .course-payment .button,
.tcs-side .course-payment button,
.tcs-side .course-payment input[type="submit"]{
	display:flex;align-items:center;justify-content:center;width:100%;min-height:48px;margin:0;padding:0 1.25rem;
	border:0;border-radius:12px;background-color:var(--cs-btn-bg);background-image:var(--cs-btn-grad);
	color:var(--cs-btn-text);font-weight:800;font-size:1rem;box-shadow:none;
	transition:filter .2s ease;
}
.tcs-side .lp-button:hover,
.tcs-side .course-payment .button:hover,
.tcs-side .course-payment button:hover,
.tcs-side .course-payment input[type="submit"]:hover{
	filter:brightness(1.1);color:var(--cs-btn-text);
}

/* ---------- Comments tab (same design as the article comments) ---------- */
/* The tab button already says "نظرات", so the comments' own title is hidden; the count stays. */
.tcs-panel--comments .tfc-title{display:none}
.tcs-panel--comments .tfc-head{margin-bottom:.9rem}

/* ---------- Tablet and phone ---------- */
@media (max-width:991px){
	.tcs-grid{grid-template-columns:1fr}
	.tcs-side{order:-1}
	.tcs-thumb__img{aspect-ratio:16/9}
	.tcs-carousel{--tcs-cols:2}
	.tcs-panel--curriculum .course-item{padding:.6rem .85rem}
}
@media (max-width:575px){
	.tcs-carousel{--tcs-cols:1;--tcs-gap:1rem}
	.tcs-carousel__track > *{flex-basis:86%}
	.tcs-instructor__profile{flex-direction:column;text-align:center}
}

@media (prefers-reduced-motion:reduce){
	.tcs-tabs__btn,.tcs-side .lp-button,.tcs-side .course-payment button,.tcs-card-course,.tcs-card-course__img{transition:none}
	.tcs-card-course:hover{transform:none}
}
