/* ================================================================
   ITServiceSPB — Main Stylesheet
   Тематика: Разработка приложений для бизнеса
   Стиль: Тёмный, современный, с градиентами
   Bootstrap 5 + кастомные переменные
================================================================ */

/* ────────────────────────────────────────────────
   CSS VARIABLES
──────────────────────────────────────────────── */
:root {
    /* Colors */
    --color-bg-deep:    #080c18;
    --color-bg-dark:    #0b0f1e;
    --color-bg-card:    #111627;
    --color-bg-hover:   #151b2e;

    --color-primary:    #4f6ef7;
    --color-primary-h:  #3a58e8;
    --color-accent:     #7c3aed;
    --color-accent-h:   #6d28d9;

    --color-text:       #e2e8f0;
    --color-muted:      #8b9abb;
    --color-border:     rgba(255,255,255,.08);
    --color-border-h:   rgba(255,255,255,.16);

    /* Gradients */
    --grad-primary:     linear-gradient(135deg, #4f6ef7 0%, #7c3aed 100%);
    --grad-header-top:  linear-gradient(180deg, #0d1124 0%, #0b0f1e 100%);
    --grad-header-nav:  linear-gradient(180deg, #0f1425 0%, #0c1020 100%);
    --grad-footer:      linear-gradient(180deg, #090d1c 0%, #06091a 100%);
    --grad-glow:        radial-gradient(ellipse 60% 40% at 50% 0%, rgba(79,110,247,.18) 0%, transparent 70%);

    /* Shadows */
    --shadow-sm:        0 2px 8px rgba(0,0,0,.35);
    --shadow-md:        0 4px 20px rgba(0,0,0,.5);
    --shadow-glow:      0 0 30px rgba(79,110,247,.25);
    --shadow-btn:       0 4px 15px rgba(79,110,247,.4);

    /* Typography */
    --font-heading:     'Montserrat', sans-serif;
    --font-body:        'Inter', sans-serif;
    --fw-regular:       400;
    --fw-medium:        500;
    --fw-semibold:      600;
    --fw-bold:          700;

    /* Transitions */
    --transition:       all .25s ease;
    --transition-slow:  all .4s ease;

    /* Header */
    --header-top-h:     68px;
    --header-nav-h:     52px;
    --header-total:     calc(var(--header-top-h) + var(--header-nav-h));

    /* Radii */
    --radius-sm:  6px;
    --radius-md:  10px;
    --radius-lg:  16px;
    --radius-pill: 50px;
}

/* ────────────────────────────────────────────────
   RESET & BASE
──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-total);
}

body {
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.7;
    color: var(--color-text);
    background-color: var(--color-bg-deep);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: var(--transition);
}
a:hover { color: #fff; }

img, svg { display: block; max-width: 100%; }

/* ────────────────────────────────────────────────
   SKIP LINK (accessibility)
──────────────────────────────────────────────── */
.skip-link:focus {
    position: fixed;
    top: 10px; left: 10px;
    z-index: 10000;
    padding: 8px 16px;
    background: var(--color-primary);
    color: #fff;
    border-radius: var(--radius-sm);
    font-weight: var(--fw-semibold);
}


/* ────────────────────────────────────────────────
   CONTAINER (кастомная ширина макета)
──────────────────────────────────────────────── */
.container,
.container-sm,
.container-md,
.container-lg,
.container-xl,
.container-xxl,
.container-fluid {
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
    margin-right: auto;
    margin-left: auto;
}

/* Переопределяем Bootstrap max-width для всех брейкпоинтов ≥ xxl */
@media (min-width: 576px)  { .container, .container-sm { max-width: 100%; } }
@media (min-width: 768px)  { .container, .container-sm, .container-md { max-width: 100%; } }
@media (min-width: 992px)  { .container, .container-sm, .container-md, .container-lg { max-width: 100%; } }
@media (min-width: 1200px) { .container, .container-sm, .container-md, .container-lg, .container-xl { max-width: 100%; } }

/* Главное значение — максимальная ширина макета */
@media (min-width: 1702px) {
    .container,
    .container-sm,
    .container-md,
    .container-lg,
    .container-xl,
    .container-xxl {
        max-width: 1672px;
    }
}

/* На экранах до 1701px — резиновый (full width минус padding) */
@media (max-width: 1701px) {
    .container,
    .container-sm,
    .container-md,
    .container-lg,
    .container-xl,
    .container-xxl {
        max-width: 100%;
    }
}

/* ════════════════════════════════════════════════
   HEADER
════════════════════════════════════════════════ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-md);
}

/* ── Header Top ── */
.header-top {
    background: var(--grad-header-top);
    border-bottom: 1px solid var(--color-border);
    height: var(--header-top-h);
    display: flex;
    align-items: center;
}

/* Logo */
.header-logo {
    text-decoration: none;
    color: inherit;
    outline-offset: 4px;
}
.header-logo:hover { color: inherit; }

.logo-icon-wrap {
    flex-shrink: 0;
    width: 48px; height: 48px;
    display: flex; align-items: center; justify-content: center;
    background: var(--grad-primary);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-glow);
    transition: var(--transition);
}
.header-logo:hover .logo-icon-wrap {
    transform: scale(1.05);
    box-shadow: 0 0 40px rgba(79,110,247,.45);
}
.logo-icon-wrap img { filter: brightness(10); }

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}
.logo-name {
    font-family: var(--font-heading);
    font-weight: var(--fw-bold);
    font-size: 1.2rem;
    color: #fff;
    letter-spacing: .01em;
}
.logo-tagline {
    font-size: .7rem;
    color: var(--color-muted);
    font-weight: var(--fw-medium);
    text-transform: uppercase;
    letter-spacing: .05em;
}

/* Phone */
.header-phone {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    font-family: var(--font-heading);
    font-weight: var(--fw-semibold);
    font-size: .95rem;
    text-decoration: none;
    padding: 6px 14px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--color-border);
    background: rgba(255,255,255,.04);
    transition: var(--transition);
    white-space: nowrap;
}
.header-phone:hover {
    color: var(--color-primary);
    border-color: var(--color-primary);
    background: rgba(79,110,247,.08);
    box-shadow: 0 0 16px rgba(79,110,247,.2);
}
.header-phone .bi { font-size: 1rem; color: var(--color-primary); }

/* ── Social Icons ── */
.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px; height: 36px;
    border-radius: 50%;
    border: 1px solid var(--color-border);
    background: rgba(255,255,255,.04);
    color: var(--color-muted);
    font-size: .95rem;
    text-decoration: none;
    transition: var(--transition);
    flex-shrink: 0;
}
.social-icon:hover {
    color: #fff;
    border-color: var(--color-primary);
    background: rgba(79,110,247,.15);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79,110,247,.3);
}
.social-icon--tg:hover { background: rgba(39,160,209,.2); border-color: #27a0d1; }
.social-icon--vk:hover { background: rgba(0,119,255,.2); border-color: #0077ff; }
.social-icon--ok:hover { background: rgba(243,113,0,.2); border-color: #f37100; }

/* ── Header Nav ── */
.header-nav {
    background: var(--grad-header-nav);
    height: var(--header-nav-h);
    display: flex;
    align-items: center;
    position: relative;
}
.header-nav .container { position: static; }

/* Main Menu (desktop) */
.main-menu {
    flex-direction: row;
    align-items: center;
}
.main-menu__link {
    display: block;
    padding: 6px 14px;
    color: var(--color-muted);
    font-size: .875rem;
    font-weight: var(--fw-medium);
    border-radius: var(--radius-sm);
    text-decoration: none;
    white-space: nowrap;
    position: relative;
    transition: var(--transition);
}
.main-menu__link::after {
    content: '';
    position: absolute;
    bottom: 0; left: 50%;
    width: 0; height: 2px;
    background: var(--grad-primary);
    border-radius: 2px;
    transform: translateX(-50%);
    transition: width .25s ease;
}
.main-menu__link:hover {
    color: #fff;
    background: rgba(255,255,255,.05);
}
.main-menu__link:hover::after,
.main-menu__link.is-active::after { width: calc(100% - 28px); }
.main-menu__link.is-active {
    color: #fff;
    background: rgba(79,110,247,.12);
}

/* ── CTA Buttons ── */
.btn-primary-cta {
    display: inline-flex;
    align-items: center;
    padding: 9px 20px;
    background: var(--grad-primary);
    color: #fff !important;
    font-family: var(--font-heading);
    font-weight: var(--fw-semibold);
    font-size: .85rem;
    border: none;
    border-radius: var(--radius-pill);
    box-shadow: var(--shadow-btn);
    text-decoration: none;
    white-space: nowrap;
    transition: var(--transition);
}
.btn-primary-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(79,110,247,.55);
    filter: brightness(1.1);
}
.btn-primary-cta:active { transform: translateY(0); }

.btn-outline-cta {
    display: inline-flex;
    align-items: center;
    padding: 8px 20px;
    background: transparent;
    color: var(--color-primary) !important;
    font-family: var(--font-heading);
    font-weight: var(--fw-semibold);
    font-size: .85rem;
    border: 1px solid var(--color-primary);
    border-radius: var(--radius-pill);
    text-decoration: none;
    white-space: nowrap;
    transition: var(--transition);
}
.btn-outline-cta:hover {
    background: rgba(79,110,247,.12);
    color: #fff !important;
    border-color: var(--color-primary-h);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(79,110,247,.25);
}

/* ── Burger Button ── */
.burger-btn {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px; height: 40px;
    padding: 6px;
    background: rgba(255,255,255,.05);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    z-index: 1100;
    flex-shrink: 0;
}
.burger-btn:hover {
    background: rgba(79,110,247,.15);
    border-color: var(--color-primary);
}
.burger-line {
    display: block;
    width: 100%; height: 2px;
    background: var(--color-text);
    border-radius: 2px;
    transition: var(--transition);
    transform-origin: center;
}
.burger-btn.is-open .burger-line:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger-btn.is-open .burger-line:nth-child(2) { opacity: 0; transform: scaleX(0); }
.burger-btn.is-open .burger-line:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Mobile nav collapse ── */
.nav-collapse {
    /* Desktop: inline row */
}

/* ── Overlay ── */
.nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.65);
    z-index: 990;
    backdrop-filter: blur(3px);
}
.nav-overlay.is-visible { display: block; }

