/* ════════════════════════════════════════════════════════════
   LANDING / PUBLIC SITE STYLES — ItEdu.kz
   Выделено из inline <style> в _LayoutLanding.cshtml.
   Обновлять этот файл, а НЕ layout.
   ════════════════════════════════════════════════════════════ */


/* БАГ (исправлен): Bootstrap `.row.g-5` имеет -24px margins, но `.container`
   компенсирует только 12px padding — на узких экранах hero и Contacts давали
   12px горизонтального скролла. Клиппируем на уровне body. */
.landing-body { overflow-x: hidden; }

/* ════════════════════════════════════
   DESIGN TOKENS
   ════════════════════════════════════ */
:root {
    --green:        #008c5b;
    --green-dark:   #006b45;
    --green-light:  rgba(0,140,91,.09);
    --navy:         #1A2A36;
    --navy-2:       #243545;
    --gold:         #c8a04a;
    --bg-1:         #ffffff;
    --bg-2:         #f5f6f8;
    --bg-3:         #edf0f3;
    --gray-light:   #f5f6f8;
    --text-1:       #111827;
    --text-2:       #4b5563;
    --text-3:       #9ca3af;
    --border:       #e5e7eb;
    --radius-sm:    6px;
    --radius:       10px;
    --radius-lg:    16px;
    --shadow-sm:    0 1px 4px rgba(0,0,0,.07);
    --shadow:       0 4px 18px rgba(0,0,0,.09);
    --shadow-lg:    0 12px 44px rgba(0,0,0,.13);
    --trans:        all .2s ease;
}

/* ════════════════════════════════════
   BASE
   ════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    font-size: 15px;
    color: var(--text-1);
    line-height: 1.7;
    background: #fff;
    -webkit-font-smoothing: antialiased;
}
h1,h2,h3,h4,h5,h6 {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    color: var(--navy);
    line-height: 1.25;
    margin-bottom: 0;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; }
p { margin-bottom: 0; }

/* ════════════════════════════════════
   TOPBAR
   ════════════════════════════════════ */
