/* =====================================================================
   Bagdar — тема «Компас карьеры» (2026)
   Подключается после modern.css в _Layout.cshtml.
   modern.css = база (кнопки, поля, окна, переполнение),
   theme.css  = характер: шрифты, цвет, глубина, главная страница.
   ===================================================================== */

:root {
    --ink: #0a1230;
    --ink-2: #121c48;
    --ink-3: #1b2a66;
    --blue: #3a6bff;
    --blue-2: #2f80ed;
    --cyan: #27c4f0;
    --green: #1fc27b;
    --amber: #ffb547;
    --paper: #f6f7fc;

    --primary: #3a6bff;
    --primary-hover: #2753e0;
    --primary-soft: #eaf0ff;
    --bg: var(--paper);

    --grad-brand: linear-gradient(120deg, #3a6bff 0%, #27c4f0 55%, #1fc27b 100%);
    --grad-ink: radial-gradient(1200px 500px at 85% -10%, rgba(58, 107, 255, .45), transparent 60%),
                radial-gradient(800px 420px at 0% 110%, rgba(31, 194, 123, .28), transparent 60%),
                linear-gradient(160deg, #0a1230 0%, #121c48 55%, #0d1a45 100%);

    --font: "Manrope", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
    --font-display: "Unbounded", "Manrope", "Segoe UI", system-ui, sans-serif;

    --radius: 14px;
    --radius-lg: 22px;
    --radius-xl: 30px;
    --shadow-card: 0 1px 2px rgba(10, 18, 48, .04), 0 8px 24px rgba(10, 18, 48, .06);
    --shadow-hover: 0 2px 4px rgba(10, 18, 48, .05), 0 22px 48px rgba(10, 18, 48, .14);
}

/* ---------- Типографика ---------- */

body {
    background:
        radial-gradient(900px 400px at 100% 0%, rgba(58, 107, 255, .06), transparent 70%),
        var(--paper);
    letter-spacing: -.005em;
}

h1, h2, h3,
.hero__title,
.hero-stat__num {
    font-family: var(--font-display) !important;
    letter-spacing: -.02em;
}

h4, h5, h6 {
    font-weight: 700;
}

/* общий заголовок секции: крупный, с цветной чертой */
.benefits_title h2,
.news_title h2,
.partners-title h2,
#education h2:first-of-type,
.ht_title h2 {
    font-size: clamp(24px, 2.6vw, 36px) !important;
    font-weight: 700 !important;
    color: var(--ink) !important;
    line-height: 1.15 !important;
}

.benefits_title,
.partners-title {
    text-align: center;
}

.benefits_title h2::after,
.partners-title h2::after,
.news_title h2::after {
    content: "";
    display: block;
    width: 56px;
    height: 4px;
    margin-top: 14px;
    border-radius: 4px;
    background: var(--grad-brand);
}

.benefits_title h2::after,
.partners-title h2::after {
    margin-left: auto;
    margin-right: auto;
}

/* ---------- Верхняя полоса и шапка ---------- */

#hdline {
    background: var(--ink) !important;
    border-bottom: 1px solid rgba(255, 255, 255, .06);
}

#hdline a,
#hdline span {
    color: rgba(255, 255, 255, .82);
}

#hdline a:hover {
    color: #fff;
}

#hdline .hdline_left-social img {
    transition: transform .2s var(--ease), opacity .2s;
    opacity: .9;
}

#hdline .hdline_left-social a:hover img {
    transform: translateY(-2px);
    opacity: 1;
}

#header {
    position: sticky;
    top: 0;
    z-index: 900;
    background: rgba(255, 255, 255, .82) !important;
    -webkit-backdrop-filter: saturate(1.6) blur(14px);
    backdrop-filter: saturate(1.6) blur(14px);
    box-shadow: 0 1px 0 rgba(10, 18, 48, .07), 0 6px 24px rgba(10, 18, 48, .04);
}

#header .h_menu ul li a {
    font-weight: 600 !important;
    color: var(--ink) !important;
}

#header .h_login span.h_login-in,
#header .btn-success {
    background: var(--ink) !important;
    border-color: var(--ink) !important;
    color: #fff !important;
    border-radius: 999px !important;
    padding-left: 20px !important;
    padding-right: 20px !important;
    box-shadow: 0 6px 16px rgba(10, 18, 48, .18);
}

#header .h_login span.h_login-in:hover,
#header .btn-success:hover {
    background: var(--blue) !important;
    border-color: var(--blue) !important;
}

/* ---------- Первый экран ---------- */

#headtext.hero {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    background: var(--grad-ink) !important;
    color: #fff;
    padding: clamp(48px, 7vw, 96px) 0 clamp(56px, 7vw, 104px) !important;
    margin: 0 !important;
}

/* тонкая сетка-«миллиметровка» */
#headtext.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image:
        linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);
    background-size: 44px 44px;
    -webkit-mask-image: radial-gradient(ellipse 70% 80% at 70% 30%, #000 30%, transparent 75%);
    mask-image: radial-gradient(ellipse 70% 80% at 70% 30%, #000 30%, transparent 75%);
}

.hero__glow {
    position: absolute;
    z-index: -1;
    border-radius: 50%;
    filter: blur(70px);
    opacity: .55;
    pointer-events: none;
}

.hero__glow--a {
    width: 420px;
    height: 420px;
    right: 6%;
    top: -120px;
    background: #3a6bff;
    animation: hero-float 14s ease-in-out infinite;
}

.hero__glow--b {
    width: 360px;
    height: 360px;
    left: -80px;
    bottom: -160px;
    background: #1fc27b;
    opacity: .35;
    animation: hero-float 18s ease-in-out infinite reverse;
}

@keyframes hero-float {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-30px, 24px); }
}

