/*
 * kursachov.ru — общие стили поверх темы (подключаются nginx-сниппетом kr-k47.conf).
 * Пара к k47.js. Разделы:
 *   1. Шапка и меню        2. Списки калькулятора   3. Подсказка Telegram
 *   4. Декор заголовков    5. Карточки отзывов      6. Слайдеры: стрелки и точки
 *   7. Блок «Отзывы из Telegram»                    8. Страница «Антиплагиат и ИИ»
 */

/* 1. Шапка и меню ------------------------------------------------------ */

.hero { background-color: #2F4F7A; }
.hero > img[data-krs] { background: #2F4F7A; }

.header__nav-slider {
  transition: transform .42s cubic-bezier(.22,.8,.3,1), width .42s cubic-bezier(.22,.8,.3,1), opacity .25s ease !important;
}
.header__nav li a { transition: color .22s ease .1s !important; }

.header__menu-list .sub-menu { border-radius: 16px !important; overflow-x: hidden; }
.krs-search input { padding-left: 50px !important; }
.krs-ghost { left: 51.5px !important; }
.krs-search input:not(:placeholder-shown)::placeholder { color: transparent !important; }
html body .header__menu-list .sub-menu > li.kr-first { background-color: #3C5E8B !important; border-radius: 10px; }
html body .header__menu-list .sub-menu > li.kr-first > a { background: transparent !important; color: #fff !important; -webkit-text-fill-color: #fff !important; }

@media (max-width: 1080px) {
  html body .header__menu-list .sub-menu > li:not(.krs-search):not(.krs-none) {
    margin-left: 8px !important; margin-right: 8px !important; width: auto !important; border-radius: 10px !important; overflow: hidden;
  }
  html body .header__menu-list .sub-menu > li:not(.krs-search) > a { border-radius: 10px !important; }
}

/* 2. Списки калькулятора --------------------------------------------- */

.custom-select-trigger .kr-q {
  display: none; flex: 1 1 auto; min-width: 0; width: 100%; height: 100%;
  border: 0 !important; outline: 0 !important; background: transparent !important; box-shadow: none !important;
  padding: 0 !important; margin: 0 !important; font: inherit; font-size: max(16px, 1em); color: inherit;
}
.custom-select-trigger .kr-q::placeholder { color: #8a97ab; opacity: 1; }
.custom-select-trigger.kr-srch .kr-q { display: block; }
.custom-select-trigger.kr-srch .custom-select-text { display: none !important; }
.custom-select-options .custom-select-option.kr-hide { display: none !important; }

html body .custom-select-wrapper .custom-select-options li.custom-select-option.kr-act,
html body .custom-select-wrapper .custom-select-options li.custom-select-option.kr-act * {
  background-color: #3C5E8B !important; color: #fff !important; -webkit-text-fill-color: #fff !important;
}
html body .custom-select-wrapper .custom-select-options li.custom-select-option.kr-act { border-radius: 10px; }
html body .custom-select-wrapper .custom-select-options li.custom-select-option mark { background: rgba(67,145,154,.3); color: inherit; border-radius: 3px; padding: 0; }
html body .custom-select-wrapper .custom-select-options li.custom-select-option.kr-act mark { background-color: rgba(255,255,255,.3) !important; }

html body .custom-select-wrapper .custom-select-options li.kr-none,
html body .custom-select-wrapper .custom-select-options li.kr-clear {
  cursor: pointer; padding: 12px 16px; font-size: inherit; font-weight: 600; color: #3C5E8B; list-style: none;
}
html body .custom-select-wrapper .custom-select-options li.kr-clear { color: #8a96a8; font-weight: 500; border-bottom: 1px solid #e3e8f0; }
html body .custom-select-wrapper .custom-select-options li.kr-none:hover,
html body .custom-select-wrapper .custom-select-options li.kr-clear:hover { background: #3C5E8B; color: #fff; }

/* 3. Подсказка «Менеджер в Telegram» --------------------------------- */

.kwl {
  position: fixed; z-index: 9990; right: 24px; bottom: 24px; box-sizing: border-box; width: 320px;
  padding: 24px 22px 22px; border-radius: 24px; background: #3c5e8b; color: #fff; font-family: Lato, sans-serif;
  box-shadow: 0 14px 34px #3c5e8b4d; opacity: 0; transform: translateY(18px); pointer-events: none;
  transition: opacity .4s ease, transform .4s ease;
}
.kwl[hidden] { display: none; }
.kwl.is-in { opacity: 1; transform: none; pointer-events: auto; }
.kwl.is-off { opacity: 0; transform: translateY(18px); pointer-events: none; }
.kwl * { box-sizing: border-box; margin: 0; font-family: Lato, sans-serif; }
.kwl__x {
  position: absolute; top: 10px; right: 12px; width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
  padding: 0; border: 0; background: none; color: #ffffffc7; cursor: pointer; transition: color .2s;
}
.kwl__x:hover { color: #fff; }
.kwl__x svg { width: 22px; height: 22px; }
.kwl__t { display: flex; align-items: center; gap: 8px; font-size: 19px; font-weight: 600; line-height: 1.2; color: #fff; }
.kwl__t span { white-space: nowrap; }
.kwl__dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: #4fd08a; animation: kwlp 1.6s ease-out infinite; }
@keyframes kwlp { 0% { box-shadow: 0 0 0 0 #4fd08acc; } 70% { box-shadow: 0 0 0 5px #4fd08a00; } 100% { box-shadow: 0 0 0 0 #4fd08a00; } }
.kwl__s { margin-top: 10px; font-size: 16px; line-height: 1.35; color: #ffffffb8; white-space: nowrap; }
.kwl__btn {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 48px; margin-top: 18px;
  border-radius: 15px; background: #fff; color: #3c5e8b; font-size: 17px; font-weight: 600; text-decoration: none;
  box-shadow: inset 4px 4px 4px #fff, inset -4px -4px 4px #00000014; transition: transform .2s;
}
.kwl__btn svg { flex: none; width: 19px; height: 19px; fill: #3c5e8b; }
.kwl__btn:active { transform: scale(.97); }
@media (max-width: 640px) {
  .kwl { right: 12px; bottom: calc(68px + env(safe-area-inset-bottom, 0px)); width: 252px; padding: 18px 16px 16px; border-radius: 18px; }
  .kwl__x { top: 4px; right: 6px; width: 32px; height: 32px; }
  .kwl__t { font-size: 16px; gap: 6px; }
  .kwl__s { font-size: 13.5px; margin-top: 6px; }
  .kwl__btn { height: 40px; font-size: 15px; margin-top: 12px; border-radius: 13px; }
}

/* 4. Декор заголовков ------------------------------------------------- */

.kr-dec { pointer-events: none; z-index: -1; position: absolute; top: -25px; left: -20px; width: 127px; height: 88px; }
.kr-dec--t path { fill: #336A77; }
.kr-dec--l path { fill: #E5F1F5; }
body.wp-admin .kr-dec { display: none !important; }

/* На телефоне все звёздочки-«рамки» у заголовков — одного размера и в одной точке. */
@media (max-width: 576px) {
  html body .services-block__decor-star, html body .hww-vuz__stars, html body .for-inst__star-decor,
  html body .direct-service__star-decor, html body .expert-block__star-decor, html body .disciplines__star-decor,
  html body .work-choice__star-decor, html body .pay-docs__star-decor, html body .guarantees__star-decor,
  html body .authors__decor, html body .reviews__decor, html body .blog__decor, html body .faq__decor,
  html body .seo-text__decor, html body .fixed-form__decor, html body .contacts-map__decor,
  html body .course-includes__star-decor, html body .nw-title__decor, html body .kr-dec,
  html body .services-deadline__star, html body .check-antiplagiarism__star,
  html body .reviews-hero__star, html body .reviews-soc__star,
  html body .hero .hero__decorative, html body .hww__title-wrap svg {
    display: block !important; transform: scale(.8) !important; transform-origin: 0 0 !important;
    left: -17px !important; top: -21px !important;
  }
  html body .hero .hero__decorative { width: 127px !important; }
  html body .expert-block__container .kr-dec { display: none !important; }
}

/* 5. Карточки отзывов ------------------------------------------------- */

/*
 * Карточка отзыва: белая. При наведении / касании — синий фон,
 * текст и звёзды белые. Размер и форма звёзд при этом не меняются.
 */
html body .review-card {
  background: #fff; border-color: var(--color-primary, #3C5E8B);
  -webkit-tap-highlight-color: transparent;
  transition: background-color .3s ease, border-color .3s ease;
}
html body .review-card:hover,
html body .review-card:active,
html body .review-card:focus-within {
  background: var(--color-primary, #3C5E8B); border-color: var(--color-primary, #3C5E8B);
}
html body .review-card:hover .review-card__name,
html body .review-card:hover .review-card__sub,
html body .review-card:hover .review-card__text,
html body .review-card:hover .review-card__desc,
html body .review-card:active .review-card__name,
html body .review-card:active .review-card__sub,
html body .review-card:active .review-card__text,
html body .review-card:active .review-card__desc { color: #fff; }
html body .review-card:hover .review-card__header *,
html body .review-card:active .review-card__header * { color: rgba(255,255,255,.85) !important; }
html body .review-card:hover .review-card__header .review-card__left .review-card__name,
html body .review-card:active .review-card__header .review-card__left .review-card__name { color: #fff !important; }

/* Звёзды: скруглённые, как у «Средняя оценка»; синие, на синем фоне — белые. */
html body .review-card .review-card__footer { display: flex !important; justify-content: flex-end; margin-top: auto; padding-top: 16px; }
html body .review-card .review-card__stars { display: flex !important; gap: 6px; align-items: center; }
html body .review-card .review-card__stars .star { width: 26px; height: 26px; flex: none; transform: none !important; }
html body .review-card .review-card__stars .star,
html body .review-card .review-card__stars .star path { fill: rgba(60,94,139,.22) !important; transition: fill .3s ease; }
html body .review-card .review-card__stars .star.is-active,
html body .review-card .review-card__stars .star.is-active path { fill: #3C5E8B !important; }
html body .review-card:hover .review-card__stars .star,
html body .review-card:hover .review-card__stars .star path,
html body .review-card:active .review-card__stars .star,
html body .review-card:active .review-card__stars .star path { fill: rgba(255,255,255,.35) !important; }
html body .review-card:hover .review-card__stars .star.is-active,
html body .review-card:hover .review-card__stars .star.is-active path,
html body .review-card:active .review-card__stars .star.is-active,
html body .review-card:active .review-card__stars .star.is-active path { fill: #fff !important; }

.reviews-filtered__select-option .kr-cnt { opacity: .6; font-weight: 400; }

/* 6. Слайдеры: стрелки и точки --------------------------------------- */

/* Свайп не выделяет текст и не вызывает лупу/меню iOS. */
.kr-slider { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-action: pan-y; }
.kr-slider img { -webkit-user-drag: none; }
.swiper-wrapper { transition-timing-function: cubic-bezier(.25,.8,.25,1) !important; }

/* Родная пагинация темы заменена на .kr-dots. */
.kr-native-off { display: none !important; }

.kr-ctrl {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; margin-top: 20px; color: #3C5E8B; position: relative; z-index: 6;
}
.kr-ctrl--abs { position: absolute; left: 0; right: 0; margin-top: 0; }
.kr-ctrl--row { justify-content: space-between; }
.kr-ctrl--dark { color: #fff; }
.kr-ctrl.is-off, .kr-side.is-off { display: none; }

.kr-dots {
  --d: 14px;                         /* диаметр точки */
  --g: 12px;                         /* расстояние между точками */
  --step: calc(var(--d) + var(--g));
  flex: none; overflow: hidden; width: calc(var(--n, 4) * var(--step)); padding: 4px 0;
}
.kr-dots[hidden] { display: none; }
.kr-dots__track {
  display: flex; gap: var(--g); padding-left: calc(var(--g) / 2);
  transition: transform .7s cubic-bezier(.25,.8,.25,1); will-change: transform;
}
.kr-dot {
  flex: none; width: var(--d); height: var(--d); padding: 0; border-radius: 50%; cursor: pointer;
  border: 2px solid currentColor; background: transparent; box-sizing: border-box; color: inherit;
  transition: background-color .35s ease, transform .5s ease, opacity .5s ease;
  -webkit-tap-highlight-color: transparent;
}
.kr-dot.is-on { background: currentColor; }
.kr-dot.is-edge { transform: scale(.6); opacity: .7; }
.kr-dot.is-out { transform: scale(.3); opacity: 0; }

.kr-arrow {
  position: absolute; z-index: 6; width: 60px; height: 60px; padding: 0; cursor: pointer;
  border: 1px solid #d5e3ee; border-radius: 24px; background: #fff; box-shadow: 0 2px 10px rgba(60,94,139,.12);
  transform: translateY(-50%); transition: opacity .2s;
}
.kr-arrow svg { display: block; width: 100%; height: 100%; }
.kr-arrow:hover { opacity: .9; }
.kr-arrow.is-off { opacity: .35; pointer-events: none; }
.kr-arrow--prev { left: -14px; }
.kr-arrow--next { right: -14px; }
@media (max-width: 1450px) { .kr-arrow--prev { left: 2px; } .kr-arrow--next { right: 2px; } }
.kr-ctrl--row .kr-arrow { position: static; transform: none; width: 44px; height: 44px; border-radius: 14px; flex: none; }

/* 7. Блок «Отзывы из Telegram» --------------------------------------- */

.reviews-soc__arrow { display: none !important; }
.reviews-soc__image-link { pointer-events: none !important; cursor: default; }
.reviews-soc .reviews-soc__header { flex-wrap: wrap; align-items: center; gap: 16px 40px; }
@media (max-width: 1024px) { .reviews-soc .reviews-soc__header { align-items: flex-start; text-align: left; } }
.reviews-soc .reviews-soc__stats { color: #fff; }
.reviews-soc .reviews-soc__stats * { color: #fff; }
.reviews-soc__footer { display: flex; justify-content: flex-start; margin-top: 24px; }
.reviews-soc__footer .reviews-soc__more { display: inline-flex; }
@media (max-width: 768px) {
  .reviews-soc .reviews-soc__header { margin-bottom: 20px; }
  .reviews-soc__footer .reviews-soc__more { width: 100%; }
}

/* В фильтре «Учебное заведение» Telegram не показываем — это не вуз. */
.reviews-filtered__select-option[data-value="Отзыв из Telegram"] { display: none !important; }

/* 8. Страница «Антиплагиат и ИИ» (page-id-27) ------------------------ */

.page-id-27 .hero { background-color: var(--color-bg, #EEF9FB) !important; }
.page-id-27 .hero > img[data-krs] { background: transparent !important; }

/* 9. Блок «Курсовую пишет эксперт» на страницах услуг ----------------
   Карточка в рамке, как остальные блоки сайта; вместо кота — пример
   отчёта Антиплагиата (о нём и говорит текст блока). */

.single-uslugi .expert-block { background: transparent; padding: 40px 0; }
.single-uslugi .expert-block__container {
  box-sizing: border-box; align-items: center; gap: 32px;
  padding: 40px; border: 2px solid #3C5E8B; border-radius: 24px;
  background: #E4F2F3; overflow: hidden;
}
.single-uslugi .expert-block__content { width: auto; flex: 1 1 55%; padding-bottom: 0; gap: 28px; justify-content: flex-start; }
.single-uslugi .expert-block__sinlge_usl { flex: 0 1 42%; align-items: center; justify-content: center; }
.single-uslugi .expert-block__report {
  display: block; width: 100%; max-width: 460px; height: auto; margin: 0;
  border-radius: 18px; box-shadow: 0 10px 30px rgba(60,94,139,.18);
}
@media (max-width: 768px) {
  .single-uslugi .expert-block { padding: 24px 0; }
  .single-uslugi .expert-block__content { gap: 20px; }
  .single-uslugi .expert-block__text-group, .single-uslugi .expert-block__btn { margin: 0; }
  .single-uslugi .expert-block__container { flex-direction: column; align-items: stretch; gap: 20px; padding: 24px 18px; margin: 0 16px; width: auto; }
  .single-uslugi .expert-block__btn { width: 100%; }
  .single-uslugi .expert-block__report { max-width: 100%; }
}

/* Таблица «Антиплагиат vs ИИ-детектор». */
.plagiarism-compare__icon { display: none !important; }
.plagiarism-compare__head-col span { font-size: 18px; font-weight: 700; }
html body .plagiarism-compare__cell { font-size: 17px; line-height: 1.35; }
html body .plagiarism-compare__cell:first-child { font-weight: 700; }
html body .plagiarism-compare__note { font-size: 17px; line-height: 1.4; }
@media (max-width: 760px) {
  html body .plagiarism-compare__table { padding: 0 !important; background: none !important; box-shadow: none !important; }
  html body .plagiarism-compare__cell { font-size: 16px; }
}

/* 10. «Гарантии и безопасность» — как в исходной мобильной версии ----- */

/* Телефон: 1 карточка, иконка 60×60 (как было). Планшет: 2. ПК: 3 в ряд. */
@media (max-width: 768px) {
  html body .guarantees__icon-wrap { position: relative; width: 60px; height: 60px; }
  html body .guarantees__icon { width: 60px; height: 60px; object-fit: contain; }
  html body .guarantees__star-bg { width: 90px; height: auto; max-width: none; }
}
/* Точки на тёмном фоне — светлые, как в оригинале (#EEF9FB). */
html body .guarantees .kr-ctrl { color: #EEF9FB; }

/* 11. «Частые вопросы»: по умолчанию белые, при нажатии/открытии — синие ---- */
html body .faq__item, html body details.faq__item.faq-item { background: #fff; color: #2e2b34; }
html body .faq__item[open], html body details.faq__item.faq-item[open],
html body .faq__item:active { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }
html body .faq__item:hover { background: #fff; color: #2e2b34; }
html body .faq__item[open]:hover { background: var(--color-primary); color: #fff; }
@media (hover: hover) { html body .faq__item:hover { background: var(--color-primary); color: #fff; } }
html body .nw-landing-block--dark .faq__item:not([open]):not(:active) { background: #fff; color: #2e2b34; }

/* 12. Зелёный блок с животным: воздух между строками и элементами --------- */
@media (max-width: 768px) {
  html body .expert-block__title { line-height: 1.2; }
  html body .expert-block__highlight { display: inline-block; line-height: 1.2; margin-top: 6px; padding: 3px 12px 5px; }
  html body .expert-block__title-wrap { margin-bottom: 16px; }
  html body .expert-block__description { line-height: 1.4; }
  html body .expert-block__content { gap: 28px; }
  html body .expert-block__text-group { padding-bottom: 0; }
  html body .expert-block__sinlge_usl { margin-top: 8px; }
}

/* 13. «Большая таблица цен»: белые карточки, при наведении/касании — синие, стрелка вперёд -- */
.services-deadline .service-card {
  background: #fff; color: var(--color-dark);
  transition: background-color .35s ease, color .35s ease, transform .35s cubic-bezier(.2,.8,.2,1), box-shadow .35s ease;
  -webkit-tap-highlight-color: transparent;
}
.services-deadline .service-card .service-card__name,
.services-deadline .service-card .service-card__rating,
.services-deadline .service-card .service-card__col--term,
.services-deadline .service-card .service-card__price-current,
.services-deadline .service-card .service-card__price-old { transition: color .35s ease; }
.services-deadline .service-card .service-card__rating svg path { transition: fill .35s ease; }
.services-deadline .service-card__action-text, .services-deadline .service-card__arrow-short { display: none !important; }
.services-deadline .service-card__arrow-long {
  max-width: 52px !important; opacity: 1 !important; color: var(--color-primary);
  transition: transform .4s cubic-bezier(.2,.8,.2,1), color .35s ease;
}
.services-deadline .service-card__arrow-long path { fill: currentColor; stroke: none; }
.services-deadline .service-card:active,
.services-deadline .service-card.is-touched {
  background: var(--color-primary); color: #fff; transform: scale(1.012);
  box-shadow: 0 10px 24px rgba(60, 94, 139, .28);
}
@media (hover: hover) {
  .services-deadline .service-card:hover {
    background: var(--color-primary); color: #fff; transform: translateY(-2px) scale(1.01);
    box-shadow: 0 10px 24px rgba(60, 94, 139, .28);
  }
}
.services-deadline .service-card:is(:active,.is-touched) .service-card__name, .services-deadline .service-card:is(:active,.is-touched) .service-card__rating,
.services-deadline .service-card:is(:active,.is-touched) .service-card__col--term, .services-deadline .service-card:is(:active,.is-touched) .service-card__price-current,
.services-deadline .service-card:is(:active,.is-touched) .service-card__price-old, .services-deadline .service-card:is(:active,.is-touched) .service-card__arrow-long { color: #fff; }
.services-deadline .service-card:is(:active,.is-touched) .service-card__price-old { color: rgba(255,255,255,.65); }
.services-deadline .service-card:is(:active,.is-touched) .service-card__rating svg path { fill: #fff; }
.services-deadline .service-card:is(:active,.is-touched) .service-card__arrow-long { transform: translateX(7px) scale(1.1); }
@media (hover: hover) {
  .services-deadline .service-card:hover .service-card__name, .services-deadline .service-card:hover .service-card__rating,
  .services-deadline .service-card:hover .service-card__col--term, .services-deadline .service-card:hover .service-card__price-current,
  .services-deadline .service-card:hover .service-card__arrow-long { color: #fff; }
  .services-deadline .service-card:hover .service-card__price-old { color: rgba(255,255,255,.65); }
  .services-deadline .service-card:hover .service-card__rating svg path { fill: #fff; }
  .services-deadline .service-card:hover .service-card__arrow-long { transform: translateX(7px) scale(1.1); }
}
/* Телефон: название + оценка, ниже срок слева и цена справа, стрелка в углу */
@media (max-width: 768px) {
  .services-deadline .service-card {
    grid-template-columns: 1fr 1fr; grid-template-areas: "title title" "term price" "action action";
    gap: 12px 16px; padding: 20px 18px 16px; align-items: end;
  }
  .services-deadline .service-card__col--title { grid-area: title; max-width: none; justify-content: space-between; }
  .services-deadline .service-card__col--term { grid-area: term; flex-direction: column; align-items: flex-start; }
  .services-deadline .service-card__col--price { grid-area: price; flex-direction: column; align-items: flex-end; gap: 4px; justify-self: end; }
  .services-deadline .service-card__col--action { grid-area: action; justify-content: flex-end; border-top: 0; padding-top: 0; margin-top: -4px; }
}
.services-deadline__examples { display: block; width: fit-content; margin: -8px 0 18px auto; font-weight: 700; font-size: 18px; color: var(--color-primary); text-decoration: underline; text-underline-offset: 4px; }
.services-deadline__examples:hover { opacity: .75; }
html body a.services-deadline__examples { border: 0; background: none; box-shadow: none; padding: 0; min-height: 0; height: auto; border-radius: 0; }

/* 14. Таблица цен: стрелка всегда видна (в теме на телефоне её прячут), без слова-призыва */
html body .services-deadline .service-card .service-card__col--action { display: flex !important; }
html body .services-deadline .service-card .service-card__arrow-long { display: block !important; max-width: 52px !important; opacity: 1 !important; width: 44px; height: auto; flex: none; overflow: visible !important; }
html body .services-deadline .service-card .service-card__arrow-short,
html body .services-deadline .service-card .service-card__action-text { display: none !important; }
html body .services-deadline .service-card.is-touched { background: var(--color-primary); color: #fff; transform: scale(1.012); box-shadow: 0 10px 24px rgba(60,94,139,.28); }
html body .services-deadline .service-card.is-touched .service-card__arrow-long { transform: translateX(7px) scale(1.1); }
html body .services-deadline .service-card.is-touched .service-card__col--term::before,
html body .services-deadline .service-card:active .service-card__col--term::before { color: rgba(255,255,255,.7); }
@media (hover: hover) { html body .services-deadline .service-card:hover .service-card__col--term::before { color: rgba(255,255,255,.7); } }
@media (max-width:768px){html body a.services-deadline__examples{margin:-8px 0 -8px auto}} @media (min-width:769px){html body a.services-deadline__examples{margin:-8px 0 -25px auto}}
