:root {
    --st-primary: #0066cc;
    --st-primary-dark: #004d99;
    --st-accent: #00b4d8;
    --st-dark: #0f172a;
    --st-gray: #64748b;
    --st-light: #f8fafc;
    --st-border: #e2e8f0;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: var(--st-dark);
    background: #fff;
}

.site-header {
    background: rgba(255,255,255,.95);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--st-border);
}

.navbar-brand { font-size: 1.4rem; color: var(--st-dark) !important; }
.site-logo { height: 36px; width: auto; max-width: 160px; object-fit: contain; }
.site-logo--footer { height: 28px; filter: brightness(0) invert(1); }
.brand-accent { color: var(--st-primary); }

.nav-link {
    color: var(--st-dark) !important;
    font-weight: 500;
    padding: .5rem 1rem !important;
}

.nav-link:hover { color: var(--st-primary) !important; }

.btn-primary {
    background: var(--st-primary);
    border-color: var(--st-primary);
    color: #fff;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    background: var(--st-primary-dark);
    border-color: var(--st-primary-dark);
    color: #fff;
}

a.btn,
a.btn:hover,
a.btn:focus {
    text-decoration: none;
}

.btn-outline-primary {
    color: var(--st-primary);
    border-color: var(--st-primary);
}

.hero-section {
    background: linear-gradient(135deg, #f0f7ff 0%, #ffffff 60%);
    padding: 5rem 0 4rem;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.hero-section .btn {
    position: relative;
    z-index: 2;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 60%;
    height: 200%;
    background: radial-gradient(circle, rgba(0,102,204,.08) 0%, transparent 70%);
    pointer-events: none;
}

.hero-title {
    font-size: clamp(2rem, 4vw, 3.2rem);
    font-weight: 700;
    line-height: 1.15;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--st-gray);
    max-width: 540px;
}

.stat-card {
    background: #fff;
    border: 1px solid var(--st-border);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--st-primary);
}

.stat-label { color: var(--st-gray); font-size: .9rem; }

.section-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: .5rem;
}

.section-subtitle { color: var(--st-gray); margin-bottom: 2.5rem; }

.service-card, .product-card, .case-card, .blog-card {
    position: relative;
    border: 1px solid var(--st-border);
    border-radius: 12px;
    overflow: hidden;
    height: 100%;
    transition: box-shadow .2s, transform .2s;
    background: #fff;
}

.service-card:hover, .product-card:hover, .case-card:hover, .blog-card:hover {
    box-shadow: 0 8px 24px rgba(15,23,42,.08);
    transform: translateY(-2px);
}

.service-icon {
    width: 48px;
    height: 48px;
    background: rgba(0,102,204,.1);
    color: var(--st-primary);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

.page-hero {
    background: var(--st-light);
    padding: 3rem 0 2rem;
    border-bottom: 1px solid var(--st-border);
}

.site-footer {
    background: var(--st-dark);
    color: #94a3b8;
}

.site-footer a {
    color: #e2e8f0;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.18em;
}
.site-footer a:hover {
    color: #fff;
    text-decoration-thickness: 2px;
}
.footer-brand {
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.2;
}
.footer-heading {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.2;
}
.footer-links li { margin-bottom: .4rem; }
.footer-projects a {
    font-weight: 600;
}
.text-muted-small { font-size: .875rem; color: #94a3b8; }

.form-check {
    gap: 0.5rem;
}
.form-check .form-check-input {
    flex-shrink: 0;
    margin-top: 0.2rem;
}
.form-check .form-check-label {
    margin-left: 0;
    padding-left: 0.15rem;
    line-height: 1.4;
}

.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 1px solid var(--st-border);
    padding: 1rem 0;
    z-index: 1050;
    box-shadow: 0 -4px 16px rgba(0,0,0,.06);
}

.client-logo-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 56px;
    overflow: hidden;
    padding: 0 4px;
}

.client-logo {
    display: block;
    max-width: 100%;
    max-height: 48px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.map-container {
    height: 400px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--st-border);
}

.form-section {
    position: relative;
    z-index: 2;
    background: var(--st-light);
    border-radius: 12px;
    padding: 2rem;
}

/* WebMCP declarative agent focus (ignored by browsers without support) */
form[toolname]:tool-form-active {
    outline: 2px dashed var(--st-primary);
    outline-offset: 6px;
}

button:tool-submit-active,
.btn-primary:tool-submit-active {
    outline: 2px dashed var(--st-accent, #00b4d8);
    outline-offset: 3px;
}

.client-card {
    border: 1px solid var(--st-border);
    border-radius: 12px;
    background: #fff;
    overflow: hidden;
    min-width: 0;
}

.client-logo-placeholder {
    height: 48px;
    width: 48px;
    margin: 0 auto;
    border-radius: 50%;
    background: rgba(0,102,204,.1);
    color: var(--st-primary);
    font-weight: 700;
    line-height: 48px;
}

.client-name {
    color: var(--st-gray);
    line-height: 1.3;
}

.client-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.client-site-link {
    font-size: .75rem;
    color: var(--st-primary);
}

.footer-projects li {
    line-height: 1.45;
}

.partner-card {
    border: 1px solid var(--st-border);
    border-radius: 12px;
    background: #fff;
    overflow: hidden;
    min-width: 0;
}

.partner-logo-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 56px;
    overflow: hidden;
    padding: 0 4px;
}