.hero__inner {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: clamp(32px, 5vw, 72px);
    align-items: center;
}

.hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 7px 14px 7px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .14);
    color: rgba(255, 255, 255, .9) !important;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.hero__eyebrow i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 0 4px rgba(31, 194, 123, .25);
}

.hero__title {
    margin: 22px 0 18px !important;
    color: #fff !important;
    font-size: clamp(30px, 3.9vw, 54px) !important;
    font-weight: 700 !important;
    line-height: 1.06 !important;
    letter-spacing: -.03em !important;
    text-wrap: balance;
}

.hero__accent {
    background: var(--grad-brand);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent !important;
    white-space: nowrap;
}

.hero__lead {
    max-width: 560px;
    margin: 0 0 32px !important;
    color: rgba(255, 255, 255, .72) !important;
    font-size: clamp(16px, 1.3vw, 18px) !important;
    line-height: 1.6 !important;
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.hero-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 54px;
    padding: 0 28px;
    border-radius: 999px;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none !important;
    transition: transform .2s var(--ease), box-shadow .2s var(--ease), background-color .2s, color .2s;
}

.hero-btn--primary {
    background: #fff;
    color: var(--ink) !important;
    box-shadow: 0 12px 32px rgba(58, 107, 255, .35);
}

.hero-btn--primary span {
    transition: transform .2s var(--ease);
}

.hero-btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 40px rgba(58, 107, 255, .5);
}

.hero-btn--primary:hover span {
    transform: translateX(4px);
}

.hero-btn--ghost {
    color: #fff !important;
    border: 1px solid rgba(255, 255, 255, .28);
    background: rgba(255, 255, 255, .04);
}

.hero-btn--ghost:hover {
    background: rgba(255, 255, 255, .12);
    border-color: rgba(255, 255, 255, .5);
}

/* правая панель с цифрами */
.hero__panel {
    position: relative;
    display: grid;
    gap: 14px;
    padding: 22px;
    border-radius: var(--radius-xl);
    background: linear-gradient(160deg, rgba(255, 255, 255, .14), rgba(255, 255, 255, .04));
    border: 1px solid rgba(255, 255, 255, .16);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
    box-shadow: 0 30px 80px rgba(0, 0, 0, .35);
    transform: rotate(-1.2deg);
}

.hero-stat {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 18px 20px;
    border-radius: var(--radius-lg);
    background: rgba(10, 18, 48, .45);
    border: 1px solid rgba(255, 255, 255, .08);
}

.hero-stat--main {
    background: var(--grad-brand);
    border: 0;
    padding: 26px 24px;
}

.hero-stat__num {
    color: #fff !important;
    font-size: clamp(26px, 2.6vw, 40px) !important;
    font-weight: 700;
    line-height: 1;
}

.hero-stat--main .hero-stat__num {
    font-size: clamp(36px, 4vw, 56px) !important;
}

.hero-stat__label {
    color: rgba(255, 255, 255, .75) !important;
    font-size: 14px;
    font-weight: 600;
}

.hero-stat--main .hero-stat__label {
    color: rgba(255, 255, 255, .95) !important;
}

.hero-stat-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.hero-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 4px;
}

.hero-chips a {
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .14);
    color: #fff !important;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none !important;
    transition: background-color .2s, border-color .2s;
}

.hero-chips a:hover {
    background: rgba(255, 255, 255, .22);
    border-color: rgba(255, 255, 255, .35);
}

/* ---------- Карточки направлений (#groups) ---------- */

#groups {
    position: relative;
    padding: clamp(40px, 5vw, 64px) 0 24px !important;
}

#groups .gr_blocks {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

#groups .gr_first,
#groups .gr_third {
    position: relative;
    isolation: isolate;
    width: auto !important;
    min-height: 420px;
    height: auto !important;
    margin: 0 !important;
    padding: 28px !important;
    border-radius: var(--radius-xl) !important;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 24px;
    box-shadow: var(--shadow-hover);
    transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}

#groups .gr_first:hover,
#groups .gr_third:hover {
    transform: translateY(-4px);
}

/* затемнение фото — текст всегда читается */
#groups .gr_first::before,
#groups .gr_third::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(100deg, rgba(10, 18, 48, .92) 0%, rgba(10, 18, 48, .7) 45%, rgba(10, 18, 48, .15) 100%);
}

#groups .gr_third::before {
    background: linear-gradient(100deg, rgba(10, 18, 48, .94) 0%, rgba(10, 18, 48, .72) 50%, rgba(10, 18, 48, .35) 100%);
}

#groups .gr_first .gr_first-top span,
#groups .gr_third .gr_third-top span {
    color: rgba(255, 255, 255, .7) !important;
    font-size: 13px !important;
    font-weight: 600;
    letter-spacing: .05em;
    text-transform: uppercase;
}