/* ════════════════════════════════════════════════
   INNER PAGE HEADER (breadcrumbs + H1)
════════════════════════════════════════════════ */
.inner-page-header {
    background: linear-gradient(180deg, #0f1425 0%, #0b0f1e 100%);
    border-bottom: 1px solid var(--color-border);
    padding: 24px 0 28px;
    position: relative;
    overflow: hidden;
}
.inner-page-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--grad-glow);
    pointer-events: none;
}

/* Breadcrumb list */
.breadcrumb-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    list-style: none;
    padding: 0; margin: 0 0 12px;
}
.breadcrumb-list__link {
    color: var(--color-muted);
    font-size: .8rem;
    text-decoration: none;
    transition: var(--transition);
}
.breadcrumb-list__link:hover { color: var(--color-primary); }
.breadcrumb-list__sep { color: var(--color-border-h); font-size: .7rem; }
.breadcrumb-list__current {
    color: var(--color-text);
    font-size: .8rem;
    font-weight: var(--fw-medium);
}

/* H1 */
.inner-page-title {
    font-family: var(--font-heading);
    font-weight: var(--fw-bold);
    font-size: clamp(1.5rem, 4vw, 2.25rem);
    color: #fff;
    margin: 0;
    line-height: 1.25;
    letter-spacing: -.01em;
}