.topbar {
    background: var(--navy);
    padding: 8px 0;
    font-size: 13px;
    color: rgba(255,255,255,.6);
}
.topbar a { color: rgba(255,255,255,.6); transition: color .2s; }
.topbar a:hover { color: #fff; }
.topbar .t-info { display: flex; align-items: center; gap: 20px; }
.topbar .t-info span { display: flex; align-items: center; gap: 6px; }
.topbar .t-socials { display: flex; align-items: center; gap: 6px; }
.topbar .t-socials a {
    display: inline-flex; align-items: center; justify-content: center;
    width: 28px; height: 28px; border-radius: 50%;
    background: rgba(255,255,255,.08); transition: var(--trans);
}
.topbar .t-socials a:hover { background: var(--green); color: #fff; }

/* ════════════════════════════════════
   NAVBAR
   ════════════════════════════════════ */
.land-nav {
    background: #fff;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
}
.land-nav .inner {
    display: flex;
    align-items: center;
    height: 68px;
    gap: 0;
}
@media (max-width: 767px) {
    .land-nav .inner { height: 64px; }
}
.land-nav .brand {
    display: flex; align-items: center; gap: 10px;
    font-weight: 800; font-size: 19px; color: var(--navy);
    margin-right: 32px; flex-shrink: 0;
}
.land-nav .brand img { height: 40px; }
.land-nav .brand .brand-name {
    font-weight: 900; font-size: 20px;
    background: linear-gradient(135deg, var(--green), #00b86d);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.land-nav .nav-menu {
    display: flex; align-items: center; gap: 2px; flex: 1;
}
.land-nav .nav-menu a {
    display: inline-flex; align-items: center;
    font-size: 14px; font-weight: 500;
    color: var(--text-2);
    padding: 8px 13px;
    border-radius: var(--radius-sm);
    transition: var(--trans);
    white-space: nowrap;
}
.land-nav .nav-menu a:hover,
.land-nav .nav-menu a.active {
    color: var(--green);
    background: var(--green-light);
}
/* "Войти" — вторичная ссылка, не конкурирует с WhatsApp CTA (§9.1). */
.land-nav .btn-login {
    display: inline-flex; align-items: center; gap: 6px;
    background: transparent; color: var(--text-2) !important;
    padding: 9px 12px;
    border-radius: var(--radius-sm);
    font-size: 13.5px; font-weight: 500;
    margin-left: 10px; flex-shrink: 0;
    transition: var(--trans);
}
.land-nav .btn-login:hover {
    color: var(--green) !important;
    background: var(--green-light);
}

/* Компактный WhatsApp CTA в navbar — не ломает layout на 1200-1366px */
.land-nav .nav-wa-cta {
    padding: 9px 18px !important;
    font-size: 13.5px !important;
    margin-left: 12px;
    flex-shrink: 0;
    white-space: nowrap;
    line-height: 1.2;
}
@media (max-width: 1199px) {
    .land-nav .nav-wa-cta {
        padding: 8px 14px !important;
        font-size: 13px !important;
    }
}
.land-nav .burger {
    display: none; flex-direction: column; gap: 5px;
    background: none; border: none; cursor: pointer;
    padding: 10px; margin-left: auto;
}
.land-nav .burger span {
    display: block; width: 22px; height: 2px;
    background: var(--navy); border-radius: 2px; transition: var(--trans);
}

/* Mobile menu */
.land-nav-mobile {
    display: none;
    background: #fff;
    border-top: 1px solid var(--border);
    padding: 10px 16px 16px;
}
/* БАГ (исправлен): меню было position:static и жило как сосед sticky-nav.
   Внизу страницы оно открывалось в своём "родном" месте DOM — вверху документа,
   далеко вне вьюпорта. Теперь — fixed под sticky-nav, виден при любом скролле. */
.land-nav-mobile.is-open {
    display: block;
    position: fixed;
    top: 64px;           /* высота .land-nav .inner на мобильном (см. @media max-width:767px) */
    left: 0;
    right: 0;
    z-index: 999;        /* под nav (1000), чтобы бордер nav оставался сверху */
    max-height: calc(100vh - 64px);
    overflow-y: auto;
    box-shadow: 0 8px 16px rgba(0, 0, 0, .08);
}
.land-nav-mobile a {
    display: block;
    padding: 10px 14px;
    color: var(--text-2); font-size: 15px; font-weight: 500;
    border-radius: var(--radius-sm);
    transition: var(--trans);
}
.land-nav-mobile a:hover,
.land-nav-mobile a.active { background: var(--green-light); color: var(--green); }
.land-nav-mobile .mob-login {
    display: block; text-align: center;
    background: var(--green); color: #fff !important;
    padding: 12px; border-radius: var(--radius-sm);
    font-weight: 700; margin-top: 10px;
}

/* ════════════════════════════════════
   PAGE HERO (inner pages)
   ════════════════════════════════════ */
.page-hero {
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 100%);
    padding: 56px 0;
}
.page-hero h1 {
    font-size: 2rem; font-weight: 800; color: #fff; margin-bottom: 10px;
}
.page-hero .breadcrumb { margin-bottom: 0; background: none; padding: 0; }
.page-hero .breadcrumb-item a { color: rgba(255,255,255,.55); }
.page-hero .breadcrumb-item + .breadcrumb-item::before { color: rgba(255,255,255,.3); }
.page-hero .breadcrumb-item.active { color: var(--green); }

/* ════════════════════════════════════
   SECTION UTILITIES
   ════════════════════════════════════ */
.sec-pad   { padding: 80px 0; }
.sec-pad-sm { padding: 60px 0; }

.section-title,
.sec-title {
    text-align: center;
    margin-bottom: 52px;
}
.section-title .label,
.sec-title .chip {
    display: inline-block;
    background: var(--green-light);
    color: var(--green);
    font-size: 11px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 1.5px;
    padding: 4px 14px; border-radius: 20px; margin-bottom: 12px;
}
.section-title h2,
.sec-title h2 {
    font-size: 2rem; font-weight: 800; color: var(--navy); margin-bottom: 12px;
}
.section-title p,
.sec-title p { color: var(--text-2); max-width: 560px; margin: 0 auto 16px; }
.section-divider,
.sec-divider {
    width: 44px; height: 3px; background: var(--green);
    margin: 0 auto; border-radius: 2px;
}

/* ════════════════════════════════════
   BUTTONS
   ════════════════════════════════════ */
.btn-green,
.btn-primary-g {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--green); color: #fff;
    padding: 11px 26px;
    border-radius: var(--radius-sm);
    font-weight: 600; font-size: 14px;
    border: 2px solid var(--green);
    transition: var(--trans); cursor: pointer;
}
.btn-green:hover,
.btn-primary-g:hover {
    background: var(--green-dark); border-color: var(--green-dark); color: #fff;
}
.btn-outline-green,
.btn-outline-g {
    display: inline-flex; align-items: center; gap: 8px;
    background: transparent; color: var(--green);
    padding: 11px 26px;
    border-radius: var(--radius-sm);
    font-weight: 600; font-size: 14px;
    border: 2px solid var(--green);
    transition: var(--trans); cursor: pointer;
}
.btn-outline-green:hover,
.btn-outline-g:hover { background: var(--green); color: #fff; }

/* ── WhatsApp CTA button (brand-green, с иконкой) ── */
.btn-wa {
    display: inline-flex; align-items: center; gap: 8px;
    background: #25d366; color: #fff !important;
    padding: 10px 22px;
    border-radius: var(--radius-sm);
    font-weight: 600; font-size: 14px;
    border: 2px solid #25d366;
    transition: var(--trans); cursor: pointer;
    white-space: nowrap;
}
.btn-wa:hover { background: #1ebe5d; border-color: #1ebe5d; color: #fff !important; }
.btn-wa svg { flex-shrink: 0; }

/* ════════════════════════════════════
   CARDS
   ════════════════════════════════════ */
.card-service,
.c-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: var(--trans);
    height: 100%;
    display: flex; flex-direction: column;
}
.card-service:hover,
.c-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-5px);
    border-color: transparent;
}
.card-service .card-img-wrap,
.c-card .img-wrap {
    height: 200px; overflow: hidden;
    background: var(--bg-2);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.card-service .card-img-wrap img,
.c-card .img-wrap img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform .45s ease;
}
.card-service:hover .card-img-wrap img,
.c-card:hover .img-wrap img { transform: scale(1.06); }
.card-service .no-img-icon,
.c-card .icon-wrap {
    font-size: 3rem; color: var(--green);
}
.card-service .card-body,
.c-card .c-body {
    padding: 20px; flex: 1;
    display: flex; flex-direction: column;
}
.card-service .card-title,
.c-card .c-title {
    font-size: 15px; font-weight: 700; color: var(--navy); margin-bottom: 8px;
}
.card-service .card-text,
.c-card .c-text {
    font-size: 13px; color: var(--text-2); line-height: 1.6;
    margin-bottom: 12px; flex: 1;
}