#groups .gr_first .gr_first-top h2,
#groups .gr_third .gr_third-top h2 {
    display: block !important;
    margin: 12px 0 14px !important;
    padding: 0 !important;
    background: none !important;
    color: #fff !important;
    font-size: clamp(26px, 2.4vw, 36px) !important;
    font-weight: 700 !important;
    line-height: 1.1;
}

#groups .gr_first .gr_first-top h2::after,
#groups .gr_third .gr_third-top h2::after {
    content: "";
    display: block;
    width: 48px;
    height: 4px;
    margin-top: 12px;
    border-radius: 4px;
    background: var(--green);
}

#groups .gr_third .gr_third-top h2::after {
    background: var(--amber);
}

#groups .gr_first .gr_first-top p,
#groups .gr_third .gr_third-top p {
    max-width: 380px;
    color: rgba(255, 255, 255, .78) !important;
    font-size: 14px !important;
    line-height: 1.55;
    margin-bottom: 4px !important;
}

#groups .gr_first .gr_first-bottom,
#groups .gr_third .gr_third-bottom {
    position: static !important;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 190px));
    gap: 12px;
}

#groups .gr_first .gr_first-bottom .gr_first-bottom_item,
#groups .gr_third .gr_third-bottom_item {
    display: flex !important;
    flex-direction: column;
    width: auto !important;
    height: auto !important;
    margin: 0 !important;
    border-radius: var(--radius-lg) !important;
    border: 1px solid rgba(255, 255, 255, .18) !important;
    background: rgba(255, 255, 255, .1) !important;
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    overflow: hidden;
}

#groups .gr_third .gr_third-bottom_item .gr_tbi-top {
    height: auto !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: #fff !important;
}

#groups .gr_first .gr_first-bottom .gr_first-bottom_item span,
#groups .gr_third .gr_third-bottom_item .gr_tbi-top span {
    margin: 0 !important;
    padding: 18px 18px 0;
    color: #fff !important;
    font-family: var(--font-display) !important;
    font-size: 28px !important;
    font-weight: 700 !important;
    line-height: 1.1;
}

#groups .gr_first .gr_first-bottom .gr_first-bottom_item p,
#groups .gr_third .gr_third-bottom_item .gr_tbi-top p {
    margin: 6px 0 14px !important;
    padding: 0 18px;
    color: rgba(255, 255, 255, .72) !important;
    font-size: 13px !important;
}

#groups .gr_first .gr_first-bottom .gr_first-bottom_item a,
#groups .gr_third .gr_third-bottom_item .gr_tbi-btn span {
    position: static !important;
    display: block;
    margin: auto 0 0 !important;
    padding: 12px 18px !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: #fff !important;
    color: var(--ink) !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    text-align: left !important;
    transition: background-color .2s, color .2s;
}

#groups .gr_third .gr_third-bottom_item .gr_tbi-btn {
    margin-top: auto;
}

#groups .gr_first .gr_first-bottom .gr_first-bottom_item a::after,
#groups .gr_third .gr_third-bottom_item .gr_tbi-btn span::after {
    content: " \2192";
}

#groups .gr_first .gr_first-bottom .gr_first-bottom_item a:hover,
#groups .gr_third .gr_third-bottom_item .gr_tbi-btn span:hover {
    background: var(--blue) !important;
    color: #fff !important;
    text-decoration: none;
}

/* ---------- Вкладки и поиск (#progtype) ---------- */

#progtype {
    padding: 32px 0 12px !important;
}

#progtype .progtype_first {
    width: fit-content !important;
    max-width: 100%;
    margin: 0 auto 18px !important;
    padding: 6px;
    gap: 4px;
    flex-wrap: wrap;
    justify-content: center;
    border-radius: 999px;
    background: #fff;
    box-shadow: var(--shadow-card);
}

#progtype .progtype_first span,
#education .education_title span {
    flex-grow: 0 !important;
    padding: 10px 20px !important;
    border-radius: 999px !important;
    border: 0 !important;
    background: transparent !important;
    color: var(--text-muted) !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    box-shadow: none !important;
    transition: background-color .2s, color .2s;
}

#progtype .progtype_first span:hover,
#education .education_title span:hover {
    color: var(--ink) !important;
    background: var(--surface-2) !important;
}

#progtype .progtype_first span.pf_active,
#education .education_title span.et_active {
    background: var(--ink) !important;
    color: #fff !important;
}

#progtype .progtype_second-form {
    border-radius: var(--radius-xl) !important;
    background: var(--grad-ink) !important;
    box-shadow: 0 20px 50px rgba(10, 18, 48, .22);
    padding: 22px 26px !important;
}

#progtype .progtype_second-form form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

#progtype .progtype_second-form select,
#progtype .progtype_second-form input[type="text"] {
    border: 0 !important;
    border-radius: 999px !important;
    min-height: 48px;
}

#progtype .progtype_second-form button,
#progtype .progtype_second-form input[type="submit"] {
    min-height: 48px !important;
    padding: 0 30px !important;
    border-radius: 999px !important;
    border: 0 !important;
    background: var(--green) !important;
    color: #fff !important;
    font-weight: 700 !important;
    box-shadow: 0 10px 24px rgba(31, 194, 123, .35);
}

/* ---------- Образование: карточки стран и вузов ---------- */

#education {
    padding: 40px 0 24px !important;
}