/* ════════════════════════════════════════════════
   MAIN CONTENT
════════════════════════════════════════════════ */
.site-main {
    min-height: 60vh;
    background: var(--color-bg-deep);
}

/* ════════════════════════════════════════════════
   FOOTER
════════════════════════════════════════════════ */
.site-footer {
    background: var(--grad-footer);
    border-top: 1px solid var(--color-border);
    position: relative;
    overflow: hidden;
}

.footer-glow {
    position: absolute;
    top: 0; left: 50%;
    transform: translateX(-50%);
    width: 100%; height: 300px;
    background: radial-gradient(ellipse 70% 60% at 50% 0%, rgba(79,110,247,.12) 0%, transparent 70%);
    pointer-events: none;
}

.footer-top {
    padding: 64px 0 48px;
}

/* Footer logo */
.footer-logo {
    text-decoration: none;
    color: inherit;
}
.footer-logo:hover { color: inherit; }
.footer-logo img {
    border-radius: var(--radius-sm);
}
.footer-logo__name {
    display: block;
    font-family: var(--font-heading);
    font-weight: var(--fw-bold);
    font-size: 1.05rem;
    color: #fff;
    line-height: 1.2;
}
.footer-logo__tagline {
    display: block;
    font-size: .68rem;
    color: var(--color-muted);
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-top: 2px;
}
.footer-about-text {
    font-size: .85rem;
    color: var(--color-muted);
    line-height: 1.65;
    margin: 0;
}

/* Footer headings */
.footer-heading {
    font-family: var(--font-heading);
    font-weight: var(--fw-semibold);
    font-size: .8rem;
    color: var(--color-muted);
    text-transform: uppercase;
    letter-spacing: .1em;
    margin-bottom: 18px;
    position: relative;
    padding-bottom: 10px;
}
.footer-heading::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 28px; height: 2px;
    background: var(--grad-primary);
    border-radius: 2px;
}

