/* Preview homepage live feeds. Product cards mirror the Django storefront geometry. */
.tp-home-live-feed { min-width: 0; min-height: 5rem; }
.tp-home-live-feed-loading { margin: 0; padding: var(--tp-space-lg); border: 1px dashed var(--tp-color-border); border-radius: var(--tp-radius-card); color: var(--tp-color-text-secondary); text-align: center; }
.tp-home-live-feed-empty { padding: var(--tp-space-lg); border: 1px solid var(--tp-color-border); border-inline-start: 3px solid var(--tp-color-brand); border-radius: var(--tp-radius-card); background: var(--tp-color-surface); }
.tp-home-live-feed-empty strong { display: block; margin-bottom: 6px; }
.tp-home-live-feed-empty p { margin: 0 0 var(--tp-space-sm); color: var(--tp-color-text-secondary); line-height: 1.9; }
.tp-home-live-feed-empty.is-error { border-inline-start-color: var(--tp-color-danger); }
.tp-judo-news-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--tp-space-md); }
.tp-judo-news-item { min-width: 0; padding: var(--tp-space-md); border: 1px solid var(--tp-color-border); border-inline-start: 3px solid var(--tp-color-belt-black, var(--tp-color-brand)); border-radius: var(--tp-radius-card); background: var(--tp-color-surface); }
.tp-judo-news-item a { color: var(--tp-color-text-primary); font-weight: 800; line-height: 1.8; text-decoration: none; }
.tp-judo-news-item a:hover { color: var(--tp-color-brand); }
.tp-judo-news-item p { margin: var(--tp-space-xs) 0; line-height: 1.8; }
.tp-judo-news-item time { display: block; margin-top: var(--tp-space-sm); }
.tp-home-live-feed .tp-coaches { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--tp-space-md); list-style: none; margin: 0; padding: 0; align-items: stretch; }
.tp-home-live-feed .tp-coaches > li { display: flex; min-width: 0; }
.tp-home-live-feed .tp-coach-card { display: flex; width: 100%; min-width: 0; flex-direction: column; }
.tp-home-live-feed .tp-coach-card-copy { display: flex; flex: 1; min-width: 0; flex-direction: column; gap: var(--tp-space-xs); }
.tp-home-live-feed .tp-coach-card-copy .btn { align-self: flex-start; margin-top: auto; }
.tp-home-live-feed.is-courses .tp-course-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--tp-space-md); }
.tp-home-live-feed.is-courses .tp-course-card { min-width: 0; }
.tp-home-live-feed.is-blog .tp-home-blog-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--tp-space-md); }
.tp-home-live-feed.is-blog .tp-home-blog-list > a { display: block; min-width: 0; padding: var(--tp-space-md); border: 1px solid var(--tp-color-border); border-radius: var(--tp-radius-card); background: var(--tp-color-surface); color: inherit; text-decoration: none; }
.tp-home-live-feed.is-blog .tp-home-blog-list > a:hover { border-color: var(--tp-color-brand); background: var(--tp-color-surface-hover); }
/* Product cards mirror the real Django storefront card geometry and breakpoints. */
.tp-home-live-feed.is-products .tp-product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); align-items: stretch; }
.tp-home-live-feed.is-products .tp-product-card { display: flex; min-width: 0; flex-direction: column; overflow: hidden; }
.tp-home-live-feed.is-products .tp-product-card > a { display: block; }
.tp-home-live-feed.is-products .tp-product-card .ph { aspect-ratio: 4 / 3; border-radius: 0; }
.tp-home-live-feed.is-products .tp-product-card .b { display: flex; flex: 1; flex-direction: column; gap: var(--tp-space-2xs); }
.tp-home-live-feed.is-products .tp-product-card h3 { overflow-wrap: anywhere; line-height: 1.75; }
.tp-home-live-feed.is-products .tp-product-card .tp-price { margin-top: auto; padding-top: var(--tp-space-sm); }
.tp-home-live-feed.is-products .tp-product-card .pa { margin-top: var(--tp-space-sm); }
.tp-home-live-feed.is-products .tp-product-card .tp-product-stock { display: inline-flex; align-self: flex-start; align-items: center; min-height: 24px; padding: 1px var(--tp-space-xs); border: 1px solid transparent; border-radius: var(--tp-radius-badge); font-size: var(--tp-font-size-xs); font-weight: var(--tp-font-weight-bold, 700); }
.tp-home-live-feed.is-products .tp-product-card .tp-product-stock--available { color: var(--tp-color-success); background: var(--tp-color-success-soft); border-color: var(--tp-color-success); }
.tp-home-live-feed.is-products .tp-product-card .tp-product-stock--unavailable { color: var(--tp-color-danger); background: var(--tp-color-danger-tint); border-color: var(--tp-color-danger); }
.tp-home-live-feed.is-products .tp-product-card .tp-product-stock--unregistered { color: var(--tp-color-text-secondary); background: var(--tp-color-neutral-tint); border-color: var(--tp-color-border); }
.tp-home-live-feed.is-products .tp-product-card .tp-product-no-price { padding-top: var(--tp-space-sm); color: var(--tp-color-text-secondary); font-size: var(--tp-font-size-sm); }
.tp-home-live-feed.is-products .tp-product-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: stretch; gap: var(--tp-space-md); }
.tp-home-live-feed.is-products .tp-product-card { height: 100%; border: 1px solid var(--tp-color-border); border-radius: var(--tp-radius-card); background: var(--tp-color-surface); transition: transform var(--tp-motion-fast), border-color var(--tp-motion-fast), background var(--tp-motion-fast); }
.tp-home-live-feed.is-products .tp-product-card:hover { transform: translateY(-3px); border-color: var(--tp-color-brand); background: var(--tp-color-surface-hover); }
.tp-home-live-feed.is-products .tp-product-card:focus-within { border-color: var(--tp-color-brand); }
.tp-home-live-feed.is-products .tp-product-card-media { display: block; overflow: hidden; background: var(--tp-color-neutral-tint); }
.tp-home-live-feed.is-products .tp-product-card-media .ph { width: 100%; aspect-ratio: 4 / 3; border-radius: 0; background: linear-gradient(145deg, var(--tp-color-surface-raised), var(--tp-color-neutral-tint)); }
.tp-home-live-feed.is-products .tp-product-card-media .ph img { object-fit: contain; object-position: center; padding: var(--tp-space-sm); transition: transform var(--tp-motion-base); }
.tp-home-live-feed.is-products .tp-product-card:hover .tp-product-card-media .ph img { transform: scale(1.035); }
.tp-home-live-feed.is-products .tp-product-card .tp-product-card-category { margin: 0; color: var(--tp-color-brand-text); font-size: var(--tp-font-size-xs); font-weight: var(--tp-font-weight-bold); }
.tp-home-live-feed.is-products .tp-product-card .b { display: flex; flex: 1 1 auto; min-width: 0; flex-direction: column; gap: var(--tp-space-xs); padding: var(--tp-space-md); }
.tp-home-live-feed.is-products .tp-product-card h3 { display: -webkit-box; min-height: 3.5em; margin: 0; overflow: hidden; overflow-wrap: anywhere; -webkit-box-orient: vertical; -webkit-line-clamp: 2; font-size: var(--tp-font-size-base); line-height: 1.75; }
.tp-home-live-feed.is-products .tp-product-card .tp-product-level { min-height: 1.5em; margin: 0; font-size: var(--tp-font-size-xs); }
.tp-home-live-feed.is-products .tp-product-card .tp-product-stock { min-height: 26px; padding: 2px var(--tp-space-xs); line-height: 1.5; }
.tp-home-live-feed.is-products .tp-product-card .tp-price { margin-top: auto; padding-top: var(--tp-space-sm); color: var(--tp-color-text-primary); font-size: var(--tp-font-size-lg); font-weight: 900; font-variant-numeric: tabular-nums; }
.tp-home-live-feed.is-products .tp-product-card .tp-product-no-price { margin-top: auto; padding-top: var(--tp-space-sm); color: var(--tp-color-text-secondary); font-size: var(--tp-font-size-sm); }
.tp-home-live-feed.is-products .tp-product-card .pa { margin-top: var(--tp-space-xs); }
.tp-home-live-feed.is-products .tp-product-card .pa .btn { display: inline-flex; width: 100%; min-height: 44px; align-items: center; justify-content: center; text-align: center; }
@media (max-width: 1100px) { .tp-home-live-feed.is-products .tp-product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 900px) { .tp-home-live-feed.is-products .tp-product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .tp-home-live-feed .tp-coaches, .tp-home-live-feed.is-courses .tp-course-grid, .tp-home-live-feed.is-blog .tp-home-blog-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 680px) { .tp-home-live-feed.is-products .tp-product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--tp-space-sm); } .tp-home-live-feed.is-products .tp-product-card .b { padding: var(--tp-space-sm); } .tp-home-live-feed.is-products .tp-product-card h3 { min-height: 3.2em; font-size: var(--tp-font-size-sm); } .tp-home-live-feed.is-products .tp-product-card .tp-price { font-size: var(--tp-font-size-base); } }
@media (max-width: 560px) { .tp-home-live-feed .tp-coaches { grid-template-columns: minmax(0, 1fr); } .tp-home-live-feed .tp-coach-card { display: grid; grid-template-columns: minmax(92px, 34%) minmax(0, 1fr); align-items: stretch; } .tp-home-live-feed .tp-coach-card > a:first-child .ph { height: 100%; min-height: 130px; aspect-ratio: auto; } .tp-home-live-feed .tp-coach-card-copy { padding: var(--tp-space-sm); } }
@media (max-width: 560px) { .tp-home-live-feed.is-courses .tp-course-grid, .tp-home-live-feed.is-blog .tp-home-blog-list { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 560px) { .tp-judo-news-list { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 380px) { .tp-home-live-feed.is-products .tp-product-grid { grid-template-columns: minmax(0, 1fr); } .tp-home-live-feed.is-products .tp-product-card .b { padding: var(--tp-space-md); } .tp-home-live-feed.is-products .tp-product-card h3 { min-height: 0; font-size: var(--tp-font-size-base); } }
@media (prefers-reduced-motion: reduce) { .tp-home-live-feed.is-products .tp-product-card, .tp-home-live-feed.is-products .tp-product-card-media .ph img { transition: none; } .tp-home-live-feed .tp-coach-card, .tp-home-live-feed .tp-coach-card-media .ph img { transition: none; } .tp-home-live-feed * { scroll-behavior: auto !important; } }

/* Keep the homepage coach directory in one browsable row at every width. */
.tp-home-live-feed.is-coaches .tp-coaches,
.tp-home-feed.is-coaches .tp-coaches { display:grid; grid-auto-flow:column; grid-auto-columns:minmax(15rem, calc((100% - 2 * var(--tp-space-md)) / 3)); grid-template-columns:none; gap:var(--tp-space-md); overflow-x:auto; overscroll-behavior-inline:contain; scroll-snap-type:x mandatory; scrollbar-color:var(--tp-color-brand) var(--tp-color-surface); scrollbar-width:thin; padding:0 0 var(--tp-space-sm); }
.tp-home-live-feed.is-coaches .tp-coaches>li,
.tp-home-feed.is-coaches .tp-coaches>li { min-width:0; scroll-snap-align:start; }
.tp-home-live-feed.is-coaches .tp-coaches>li>.tp-coach-card,
.tp-home-feed.is-coaches .tp-coaches>li>.tp-coach-card { min-width:0; }
@media (max-width:900px) { .tp-home-live-feed.is-coaches .tp-coaches, .tp-home-feed.is-coaches .tp-coaches { grid-auto-columns:minmax(15rem, calc((100% - var(--tp-space-md)) / 2)); } }
@media (max-width:560px) { .tp-home-live-feed.is-coaches .tp-coaches, .tp-home-feed.is-coaches .tp-coaches { grid-auto-columns:minmax(16rem, 86%); } .tp-home-live-feed.is-coaches .tp-coach-card, .tp-home-feed.is-coaches .tp-coach-card { display:grid; grid-template-columns:minmax(92px,34%) minmax(0,1fr); align-items:stretch; } .tp-home-live-feed.is-coaches .tp-coach-card> a:first-child .ph, .tp-home-feed.is-coaches .tp-coach-card> a:first-child .ph { height:100%; min-height:130px; aspect-ratio:auto; } .tp-home-live-feed.is-coaches .tp-coach-card-copy, .tp-home-feed.is-coaches .tp-coach-card-copy { padding:var(--tp-space-sm); } }

/* Editorial covers for live Django blog entries, using each article's own text. */
.tp-home-live-feed.is-blog .tp-home-blog-list,
.tp-home-feed.is-blog .tp-home-blog-list { grid-template-columns:repeat(3,minmax(0,1fr)); gap:var(--tp-space-md); }
.tp-home-live-feed.is-blog .tp-home-blog-list>a,
.tp-home-feed.is-blog .tp-home-blog-list>a { position:relative; display:flex; min-height:15rem; flex-direction:column; justify-content:flex-end; overflow:hidden; padding:8.5rem var(--tp-space-lg) var(--tp-space-lg); border:1px solid var(--tp-color-border); border-radius:var(--tp-radius-card); background:linear-gradient(160deg,rgba(39,85,217,.12),transparent 55%),var(--tp-color-surface); isolation:isolate; transition:border-color var(--tp-motion-fast),transform var(--tp-motion-fast),background var(--tp-motion-fast); }
.tp-home-live-feed.is-blog .tp-home-blog-list>a::before,
.tp-home-feed.is-blog .tp-home-blog-list>a::before { position:absolute; z-index:-1; inset:0 0 auto; height:8rem; content:""; background:radial-gradient(ellipse at 70% 25%,rgba(126,165,255,.4),transparent 34%),linear-gradient(125deg,transparent 38%,rgba(39,85,217,.42) 38% 54%,transparent 54%),repeating-linear-gradient(145deg,transparent 0 18px,rgba(245,247,250,.045) 19px 20px),linear-gradient(120deg,#101722,#202a3b); }
.tp-home-live-feed.is-blog .tp-home-blog-list>a::after,
.tp-home-feed.is-blog .tp-home-blog-list>a::after { position:absolute; inset-block-start:var(--tp-space-md); inset-inline-start:var(--tp-space-md); content:"یادداشت جودو"; padding:4px 10px; border:1px solid rgba(126,165,255,.45); border-radius:999px; background:rgba(10,10,11,.55); color:#cbd9ff; font-size:var(--tp-font-size-xs); }
.tp-home-live-feed.is-blog .tp-home-blog-list>a>b,
.tp-home-feed.is-blog .tp-home-blog-list>a>b { font-size:var(--tp-font-size-lg); line-height:1.8; }
.tp-home-live-feed.is-blog .tp-home-blog-list>a>span,
.tp-home-feed.is-blog .tp-home-blog-list>a>span { margin-top:var(--tp-space-xs); color:var(--tp-color-text-secondary); line-height:1.8; }
.tp-home-live-feed.is-blog .tp-home-blog-list>a:hover,
.tp-home-feed.is-blog .tp-home-blog-list>a:hover { transform:translateY(-3px); border-color:var(--tp-color-brand-light); background-color:var(--tp-color-surface-hover); }
.tp-home-live-feed.is-blog .tp-home-blog-list>a:focus-visible,
.tp-home-feed.is-blog .tp-home-blog-list>a:focus-visible { outline:3px solid var(--tp-color-brand-light); outline-offset:3px; }
@media(max-width:900px) { .tp-home-live-feed.is-blog .tp-home-blog-list,.tp-home-feed.is-blog .tp-home-blog-list { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:560px) { .tp-home-live-feed.is-blog .tp-home-blog-list,.tp-home-feed.is-blog .tp-home-blog-list { grid-template-columns:minmax(0,1fr); } }

/* Give the three judo diagrams a deliberate cover treatment. */
.tp-technique-visual { background:#111722; }
.tp-technique-visual::after { position:absolute; inset:40% 0 0; content:""; pointer-events:none; background:linear-gradient(180deg,transparent,rgba(10,10,11,.72)); }
.tp-technique-visual img { transition:transform var(--tp-motion-base),filter var(--tp-motion-base); }
.tp-technique-card:hover .tp-technique-visual img { transform:scale(1.035); filter:saturate(1.12); }
.tp-technique-visual-label { z-index:1; border-color:rgba(126,165,255,.4); background:rgba(10,10,11,.68); color:#f5f7fa; }
@media(prefers-reduced-motion:reduce) { .tp-home-live-feed.is-blog .tp-home-blog-list>a,.tp-technique-visual img { transition:none; } .tp-home-live-feed.is-blog .tp-home-blog-list>a:hover,.tp-technique-card:hover .tp-technique-visual img { transform:none; } }
