/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding-top: env(safe-area-inset-top, 0px);
    background: rgba(255,255,255,0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0,0,0,0.06);
    transition: var(--transition);
}

.header.scrolled {
    box-shadow: 0 2px 20px rgba(0,0,0,0.08);
}

.header-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 max(20px, env(safe-area-inset-right, 0px)) 0 max(20px, env(safe-area-inset-left, 0px));
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-height);
    min-width: 0;
    gap: 8px;
}

.panorama-section {
    padding-top: var(--header-offset);
}

.logo-small {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--dark);
    flex-shrink: 1;
    min-width: 0;
}

.panorama-picture {
    display: block;
    width: 100%;
    max-width: 100%;
}

.panorama-picture .panorama-img {
    width: 100%;
    height: auto;
    display: block;
}

.site-logo {
    display: block;
    width: auto;
    max-width: 100%;
    object-fit: contain;
}

.site-logo--header {
    height: 40px;
    width: auto;
    max-width: min(300px, 58vw);
}

.site-logo--sidebar {
    height: 36px;
    max-width: 260px;
}

.site-logo--large {
    height: clamp(44px, 8vw, 64px);
    max-width: min(480px, 92vw);
}

.logo-large-wrap .site-logo--large,
.footer-logo-wrap .site-logo--large,
.footer-logo-section .site-logo--large {
    max-width: 100%;
    width: auto;
}

.site-logo--modal {
    height: 44px;
    max-width: 280px;
    margin: 0 auto 16px;
}

.site-logo--inverse {
    height: 40px;
    max-width: 220px;
}

.logo-name {
    display: flex;
    align-items: baseline;
    gap: 1px;
}

.logo-name .logo-ya {
    font-weight: 800;
    font-size: 24px;
    color: var(--logo-accent, var(--primary));
    line-height: 1;
}

.logo-name .logo-snab {
    font-weight: 800;
    font-size: 24px;
    color: var(--dark);
    line-height: 1;
}

.logo-business {
    font-weight: 700;
    font-size: 10px;
    color: var(--white);
    background: var(--dark);
    padding: 3px 9px;
    border-radius: 8px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    line-height: 1.3;
    white-space: nowrap;
}

.logo-found {
    font-weight: 500;
    font-size: 10px;
    color: var(--dark);
    letter-spacing: 0.3px;
    line-height: 1.3;
    white-space: nowrap;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.btn-phone {
    display: flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    color: var(--dark);
    font-size: 14px;
    font-weight: 600;
    padding: 8px 14px;
    border-radius: 8px;
    transition: var(--transition);
}

.btn-phone:hover {
    background: var(--gray-light);
}

.btn-phone svg {
    width: 18px;
    height: 18px;
}

.btn-email-header {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    color: var(--dark);
    font-size: 13px;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 8px;
    transition: var(--transition);
    white-space: nowrap;
    line-height: 1;
    flex-shrink: 0;
}

.btn-email-header:visited {
    color: var(--dark);
}

.btn-email-header:hover {
    background: var(--gray-light);
}

.btn-email-icon,
.btn-email-header svg {
    width: 18px;
    height: 18px;
    min-width: 18px;
    min-height: 18px;
    max-width: 18px;
    max-height: 18px;
    flex-shrink: 0;
    display: block;
    overflow: hidden;
}

@media (max-width: 1100px) {
    .btn-email-text {
        display: none;
    }

    .btn-email-header {
        padding: 8px 10px;
    }
}

.btn-cta-header {
    background: var(--primary);
    color: white;
    border: none;
    padding: 10px 22px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    white-space: nowrap;
    font-family: inherit;
}

.btn-cta-header:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(229,57,53,0.4);
}

.mobile-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 10px;
    transition: var(--transition);
}

.mobile-toggle:hover {
    background: var(--gray-light);
}

.mobile-toggle svg {
    width: 26px;
    height: 26px;
    display: block;
}

/* Sidebar */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    z-index: 1998;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

.sidebar-menu {
    position: fixed;
    top: 0;
    right: 0;
    width: 320px;
    max-width: 85vw;
    height: 100vh;
    height: 100dvh;
    background: var(--white);
    z-index: 1999;
    transform: translate3d(100%, 0, 0);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.4s;
    overflow-y: auto;
    overflow-x: hidden;
    box-shadow: -10px 0 40px rgba(0,0,0,0.15);
    -webkit-overflow-scrolling: touch;
    backface-visibility: hidden;
    pointer-events: none;
    visibility: hidden;
}