/* Footer nav */
.footer-nav { display: flex; flex-direction: column; gap: 10px; }
.footer-nav__link {
    color: var(--color-muted);
    font-size: .85rem;
    text-decoration: none;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.footer-nav__link::before {
    content: '›';
    color: var(--color-primary);
    opacity: 0;
    transform: translateX(-4px);
    transition: var(--transition);
}
.footer-nav__link:hover {
    color: #fff;
    transform: translateX(6px);
}
.footer-nav__link:hover::before { opacity: 1; transform: translateX(0); }

/* Footer contacts */
.footer-contacts { display: flex; flex-direction: column; gap: 14px; }
.footer-contacts__item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: .875rem;
    color: var(--color-muted);
}
.footer-contacts__item a {
    color: var(--color-muted);
    text-decoration: none;
    transition: var(--transition);
}
.footer-contacts__item a:hover { color: var(--color-primary); }
.footer-contacts__icon {
    color: var(--color-primary);
    font-size: 1rem;
    margin-top: 2px;
    flex-shrink: 0;
}

/* Footer socials */
.footer-socials .social-icon { width: 38px; height: 38px; }

/* Footer CTA */
.footer-cta .btn-primary-cta,
.footer-cta .btn-outline-cta { width: 100%; justify-content: center; }

/* Footer bottom */
.footer-bottom {
    background: rgba(0,0,0,.3);
    border-top: 1px solid var(--color-border);
    padding: 18px 0;
}
.footer-copy {
    font-size: .8rem;
    color: var(--color-muted);
}
.footer-legal {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: flex-end;
    flex-wrap: wrap;
}
.footer-legal__link {
    font-size: .8rem;
    color: var(--color-muted);
    text-decoration: none;
    transition: var(--transition);
}
.footer-legal__link:hover { color: var(--color-primary); }
.footer-legal__sep { color: var(--color-border-h); }

/* ════════════════════════════════════════════════
   RESPONSIVE — BURGER MENU (< 1200px / xl)
════════════════════════════════════════════════ */
@media (max-width: 1199.98px) {

    /* Header nav becomes absolute drawer */
    .header-nav { height: var(--header-nav-h); }

    .nav-collapse {
        display: none;
        position: fixed;
        top: 0; left: 0;
        width: min(320px, 90vw);
        height: 100dvh;
        background: linear-gradient(160deg, #101525 0%, #0c1020 100%);
        border-right: 1px solid var(--color-border);
        padding: calc(var(--header-total) + 20px) 24px 32px;
        overflow-y: auto;
        z-index: 1050;
        box-shadow: 4px 0 40px rgba(0,0,0,.6);
        flex-direction: column;
        gap: 0;
        transform: translateX(-100%);
        transition: transform .35s cubic-bezier(.4,0,.2,1);
    }
    .nav-collapse.is-open {
        display: flex;
        transform: translateX(0);
        animation: slideInLeft .35s cubic-bezier(.4,0,.2,1);
    }

    @keyframes slideInLeft {
        from { transform: translateX(-100%); }
        to   { transform: translateX(0); }
    }

    .main-menu {
        flex-direction: column;
        align-items: stretch;
        gap: 2px;
        width: 100%;
    }
    .main-menu__link {
        font-size: .95rem;
        padding: 12px 14px;
        border-radius: var(--radius-md);
    }
    .main-menu__link::after { display: none; }
    .main-menu__link:hover  { background: rgba(79,110,247,.1); }

    /* Phone: keep visible, hide label on very small */
    .header-phone span { display: none; }
}

@media (max-width: 575.98px) {
    .header-phone span { display: none; }
    .header-phone { padding: 6px 10px; gap: 0; }

    .logo-tagline { display: none; }
    .logo-name    { font-size: 1rem; }

    :root {
        --header-top-h: 60px;
        --header-nav-h: 48px;
    }
}

/* Keep phone number visible at ≥ 576px */
@media (min-width: 576px) {
    .header-phone span { display: inline; }
}

/* Desktop: reset mobile-only nav styles */
@media (min-width: 1200px) {
    .nav-collapse {
        display: flex !important;
        position: static;
        height: auto;
        width: auto;
        background: transparent;
        border: none;
        padding: 0;
        overflow: visible;
        box-shadow: none;
        transform: none;
        flex-direction: row;
        align-items: center;
        animation: none;
    }
    .main-menu { flex-direction: row; gap: 2px; }
    .nav-overlay { display: none !important; }
}

/* ────────────────────────────────────────────────
   UTILITY CLASSES
──────────────────────────────────────────────── */
.text-gradient {
    background: var(--grad-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ────────────────────────────────────────────────
   SCROLLBAR STYLING
──────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--color-bg-dark); }
::-webkit-scrollbar-thumb { background: var(--color-primary); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--color-accent); }

/* ────────────────────────────────────────────────
   SELECTION
──────────────────────────────────────────────── */
::selection { background: rgba(79,110,247,.35); color: #fff; }
