/*
 * STO (auto-service) global header + footer styles.
 * Loaded site-wide via artfolio_assets() ($css_files in functions.php).
 */

:root {
    --sto-h-bg:      rgba(8, 16, 38, 0.85);
    --sto-h-bg-solid:#08102a;
    --sto-accent:    #2a8fe0;
    --sto-accent-2:  #1b6ec2;
    --sto-white:     #ffffff;
    --sto-muted:     #aebbd6;
    --sto-line:      rgba(255, 255, 255, 0.10);
}

/* Push non-front-page content below the fixed header
   (the STO front page hero has its own top padding). */
body:not(.sto-page) { padding-top: var(--sto-header-h, 76px); }

/* ═══════════════ HEADER ═══════════════ */
.sto-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 9000;
    background: var(--sto-h-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--sto-line);
    transition: background 0.25s ease, box-shadow 0.25s ease, padding 0.25s ease;
}
.admin-bar .sto-header { top: 32px; }
@media screen and (max-width: 782px) { .admin-bar .sto-header { top: 46px; } }

.sto-header__inner {
    max-width: 1240px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    gap: 24px;
    transition: padding 0.25s ease;
    box-sizing: border-box;
}
.sto-header.is-scrolled { background: var(--sto-h-bg-solid); box-shadow: 0 6px 24px rgba(0, 0, 0, 0.4); }
.sto-header.is-scrolled .sto-header__inner { padding-top: 10px; padding-bottom: 10px; }

/* Logo */
.sto-header__logo {
    display: flex; align-items: center; gap: 10px;
    text-decoration: none; color: var(--sto-white);
    font-family: 'Inter', sans-serif;
    font-weight: 800; font-size: 20px; letter-spacing: 0.4px;
    white-space: nowrap;
}
.sto-header__logo-icon {
    width: 38px; height: 38px; flex: 0 0 auto;
    display: flex; align-items: center; justify-content: center;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--sto-accent) 0%, var(--sto-accent-2) 100%);
    color: #fff;
}
.sto-header__logo-icon svg { width: 22px; height: 22px; }
.sto-header__logo-img { display: block; width: auto; max-height: 200px; }

