/* HomeV2 (Index): светлая тема, без глобальных правок layout */

.home-v2{
  --home-v2-bg: #f7f9fc;
  --home-v2-elev: #ffffff;
  --home-v2-panel: #f1f5f9;
  --home-v2-border: rgba(15,23,42,.10);
  --home-v2-text: #0f172a;
  --home-v2-muted: #475569;
  --home-v2-accent: #3b82f6;
  --home-v2-accent2: #8b5cf6;

  font-family: Arial, Helvetica, sans-serif;
  color: var(--home-v2-text);
  background: var(--home-v2-bg);
  min-height: 100%;
}

.home-v2__container{
  max-width: 1200px;
  margin: 0 auto;
  padding: 18px 16px 48px;
}

.home-v2__hero{
  border-radius: 20px;
  padding: 22px 18px;
  background: linear-gradient(145deg, rgba(59,130,246,.10), rgba(139,92,246,.08)), var(--home-v2-elev);
  border: 1px solid var(--home-v2-border);
  box-shadow: 0 12px 34px rgba(15,23,42,.10);
}

.home-v2__h1{
  font-size: clamp(24px, 3.6vw, 36px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0;
  font-weight: 800;
}
.home-v2__lead{
  margin: 10px 0 0;
  color: var(--home-v2-muted);
  font-size: 15px;
  line-height: 1.55;
}

.home-v2__hero-actions{
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.home-v2__btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 11px 16px;
  border-radius: 14px;
  text-decoration: none;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  border: 1px solid var(--home-v2-border);
  background: rgba(255,255,255,.92);
  color: var(--home-v2-text);
  transition: transform .12s ease, filter .12s ease, background .12s ease;
  cursor: pointer;
}
.home-v2__btn:hover{ transform: translateY(-1px); background: #ffffff; filter: brightness(1.02); }
.home-v2__btn:active{ transform: scale(.98); }

.home-v2__btn--primary{
  border-color: rgba(139,92,246,.35);
  background: linear-gradient(180deg, rgba(139,92,246,.18), rgba(139,92,246,.08));
}
.home-v2__btn--secondary{
  border-color: rgba(59,130,246,.30);
  background: linear-gradient(180deg, rgba(59,130,246,.14), rgba(59,130,246,.06));
}

.home-v2__stats{
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
@media (max-width: 600px){
  .home-v2__stats{ grid-template-columns: 1fr; }
}
.home-v2__stat{
  border-radius: 16px;
  border: 1px solid var(--home-v2-border);
  background: rgba(15,23,42,.04);
  padding: 12px 14px;
  min-width: 0;
}
.home-v2__stat-k{ color: var(--home-v2-muted); font-weight: 650; font-size: 13px; }
.home-v2__stat-v{ margin-top: 6px; font-size: 20px; font-weight: 800; letter-spacing: -0.01em; }
.home-v2__stat-sep{ margin: 0 6px; color: rgba(15,23,42,.25); font-weight: 900; }

.home-v2__section{
  margin-top: 22px;
}
.home-v2__section-head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:12px;
  margin-bottom:12px;
}
.home-v2__h2{
  margin:0;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.home-v2__muted{
  color: var(--home-v2-muted);
  font-size: 13px;
  line-height: 1.4;
}
.home-v2__muted a{ color: var(--home-v2-accent); }
.home-v2__headlink{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--home-v2-border);
  background: rgba(255,255,255,.92);
  color: var(--home-v2-text);
  text-decoration: none;
  font-weight: 800;
  font-size: 13px;
  white-space: nowrap;
}
.home-v2__headlink:hover{ background: #ffffff; filter: brightness(1.02); }
.home-v2__headlink:active{ transform: scale(.99); }

/* Горизонтальная лента: без видимого скроллбара, колесо мыши — в home-v2.js */
.home-v2__rail{
  display:flex;
  gap:14px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x proximity;
  padding: 4px 2px 8px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  cursor: grab;
}
.home-v2__rail.is-dragging{ cursor: grabbing; }
.home-v2__rail::-webkit-scrollbar{
  display: none;
  height: 0;
  width: 0;
}

.home-v2__dots{
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
  user-select: none;
}
.home-v2__dot{
  width: 8px;
  height: 8px;
  border-radius: 999px;
  border: 1px solid rgba(15,23,42,.18);
  background: rgba(15,23,42,.08);
  cursor: pointer;
  padding: 0;
}
.home-v2__dot:hover{ background: rgba(15,23,42,.14); }
.home-v2__dot.is-active{
  width: 22px;
  background: rgba(59,130,246,.85);
  border-color: rgba(59,130,246,.65);
}
@media (max-width: 600px){
  .home-v2__dots{ margin-top: 10px; }
  .home-v2__dot{ width: 9px; height: 9px; }
  .home-v2__dot.is-active{ width: 26px; }
}

.home-v2__card{
  scroll-snap-align: start;
  flex: 0 0 300px;
  border-radius: 18px;
  border: 1px solid var(--home-v2-border);
  background: var(--home-v2-elev);
  box-shadow: 0 10px 28px rgba(15,23,42,.10);
  transition: box-shadow .14s ease, transform .14s ease, border-color .14s ease;
  overflow: hidden;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.home-v2__card:hover{
  border-color: rgba(59,130,246,.22);
  box-shadow: 0 16px 38px rgba(15,23,42,.14);
  transform: translateY(-1px);
}
.home-v2__card--inst{
  flex: 0 0 min(336px, 92vw);
}

.home-v2__card-img{
  height: 160px;
  background: rgba(15,23,42,.06);
}
.home-v2__card--inst .home-v2__card-img{
  height: auto;
  aspect-ratio: 4 / 3;
}
.home-v2__card-img img{
  width:100%;
  height:100%;
  object-fit: cover;
  display:block;
}

/* Mobile: показываем по 1 карточке на экран */
@media (max-width: 600px){
  .home-v2__rail{
    scroll-snap-type: x mandatory;
    margin-left: -16px;
    margin-right: -16px;
    padding-left: 16px;
    padding-right: 16px;
    padding-top: 4px;
    padding-bottom: 10px;
    gap: 12px;
    scroll-padding-left: 16px;
    scroll-padding-right: 16px;
  }
  .home-v2__card{
    flex: 0 0 calc(100% - 0px);
  }
  .home-v2__card--inst{
    flex: 0 0 calc(100% - 0px);
  }
}

.home-v2__card-body{
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.home-v2__inst-label{
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--home-v2-muted);
}
.home-v2__card-title{
  font-weight: 800;
  line-height: 1.22;
  margin:0;
  font-size: 18px;
  letter-spacing: -0.01em;
}
.home-v2__inst-title{
  display: flex;
  align-items: center;
  gap: 10px;
}
.home-v2__avatar{
  width: 34px;
  height: 34px;
  border-radius: 999px;
  object-fit: cover;
  border: 1px solid rgba(15,23,42,.12);
  background: rgba(15,23,42,.06);
  flex: 0 0 auto;
}

.home-v2__school-meta{
  font-size: 14px;
  color: var(--home-v2-muted);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.home-v2__school-meta i{
  margin-right: 6px;
  color: var(--home-v2-accent);
}

.home-v2__rate-row{
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.home-v2__rate-row canvas.rates{
  flex: 0 0 auto;
}
.home-v2__reviews{
  font-size: 15px;
  color: var(--home-v2-muted);
  text-decoration: none;
}
.home-v2__reviews:hover{ text-decoration: underline; }

.home-v2__card-footer{
  margin-top: auto;
  padding-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.home-v2__rate-stack{
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.home-v2__rate-top{
  display: flex;
  align-items: center;
  gap: 12px;
}

.home-v2__rating-num{
  font-weight: 900;
  font-size: 50px; /* ~2x of 25px star height */
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--home-v2-text);
  min-width: 72px;
}

.home-v2__rate-top canvas.rates{
  transform: scale(1.4);
  transform-origin: left center;
}

.home-v2__price{
  font-size: 16px;
  font-weight: 700;
  color: var(--home-v2-text);
}

.home-v2__trans{
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.home-v2__trans-pill{
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid var(--home-v2-border);
  background: rgba(255,255,255,.04);
  color: var(--home-v2-muted);
}

.home-v2__addr-list{
  font-size: 12px;
  color: var(--home-v2-muted);
  line-height: 1.35;
  max-height: 4.2em;
  overflow: hidden;
}
.home-v2__addr-line{
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.home-v2__addr-line i{ margin-right: 4px; color: var(--home-v2-accent); }

.home-v2__week-label{
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--home-v2-muted);
  margin-top: 4px;
}
.home-v2__week{
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 4px;
}
.home-v2__week-row{
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 10px;
  border: 1px solid var(--home-v2-border);
  font-size: 12px;
  color: var(--home-v2-muted);
}
.home-v2__week-row strong{
  font-size: 12px;
  color: var(--home-v2-text);
  font-weight: 700;
}
.home-v2__week-empty{
  font-size: 12px;
  color: var(--home-v2-muted);
  padding: 6px 0;
}

.home-v2__card-cta{
  display: block;
  text-align: center;
  margin-top: 6px;
  padding: 10px 12px;
  border-radius: 12px;
  font-weight: 800;
  font-size: 14px;
  text-decoration: none;
  color: #fff;
  background: linear-gradient(180deg, rgba(59,130,246,.9), rgba(37,99,235,.85));
  border: 1px solid rgba(59,130,246,.5);
}
.home-v2__card-cta:hover{
  filter: none;
  background: linear-gradient(180deg, rgba(59,130,246,.98), rgba(37,99,235,.92));
  box-shadow: 0 10px 22px rgba(37,99,235,.20);
}

.home-v2__card-actions{
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: auto;
  padding-top: 4px;
}
.home-v2__btn-mini{
  display: block;
  text-align: center;
  padding: 9px 10px;
  border-radius: 11px;
  font-weight: 700;
  font-size: 13px;
  text-decoration: none;
  color: var(--home-v2-text);
  border: 1px solid var(--home-v2-border);
  background: rgba(255,255,255,.05);
}
.home-v2__btn-mini:hover{ background: rgba(255,255,255,.09); }
.home-v2__btn-mini--accent{
  border-color: rgba(34,197,94,.45);
  background: linear-gradient(180deg, rgba(34,197,94,.2), rgba(22,163,74,.12));
}

.home-v2__skeleton{
  border-radius: 18px;
  border: 1px solid var(--home-v2-border);
  background: linear-gradient(90deg, rgba(255,255,255,.04), rgba(255,255,255,.09), rgba(255,255,255,.04));
  background-size: 200% 100%;
  animation: home-v2-shimmer 1.2s ease-in-out infinite;
  height: 240px;
  flex: 0 0 300px;
}
@keyframes home-v2-shimmer{
  0%{ background-position: 200% 0; }
  100%{ background-position: -200% 0; }
}

.home-v2__seo{
  margin-top: 22px;
  border-radius: 20px;
  padding: 16px 16px;
  border: 1px solid var(--home-v2-border);
  background: var(--home-v2-elev);
}
.home-v2__seo p{ margin: 0 0 10px; line-height: 1.6; color: var(--home-v2-muted); }
.home-v2__seo ul{ margin: 0; padding-left: 18px; color: var(--home-v2-muted); }
.home-v2__seo a{ color: var(--home-v2-accent); }
.home-v2__seo li{ margin: 6px 0; line-height: 1.5; }

/* Роли пользователей */
.home-v2__roles{
  margin-top: 28px;
  padding-top: 8px;
  border-top: 1px solid var(--home-v2-border);
}
.home-v2__roles > h2{
  margin: 0 0 12px;
  font-size: 20px;
  font-weight: 800;
}
.home-v2__roles-label{
  margin: 0 0 10px;
  color: var(--home-v2-muted);
  font-size: 15px;
  line-height: 1.4;
  font-weight: 750;
}
.home-v2__rolechips{
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.home-v2__rolechips li{
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--home-v2-border);
  background: rgba(255,255,255,.92);
  color: var(--home-v2-text);
  font-size: 14px;
  font-weight: 850;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.home-v2__reglinks{
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}
.home-v2__reglinks a{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid var(--home-v2-border);
  background: rgba(255,255,255,.92);
  color: var(--home-v2-text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
}
.home-v2__reglinks a img{ width: 28px; height: 28px; }
.home-v2__reglinks a:hover{ background: #ffffff; }

.home-v2__details{
  border: 1px solid var(--home-v2-border);
  border-radius: 14px;
  margin-bottom: 10px;
  background: rgba(255,255,255,.92);
  overflow: hidden;
  box-shadow: 0 10px 26px rgba(15,23,42,.06);
  transition: box-shadow .15s ease, border-color .15s ease, transform .15s ease;
}
.home-v2__details:hover{
  border-color: rgba(59,130,246,.20);
  box-shadow: 0 14px 34px rgba(15,23,42,.09);
}
.home-v2__details summary{
  cursor: pointer;
  padding: 12px 14px;
  font-weight: 800;
  font-size: 16px;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  user-select: none;
  background: rgba(15,23,42,.03);
}
.home-v2__details summary::-webkit-details-marker{ display: none; }
.home-v2__details summary::after{
  content: "";
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  border-radius: 999px;
  border: 1px solid rgba(59,130,246,.35);
  background-color: rgba(59,130,246,.12);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'%3E%3Cpath d='M5 8l5 5 5-5' fill='none' stroke='%231d4ed8' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  box-shadow: 0 10px 22px rgba(29,78,216,.14);
  transform: rotate(0deg);
  transition: transform .14s ease, filter .14s ease, background-color .14s ease, border-color .14s ease;
}
.home-v2__details summary:hover::after{ filter: brightness(0.9); }
.home-v2__details[open] summary{
  border-bottom: 1px solid var(--home-v2-border);
  background: rgba(59,130,246,.06);
}
.home-v2__details[open] summary::after{
  transform: rotate(180deg);
}
.home-v2__details-body{
  padding: 12px 14px 16px;
  font-size: 15px;
  line-height: 1.55;
  color: var(--home-v2-muted);
  background: rgba(255,255,255,.92);
}
.home-v2__details-body ul{ margin: 8px 0; padding-left: 18px; }
.home-v2__details-body a{ color: var(--home-v2-accent); }
.home-v2__details-foot{
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-top: 1px solid var(--home-v2-border);
  background: rgba(15,23,42,.02);
  font-size: 13px;
  font-weight: 700;
  color: var(--home-v2-text);
}
.home-v2__details-foot img{ width: 36px; height: 36px; }

/* CTA "Подробнее..." blocks (Index) */
.home-v2__deep-link-row{margin:14px 0 34px}
.home-v2__deep-link,.home-v2__deep-link:visited{display:inline-flex;align-items:center;gap:10px;padding:12px 16px;border-radius:16px;text-decoration:none;border:1px solid rgba(59,130,246,.12);background:linear-gradient(135deg,#3b82f6 0%,#8b5cf6 100%);color:#fff;box-shadow:0 16px 34px rgba(59,130,246,.25),0 10px 22px rgba(15,23,42,.12);transition:transform .14s ease,box-shadow .14s ease,filter .14s ease}
.home-v2__deep-link:hover{transform:translateY(-1px);filter:brightness(1.03);box-shadow:0 18px 40px rgba(59,130,246,.30),0 12px 26px rgba(15,23,42,.14)}
.home-v2__deep-link:active{transform:scale(.99)}
.home-v2__deep-link i{color:rgba(255,255,255,.95);font-size:18px}
.home-v2__deep-link span{font-weight:800;letter-spacing:-.01em;color:#fff;text-shadow:0 1px 1px rgba(15,23,42,.18)}
.home-v2__deep-link .home-v2__deep-link-arrow{margin-left:2px;color:rgba(255,255,255,.92);transition:transform .14s ease,opacity .14s ease}
.home-v2__deep-link:hover .home-v2__deep-link-arrow{transform:translateX(3px);opacity:1}

/* Landing "find your school" info panel */
.landing-lookup{margin-top:14px;border:0;padding:0;overflow:hidden}
.landing-lookup__head{display:flex;align-items:flex-start;gap:12px;padding:0}
.landing-lookup__icon{width:40px;height:40px;border-radius:14px;display:flex;align-items:center;justify-content:center;background:linear-gradient(135deg,#3b82f6 0%,#8b5cf6 100%);color:#fff;box-shadow:0 10px 24px rgba(59,130,246,.22);flex-shrink:0}
.landing-lookup__title{font-weight:900;letter-spacing:-.01em}
.landing-lookup__sub{color:rgba(15,23,42,.62);font-size:13px;margin-top:2px}
.landing-lookup__body{padding:0}
.landing-lookup__form{display:flex;flex-wrap:nowrap;gap:10px;margin-top:10px}
.landing-lookup__input{flex:1;min-width:240px;padding:12px 14px;border-radius:14px;border:1px solid rgba(15,23,42,.12);background:#fff;outline:none}
.landing-lookup__input:focus{border-color:rgba(59,130,246,.45);box-shadow:0 0 0 3px rgba(59,130,246,.14)}
.landing-lookup__btn{display:inline-flex;align-items:center;gap:10px;padding:12px 14px;border-radius:14px;border:0;background:linear-gradient(135deg,#3b82f6 0%,#8b5cf6 100%);color:#fff;font-weight:900;cursor:pointer;box-shadow:0 12px 26px rgba(59,130,246,.25);font-family:Arial,Helvetica,sans-serif;text-decoration:none;user-select:none}
.landing-lookup__btn[aria-disabled="true"]{opacity:.75;cursor:not-allowed;pointer-events:none}
.landing-lookup__btn-text{display:inline}
@media (max-width:420px){.landing-lookup__btn-text{display:none}.landing-lookup__input{min-width:0}}
.landing-lookup__hint{display:none;margin-top:10px;padding:10px 12px;border-radius:14px;font-size:13px;border:1px solid rgba(59,130,246,.18);background:rgba(59,130,246,.08);color:rgba(15,23,42,.74)}
.landing-lookup__hint[data-type="error"]{border-color:rgba(239,68,68,.25);background:rgba(239,68,68,.08)}
.landing-lookup__list{margin-top:12px;display:flex;flex-direction:column;gap:10px}
.landing-lookup__item{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px;padding:12px 12px;border-radius:16px;border:1px solid rgba(15,23,42,.10);background:rgba(255,255,255,.92)}
.landing-lookup__main{min-width:240px}
.landing-lookup__title{font-weight:900}
.landing-lookup__meta{margin-top:2px;color:rgba(15,23,42,.62);font-size:12px}
.landing-lookup__cta{text-align:right}
.landing-lookup__question{color:rgba(15,23,42,.78);font-size:14px;font-weight:900;margin-bottom:8px}
.landing-lookup__link{display:inline-flex;align-items:center;gap:8px;text-decoration:none;font-weight:900;color:#2563eb}
.landing-lookup__link:hover{text-decoration:underline}
.landing-lookup__stickers{margin-top:6px;display:flex;flex-wrap:wrap;gap:6px}
.landing-lookup__sticker{display:inline-flex;align-items:center;gap:6px;padding:4px 8px;border-radius:999px;border:1px solid rgba(15,23,42,.10);background:rgba(15,23,42,.04);color:rgba(15,23,42,.75);font-size:12px;font-weight:900}
.landing-lookup__sticker--addr{background:rgba(59,130,246,.10);border-color:rgba(59,130,246,.18);color:rgba(30,64,175,.95)}
.landing-lookup__address{margin-top:8px;display:flex;align-items:center;gap:8px}
.landing-lookup__address-text{font-size:14px;line-height:1.4;color:rgba(15,23,42,.82);display:flex;align-items:center;min-height:24px}
.landing-lookup__connect{justify-content:center}