#education .education_title {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px;
    width: fit-content;
    max-width: 100%;
    margin: 0 auto 28px !important;
    padding: 6px;
    border-radius: 999px;
    background: #fff;
    box-shadow: var(--shadow-card);
}

#education .edu_home-demo_in {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    height: 270px !important;
    padding: 22px !important;
    border: 0 !important;
    border-radius: var(--radius-lg) !important;
    box-shadow: var(--shadow-card);
    transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}

#education .edu_home-demo_in::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(180deg, rgba(10, 18, 48, .15) 0%, rgba(10, 18, 48, .55) 45%, rgba(10, 18, 48, .92) 100%);
}

#education .edu_home-demo_in:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

#education .edu_home-demo_in h2,
#education .edu_home-demo_in h2 a {
    font-family: var(--font) !important;
    font-weight: 800 !important;
    letter-spacing: -.01em;
    color: #fff !important;
    font-size: 17px !important;
    line-height: 1.25 !important;
}

#education .edu_home-demo_in a,
#education .edu_home-demo_in span,
#education .edu_home-demo_in span a {
    color: rgba(255, 255, 255, .85) !important;
}

#education .edu_home-demo_in .eh_din-univer a {
    color: #8fd8ff !important;
}

#education .eh_din-btn {
    left: 22px !important;
    right: 22px !important;
    width: auto !important;
    border-radius: 999px !important;
    background: rgba(255, 255, 255, .16) !important;
    border: 1px solid rgba(255, 255, 255, .3) !important;
    color: #fff !important;
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    font-weight: 600;
    transition: background-color .2s, color .2s;
}

#education .edu_home-demo_in:hover .eh_din-btn {
    background: #fff !important;
    color: var(--ink) !important;
}

#education .edu_home-demo_sec {
    border: 0 !important;
    border-radius: var(--radius-lg) !important;
    background: #fff !important;
    box-shadow: var(--shadow-card);
    overflow: hidden;
    transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}

#education .edu_home-demo_sec:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

#education .edu_home-demo_sec h2,
#education .edu_home-demo_sec h2 a {
    font-family: var(--font) !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    line-height: 1.35 !important;
    color: var(--ink) !important;
    letter-spacing: 0;
}

/* стрелки каруселей */
.owl-theme .owl-nav [class*="owl-"] {
    width: 44px;
    height: 44px;
    border-radius: 50% !important;
    background: #fff !important;
    color: var(--ink) !important;
    box-shadow: var(--shadow-card);
}

.owl-theme .owl-nav [class*="owl-"]:hover {
    background: var(--ink) !important;
    color: #fff !important;
}

.owl-theme .owl-dots .owl-dot span {
    background: #cfd6e6 !important;
    transition: width .2s, background-color .2s;
}

.owl-theme .owl-dots .owl-dot.active span {
    width: 22px;
    background: var(--blue) !important;
}

/* ---------- Преимущества ---------- */

#benefits {
    padding: 48px 0 !important;
}

#benefits .benefits_block {
    display: grid !important;
    width: 100% !important;
    max-width: none !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    margin-top: 28px;
}

#benefits .benefits_item {
    display: flex !important;
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
    width: auto !important;
    margin: 0 !important;
    padding: 28px !important;
    border-radius: var(--radius-lg);
    background: #fff;
    box-shadow: var(--shadow-card);
    text-align: left !important;
    transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}

#benefits .benefits_item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

#benefits .benefits_item img {
    width: 64px !important;
    height: 64px !important;
    padding: 14px;
    border-radius: 18px;
    background: var(--primary-soft);
    margin: 0 !important;
}

#benefits .benefits_item span {
    color: var(--ink) !important;
    font-size: 17px !important;
    font-weight: 700 !important;
    line-height: 1.35;
    text-align: left !important;
}

/* ---------- Новости и статьи ---------- */

#news {
    padding: 24px 0 48px !important;
}

#news .news_left-preview_link {
    padding: 14px !important;
    margin-bottom: 14px !important;
    border-radius: var(--radius-lg) !important;
    background: #fff !important;
    border: 1px solid var(--border) !important;
    box-shadow: var(--shadow-card);
    transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}

#news .news_left-preview_link:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

#news .news_left-preview_link img {
    border-radius: 12px;
    object-fit: cover;
}

#news .nlpl_date {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--primary-soft);
    color: var(--blue) !important;
    font-size: 12px !important;
    font-weight: 700;
}

#news .news_left-preview_link a {
    color: var(--ink) !important;
    font-weight: 700 !important;
    line-height: 1.35;
}

#news .news_right-row {
    position: relative;
    padding: 16px 44px 16px 18px !important;
    margin-bottom: 10px !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--radius) !important;
    background: #fff !important;
    box-shadow: var(--shadow-card);
    transition: border-color .2s, transform .2s var(--ease);
}

#news .news_right-row::after {
    content: "\2192";
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--blue);
    font-weight: 700;
    transition: transform .2s var(--ease);
}

#news .news_right-row:hover {
    border-color: var(--blue) !important;
    transform: translateX(3px);
}

#news .news_right-row a {
    color: var(--ink) !important;
    font-weight: 600;
}

#news .news_more-btn a,
#news .news_more-btn span,
#news .news_more-btn button {
    border-radius: 999px !important;
}

/* ---------- Партнёры ---------- */

#partners {
    padding: 24px 0 40px !important;
}