/* ── Teacher avatar ── */
.teacher-avatar {
    width: 160px; height: 160px;
    border-radius: 50%;
    object-fit: cover; object-position: top center;
    display: block; margin: 0 auto 20px;
    border: 3px solid var(--green);
    box-shadow: 0 4px 20px rgba(0,140,91,.25);
}
@media (max-width: 576px) {
    .teacher-avatar { width: 130px; height: 130px; }
}

/* ════════════════════════════════════
   FORM CONTROLS
   ════════════════════════════════════ */
.form-control {
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px; font-family: inherit;
    padding: 10px 14px;
    color: var(--text-1);
    transition: var(--trans);
}
.form-control:focus {
    border-color: var(--green);
    box-shadow: 0 0 0 3px rgba(0,140,91,.1);
    outline: none;
}
.form-control::placeholder { color: var(--text-3); }
textarea.form-control { resize: vertical; }

/* ════════════════════════════════════
   STAT CARD
   ════════════════════════════════════ */
.stat-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px; text-align: center;
}
.stat-card .num { font-size: 2.2rem; font-weight: 900; color: var(--green); line-height: 1; }
.stat-card .lbl { font-size: 13px; color: var(--text-2); margin-top: 6px; }

/* ════════════════════════════════════
   MOBILE STICKY CTA (нижняя плавающая)
   §8.5 — IntersectionObserver: скрыт пока виден #hero_primary.
   Класс .is-visible добавляется JS-ом; никакой анимации, вызывающей CLS.
   ════════════════════════════════════ */