/* Desktop nav */
.sto-header__nav { margin-left: auto; }
.sto-header__nav-list {
    display: flex; align-items: center; gap: 30px;
    list-style: none; margin: 0; padding: 0;
}
.sto-header__nav-link {
    position: relative;
    color: var(--sto-muted);
    text-decoration: none;
    font-family: 'Inter', sans-serif;
    font-size: 15px; font-weight: 600;
    padding: 6px 0;
    transition: color 0.18s ease;
}
.sto-header__nav-link::after {
    content: ''; position: absolute; left: 0; bottom: 0;
    width: 0; height: 2px; border-radius: 2px;
    background: var(--sto-accent);
    transition: width 0.22s ease;
}
.sto-header__nav-link:hover { color: #fff; }
.sto-header__nav-link:hover::after { width: 100%; }

/* Right: phone + CTA */
.sto-header__right { display: flex; align-items: center; gap: 18px; }
.sto-header__phone {
    display: inline-flex; align-items: center; gap: 8px;
    color: #fff; text-decoration: none;
    font-family: 'Inter', sans-serif; font-weight: 700; font-size: 15px;
    white-space: nowrap;
}
.sto-header__phone svg { width: 18px; height: 18px; color: var(--sto-accent); }
.sto-header__phone:hover { color: var(--sto-accent); }
.sto-header__cta {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 11px 22px; border-radius: 10px;
    background: linear-gradient(135deg, var(--sto-accent) 0%, var(--sto-accent-2) 100%);
    color: #fff; text-decoration: none;
    font-family: 'Inter', sans-serif; font-weight: 700; font-size: 14px;
    white-space: nowrap;
    box-shadow: 0 6px 18px rgba(42, 143, 224, 0.35);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.sto-header__cta:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(42, 143, 224, 0.5); color: #fff; }

/* Burger */
.sto-header__burger {
    display: none;
    flex-direction: column; justify-content: center; gap: 5px;
    width: 44px; height: 44px;
    background: transparent; border: 0; cursor: pointer; padding: 10px;
    margin-left: auto;
}
.sto-header__burger span {
    display: block; height: 2px; width: 100%;
    background: #fff; border-radius: 2px;
    transition: transform 0.25s ease, opacity 0.25s ease;
}
.sto-header__burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.sto-header__burger.is-open span:nth-child(2) { opacity: 0; }
.sto-header__burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ═══════════════ MOBILE NAV ═══════════════ */
.sto-mobile-nav {
    position: fixed;
    top: 0; right: 0; bottom: 0;
    width: min(320px, 84vw);
    z-index: 9100;
    background: var(--sto-h-bg-solid);
    border-left: 1px solid var(--sto-line);
    padding: 90px 28px 40px;
    display: flex; flex-direction: column; gap: 6px;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
}
.sto-mobile-nav.is-open { transform: translateX(0); }
.sto-mobile-nav__link {
    color: var(--sto-muted); text-decoration: none;
    font-family: 'Inter', sans-serif; font-weight: 600; font-size: 17px;
    padding: 14px 0; border-bottom: 1px solid var(--sto-line);
    transition: color 0.18s ease;
}
.sto-mobile-nav__link:hover { color: #fff; }
.sto-mobile-nav__cta { margin-top: 20px; padding: 14px 22px; font-size: 15px; }
.sto-mobile-nav__phone {
    margin-top: 16px; color: #fff; text-decoration: none;
    font-family: 'Inter', sans-serif; font-weight: 700; font-size: 18px; text-align: center;
}
.sto-mobile-backdrop {
    position: fixed; inset: 0; z-index: 9050;
    background: rgba(0, 0, 0, 0.55);
    opacity: 0; transition: opacity 0.3s ease;
}
.sto-mobile-backdrop.is-open { opacity: 1; }

@media (max-width: 960px) {
    .sto-header__nav,
    .sto-header__right { display: none; }
    .sto-header__burger { display: flex; }
}

/* ═══════════════ FOOTER ═══════════════ */
.sto-footer {
    background: var(--sto-h-bg-solid);
    color: var(--sto-muted);
    border-top: 1px solid var(--sto-line);
    font-family: 'Inter', sans-serif;
}
.sto-footer__inner {
    max-width: 1240px; margin: 0 auto;
    padding: 60px 24px 40px;
    display: grid;
    grid-template-columns: 1.6fr 1fr 1.2fr;
    gap: 48px;
    box-sizing: border-box;
}
.sto-footer__logo {
    display: inline-flex; align-items: center; gap: 10px;
    color: #fff; text-decoration: none;
    font-weight: 800; font-size: 20px; margin-bottom: 16px;
}
.sto-footer__desc { font-size: 14px; line-height: 1.7; margin: 0 0 20px; max-width: 420px; }
.sto-footer__socials { display: flex; gap: 12px; }
.sto-footer__social {
    width: 40px; height: 40px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(255, 255, 255, 0.06); color: var(--sto-muted);
    transition: all 0.18s ease;
}
.sto-footer__social svg { width: 20px; height: 20px; }
.sto-footer__social:hover { background: var(--sto-accent); color: #fff; transform: translateY(-2px); }
.sto-footer__title { color: #fff; font-size: 16px; font-weight: 700; margin: 0 0 18px; }
.sto-footer__nav { display: flex; flex-direction: column; gap: 12px; }
.sto-footer__link { color: var(--sto-muted); text-decoration: none; font-size: 14px; transition: color 0.18s ease; }
.sto-footer__link:hover { color: var(--sto-accent); }
.sto-footer__contacts { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.sto-footer__contacts li { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; line-height: 1.5; }
.sto-footer__contacts svg { width: 18px; height: 18px; flex: 0 0 auto; color: var(--sto-accent); margin-top: 2px; }
.sto-footer__contacts a { color: var(--sto-muted); text-decoration: none; }
.sto-footer__contacts a:hover { color: var(--sto-accent); }
.sto-footer__bottom {
    border-top: 1px solid var(--sto-line);
    max-width: 1240px; margin: 0 auto;
    padding: 22px 24px;
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    font-size: 13px;
    box-sizing: border-box;
}
.sto-footer__bottom p { margin: 0; }

@media (max-width: 860px) {
    .sto-footer__inner { grid-template-columns: 1fr; gap: 36px; }
    .sto-footer__bottom { flex-direction: column; text-align: center; }
}