.partner-logo {
    display: block;
    max-width: 100%;
    max-height: 48px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.partner-logo-placeholder {
    height: 48px;
    width: 48px;
    margin: 0 auto;
    border-radius: 50%;
    background: rgba(0,102,204,.1);
    color: var(--st-primary);
    font-weight: 700;
    line-height: 48px;
}

.partner-name {
    color: var(--st-gray);
    line-height: 1.3;
}

.partner-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.partner-site-link {
    font-size: .75rem;
    color: var(--st-primary);
}

.badge-soft {
    background: rgba(0,102,204,.1);
    color: var(--st-primary);
}

.content-body img { max-width: 100%; height: auto; border-radius: 8px; }

.requisites-table {
    width: 100%;
    max-width: 860px;
    border-collapse: collapse;
}

.requisites-table td {
    padding: .75rem 1rem;
    border-bottom: 1px solid var(--st-border);
    vertical-align: top;
}

.requisites-table td:first-child {
    width: 38%;
    color: var(--st-gray);
    font-weight: 600;
    white-space: nowrap;
}

@media (max-width: 575.98px) {
    .requisites-table,
    .requisites-table tbody,
    .requisites-table tr,
    .requisites-table td {
        display: block;
        width: 100%;
    }

    .requisites-table td:first-child {
        white-space: normal;
        padding-bottom: .25rem;
        border-bottom: none;
    }

    .requisites-table tr {
        margin-bottom: .75rem;
        border-bottom: 1px solid var(--st-border);
        padding-bottom: .5rem;
    }
}

.catalog-sidebar {
    background: var(--st-light);
    border: 1px solid var(--st-border);
    border-radius: 12px;
    position: sticky;
    top: 5.5rem;
}

.catalog-categories a {
    display: block;
    padding: .35rem .5rem;
    border-radius: 6px;
    color: var(--st-gray);
    text-decoration: none;
    font-size: .95rem;
}

.catalog-categories a:hover,
.catalog-categories a.active {
    background: rgba(0,102,204,.08);
    color: var(--st-primary);
    font-weight: 600;
}

.catalog-card {
    border: 1px solid var(--st-border);
    border-radius: 12px;
    background: #fff;
    overflow: hidden;
    transition: box-shadow .2s, transform .2s;
    display: flex;
    flex-direction: column;
}

.catalog-card:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,.08);
    transform: translateY(-2px);
}

.catalog-card-image {
    position: relative;
    aspect-ratio: 4/3;
    background: var(--st-light);
    overflow: hidden;
}

.catalog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.catalog-card-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 160px;
    color: var(--st-primary);
    font-size: 2.5rem;
    opacity: .35;
}

.catalog-badge {
    position: absolute;
    top: .75rem;
    left: .75rem;
    font-size: .7rem;
    padding: .25rem .5rem;
    border-radius: 4px;
    background: rgba(108,117,125,.9);
    color: #fff;
}

.catalog-card-title {
    font-size: .95rem;
    line-height: 1.35;
    margin-bottom: .25rem;
}

.catalog-price strong {
    color: var(--st-primary);
    font-size: 1rem;
}

.catalog-buy-box {
    background: var(--st-light);
    border: 1px solid var(--st-border);
    border-radius: 12px;
}

.catalog-gallery-main {
    aspect-ratio: 4/3;
    object-fit: contain;
    background: var(--st-light);
    border: 1px solid var(--st-border);
}

.catalog-thumb {
    width: 72px;
    height: 72px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    cursor: pointer;
}

.catalog-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.catalog-thumb.active {
    border-color: var(--st-primary);
}

/* Card thumbs: fixed display size + CLS-friendly intrinsic ratio */
.card-thumb {
    display: block;
    width: 100%;
    height: auto;
    background: #fff;
}
.card-thumb--cover {
    height: 120px;
    object-fit: cover;
}
.card-thumb--contain {
    height: 120px;
    object-fit: contain;
    padding: 8px;
    background: #f8fafc;
}
.case-card .card-thumb--cover { height: 160px; }
.blog-card .card-thumb--cover { height: 180px; }

/* Links distinguishable by more than color (exclude button links) */
.content-body a:not(.btn),
.link-more {
    color: var(--st-primary);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 0.18em;
}
.link-more:hover {
    color: var(--st-primary-dark);
}
.content-body a.btn-primary,
.content-body a.btn-primary:hover {
    color: #fff;
    text-decoration: none;
}

@media (max-width: 768px) {
    .hero-section { padding: 3rem 0 2rem; }
}
