/* Homepage course rails — compact Netflix-like presentation, preserving current brand colors. */
.home-course-section{
  margin:30px 0 34px;
}
.home-course-section .section-head{
  margin-bottom:12px;
  padding-right:2px;
}
.home-course-section .section-head h2{
  font-size:clamp(20px,1.7vw,28px);
  line-height:1.15;
  letter-spacing:-.02em;
}
.home-course-section .section-head a{
  color:#dce9e5;
  font-size:13px;
  font-weight:700;
  opacity:.82;
}
.home-course-section .section-head a:hover{
  opacity:1;
  color:#fff;
}
.home-course-section .rail{
  display:grid;
  grid-auto-flow:column;
  grid-auto-columns:clamp(210px,17vw,250px);
  gap:12px;
  overflow-x:auto;
  overflow-y:visible;
  padding:4px 3px 16px;
  scroll-snap-type:x proximity;
  scroll-padding-inline:3px;
  scrollbar-width:none;
}
.home-course-section .rail::-webkit-scrollbar{display:none}
.home-course-section .product-card{
  min-width:0;
  border-radius:10px;
  overflow:hidden;
  background:linear-gradient(180deg,#0d1310 0%,#080c0a 100%);
  border:1px solid rgba(111,168,154,.20);
  box-shadow:0 12px 30px rgba(0,0,0,.34);
  transform-origin:center bottom;
  transition:transform .2s ease,box-shadow .2s ease,border-color .2s ease;
}
.home-course-section .product-card:hover{
  transform:translateY(-4px) scale(1.015);
  border-color:rgba(158,199,186,.55);
  box-shadow:0 18px 38px rgba(0,0,0,.32);
}
.home-course-section .product-image{
  aspect-ratio:16/9;
  background:#111a17;
}
.home-course-section .product-image img{
  width:100%;
  height:100%;
  object-fit:cover;
}
.home-course-section .product-body{
  min-height:0;
  padding:10px 11px 11px;
  display:flex;
  flex-direction:column;
}
.home-course-section .product-body small{
  font-size:10px;
  font-weight:700;
  color:#bcd0ca;
  letter-spacing:.01em;
}
.home-course-section .product-body h3{
  margin:4px 0 6px;
  min-height:36px;
  font-size:14px;
  line-height:1.26;
  -webkit-line-clamp:2;
}
.home-course-section .product-body p{
  margin:0 0 7px;
  min-height:30px;
  font-size:11px;
  line-height:1.35;
  -webkit-line-clamp:2;
  color:#c4d0cc;
}
.home-course-section .course-meta{
  grid-template-columns:1fr 1fr;
  gap:4px 8px;
  margin:5px 0 7px;
  font-size:9px;
  line-height:1.2;
}
.home-course-section .course-meta span{
  min-width:0;
  overflow:hidden;
  white-space:nowrap;
  text-overflow:ellipsis;
}
.home-course-section .rating{
  margin-top:1px;
  font-size:10px;
}
.home-course-section .rating span{
  font-size:9px;
}
.home-course-section .price-line{
  min-height:27px;
  margin-top:6px;
  gap:7px;
}
.home-course-section .price-line del{
  font-size:10px;
}
.home-course-section .price-line strong{
  font-size:18px;
}
.home-course-section .product-body em{
  margin:2px 0 8px;
  font-size:9px;
}
.home-course-section .card-actions{
  gap:6px;
}
.home-course-section .card-actions .btn,
.home-course-section .card-actions a.btn{
  min-height:34px;
  padding:7px 9px;
  border-radius:8px;
  font-size:12px;
}
.home-course-section .badges{
  top:7px;
  left:7px;
}
.home-course-section .badges span{
  font-size:9px;
  padding:4px 6px;
}

@media (min-width:1400px){
  .home-course-section .rail{
    grid-auto-columns:clamp(220px,16vw,250px);
  }
}

@media (max-width:1100px) and (min-width:901px){
  .home-course-section .rail{
    grid-auto-columns:clamp(205px,22vw,230px);
  }
}

@media (max-width:900px){
  .home-course-section{
    margin:20px 0 24px;
  }
  .home-course-section .section-head{
    margin-bottom:9px;
  }
  .home-course-section .section-head h2{
    font-size:19px;
  }
  .home-course-section .section-head a{
    font-size:11px;
  }
  .home-course-section .rail{
    grid-auto-columns:minmax(132px,36vw);
    gap:8px;
    padding:2px 1px 10px;
  }
  .home-course-section .product-card{
    border-radius:9px;
    box-shadow:0 8px 20px rgba(0,0,0,.2);
  }
  .home-course-section .product-card:hover{
    transform:none;
  }
  .home-course-section .product-body{
    padding:8px;
  }
  .home-course-section .product-body small{
    font-size:9px;
  }
  .home-course-section .product-body h3{
    min-height:30px;
    font-size:12px;
    margin:3px 0 4px;
  }
  .home-course-section .product-body p{
    min-height:26px;
    font-size:10px;
    margin-bottom:5px;
  }
  .home-course-section .course-meta{
    grid-template-columns:1fr;
    gap:2px;
    margin:4px 0 5px;
    font-size:8.5px;
  }
  .home-course-section .course-meta span:nth-child(2),
  .home-course-section .course-meta span:nth-child(4){
    display:none;
  }
  .home-course-section .rating{
    font-size:9px;
  }
  .home-course-section .price-line{
    min-height:24px;
    margin-top:5px;
  }
  .home-course-section .price-line strong{
    font-size:15px;
  }
  .home-course-section .product-body em{
    display:none;
  }
  .home-course-section .card-actions .btn,
  .home-course-section .card-actions a.btn{
    min-height:31px;
    padding:6px 7px;
    font-size:10px;
  }
}

@media (max-width:420px){
  .home-course-section .rail{
    grid-auto-columns:minmax(126px,38vw);
    gap:7px;
  }
  .home-course-section .product-body{
    padding:7px;
  }
  .home-course-section .product-body h3{
    font-size:11px;
    min-height:28px;
  }
  .home-course-section .product-body p{
    font-size:9px;
    min-height:24px;
  }
  .home-course-section .course-meta{
    font-size:8px;
  }
  .home-course-section .price-line strong{
    font-size:14px;
  }
}

/* Netflix-style hover / long-press preview for course cards */
.product-card[data-course-preview-card]{position:relative}
.product-card[data-course-preview-card].preview-active{z-index:5}
.course-hover-preview{
  position:fixed;
  z-index:9998;
  width:360px;
  max-width:calc(100vw - 28px);
  opacity:0;
  visibility:hidden;
  transform:scale(.94);
  transform-origin:center center;
  pointer-events:none;
  border:1px solid rgba(158,199,186,.24);
  border-radius:14px;
  overflow:hidden;
  background:#090d0b;
  box-shadow:0 28px 70px rgba(0,0,0,.58),0 0 0 1px rgba(111,168,154,.05);
  transition:opacity .18s ease,transform .18s ease,visibility .18s ease;
}
.course-hover-preview.show{
  opacity:1;
  visibility:visible;
  transform:scale(1);
  pointer-events:auto;
}
.course-hover-media{
  position:relative;
  aspect-ratio:16/9;
  overflow:hidden;
  background:#050706;
}
.course-hover-fallback,
.course-hover-video,
.course-hover-video video,
.course-hover-video iframe{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
}
.course-hover-fallback{
  background-size:cover;
  background-position:center;
  transition:opacity .2s ease;
}
.course-hover-fallback:after{
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(180deg,rgba(0,0,0,.02),rgba(0,0,0,.34));
}
.course-hover-fallback.hidden{opacity:0}
.course-hover-video video{object-fit:cover;background:#000}
.course-hover-video iframe{border:0;background:#000}
.course-hover-free{
  position:absolute;
  left:12px;
  bottom:10px;
  z-index:4;
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:6px 9px;
  border-radius:999px;
  background:#6FA89A;
  color:#07100d;
  font-size:11px;
  font-weight:800;
  box-shadow:0 8px 22px rgba(0,0,0,.22);
}
.course-hover-close{
  position:absolute;
  z-index:5;
  top:9px;
  right:9px;
  width:32px;
  height:32px;
  border:1px solid rgba(255,255,255,.14);
  border-radius:50%;
  background:rgba(0,0,0,.66);
  color:#fff;
  display:grid;
  place-items:center;
  cursor:pointer;
}
.course-hover-body{padding:12px 13px 14px}
.course-hover-actions{display:flex;align-items:center;gap:8px;margin-bottom:10px}
.course-hover-play{
  width:38px;
  height:38px;
  display:grid;
  place-items:center;
  border:0;
  border-radius:50%;
  background:#fff;
  color:#050706;
  cursor:pointer;
  font-size:20px;
}
.course-hover-details{
  min-height:36px;
  padding:0 11px;
  display:inline-flex;
  align-items:center;
  gap:6px;
  border:1px solid #294037;
  border-radius:9px;
  background:#101713;
  color:#fff;
  font-size:12px;
  font-weight:700;
}
.course-hover-title{
  display:block;
  font-size:16px;
  line-height:1.25;
  color:#fff;
  margin-bottom:5px;
}
.course-hover-meta{display:flex;gap:8px;flex-wrap:wrap;font-size:11px;color:#9EC7BA;margin-bottom:6px}
.course-hover-meta span+span:before{content:"•";margin-right:8px;color:#5e746b}
.course-hover-desc{
  margin:0;
  color:#a9bbb4;
  font-size:12px;
  line-height:1.4;
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
}
@media (min-width:901px){
  .home-course-section .product-card[data-course-preview-card]{transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease}
  .home-course-section .product-card[data-course-preview-card]:hover{transform:translateY(-3px) scale(1.012)}
}
@media (max-width:900px){
  .course-hover-preview.mobile-preview{
    width:auto;
    max-width:none;
    max-height:calc(100dvh - 110px);
    overflow:auto;
    border-radius:16px;
    transform:translateY(-50%) scale(.96)!important;
  }
  .course-hover-preview.mobile-preview.show{transform:translateY(-50%) scale(1)!important}
  .course-hover-media{aspect-ratio:16/9}
  .course-hover-body{padding:11px 12px 13px}
  .course-hover-title{font-size:15px}
  .course-hover-desc{font-size:11px}
  .course-hover-close{width:36px;height:36px}
}
@media (max-width:420px){
  .course-hover-preview.mobile-preview{left:8px!important;right:8px!important}
  .course-hover-body{padding:10px}
  .course-hover-free{left:9px;bottom:8px;font-size:10px;padding:5px 7px}
}