#partners .owl-height,
#partners .owl-stage-outer {
    height: auto !important;
}

#partners .owl-stage-outer {
    padding: 6px 2px 12px;
}

#partners .owl-item {
    background: transparent !important;
    height: auto !important;
}

#partners .item {
    height: auto !important;
    overflow: visible !important;
    display: flex !important;
    align-items: center;
    gap: 14px;
    min-height: 96px;
    padding: 16px 18px !important;
    border-radius: var(--radius-lg) !important;
    background: #fff !important;
    border: 1px solid var(--border) !important;
    box-shadow: var(--shadow-card);
}

#partners .item img {
    width: 48px !important;
    flex: 0 0 48px;
    filter: grayscale(1);
    opacity: .75;
    transition: filter .2s, opacity .2s;
}

#partners .item:hover img {
    filter: none;
    opacity: 1;
}

#partners .item span {
    color: var(--ink) !important;
    font-size: 13px !important;
    font-weight: 600;
    line-height: 1.35;
}

/* ---------- Баннер «задать вопрос» ---------- */

#feedblock .feedblock_item {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    flex-wrap: wrap;
    gap: 16px;
    padding: 36px 40px !important;
    border-radius: var(--radius-xl) !important;
    background: var(--grad-brand) !important;
    box-shadow: 0 24px 60px rgba(58, 107, 255, .3);
}

#feedblock .feedblock_item::before {
    content: "";
    position: absolute;
    right: -60px;
    top: -80px;
    z-index: -1;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    border: 40px solid rgba(255, 255, 255, .12);
}

#feedblock .feedblock_item > span {
    flex: 1 1 260px;
    color: #fff !important;
    font-family: var(--font-display) !important;
    font-size: clamp(18px, 1.8vw, 24px) !important;
    font-weight: 600 !important;
    line-height: 1.25;
}

#feedblock .feedblock_item form {
    position: static !important;
    inset: auto !important;
    transform: none !important;
    width: auto !important;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    flex: 2 1 480px;
}

#feedblock .feedblock_item input[type="text"],
#feedblock .feedblock_item input[type="tel"] {
    flex: 1 1 180px;
    border: 0 !important;
    border-radius: 999px !important;
    min-height: 50px;
    width: auto !important;
    background: #fff !important;
    color: var(--ink) !important;
}

#feedblock .feedblock_item button,
#feedblock .feedblock_item input[type="submit"] {
    min-height: 50px;
    padding: 0 26px !important;
    border: 0 !important;
    border-radius: 999px !important;
    background: var(--ink) !important;
    color: #fff !important;
    font-weight: 700 !important;
}

#feedblock .feedblock_item input::placeholder {
    color: #7a8399 !important;
}

/* ---------- Подвал ---------- */

#footer {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    margin-top: 56px !important;
    padding: 56px 0 32px !important;
    background: var(--grad-ink) !important;
    color: rgba(255, 255, 255, .72);
}

#footer::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 1px;
    background: var(--grad-brand);
    opacity: .7;
}

#footer a,
#footer span,
#footer p,
#footer li {
    color: rgba(255, 255, 255, .72) !important;
}

#footer a:hover {
    color: #fff !important;
}

#footer .ft_subscribe > span {
    color: #fff !important;
    font-weight: 700;
}

#footer .ft_subscribe input {
    border: 1px solid rgba(255, 255, 255, .18) !important;
    border-radius: 999px !important;
    background: rgba(255, 255, 255, .08) !important;
    color: #fff !important;
}

#footer .ft_subscribe input::placeholder {
    color: rgba(255, 255, 255, .5);
}

#footer .ft_subscribe button {
    border: 0 !important;
    border-radius: 999px !important;
    background: #fff !important;
    color: var(--ink) !important;
    font-weight: 700 !important;
}

#footer .ft_social img {
    transition: transform .2s var(--ease);
}

#footer .ft_social a:hover img {
    transform: translateY(-2px);
}

/* ---------- Внутренние страницы: общий ритм ---------- */

.breadcrumb a {
    color: var(--text-muted) !important;
}

.breadcrumb a:hover {
    color: var(--blue) !important;
}

/* ---------- Адаптив ---------- */

@media (max-width: 991.98px) {
    .hero__inner {
        grid-template-columns: 1fr;
    }

    .hero__panel {
        transform: none;
        max-width: 560px;
    }

    #groups .gr_blocks {
        grid-template-columns: 1fr;
    }

    #benefits .benefits_block {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 575.98px) {
    #headtext.hero {
        padding: 36px 0 64px !important;
    }

    .hero__accent {
        white-space: normal;
    }

    .hero-btn {
        flex: 1 1 100%;
    }

    .hero__panel {
        padding: 14px;
        border-radius: var(--radius-lg);
    }

    #groups .gr_first,
    #groups .gr_third {
        min-height: 0;
        padding: 22px !important;
    }

    #groups .gr_first .gr_first-bottom,
    #groups .gr_third .gr_third-bottom {
        grid-template-columns: 1fr 1fr;
    }

    #progtype .progtype_first,
    #education .education_title {
        border-radius: var(--radius-lg);
    }

    #feedblock .feedblock_item {
        padding: 28px 22px !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero__glow {
        animation: none;
    }
}

/* ---------- Доводка ---------- */

