:root {
    --surface-0: #f4f7fb;
    --surface-1: #ffffff;
    --ink-1: #0f172a;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    --radius-2xl: 2rem;
    /* Fallback until JS measures #site-header (expanded two-row layout ≈ 9–11rem) */
    --site-header-sticky-offset: 10rem;
    /* Единая ширина контента: Tailwind max-w-7xl = 80rem */
    --site-container: 80rem;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Onest', system-ui, sans-serif;
    background-color: #FFFFFF;
    color: #1F2937;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Onest', system-ui, sans-serif;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.util-text {
    font-family: 'JetBrains Mono', monospace;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #E5E7EB;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #D1D5DB;
}

/* Единый контейнер страниц / шапки / футера */
.site-container,
.mx-auto.max-w-7xl,
.mx-auto.max-w-screen-2xl,
.mx-auto.max-w-\[1440px\] {
    width: 100%;
    max-width: var(--site-container) !important;
    margin-left: auto;
    margin-right: auto;
}

a,
button {
    transition: all 0.22s ease;
}

input,
textarea,
select {
    border-radius: 0.5rem !important;
}

input[type="checkbox"] {
    border-radius: 0.1rem !important;
}

article,
.rounded-lg.border,
.rounded-lg.bg-white,
.rounded-lg.bg-gray-50 {
    border-radius: var(--radius-lg) !important;
    /* box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06), 0 1px 0 rgba(15, 23, 42, 0.03); */
    background-color: var(--surface-1);
}

article:hover,
.rounded-lg.border:hover,
.rounded-lg.bg-white:hover,
.rounded-lg.bg-gray-50:hover {
    /* box-shadow: 0 18px 42px rgba(15, 23, 42, 0.1), 0 1px 0 rgba(15, 23, 42, 0.04); */
}

/* Hero Swiper Fade Effect Fixes */
.hero-swiper {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.hero-swiper .swiper-wrapper {
    position: relative;
    width: 100%;
}

/* Swiper fade effect - all slides positioned absolutely */
.hero-swiper .swiper-slide {
    position: absolute !important;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100%;
    opacity: 0 !important;
    visibility: hidden;
    transition: opacity 1s ease-in-out, visibility 0s 1s;
    z-index: 1;
}

/* Active slide is visible and on top */
.hero-swiper .swiper-slide-active {
    position: relative !important;
    opacity: 1 !important;
    visibility: visible;
    z-index: 2;
    transition: opacity 1s ease-in-out, visibility 0s 0s;
}

/* Duplicate slides should be hidden */
.hero-swiper .swiper-slide-duplicate {
    opacity: 0 !important;
    visibility: hidden;
}

/* Ensure content inside slides is properly positioned */
.hero-swiper .swiper-slide>div {
    position: relative;
    z-index: 1;
    width: 100%;
}

/* Two-line header styles */
#site-header {
    transition: box-shadow 0.3s ease, transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.3s ease;
    transform: translateY(0);
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.92);
}

#site-header .header-row-1 {
    transition: padding 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#site-header .header-row-2 {
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        margin 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        padding 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    max-height: 100px;
    opacity: 1;
    overflow: hidden;
}

#site-header.collapsed {
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.12);
}

#site-header.collapsed .header-row-1>div {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

#site-header.collapsed .header-row-2 {
    max-height: 0;
    opacity: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

/* Header scrolled state */
#site-header.header-scrolled {
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.1);
}

/* Pagination bullets styling */
.hero-pagination .swiper-pagination-bullet {
    background: rgba(255, 255, 255, 0.4);
    opacity: 1;
    width: 8px;
    height: 8px;
    margin: 0 4px;
    transition: all 0.3s ease;
}

.hero-pagination .swiper-pagination-bullet-active {
    background: rgba(255, 255, 255, 1);
    width: 24px;
    border-radius: 4px;
}

/* Blog / related posts / landing services / equipment: equal-height slides */
.blog-swiper .swiper-slide,
.home-articles-swiper .swiper-slide,
.home-reviews-swiper .swiper-slide,
.related-posts-swiper .swiper-slide,
.landing-services-swiper .swiper-slide,
.equipment-swiper .swiper-slide {
    height: auto;
}

.blog-swiper .swiper-slide>article,
.home-articles-swiper .swiper-slide>article,
.home-reviews-swiper .swiper-slide>blockquote,
.related-posts-swiper .swiper-slide>a,
.landing-services-swiper .swiper-slide>article,
.equipment-swiper .swiper-slide>.equipment-card {
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.equipment-swiper-wrap {
    --swiper-theme-color: var(--ink-1);
    --swiper-navigation-sides-offset: 0.25rem;
}

@media (min-width: 768px) {
    .equipment-swiper-wrap {
        --swiper-navigation-sides-offset: -0.25rem;
    }
}

/* Modal open / close animations */
.modal {
    transition: opacity 0.35s ease;
}

.modal .modal-overlay {
    opacity: 0;
    transition: opacity 0.35s ease;
}

.modal .modal-content {
    opacity: 0;
    transform: translateY(24px) scale(0.98);
    transition: transform 0.35s ease, opacity 0.35s ease;
}

.modal.modal-visible .modal-overlay {
    opacity: 1;
}

.modal.modal-visible .modal-content {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.modal.modal-closing .modal-overlay {
    opacity: 0;
}

.modal.modal-closing .modal-content {
    opacity: 0;
    transform: translateY(12px) scale(0.97);
}

/* Scroll reveal */
.reveal {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.7s ease, transform 0.7s ease;
    will-change: opacity, transform;
}

.reveal.reveal-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {

    .modal,
    .modal .modal-overlay,
    .modal .modal-content {
        transition: none !important;
    }
}


#back-to-top {
    bottom: 1rem;
    left: 1rem;
}

.b24-widget-button-position-bottom-right {
    bottom: 1rem !important;
    right: 1rem !important;
}

@media (min-width: 768px) {
    #back-to-top {
        bottom: 1rem;
        left: 1rem;
    }

    .b24-widget-button-position-bottom-right {
        bottom: 1rem !important;
        right: 1rem !important;
    }
}