.mobile-sticky-cta {
    display: none;                                 /* по умолчанию скрыт */
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 1050;
    padding: 8px 12px calc(8px + env(safe-area-inset-bottom)) 12px;
    background: rgba(255,255,255,.96);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-top: 1px solid var(--border);
    box-shadow: 0 -4px 14px rgba(0,0,0,.08);
    opacity: 0;
    transition: opacity .18s ease;
}
.mobile-sticky-cta .btn-wa {
    width: 100%;
    justify-content: center;
    padding: 12px;
    font-size: 15px;
    min-height: 48px;
}
@media (max-width: 767px) {
    .mobile-sticky-cta.is-visible {
        display: block;
        opacity: 1;
    }
    /* padding-bottom у body добавляется JS-ом только когда sticky показан */
    body.has-sticky-cta-visible { padding-bottom: 68px; }
}
@media (prefers-reduced-motion: reduce) {
    .mobile-sticky-cta { transition: none; }
}

/* ════════════════════════════════════
   FOOTER
   ════════════════════════════════════ */
footer.site-footer {
    background: var(--navy);
    color: rgba(255,255,255,.68);
    padding: 64px 0 0;
    font-size: 14px;
}
footer.site-footer h5 {
    font-size: 15px; font-weight: 700; color: #fff;
    margin-bottom: 22px; font-family: 'Inter', sans-serif;
}
footer.site-footer a { color: rgba(255,255,255,.65); transition: color .2s; }
footer.site-footer a:hover { color: var(--green); }
.f-link { display: flex; align-items: center; gap: 6px; padding: 4px 0; }
.f-contact { display: flex; gap: 12px; margin-bottom: 14px; align-items: flex-start; }
.f-contact i { color: var(--green); margin-top: 2px; flex-shrink: 0; }
.f-bottom {
    background: rgba(0,0,0,.22);
    margin-top: 52px;
    padding: 18px 0;
    font-size: 13px;
}
.f-socials a {
    display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; border-radius: 50%;
    background: rgba(255,255,255,.08);
    color: rgba(255,255,255,.68);
    margin-right: 8px; transition: var(--trans);
}
.f-socials a:hover { background: var(--green); color: #fff; }

/* Social icons variant for LIGHT backgrounds (Contacts page) */
.l-socials { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.l-socials a {
    display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; border-radius: 50%;
    background: #fff;
    border: 1px solid var(--border);
    color: var(--text-2);
    transition: var(--trans);
}
.l-socials a:hover {
    border-color: var(--green);
    color: var(--green);
    transform: translateY(-1px);
}

/* ════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════ */
@media (max-width: 991px) {
    .land-nav .nav-menu { display: none; }
    .land-nav .btn-login { display: none; }
    .land-nav .burger { display: flex; }
}
@media (max-width: 767px) {
    .sec-pad { padding: 56px 0; }
    .section-title h2, .sec-title h2 { font-size: 1.6rem; }
    .page-hero { padding: 40px 0; }
    .page-hero h1 { font-size: 1.5rem; }
}