/* цифры не рвутся посередине */
.hero-stat__num,
#groups .gr_first .gr_first-bottom .gr_first-bottom_item span,
#groups .gr_third .gr_third-bottom_item .gr_tbi-top span {
    white-space: nowrap;
    overflow-wrap: normal !important;
    word-break: keep-all;
}

@media (max-width: 575.98px) {
    #groups .gr_first .gr_first-bottom .gr_first-bottom_item span,
    #groups .gr_third .gr_third-bottom_item .gr_tbi-top span {
        font-size: 22px !important;
        padding: 14px 14px 0;
    }

    #groups .gr_first .gr_first-bottom .gr_first-bottom_item p,
    #groups .gr_third .gr_third-bottom_item .gr_tbi-top p,
    #groups .gr_first .gr_first-bottom .gr_first-bottom_item a,
    #groups .gr_third .gr_third-bottom_item .gr_tbi-btn span {
        padding-left: 14px !important;
        padding-right: 14px !important;
    }
}

/* подписи партнёров целиком */
#partners .item span {
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    -webkit-line-clamp: unset !important;
}

#partners .partners-demo .owl-carousel .owl-stage-outer,
#partners .owl-carousel.owl-drag .owl-item {
    height: auto !important;
}

/* первый экран — на всю высоту окна, следующий блок начинается ниже */
@media (min-width: 992px) {
    #headtext.hero {
        display: flex;
        align-items: center;
        min-height: calc(100vh - 129px);
        min-height: min(calc(100svh - 129px), 900px);
    }

    #headtext.hero > .container {
        width: 100%;
    }
}

/* 992–1199px без входа: «Войти / Регистрация» компактнее, чтобы меню не наезжало на поиск */
@media (min-width: 992px) and (max-width: 1199.98px) {
    #header .h_login,
    #header .h_login .h_login {
        gap: 8px;
    }

    #header .h_login span.h_login-in {
        padding: 6px 14px !important;
        font-size: 13px;
    }

    #header .h_login a span {
        font-size: 13px !important;
    }
}

/* =====================================================================
   Фильтры (вакансии, резюме, образование, профориентация):
   поля на одной линии, select2 по ширине колонки, одинаковая высота.
   Причина бага: select2 замеряет ширину при запуске, а style.css грузится
   отложенно — ширина/раскладка получались случайными; подписи разной
   длины сдвигали селекты по вертикали.
   ===================================================================== */

/* блок «слева зарплата — справа поля» */
.vacanfilter_block {
    display: flex !important;
    gap: 28px;
    align-items: stretch;
}

.vacanfilter_block > form {
    display: flex;
    gap: 28px;
    width: 100%;
    align-items: stretch;
}

.vacanfilter_block .vacanfilter_block-left {
    flex: 0 0 28%;
    width: auto !important;
    float: none !important;
    min-width: 0;
}

.vacanfilter_block .vacanfilter_block-right {
    flex: 1 1 auto;
    display: flex !important;
    flex-wrap: wrap;
    gap: 14px;
    align-items: flex-end;
    width: auto !important;
    float: none !important;
    padding: 0 !important;
    min-width: 0;
}

.vacanfilter_block .vacanfilter_block-right > div {
    display: flex !important;
    flex-direction: column;
    justify-content: flex-end;
    flex: 1 1 170px;
    width: auto !important;
    min-width: 0;
    margin: 0 !important;
    padding: 0 !important;
}

.vacanfilter_block .vacanfilter_block-right > .vacanfilter_block-right_prof {
    flex-basis: 100%;
}

.vacanfilter_block .vacanfilter_block-right > .vacanfilter_block-right_btn {
    flex: 0 0 180px;
}

/* пустые колонки и скрытые скриптом блоки не занимают место */
.vacanfilter_block .vacanfilter_block-right > div:not(:has(*)),
.catalfilter_block-form form > div:not(:has(*)),
.vacanfilter_block .vacanfilter_block-right > div[style*="display: none"],
.vacanfilter_block .vacanfilter_block-right > div[style*="display:none"],
.catalfilter_block-form form > div[style*="display: none"],
.catalfilter_block-form form > div[style*="display:none"] {
    display: none !important;
}

.vacanfilter_block .vacanfilter_block-right_prof input {
    width: 100% !important;
    min-height: 48px;
}

/* подписи полей */
.vacanfilter_block .vacanfilter_block-right > div > span:first-child:not(.select2),
.vacanfilter_block .vacanfilter_block-right .vbrt_title,
.catalfilter_block-form form > div > span:first-child {
    display: block !important;
    margin: 0 0 8px !important;
    color: var(--text-muted) !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    line-height: 1.3 !important;
}

/* select2: без старых отступов у внутренних span, ширина = колонка */
.vacanfilter_block .select2-container,
.catalfilter_block-form .select2-container {
    display: block !important;
    width: 100% !important;
    max-width: 100%;
    margin: 0 !important;
}

.vacanfilter_block .select2-container span,
.catalfilter_block-form .select2-container span {
    margin: 0 !important;
    border-radius: 0;
}

.vacanfilter_block select,
.catalfilter_block-form select {
    width: 100% !important;
    min-height: 48px;
}