@media (min-width: 1024px) {
    #back-to-top {
        bottom: 1rem;
        left: 1rem;
    }

    .b24-widget-button-position-bottom-right {
        bottom: 1rem !important;
        right: 1rem !important;
    }
}

.sticky-block {
    position: -webkit-sticky;
    position: sticky;
    top: var(--site-header-sticky-offset);
}

#main-content>section,
#main-content>div {
    position: relative;
}

#main-content>section:nth-of-type(odd)::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0));
    pointer-events: none;
}

.prose {
    max-width: 100% !important;
}

.service-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5rem 0;
}

.service-content h2,
.service-content h3,
.service-content h4 {
    color: var(--color-primary, #1a1a1a);
    font-family: inherit;
    font-weight: 700;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.service-content ul,
.service-content ol {
    padding-left: 1.25rem;
    margin: 1rem 0;
}

.service-content li {
    margin: 0.35rem 0;
}

.service-content a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.service-content {
    overflow-x: auto;
    isolation: isolate;
}

.service-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    font-size: 0.875rem;
}

.service-content th,
.service-content td {
    border: 1px solid rgba(0, 0, 0, 0.1);
    padding: 0.5rem 0.75rem;
    text-align: left;
}

.line-height-full {
    line-height: 100% !important;
}

/* Homepage hero — text in site container (как везде), media bleeds right */
.home-hero {
    position: relative;
    overflow: hidden;
    background: #FFFFFF;
    border-bottom: 1px solid #D1D5DB;
    min-height: min(62vh, 34rem);
}

.home-hero__media {
    position: relative;
    min-height: 16rem;
    background: #E5E7EB;
}

@media (min-width: 900px) {
    .home-hero__media {
        position: absolute;
        inset: 0 0 0 auto;
        width: 50%;
        min-height: 100%;
        z-index: 0;
    }
}

.home-hero__media-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    position: absolute;
    inset: 0;
}

.home-hero:not(.home-hero--has-media) .home-hero__media {
    display: none;
}

.home-hero__shell {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    width: 100%;
    padding: 2rem 0 2.25rem;
}

@media (min-width: 900px) {
    .home-hero__shell {
        min-height: min(62vh, 34rem);
        padding: 3rem 0;
    }
}

/* Тот же контейнер, что max-w-7xl mx-auto px-6 lg:px-12 */
.home-hero__container {
    width: 100%;
    max-width: var(--site-container);
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

@media (min-width: 1024px) {
    .home-hero__container {
        padding-left: 3rem;
        padding-right: 3rem;
    }
}

.home-hero__panel {
    max-width: 28rem;
}

@media (min-width: 900px) {
    /* Не заезжать под фото: левая половина контейнера */
    .home-hero--has-media .home-hero__panel {
        max-width: min(28rem, calc((min(100%, var(--site-container)) - 6rem) / 2));
    }
}

.home-hero__brand {
    font-family: 'Onest', system-ui, sans-serif;
    font-size: clamp(2.25rem, 5vw, 3.25rem);
    font-weight: 800;
    line-height: 0.95;
    color: #2B3065;
    margin: 0 0 0.85rem;
    letter-spacing: -0.045em;
}

.home-hero__title {
    font-family: 'Onest', system-ui, sans-serif;
    font-size: clamp(1.05rem, 1.7vw, 1.2rem);
    font-weight: 600;
    line-height: 1.35;
    color: #111827;
    margin: 0 0 0.7rem;
    letter-spacing: -0.02em;
}

.home-hero__lead {
    font-size: 0.95rem;
    line-height: 1.5;
    color: #4B5563;
    margin: 0 0 1.35rem;
}

.home-hero__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.home-hero__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.2rem;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 0;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.home-hero__btn--primary {
    background: #2B3065;
    color: #fff;
    border: 1px solid #2B3065;
}

.home-hero__btn--primary:hover {
    background: #111827;
    border-color: #111827;
}

.home-hero__btn--ghost {
    background: transparent;
    color: #2B3065;
    border: 1px solid #9CA3AF;
}

.home-hero__btn--ghost:hover {
    border-color: #2B3065;
}

.home-hero__meta {
    margin: 1.1rem 0 0;
    font-size: 0.75rem;
    color: #6B7280;
}

.home-category-card:hover,
.home-popular-card:hover {
    transform: translateY(-2px);
}

.faq-item.is-open .faq-icon svg {
    transform: rotate(180deg);
}

.catalog-acc.is-open .catalog-acc__icon {
    transform: rotate(180deg);
}

/* ---- Catalog / price lists ---- */
.catalog-hero {
    background:
        linear-gradient(180deg, rgba(243, 244, 246, 0.85) 0%, rgba(255, 255, 255, 0.4) 100%);
}

.service-card,
.category-tile {
    border-radius: 2px;
}

.service-card__price-badge {
    letter-spacing: 0.01em;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.15);
}

.price-list-block + .price-list-block {
    margin-top: 0.5rem;
}

.price-list-table-wrap {
    -webkit-overflow-scrolling: touch;
}

.price-list-table th,
.price-list-table td {
    vertical-align: middle;
}

.price-list-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
}

.price-list-group-row td {
    letter-spacing: 0.01em;
}

@media (max-width: 640px) {
    .price-list-table {
        font-size: 0.8125rem;
    }

    .price-list-table th,
    .price-list-table td {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
}