.sidebar-menu.active {
    transform: translate3d(0, 0, 0);
    pointer-events: auto;
    visibility: visible;
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid var(--gray-light);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 3px;
    flex-wrap: wrap;
}

.sidebar-logo .sl-name {
    display: flex;
    align-items: baseline;
    gap: 1px;
}

.sidebar-logo .sl-ya {
    font-weight: 800;
    font-size: 20px;
    color: var(--logo-accent, var(--primary));
}

.sidebar-logo .sl-snab {
    font-weight: 800;
    font-size: 20px;
    color: var(--dark);
}

.sidebar-logo .sl-business {
    font-weight: 700;
    font-size: 9px;
    color: var(--white);
    background: var(--dark);
    padding: 2px 7px;
    border-radius: 7px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    white-space: nowrap;
}

.sidebar-logo .sl-found {
    font-weight: 500;
    font-size: 9px;
    color: var(--dark);
    white-space: nowrap;
}

.sidebar-close {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--gray-light);
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    flex-shrink: 0;
}

.sidebar-close:hover {
    background: var(--primary);
    color: white;
}

.sidebar-close svg {
    width: 18px;
    height: 18px;
}

.sidebar-nav {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    color: var(--dark);
    font-size: 15px;
    font-weight: 500;
    padding: 14px 14px;
    border-radius: 12px;
    transition: var(--transition);
}

.sidebar-nav a:hover {
    background: var(--light);
    color: var(--dark);
}

/* Hover по цвету раздела (платформенное меню) */
.sidebar-nav a.nav-home:hover,
.sidebar-nav a.nav-suppliers:hover {
    background: rgba(229, 57, 53, 0.1);
    color: var(--primary);
}

.sidebar-nav a.nav-customers:hover {
    background: #E3F2FD;
    color: #1565C0;
}

.sidebar-nav a.nav-operators:hover {
    background: rgba(46, 125, 50, 0.12);
    color: #2E7D32;
}

.sidebar-nav a.nav-investors:hover {
    background: rgba(245, 124, 0, 0.12);
    color: #F57C00;
}

.sidebar-nav a.nav-news:hover {
    background: rgba(0, 0, 0, 0.06);
    color: var(--dark);
}

/* Локальное меню страницы — единый цвет раздела */
.page-customers .sidebar-nav a:hover {
    background: #E3F2FD;
    color: #1565C0;
}

.page-suppliers .sidebar-nav a:hover {
    background: var(--primary-light);
    color: var(--primary);
}

.page-investors .sidebar-nav a:hover {
    background: rgba(245, 124, 0, 0.12);
    color: #F57C00;
}

.sidebar-nav a .nav-icon {
    width: 26px;
    height: 26px;
    flex-shrink: 0;
}

.sidebar-nav a .nav-icon svg {
    width: 100%;
    height: 100%;
}

.sidebar-divider {
    height: 1px;
    background: var(--gray-light);
    margin: 8px 16px;
}

.sidebar-contact {
    padding: 16px 20px;
    border-top: 1px solid var(--gray-light);
    margin-top: 4px;
}

.sidebar-contact a {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--dark);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    padding: 8px 0;
}

.sidebar-contact a svg {
    width: 20px;
    height: 20px;
    color: var(--primary);
    flex-shrink: 0;
    transition: var(--transition);
}

.sidebar-contact a:hover {
    color: var(--primary);
}

.page-customers .sidebar-contact a svg {
    color: var(--blue);
}

.page-customers .sidebar-contact a:hover {
    color: var(--blue);
}

.page-suppliers .sidebar-contact a svg,
.page-suppliers .sidebar-contact a:hover {
    color: var(--primary);
}

.page-operators .sidebar-contact a svg {
    color: var(--green);
}

.page-operators .sidebar-contact a:hover {
    color: var(--green);
}

.page-investors .sidebar-contact a svg {
    color: var(--orange);
}

.page-investors .sidebar-contact a:hover {
    color: #F57C00;
}

.page-news .sidebar-contact a svg,
.page-news .sidebar-contact a:hover {
    color: var(--primary);
}