.vacanfilter_block .vacanfilter_block-right_btn button,
.catalfilter_block-form .catalfilter_block-form_btn button {
    width: 100% !important;
    min-height: 48px !important;
    margin: 0 !important;
    padding: 0 20px !important;
    border: 0 !important;
    border-radius: 999px !important;
    background: var(--blue) !important;
    color: #fff !important;
    font-weight: 700 !important;
    box-shadow: 0 10px 24px rgba(58, 107, 255, .28);
    transition: background-color .2s, transform .2s var(--ease);
}

.vacanfilter_block .vacanfilter_block-right_btn button:hover,
.catalfilter_block-form .catalfilter_block-form_btn button:hover {
    background: var(--primary-hover) !important;
    transform: translateY(-1px);
}

/* фильтр профориентации (catalfilter) */
.catalfilter_block-form form {
    display: flex !important;
    flex-wrap: wrap;
    gap: 14px;
    align-items: flex-end;
}

.catalfilter_block-form form > div {
    display: flex !important;
    flex-direction: column;
    justify-content: flex-end;
    flex: 1 1 180px;
    width: auto !important;
    float: none !important;
    min-width: 0;
    margin: 0 !important;
    padding: 0 !important;
}

.catalfilter_block-form form > .catalfilter_block-form_name {
    flex-basis: 100%;
}

.catalfilter_block-form form > .catalfilter_block-form_btn {
    flex: 0 0 180px;
}

.catalfilter_block-form form > .catalfilter_block-form_name input,
.catalfilter_block-form form > div > select,
.vacanfilter_block .vacanfilter_block-right_prof input {
    width: 100% !important;
    height: 48px !important;
    min-height: 48px;
    padding: 0 16px !important;
    border-radius: 10px !important;
    font-size: 15px !important;
}

/* поля catalfilter в style.css спозиционированы absolute (блок нулевой высоты) */
.catalfilter_block-form form > div > input,
.catalfilter_block-form form > div > select,
.catalfilter_block-form form > div > button {
    position: static !important;
    inset: auto !important;
    margin: 0 !important;
}

/* только поиск + кнопка (без селектов) — в одну строку */
.catalfilter_block-form form:not(:has(select)) > .catalfilter_block-form_name {
    flex: 1 1 260px;
}

/* общий вид select2 — как у остальных полей */
.select2-container {
    min-width: 88px;
}

.select2-container--default .select2-selection--single {
    display: flex !important;
    align-items: center;
    height: 48px !important;
    border: 1px solid var(--border-strong) !important;
    border-radius: 10px !important;
    background: #fff !important;
    transition: border-color .15s, box-shadow .15s;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    width: 100%;
    padding: 0 30px 0 12px !important;
    line-height: 1.3 !important;
    color: var(--text) !important;
    font-size: 15px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    top: 0 !important;
    right: 10px !important;
    height: 100% !important;
}

.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--open .select2-selection--single {
    border-color: var(--blue) !important;
    box-shadow: var(--ring) !important;
}

.select2-dropdown {
    border: 1px solid var(--border) !important;
    border-radius: 12px !important;
    overflow: hidden;
    box-shadow: var(--shadow-hover) !important;
}

.select2-container--default .select2-results__option--highlighted[aria-selected],
.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable {
    background: var(--blue) !important;
    color: #fff !important;
}

/* планшеты и телефоны: зарплата сверху, поля столбиком */
@media (max-width: 991.98px) {
    .vacanfilter_block,
    .vacanfilter_block > form {
        flex-direction: column;
        gap: 18px;
    }

    .vacanfilter_block .vacanfilter_block-left {
        flex: 0 0 auto;
    }
}

@media (max-width: 575.98px) {
    .vacanfilter_block .vacanfilter_block-right > div,
    .catalfilter_block-form form > div,
    .catalfilter_block-form form:not(:has(select)) > .catalfilter_block-form_name {
        flex: 1 1 100% !important;
    }
}

/* обычный select в фильтрах — место под стрелку справа */
.catalfilter_block-form form > div > select,
.vacanfilter_block select:not(.select2-hidden-accessible) {
    padding-right: 40px !important;
    text-overflow: ellipsis;
}

/* =====================================================================
   Карточки «Тесты на профориентацию» (/Proforientation/LandProforientation)
   Было: фиксированная высота 550px + строка с кнопкой position:absolute —
   длинный текст наезжал на кнопку, цену и картинку в углу.
   Стало: высота по содержимому, карточки в ряду одной высоты, снизу —
   зона «описание + кнопка + цена» слева и картинка справа.
   Картинка (фон, 30% ширины, пропорция 125x347) ≈ 83.3cqw высотой.
   ===================================================================== */

#proftest .row {
    row-gap: 24px;
}

#proftest .row > [class*="col-"] {
    display: flex;
}

#proftest .proftest_item {
    container-type: inline-size;
    position: relative;
    display: flex !important;
    flex-direction: column;
    width: 100%;
    height: auto !important;
    min-height: 0 !important;
    padding: 26px 24px 24px !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--radius-lg) !important;
    background-color: #fff !important;
    box-shadow: var(--shadow-card);
    transition: box-shadow .3s var(--ease), transform .3s var(--ease);
}

#proftest .proftest_item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

#proftest .proftest_item-title {
    padding-right: 96px;
    min-height: 0 !important;
    height: auto !important;
}

#proftest .proftest_item-title h2 {
    margin: 0 0 14px !important;
    font-size: 20px !important;
    line-height: 1.25 !important;
    -webkit-hyphens: manual;
    hyphens: manual;
    overflow-wrap: normal;
}

#proftest .proftest_item-time {
    top: 24px !important;
    right: 20px !important;
}

#proftest .proftest_item-txt {
    height: auto !important;
    overflow: visible !important;
}

/* нижняя зона: слева описание, кнопка, цена; справа — картинка */
#proftest .proftest_item-btm {
    position: static !important;
    height: auto !important;
    margin-top: auto !important;
    padding: 18px 34% 0 0 !important;
    min-height: calc(83.3cqw - 76px);
    display: flex;
    align-items: flex-end;
}

#proftest .proftest_item-btm span {
    display: block;
    color: var(--text-muted) !important;
    font-size: 13px !important;
    line-height: 1.45 !important;
}

#proftest .proftest_item-link {
    position: static !important;
    inset: auto !important;
    width: auto !important;
    display: flex !important;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 16px;
    margin-top: 16px;
    padding-right: 34%;
}

#proftest .proftest_item-link_button a {
    display: inline-flex;
    text-decoration: none !important;
}

#proftest .proftest_item-link_button span {
    display: inline-flex !important;
    align-items: center;
    min-height: 44px;
    padding: 0 46px 0 20px !important;
    background-position: calc(100% - 16px) 50% !important;
    border-radius: 999px !important;
    white-space: nowrap;
}

#proftest .proftest_item-link_right {
    position: static !important;
    display: flex !important;
    flex-direction: column;
    line-height: 1.2;
}

#proftest .proftest_item-link_right .pilr_price {
    color: var(--text-muted) !important;
    font-size: 12px !important;
}

#proftest .proftest_item-link_right .pilr_numb {
    color: var(--ink) !important;
    font-family: var(--font-display) !important;
    font-size: 20px !important;
    font-weight: 700 !important;
    white-space: nowrap;
}

/* следующий блок не налезает на карточки */
#proftest {
    padding-bottom: 48px !important;
    height: auto !important;
}

/* =====================================================================
   Справочник профессий: карточки профессий (отрасль, группа специальностей)
   Сервер кладёт карточки стопками по 3 в колонку col-md-3 — из-за разной
   длины названий колонки «съезжали», лишняя колонка падала вниз;
   внутри карточки 60px пустоты сверху, текст прижат к низу, переносы
   по слогам («ДЕТ-СКОГО»).
   Стало: колонки прозрачны (display: contents), ряд — ровная сетка,
   карточки одной высоты в ряду, текст сверху без переносов.
   ===================================================================== */

.row:has(> [class*="col-"] > .profcalalog_natscien):has(> [class*="col-"] > .profcalalog_small) {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
    margin-left: 0 !important;
    margin-right: 0 !important;
    margin-bottom: 40px !important;
}

.row:has(> [class*="col-"] > .profcalalog_natscien):has(> [class*="col-"] > .profcalalog_small) > [class*="col-"] {
    display: contents;
}

/* карточка прогноза по отрасли — первая колонка, на две строки */
.row:has(> [class*="col-"] > .profcalalog_natscien):has(> [class*="col-"] > .profcalalog_small) .profcalalog_natscien {
    grid-row: span 2;
    margin: 0 !important;
    height: auto !important;
    border-radius: var(--radius-lg) !important;
}

.profcalalog_small {
    display: flex !important;
    flex-direction: column;
    justify-content: flex-start;
    gap: 8px;
    height: auto !important;
    min-height: 112px;
    margin: 0 0 20px !important;
    padding: 18px 20px 20px !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--radius-lg) !important;
    background: #fff !important;
    box-shadow: var(--shadow-card);
    transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s;
}

/* в сетке отрасли: карточки тянутся на высоту ряда, отступы даёт gap */
.row:has(> [class*="col-"] > .profcalalog_natscien):has(> [class*="col-"] > .profcalalog_small) .profcalalog_small {
    height: 100% !important;
    margin: 0 !important;
}

.profcalalog_small:hover {
    transform: translateY(-3px);
    border-color: var(--blue) !important;
    box-shadow: var(--shadow-hover);
}

.profcalalog_small > span {
    display: inline-block !important;
    align-self: flex-start;
    margin: 0 !important;
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--primary-soft);
    color: var(--blue) !important;
    font-size: 12px !important;
    font-weight: 600;
    line-height: 1.4 !important;
}

.profcalalog_small > a {
    text-decoration: none !important;
}

.profcalalog_small h2 {
    margin: 0 !important;
    color: var(--ink) !important;
    font-family: var(--font) !important;
    font-size: 16px !important;
    font-weight: 800 !important;
    line-height: 1.3 !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
    -webkit-hyphens: manual;
    hyphens: manual;
    overflow-wrap: normal;
    word-break: normal;
}

.profcalalog_small:hover h2 {
    color: var(--blue) !important;
}

@media (max-width: 991.98px) {
    .row:has(> [class*="col-"] > .profcalalog_natscien):has(> [class*="col-"] > .profcalalog_small) {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .row:has(> [class*="col-"] > .profcalalog_natscien):has(> [class*="col-"] > .profcalalog_small) .profcalalog_natscien {
        grid-column: 1 / -1;
        grid-row: auto;
    }
}

@media (max-width: 575.98px) {
    .row:has(> [class*="col-"] > .profcalalog_natscien):has(> [class*="col-"] > .profcalalog_small) {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}