.sidebar-cta {
    padding: 16px 20px 24px;
}

.sidebar-cta button {
    width: 100%;
    padding: 14px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

.sidebar-cta button:hover {
    background: var(--primary-dark);
}

/* Footer logo */
.footer-logo-section {
    background: var(--white);
    padding: 60px 24px 50px;
    text-align: center;
}

.footer-logo-section.compact {
    padding: 50px 24px 40px;
}

.logo-large-wrap,
.footer-logo-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-large-name,
.footer-logo-name {
    display: flex;
    align-items: baseline;
}

.logo-large-name .ll-ya,
.footer-logo-name .fl-ya {
    font-weight: 800;
    font-size: 52px;
    color: var(--logo-accent, var(--primary));
    line-height: 1;
}

.footer-logo-name .fl-ya {
    font-size: 40px;
}

.logo-large-name .ll-snab,
.footer-logo-name .fl-snab {
    font-weight: 800;
    font-size: 52px;
    color: var(--dark);
    line-height: 1;
}

.footer-logo-name .fl-snab {
    font-size: 40px;
}

.logo-large-business,
.footer-logo-business {
    font-weight: 700;
    font-size: 16px;
    color: var(--white);
    background: var(--dark);
    padding: 5px 14px;
    border-radius: 12px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    line-height: 1.3;
    white-space: nowrap;
}

.footer-logo-business {
    font-size: 14px;
    padding: 4px 12px;
}

.logo-large-found,
.footer-logo-found {
    font-weight: 500;
    font-size: 16px;
    color: var(--dark);
    line-height: 1.3;
    white-space: nowrap;
}

.footer-logo-found {
    font-size: 14px;
}

.footer-tagline,
.footer-logo-section .footer-tagline {
    font-size: 16px;
    color: var(--gray);
    margin-top: 16px;
    font-weight: 500;
}

.footer-logo-section.compact .footer-tagline {
    margin-top: 12px;
    font-size: 15px;
}

/* Footer */
.footer {
    background: var(--dark);
    color: rgba(255,255,255,0.6);
    padding: 50px 24px 28px;
    max-width: 100%;
    overflow-x: clip;
}

.footer.compact {
    padding: 40px 24px 24px;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer.compact .footer-grid {
    gap: 36px;
    margin-bottom: 36px;
}

.footer-brand p {
    font-size: 13px;
    line-height: 1.7;
    margin-top: 14px;
}

.footer h4 {
    color: white;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
}

.footer.compact h4 {
    margin-bottom: 14px;
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-links a {
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    font-size: 13px;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    flex-wrap: wrap;
    gap: 10px;
}

.footer-contact {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.footer-contact a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: var(--transition);
}

.footer-contact a:hover {
    color: var(--primary);
}

@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .btn-cta-header {
        display: none;
    }

    .header-inner {
        padding: 0 12px;
        gap: 4px;
        justify-content: flex-start;
    }

    .logo-small {
        flex: 1;
        min-width: 0;
    }

    .header-actions {
        gap: 2px;
        flex-shrink: 0;
    }

    .header .header-actions .btn-phone,
    .header .header-actions .btn-email-header {
        display: flex !important;
        align-items: center;
        justify-content: center;
        padding: 8px;
    }

    .btn-phone-text {
        display: none;
    }

    .mobile-toggle {
        flex-shrink: 0;
        padding: 8px 6px;
    }

    .site-logo--header,
    .logo-small .brand-logo--header {
        max-width: min(220px, calc(100vw - 132px));
    }

    .site-logo--header {
        height: 34px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 420px) {
    :root {
        --header-height: 60px;
    }

    .header-inner {
        padding: 0 10px;
        height: var(--header-height);
    }

    .site-logo--header,
    .logo-small .brand-logo--header {
        max-width: min(200px, calc(100vw - 124px));
    }

    .site-logo--header {
        height: 30px;
    }

    .logo-name .logo-ya, .logo-name .logo-snab {
        font-size: 20px;
    }

    .logo-business { font-size: 8px; padding: 2px 6px; }
    .logo-found { font-size: 8px; }

    .logo-large-name .ll-ya, .logo-large-name .ll-snab { font-size: 30px; }
    .footer-logo-name .fl-ya, .footer-logo-name .fl-snab { font-size: 30px; }
}
