/*
Theme Name: BTS Marine Service 6.1.11
Theme URI: https://example.com/
Author: BTS
Author URI: https://example.com/
Description: Легкая WordPress-тема для сайта сервиса моторных катеров и яхт БТС.
Version: 6.1.11
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
Text Domain: bts
*/

:root {
    --font-main: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Arial, sans-serif;
    --color-navy: #071421;
    --color-navy-2: #0b1b2b;
    --color-blue: #082544;
    --color-text: #0d1525;
    --color-muted: #5e6876;
    --color-line: #dfe4ea;
    --color-soft: #f6f7f8;
    --color-white: #ffffff;
    --shadow-card: 0 18px 48px rgba(10, 24, 42, 0.09);
    --radius-card: 14px;
    --radius-media: 12px;
    --container: 1160px;
    --section: 92px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    color: var(--color-text);
    background: #fff;
    font-family: var(--font-main);
    font-size: 14px;
    line-height: 1.62;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
body.menu-is-open { overflow: hidden; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }

.container {
    width: min(calc(100% - 64px), var(--container));
    margin-inline: auto;
}
.section-padding { padding: var(--section) 0; }

.site-header {
    position: absolute;
    z-index: 50;
    top: 0;
    left: 0;
    width: 100%;
    color: #fff;
}
.admin-bar .site-header { top: 32px; }
.page:not(.home) .site-header,
.single:not(.home) .site-header,
.archive:not(.home) .site-header,
.blog:not(.home) .site-header,
.search:not(.home) .site-header,
.error404:not(.home) .site-header {
    position: relative;
    background: var(--color-navy);
}
.site-header__inner {
    width: min(calc(100% - 64px), 1200px);
    min-height: 84px;
    margin-inline: auto;
    display: flex;
    align-items: center;
    gap: 24px;
}
.burger {
    width: 38px;
    height: 38px;
    display: inline-grid;
    align-content: center;
    gap: 7px;
    padding: 0;
    border: 0;
    color: inherit;
    background: transparent;
    cursor: pointer;
}
.burger span {
    display: block;
    width: 30px;
    height: 2px;
    background: currentColor;
    transition: transform .2s ease, opacity .2s ease;
}
.brand {
    display: inline-flex;
    align-items: center;
    gap: 22px;
    text-transform: uppercase;
    letter-spacing: .02em;
}
.brand__name {
    font-size: clamp(30px, 3.2vw, 40px);
    line-height: 1;
    font-weight: 800;
}
.brand__line {
    width: 1px;
    height: 42px;
    background: rgba(255,255,255,.65);
}
.brand--dark .brand__line { background: rgba(7,20,33,.25); }
.brand__text {
    font-size: 12px;
    line-height: 1.25;
    font-weight: 600;
}
.site-header__contacts {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-left: auto;
    font-size: 14px;
}
.header-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    opacity: .94;
    transition: opacity .2s ease;
}
.header-link:hover { opacity: 1; }
.header-link svg,
.socials svg,
.cta__phone svg { width: 24px; height: 24px; }
.header-divider {
    width: 1px;
    height: 36px;
    background: rgba(255,255,255,.55);
}

.menu-backdrop {
    position: fixed;
    inset: 0;
    z-index: 90;
    background: rgba(0, 0, 0, .45);
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease;
}
.side-menu {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 100;
    width: min(420px, calc(100% - 28px));
    min-height: 100svh;
    padding: 34px;
    display: flex;
    flex-direction: column;
    color: var(--color-navy);
    background: #fff;
    transform: translateX(-104%);
    transition: transform .32s ease;
    box-shadow: 30px 0 70px rgba(0,0,0,.18);
}
.menu-is-open .menu-backdrop { opacity: 1; pointer-events: auto; }
.menu-is-open .side-menu { transform: translateX(0); }
.side-menu__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 56px;
}
.side-menu__close {
    width: 44px;
    height: 44px;
    border: 1px solid var(--color-line);
    border-radius: 50%;
    color: var(--color-navy);
    background: #fff;
    font-size: 34px;
    line-height: 1;
    cursor: pointer;
}
.side-menu__nav {
    display: grid;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 22px;
    line-height: 1.22;
    font-weight: 600;
}
.side-menu__nav a { transition: color .2s ease; }
.side-menu__nav a:hover { color: #315f8f; }
.side-menu__info {
    margin-top: auto;
    padding-top: 42px;
    color: var(--color-muted);
}
.side-menu__phone {
    display: inline-flex;
    margin: 16px 0 24px;
    color: var(--color-navy);
    font-size: 20px;
    font-weight: 600;
}
.socials { display: flex; align-items: center; gap: 12px; }
.socials a {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border: 1px solid var(--color-line);
    border-radius: 50%;
    color: var(--color-navy);
    background: #fff;
    transition: transform .2s ease, background .2s ease;
}
.socials a:hover { transform: translateY(-2px); background: var(--color-soft); }

.hero {
    width: 100vw;
    min-height: clamp(660px, 56.3vw, 820px);
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    color: #fff;
    background-image:
        linear-gradient(90deg, rgba(4,13,22,.96) 0%, rgba(4,13,22,.75) 32%, rgba(4,13,22,.30) 58%, rgba(4,13,22,.04) 100%),
        var(--hero-bg);
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    padding: 126px 0 88px;
}
.hero__content { max-width: 620px; }
.hero h1 {
    margin: 0;
    font-size: clamp(34px, 3.25vw, 48px);
    line-height: 1.2;
    font-weight: 400;
    letter-spacing: -.04em;
}
.hero__line { display: block; }
.decor-line,
.mini-line {
    display: block;
    width: 68px;
    height: 1px;
    background: currentColor;
    opacity: .8;
}
.decor-line { margin: 28px 0; }
.hero p {
    max-width: 360px;
    margin: 0 0 30px;
    color: rgba(255,255,255,.86);
    font-size: 17px;
    line-height: 1.45;
}
.btn {
    min-height: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 26px;
    padding: 13px 24px;
    border-radius: 3px;
    font-size: 13px;
    line-height: 1.2;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
    transition: transform .2s ease, background .2s ease, border-color .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn--outline {
    min-width: 250px;
    color: #fff;
    border: 1px solid rgba(255,255,255,.66);
    background: rgba(255,255,255,.02);
}
.btn--outline:hover { background: rgba(255,255,255,.12); }
.btn--primary {
    color: #fff;
    border: 1px solid var(--color-blue);
    background: var(--color-blue);
}
.btn--primary:hover { background: #0c3159; border-color: #0c3159; }

.intro {
    min-height: 610px;
    display: flex;
    align-items: flex-start;
    text-align: center;
    padding: 82px 0 245px;
    background-image:
        linear-gradient(180deg, #fff 0%, #fff 54%, rgba(255,255,255,.70) 68%, rgba(255,255,255,.12) 100%),
        var(--intro-bg);
    background-size: cover;
    background-position: center bottom;
}
.intro__content {
    max-width: 790px;
    padding: 0 18px 18px;
    background: rgba(255,255,255,.94);
    border-radius: var(--radius-card);
    box-shadow: 0 20px 70px rgba(255,255,255,.72);
}
.intro h2 {
    margin: 0 0 22px;
    font-size: clamp(20px, 2.05vw, 30px);
    line-height: 1.48;
    font-weight: 400;
    letter-spacing: -.03em;
}
.intro p {
    max-width: 640px;
    margin: 0 auto;
    color: #3d4652;
    font-size: 15px;
    line-height: 1.72;
    text-shadow: none;
}

.eyebrow {
    margin: 0 0 14px;
    color: #717b88;
    font-size: 12px;
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
}
.eyebrow--center { text-align: center; }
.mini-line {
    width: 34px;
    color: #7792a8;
    margin-bottom: 28px;
}
.mini-line--center { margin-inline: auto; }
.owner-path { background: #fff; }
.owner-path__grid {
    display: grid;
    grid-template-columns: 1.15fr repeat(3, 1fr);
    gap: 12px;
}
.owner-path__lead {
    padding: 46px 20px 34px 0;
}
.owner-path__lead h2,
.stories__lead h2,
.brands h2,
.cta h2,
.page-hero h1 {
    margin: 0;
    color: var(--color-text);
    line-height: 1.18;
    font-weight: 500;
    letter-spacing: -.045em;
}
.owner-path__lead h2 { max-width: 360px; font-size: clamp(30px, 2.8vw, 39px); }
.stories__lead h2 { font-size: clamp(32px, 4.1vw, 56px); }
.brands h2 { font-size: clamp(28px, 3vw, 42px); }
.cta h2 { font-size: clamp(28px, 3vw, 40px); }
.page-hero h1 { font-size: clamp(32px, 4.1vw, 56px); }
.owner-path__lead p:last-child,
.stories__lead p {
    margin-top: 30px;
    color: var(--color-muted);
    font-size: 15px;
    line-height: 1.68;
}
.service-card {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    overflow: hidden;
    padding: 0 20px 34px;
    border: 1px solid #edf0f3;
    border-radius: var(--radius-card);
    color: var(--color-text);
    background: #fff;
    transition: transform .22s ease, box-shadow .22s ease;
}
.service-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-card);
}
.service-card img {
    width: calc(100% + 40px);
    max-width: none;
    height: 260px;
    margin: 0 -20px 24px;
    object-fit: cover;
    border-radius: var(--radius-media) var(--radius-media) 0 0;
}
.service-card__number {
    color: var(--color-navy);
    font-size: 15px;
    font-weight: 500;
}
.service-card .mini-line { margin: 14px 0 28px; width: 26px; color: #a6b1bb; }
.service-card h3 {
    margin: 0 0 16px;
    font-size: 19px;
    line-height: 1.25;
    font-weight: 500;
    letter-spacing: -.02em;
}
.service-card p {
    margin: 0;
    color: var(--color-muted);
    font-size: 14px;
}

.stories { background: #fafafa; }
.stories__layout {
    display: grid;
    grid-template-columns: 310px 1fr;
    align-items: start;
    gap: 42px;
}
.stories__lead { position: sticky; top: 40px; padding-top: 34px; }
.stories__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}
.story-card {
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100%;
    border: 1px solid #edf0f3;
    border-radius: var(--radius-card);
    background: #fff;
    box-shadow: 0 14px 38px rgba(8, 20, 33, .05);
    transition: transform .22s ease, box-shadow .22s ease;
}
.story-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-card); }
.story-card img {
    width: 100%;
    height: 255px;
    object-fit: cover;
    border-radius: var(--radius-media) var(--radius-media) 0 0;
}
.story-card--wide { grid-column: 1 / -1; }
.story-card--wide img { height: 380px; object-position: center center; }
.story-card--full { grid-column: 1 / -1; }
.story-card--full img { height: 285px; }
.story-card__body { padding: 28px 34px 34px; }
.story-card__label {
    margin: 0 0 12px;
    color: #55708b;
    font-size: 12px;
    line-height: 1.2;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
}
.story-card h3 {
    margin: 0 0 14px;
    font-size: 22px;
    line-height: 1.35;
    font-weight: 600;
    letter-spacing: -.02em;
}
.story-card p:not(.story-card__label) {
    margin: 0 0 26px;
    color: var(--color-muted);
    font-size: 15px;
}
.read-more {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--color-navy);
    font-weight: 700;
}

.brands {
    background: #fff;
    text-align: center;
}
.brands h2 { margin-top: 6px; }
.brands__inner > p:not(.eyebrow) {
    max-width: 570px;
    margin: 18px auto 48px;
    color: var(--color-muted);
    font-size: 17px;
}
.brands__grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 24px 34px;
    border: 0;
    background: transparent;
}
.brand-logo {
    min-height: 118px;
    display: grid;
    place-items: center;
    padding: 8px;
    border: 0;
    background: transparent;
}
.brand-logo img {
    max-width: min(92%, 230px);
    max-height: 98px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.cta-wrap { padding: 0 0 18px; background: #fff; }
.cta {
    overflow: hidden;
    min-height: 365px;
    display: flex;
    align-items: center;
    border-radius: var(--radius-card);
    color: #fff;
    background-image:
        linear-gradient(90deg, rgba(7,20,33,.92) 0%, rgba(7,20,33,.65) 38%, rgba(7,20,33,.12) 76%, rgba(7,20,33,.04) 100%),
        var(--cta-bg);
    background-size: cover;
    background-position: center;
}
.cta__content {
    max-width: 530px;
    padding: 52px 48px;
}
.cta h2 { color: #fff; margin-bottom: 22px; }
.cta p { margin: 0 0 26px; color: rgba(255,255,255,.86); font-size: 16px; }
.cta__phone {
    display: flex;
    align-items: center;
    width: max-content;
    gap: 14px;
    margin-top: 22px;
    color: rgba(255,255,255,.94);
    font-size: 18px;
}
.site-footer {
    padding: 24px 0;
    color: rgba(255,255,255,.82);
    background: var(--color-navy);
}
.site-footer__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.page-hero {
    padding: 92px 0 74px;
    color: #fff;
    background: linear-gradient(135deg, #071421, #12314c);
}
.page-hero h1 { color: #fff; }
.content-narrow { max-width: 860px; }
.content-card {
    padding: 42px;
    border: 1px solid var(--color-line);
    border-radius: var(--radius-card);
    background: #fff;
    box-shadow: 0 14px 40px rgba(7,20,33,.06);
}
.content-card h2 { margin-top: 0; }
.content-card a:not(.btn) { color: #0c3159; }

@media (max-width: 1100px) {
    :root { --section: 82px; }
    .site-header__contacts { font-size: 14px; gap: 16px; }
    .owner-path__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .owner-path__lead { padding-right: 0; }
    .stories__layout { grid-template-columns: 1fr; }
    .stories__lead { position: static; max-width: 580px; padding-top: 0; }
}

@media (max-width: 840px) {
    .container,
    .site-header__inner { width: min(calc(100% - 36px), var(--container)); }
    .site-header__inner { min-height: 78px; gap: 18px; }
    .brand { gap: 14px; }
    .brand__name { font-size: 34px; }
    .brand__line { height: 38px; }
    .brand__text { font-size: 11px; }
    .site-header__contacts { display: none; }
    .hero { min-height: 620px; padding: 108px 0 68px; background-position: 62% center; }
    .hero p { font-size: 17px; }
    .intro { min-height: 560px; padding: 70px 0 215px; }
    .intro h2 { line-height: 1.38; }
    .owner-path__grid,
    .stories__grid { grid-template-columns: 1fr; }
    .story-card--wide,
    .story-card--full { grid-column: auto; }
    .story-card img,
    .story-card--wide img,
    .story-card--full img { height: 255px; }
    .brands__grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
    .cta { min-height: 400px; background-position: 65% center; }
    .cta__content { padding: 42px 28px; }
    .site-footer__inner { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 520px) {
    :root { --section: 64px; }
    body { font-size: 14px; }
    .burger span { width: 29px; }
    .brand__text { display: none; }
    .brand__line { display: none; }
    .hero h1 { font-size: 34px; }
    .btn { width: 100%; min-width: 0; }
    .intro { min-height: 560px; padding: 70px 0 215px; }
    .intro p { font-size: 16px; }
    .owner-path__lead h2,
    .stories__lead h2,
    .brands h2 { font-size: 32px; }
    .service-card { padding: 0 22px 34px; }
    .service-card img { width: calc(100% + 44px); margin-inline: -22px; height: 250px; }
    .story-card__body { padding: 24px; }
    .brands__grid { grid-template-columns: 1fr; }
    .brand-logo { min-height: 120px; }
    .cta__phone { font-size: 18px; }
    .side-menu { padding: 24px; }
    .side-menu__nav { font-size: 20px; }
}


.home-main { overflow: hidden; }
.cta .btn { width: max-content; }
img { border-radius: var(--radius-media); }
.site-header img,
.brand-logo img,
.socials svg,
.header-link svg,
.cta__phone svg { border-radius: 0; }


/* ===== BTS v0.5 layout refinements ===== */
:root {
    --edge-padding: clamp(24px, 5vw, 92px);
}

.site-header__inner {
    width: 100%;
    max-width: none;
    min-height: 84px;
    padding-inline: var(--edge-padding);
    margin: 0;
}

.side-menu__nav {
    gap: 10px;
    font-size: 18px;
    line-height: 1.24;
}
.side-menu__phone { font-size: 18px; }

.hero {
    min-height: clamp(650px, 56vw, 820px);
    padding: 126px 0 88px;
    background-position: center center;
}
.hero__inner.container {
    width: 100%;
    max-width: none;
    padding-inline: var(--edge-padding);
    margin: 0;
}
.hero__content {
    max-width: 650px;
    margin-left: 62px;
}
.hero h1 {
    font-size: clamp(36px, 3.05vw, 50px);
    line-height: 1.18;
}
.hero__line { white-space: nowrap; }

.intro {
    min-height: 470px;
    padding: 57px 0 145px;
    align-items: flex-start;
    background-image:
        linear-gradient(180deg, #fff 0%, #fff 50%, rgba(255,255,255,.92) 61%, rgba(255,255,255,.42) 76%, rgba(255,255,255,.06) 100%),
        var(--intro-bg);
    background-position: center bottom;
    background-size: cover;
}
.intro__content {
    max-width: 820px;
    padding: 0 32px 24px;
    background: rgba(255,255,255,.97);
    box-shadow: 0 18px 64px rgba(255,255,255,.82);
}
.intro h2 { margin-bottom: 18px; }

.owner-path__grid { gap: 6px; }
.service-card {
    cursor: default;
    user-select: text;
}
.service-card:hover {
    transform: translateY(-5px) scale(1.01);
}

.stories__lead {
    position: sticky;
    top: 96px;
    align-self: start;
    z-index: 1;
}

.brands__grid {
    gap: 22px 28px;
}
.brand-logo {
    position: relative;
    min-height: 126px;
}
.brand-logo:not(:nth-child(5n))::after {
    content: "";
    position: absolute;
    top: 50%;
    right: -14px;
    width: 1px;
    height: 44px;
    transform: translateY(-50%);
    background: #7792a8;
    opacity: .55;
}
.brand-logo img {
    max-width: min(96%, 250px);
    max-height: 112px;
}

.cta-wrap {
    width: 100%;
    padding: 0;
    background: #fff;
}
.cta {
    width: 100%;
    min-height: 430px;
    border-radius: 0;
    background-position: center center;
}
.cta__content {
    max-width: 760px;
    padding: 72px var(--edge-padding) 72px calc(var(--edge-padding) + 62px);
}
.cta h2 {
    white-space: nowrap;
    font-size: clamp(30px, 3vw, 46px);
}
.cta .btn { width: max-content; }
.cta__phone {
    display: flex;
    margin-top: 20px;
}

@media (max-width: 1100px) {
    .site-header__inner { padding-inline: clamp(22px, 4vw, 48px); }
    .hero__inner.container { padding-inline: clamp(22px, 4vw, 48px); }
    .hero__content { margin-left: 56px; }
    .stories__lead { position: static; top: auto; }
    .brand-logo:not(:nth-child(5n))::after { display: none; }
    .brand-logo:not(:nth-child(2n))::after {
        content: "";
        display: block;
        position: absolute;
        top: 50%;
        right: -10px;
        width: 1px;
        height: 38px;
        transform: translateY(-50%);
        background: #7792a8;
        opacity: .45;
    }
    .cta__content { padding-left: calc(clamp(22px, 4vw, 48px) + 56px); }
}

@media (max-width: 840px) {
    .site-header__inner,
    .hero__inner.container { width: 100%; padding-inline: 22px; }
    .hero__content { margin-left: 0; }
    .hero__line { white-space: normal; }
    .intro { min-height: 440px; padding: 48px 0 120px; }
    .intro__content { padding-inline: 18px; }
    .brands__grid { gap: 18px; }
    .brand-logo img { max-height: 92px; }
    .cta { min-height: 410px; background-position: 65% center; }
    .cta__content { padding: 48px 22px; }
    .cta h2 { white-space: normal; }
}

@media (max-width: 520px) {
    .site-header__inner { min-height: 72px; }
    .side-menu__nav { font-size: 18px; }
    .hero h1 { font-size: 32px; }
    .intro { min-height: 430px; padding: 44px 0 112px; }
    .brand-logo:not(:nth-child(2n))::after { display: none; }
    .cta .btn { width: 100%; }
}


/* ===== BTS v0.5 quick refinements ===== */
.home-main {
    overflow-x: clip;
    overflow-y: visible;
}

.side-menu__navigation {
    margin: auto 0;
}
.side-menu__info {
    margin-top: 0;
}
.side-menu__nav {
    align-content: center;
}

.intro__content {
    background: transparent;
    box-shadow: none;
    border-radius: 0;
}

.stories,
.stories__layout {
    overflow: visible;
}
.stories__lead {
    position: sticky;
    top: 96px;
}

.cta {
    background-position: center 28%;
}

@media (max-width: 1100px) {
    .stories__lead {
        position: sticky;
        top: 84px;
    }
}

@media (max-width: 840px) {
    .side-menu__navigation {
        margin: auto 0;
    }
    .stories__lead {
        position: static;
    }
    .cta {
        background-position: 65% 30%;
    }
}

/* ===== BTS v0.6 targeted refinements ===== */
.side-menu {
    padding-top: 61px;
}
.side-menu__top {
    margin-bottom: 0;
}
.side-menu__close {
    width: auto;
    height: auto;
    min-width: 0;
    min-height: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    font-size: 40px;
    line-height: .75;
}
.side-menu__close:hover {
    background: transparent;
}
.side-menu__navigation {
    margin: auto 0;
}

.hero {
    background-image:
        linear-gradient(90deg, rgba(4,13,22,.86) 0%, rgba(4,13,22,.62) 32%, rgba(4,13,22,.24) 58%, rgba(4,13,22,.03) 100%),
        var(--hero-bg);
}

.intro {
    min-height: 430px;
    padding: 62px 0;
    align-items: center;
    background-image:
        linear-gradient(180deg, rgba(255,255,255,.68) 0%, rgba(255,255,255,.54) 50%, rgba(255,255,255,.36) 100%),
        var(--intro-bg);
    background-position: center center;
    background-size: cover;
}
.intro__content {
    padding: 0 32px;
    background: transparent;
    box-shadow: none;
}
.intro h2,
.intro p {
    text-shadow: 0 1px 10px rgba(255,255,255,.65);
}

.home-main {
    overflow: visible;
}
.stories,
.stories__layout {
    overflow: visible;
}
.stories__layout {
    align-items: stretch;
}
.stories__lead {
    position: sticky;
    top: 96px;
    height: max-content;
    align-self: start;
}

.cta {
    background-size: cover;
    background-position: center center;
}

@media (max-width: 840px) {
    .side-menu {
        padding-top: 43px;
    }
    .intro {
        min-height: 400px;
        padding: 46px 0;
    }
    .intro__content {
        padding-inline: 18px;
    }
    .stories__lead {
        position: static;
    }
    .cta {
        background-position: 68% center;
    }
}


/* === BTS 1.0: первая карточка «Уверенный выбор» ведёт на страницу === */
a.service-card.service-card--link {
    cursor: pointer;
    text-decoration: none;
}

a.service-card.service-card--link:hover {
    color: var(--color-text);
}


/* === BTS 1.3: страница «Уверенный выбор» — верхнее меню как на главной === */
body.page-template-page-uverennyy-vybor .site-header,
body.page-template-page-uverennyy-vybor-php .site-header,
body.page-template-template-uverennyy-vybor .site-header,
body.page-template-template-uverennyy-vybor-php .site-header {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    background: transparent !important;
    color: #fff !important;
    box-shadow: none !important;
}

body.admin-bar.page-template-page-uverennyy-vybor .site-header,
body.admin-bar.page-template-page-uverennyy-vybor-php .site-header,
body.admin-bar.page-template-template-uverennyy-vybor .site-header,
body.admin-bar.page-template-template-uverennyy-vybor-php .site-header {
    top: 32px !important;
}

body.page-template-page-uverennyy-vybor .burger,
body.page-template-page-uverennyy-vybor-php .burger,
body.page-template-template-uverennyy-vybor .burger,
body.page-template-template-uverennyy-vybor-php .burger,
body.page-template-page-uverennyy-vybor .header-link,
body.page-template-page-uverennyy-vybor-php .header-link,
body.page-template-template-uverennyy-vybor .header-link,
body.page-template-template-uverennyy-vybor-php .header-link {
    color: #fff !important;
}

body.page-template-page-uverennyy-vybor .header-divider,
body.page-template-page-uverennyy-vybor-php .header-divider,
body.page-template-template-uverennyy-vybor .header-divider,
body.page-template-template-uverennyy-vybor-php .header-divider {
    background: rgba(255,255,255,.42) !important;
}

/* =========================================================
   BTS 6.1.4 — automatic latest works and project articles
   ========================================================= */
.latest-works {
    --latest-works-gold: #e8c997;
    position: relative;
    overflow: hidden;
    padding: 92px 0 78px;
    color: #fff;
    background:
        linear-gradient(180deg, rgba(5,15,25,.84), rgba(5,15,25,.97)),
        var(--latest-works-bg) center / cover no-repeat;
}
.latest-works::before {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 78% 18%, rgba(223,190,138,.12), transparent 34%);
    pointer-events: none;
    content: "";
}
.latest-works__inner { position: relative; z-index: 1; }
.latest-works__heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 48px;
    margin-bottom: 52px;
    text-align: center;
}
.latest-works__heading > div { flex: 1; }
.latest-works__eyebrow {
    width: max-content;
    margin: 0 auto 15px;
    padding: 6px 15px;
    border-radius: 999px;
    color: #f5d7a7;
    background: rgba(231,199,148,.16);
    font-size: 12px;
    line-height: 1;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .08em;
}
.latest-works h2 {
    margin: 0;
    font-size: clamp(36px, 4.2vw, 60px);
    line-height: 1.05;
    font-weight: 400;
    letter-spacing: -.045em;
}
.latest-works__heading p:not(.latest-works__eyebrow) {
    max-width: 720px;
    margin: 20px auto 0;
    color: rgba(255,255,255,.78);
    font-size: 17px;
    line-height: 1.55;
}
.latest-works__all {
    flex: 0 0 auto;
    min-width: 196px;
    min-height: 54px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    padding: 13px 25px;
    border: 1px solid rgba(232,201,151,.88);
    border-radius: 999px;
    color: #f2d4a4;
    font-size: 15px;
    transition: background .2s ease, transform .2s ease;
}
.latest-works__all:hover { background: rgba(232,201,151,.12); transform: translateY(-2px); }
.latest-works__track {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding: 2px 2px 14px;
    align-items: stretch;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    overscroll-behavior-inline: contain;
}
.latest-works__track::-webkit-scrollbar { display: none; }
.latest-work-card {
    flex: 0 0 calc((100% - 60px) / 4);
    min-width: 270px;
    min-height: 590px;
    height: auto;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    scroll-snap-align: start;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 10px;
    background: linear-gradient(180deg, rgba(23,41,56,.98), rgba(15,31,44,.98));
    box-shadow: 0 20px 55px rgba(0,0,0,.18);
    transition: transform .25s ease, border-color .25s ease;
}
.latest-work-card:hover { transform: translateY(-5px); border-color: rgba(232,201,151,.36); }
.latest-work-card__image {
    height: 260px;
    flex: 0 0 260px;
    overflow: hidden;
    background: #0a1722;
}
.latest-work-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .45s ease;
}
.latest-work-card:hover .latest-work-card__image img { transform: scale(1.035); }
.latest-work-card__body {
    min-height: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 23px 24px 25px;
}
.latest-work-card__meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: rgba(255,255,255,.68);
    font-size: 11px;
    line-height: 1.35;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.latest-work-card__meta span { color: #e9c990; }
.latest-work-card h3 {
    margin: 20px 0 14px;
    font-size: 23px;
    line-height: 1.22;
    font-weight: 500;
    letter-spacing: -.025em;
}
.latest-work-card h3 a { display: block; }
.latest-work-card__body > p {
    margin: 0;
    color: rgba(255,255,255,.72);
    font-size: 14px;
    line-height: 1.58;
}
.latest-work-card__more {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-top: auto;
    padding-top: 22px;
    color: #edcf9c;
    font-size: 14px;
}
.latest-works__controls {
    display: flex;
    justify-content: center;
    gap: 14px;
    margin-top: 22px;
}
.latest-works__controls button {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(232,201,151,.56);
    border-radius: 50%;
    color: #edcf9c;
    background: transparent;
    cursor: pointer;
    transition: background .2s ease, opacity .2s ease;
}
.latest-works__controls button:hover { background: rgba(232,201,151,.12); }
.latest-works__controls button:disabled { opacity: .3; cursor: default; }
.latest-works__empty { text-align: center; color: rgba(255,255,255,.7); }

/* Single project article. */
body.single-post .site-header {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    color: #fff !important;
    background: transparent !important;
    box-shadow: none !important;
}
body.admin-bar.single-post .site-header { top: 32px !important; }
body.single-post .header-divider { background: rgba(255,255,255,.46); }
.project-page { background: #fff; }
.project-hero {
    min-height: 640px;
    display: flex;
    align-items: flex-end;
    padding: 150px 0 78px;
    color: #fff;
    background:
        linear-gradient(90deg, rgba(4,14,23,.94) 0%, rgba(4,14,23,.76) 37%, rgba(4,14,23,.28) 70%, rgba(4,14,23,.08) 100%),
        var(--project-hero) center / cover no-repeat;
}
.project-hero__copy { max-width: 760px; }
.project-hero__meta {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 24px;
    color: rgba(255,255,255,.76);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .06em;
}
.project-hero__meta span {
    padding: 7px 12px;
    border-radius: 999px;
    color: #f0d2a0;
    background: rgba(230,197,143,.15);
}
.project-hero h1 {
    max-width: 760px;
    margin: 0;
    font-size: clamp(42px, 5vw, 72px);
    line-height: 1.02;
    font-weight: 400;
    letter-spacing: -.045em;
}
.project-hero__copy > p {
    max-width: 650px;
    margin: 28px 0 0;
    color: rgba(255,255,255,.82);
    font-size: 18px;
    line-height: 1.55;
}
.project-main { padding: 72px 0 88px; }
.project-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 70px;
    align-items: start;
}
.project-content { min-width: 0; }
.project-section,
.project-gallery {
    padding: 0 0 52px;
    margin: 0 0 52px;
    border-bottom: 1px solid #e2e5e8;
}
.project-section:last-child { margin-bottom: 0; }
.project-content h2,
.project-gallery h2 {
    margin: 0 0 22px;
    color: #0b1724;
    font-size: clamp(28px, 3vw, 40px);
    line-height: 1.14;
    font-weight: 500;
    letter-spacing: -.035em;
}
.project-content h3 {
    margin: 0 0 10px;
    color: #0c1825;
    font-size: 18px;
    line-height: 1.3;
    font-weight: 600;
}
.project-content p,
.project-content li {
    color: #48515d;
    font-size: 16px;
    line-height: 1.75;
}
.project-content p { margin: 0 0 17px; }
.project-content ul { margin: 0; padding-left: 20px; }
.project-content li + li { margin-top: 8px; }
.project-section--split,
.project-section--result {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 1fr);
    gap: 42px;
    align-items: start;
}
.project-inline-image {
    width: 100%;
    margin: 0;
    justify-self: end;
}
.project-inline-image img {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    height: auto;
    object-fit: cover;
    border-radius: 8px;
}
.project-inline-image figcaption {
    margin-top: 9px;
    color: #7a838d;
    font-size: 12px;
}
.project-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}
.project-steps > div {
    padding-top: 20px;
    border-top: 1px solid #cfd5da;
}
.project-steps span {
    display: block;
    margin-bottom: 18px;
    color: #9c7a4c;
    font-size: 12px;
    letter-spacing: .08em;
}
.project-steps p { margin: 0; font-size: 14px; line-height: 1.65; }
.project-gallery { border-bottom: 0; padding-bottom: 0; }
.project-gallery__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}
.project-gallery__grid a {
    display: block;
    overflow: hidden;
    border-radius: 8px;
    background: #eef0f2;
}
.project-gallery__grid img {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    height: auto;
    object-fit: cover;
    transition: transform .35s ease;
}
.project-gallery__grid a:hover img { transform: scale(1.035); }
.project-sidebar {
    position: sticky;
    top: 28px;
    display: grid;
    gap: 20px;
}
.admin-bar .project-sidebar { top: 60px; }
.project-sidebar__card {
    padding: 25px;
    border: 1px solid #e4e7ea;
    border-radius: 8px;
    background: #f7f8f9;
}
.project-sidebar__card h2 {
    margin: 0 0 19px;
    font-size: 18px;
    line-height: 1.25;
    font-weight: 600;
}
.project-sidebar__card > a:not(.project-related) {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-top: 1px solid #e1e4e7;
    color: #26313c;
    font-size: 14px;
}
.project-sidebar__card > a:first-of-type { border-top: 0; }
.project-related {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 13px;
    align-items: center;
    padding: 14px 0;
    border-top: 1px solid #e1e4e7;
}
.project-related img {
    width: 72px;
    height: 68px;
    object-fit: cover;
    border-radius: 5px;
}
.project-related time {
    display: block;
    margin-bottom: 5px;
    color: #838b94;
    font-size: 10px;
}
.project-related strong {
    display: block;
    color: #172330;
    font-size: 13px;
    line-height: 1.32;
    font-weight: 600;
}
.project-sidebar__all { color: #8b6b42 !important; font-weight: 600; }
.project-cta-wrap { padding: 0 0 88px; }
.project-cta {
    min-height: 230px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    padding: 44px 58px;
    border-radius: 10px;
    color: #fff;
    background:
        linear-gradient(90deg, rgba(5,17,29,.96), rgba(5,17,29,.78) 56%, rgba(5,17,29,.42)),
        var(--project-cta) center / cover no-repeat;
}
.project-cta h2 {
    max-width: 550px;
    margin: 0 0 14px;
    font-size: clamp(30px, 3vw, 43px);
    line-height: 1.12;
    font-weight: 400;
    letter-spacing: -.035em;
}
.project-cta p {
    max-width: 580px;
    margin: 0;
    color: rgba(255,255,255,.75);
    line-height: 1.55;
}
.project-cta__button {
    flex: 0 0 auto;
    min-height: 52px;
    display: inline-flex;
    align-items: center;
    gap: 25px;
    padding: 13px 25px;
    border-radius: 999px;
    color: #10202e;
    background: #ead0a6;
    font-size: 14px;
    font-weight: 600;
}

/* Automatic all-news page. */
.news-page { background: #071521; color: #fff; }
.news-page__hero {
    min-height: 430px;
    display: flex;
    align-items: flex-end;
    padding: 90px 0 68px;
    background:
        linear-gradient(90deg, rgba(4,14,23,.94), rgba(4,14,23,.54), rgba(4,14,23,.14)),
        var(--news-hero) center / cover no-repeat;
}
.news-page__eyebrow { margin: 0 0 14px; color: #e6c794; text-transform: uppercase; letter-spacing: .08em; }
.news-page__hero h1 { margin: 0; font-size: clamp(46px, 6vw, 78px); line-height: 1; font-weight: 400; letter-spacing: -.05em; }
.news-page__hero p:not(.news-page__eyebrow) { max-width: 620px; margin: 23px 0 0; color: rgba(255,255,255,.75); font-size: 17px; line-height: 1.55; }
.news-page__content { padding: 72px 0 96px; }
.news-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.news-card {
    min-height: 580px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 9px;
    background: #102332;
}
.news-card__image { height: 250px; overflow: hidden; }
.news-card__image img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.news-card:hover .news-card__image img { transform: scale(1.03); }
.news-card__body { flex: 1; display: flex; flex-direction: column; padding: 23px; }
.news-card__meta { display: flex; justify-content: space-between; gap: 12px; color: rgba(255,255,255,.58); font-size: 10px; text-transform: uppercase; }
.news-card__meta span { color: #e8c894; }
.news-card h2 { margin: 19px 0 13px; font-size: 22px; line-height: 1.25; font-weight: 500; }
.news-card__body > p { margin: 0; color: rgba(255,255,255,.68); font-size: 14px; line-height: 1.6; }
.news-card__more { margin-top: auto; padding-top: 22px; color: #e7c691; font-size: 14px; }

@media (max-width: 1100px) {
    .latest-work-card { flex-basis: calc((100% - 40px) / 3); }
    .project-layout { grid-template-columns: minmax(0, 1fr) 270px; gap: 42px; }
    .news-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 840px) {
    .latest-works { padding: 70px 0 58px; }
    .latest-works__heading { align-items: center; flex-direction: column; margin-bottom: 38px; }
    .latest-work-card { flex-basis: calc((100% - 20px) / 2); }
    .project-hero { min-height: 570px; padding-bottom: 58px; }
    .project-layout { grid-template-columns: 1fr; }
    .project-sidebar { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .project-section--split,
    .project-section--result { grid-template-columns: 1fr; }
    .project-steps { grid-template-columns: 1fr; gap: 22px; }
    .project-gallery__grid { grid-template-columns: repeat(2, 1fr); }
    .project-cta { align-items: flex-start; flex-direction: column; padding: 38px; }
    .news-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
    .latest-works h2 { font-size: 38px; }
    .latest-works__heading p:not(.latest-works__eyebrow) { font-size: 15px; }
    .latest-work-card { flex-basis: 88%; min-height: 560px; height: auto; }
    .latest-work-card__image { height: 235px; flex-basis: 235px; }
    .project-hero { min-height: 520px; padding: 125px 0 48px; }
    .project-hero h1 { font-size: 40px; }
    .project-hero__copy > p { font-size: 16px; }
    .project-main { padding: 52px 0 66px; }
    .project-section,
    .project-gallery { padding-bottom: 38px; margin-bottom: 38px; }
    .project-sidebar { grid-template-columns: 1fr; }
    .project-gallery__grid { grid-template-columns: 1fr; }
    .project-cta { padding: 30px 24px; }
    .project-cta-wrap { padding-bottom: 60px; }
    .news-grid { grid-template-columns: 1fr; }
    .news-card { min-height: 550px; }
}


/* BTS 6.1.5 — project layout, gallery lightbox and flexible latest-work cards. */
.latest-work-card__body > p {
    padding-bottom: 2px;
}

.project-section--split > div,
.project-section--result > div {
    grid-column: 1;
    text-align: left;
}

.project-section--split > .project-inline-image,
.project-section--result > .project-inline-image {
    grid-column: 2;
}

body.project-lightbox-open {
    overflow: hidden;
}

.project-lightbox {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 28px 86px;
    background: rgba(3, 10, 17, .94);
    backdrop-filter: blur(12px);
}

.project-lightbox.is-open {
    display: flex;
}

.project-lightbox__figure {
    width: min(78vh, 820px);
    max-width: calc(100vw - 190px);
    margin: 0;
}

.project-lightbox__media {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 10px;
    background: #071521;
    box-shadow: 0 28px 80px rgba(0, 0, 0, .48);
}

.project-lightbox__media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.project-lightbox figcaption {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    margin-top: 14px;
    color: rgba(255,255,255,.76);
    font-size: 13px;
    line-height: 1.45;
}

.project-lightbox__close,
.project-lightbox__nav {
    position: absolute;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255,255,255,.34);
    color: #fff;
    background: rgba(8, 22, 34, .72);
    cursor: pointer;
    transition: background .2s ease, border-color .2s ease, transform .2s ease;
}

.project-lightbox__close:hover,
.project-lightbox__nav:hover {
    border-color: rgba(232,201,151,.78);
    background: rgba(232,201,151,.14);
}

.project-lightbox__close {
    top: 24px;
    right: 28px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 28px;
    line-height: 1;
}

.project-lightbox__nav {
    top: 50%;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    font-size: 22px;
    transform: translateY(-50%);
}

.project-lightbox__nav:hover {
    transform: translateY(-50%) scale(1.04);
}

.project-lightbox__nav--prev { left: 24px; }
.project-lightbox__nav--next { right: 24px; }
.project-lightbox--single .project-lightbox__nav { display: none; }

@media (max-width: 840px) {
    .project-section--split > .project-inline-image,
    .project-section--result > .project-inline-image,
    .project-section--split > div,
    .project-section--result > div {
        grid-column: 1;
    }

    .project-lightbox {
        padding: 74px 20px 28px;
    }

    .project-lightbox__figure {
        width: min(82vh, 100%);
        max-width: 100%;
    }

    .project-lightbox__nav {
        top: auto;
        bottom: 18px;
        width: 46px;
        height: 46px;
        transform: none;
    }

    .project-lightbox__nav:hover { transform: scale(1.04); }
    .project-lightbox__nav--prev { left: calc(50% - 58px); }
    .project-lightbox__nav--next { right: calc(50% - 58px); }
    .project-lightbox__close { top: 16px; right: 16px; }
    .project-lightbox figcaption { padding-bottom: 54px; }
}


/* BTS 6.1.6 — strict top alignment for article text/image rows. */
.project-section--split,
.project-section--result {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 380px) !important;
    grid-template-areas: "project-copy project-image";
    column-gap: 42px;
    row-gap: 0;
    align-items: start !important;
    align-content: start !important;
}

.project-section--split > div,
.project-section--result > div {
    grid-area: project-copy;
    align-self: start !important;
    justify-self: stretch;
    min-width: 0;
    margin: 0 !important;
    padding: 0 !important;
    text-align: left;
}

.project-section--split > .project-inline-image,
.project-section--result > .project-inline-image {
    grid-area: project-image;
    align-self: start !important;
    justify-self: stretch;
    width: 100%;
    max-width: 380px;
    margin: 0 !important;
    padding: 0 !important;
}

.project-section--split > .project-inline-image img,
.project-section--result > .project-inline-image img {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    height: auto;
    object-fit: cover;
}

.project-section--split > div > :first-child,
.project-section--result > div > :first-child {
    margin-top: 0 !important;
}

@media (max-width: 840px) {
    .project-section--split,
    .project-section--result {
        grid-template-columns: 1fr !important;
        grid-template-areas:
            "project-copy"
            "project-image";
        row-gap: 28px;
    }

    .project-section--split > .project-inline-image,
    .project-section--result > .project-inline-image {
        max-width: 100%;
    }
}


/* BTS 6.1.7 — latest works card alignment and centered image cropping. */
.latest-work-card__image {
    position: relative;
}

.latest-work-card__category {
    position: absolute;
    z-index: 2;
    top: 16px;
    left: 16px;
    max-width: calc(100% - 32px);
    padding: 6px 10px;
    border: 1px solid rgba(232, 201, 151, .36);
    border-radius: 999px;
    color: #e9c990;
    background: rgba(7, 20, 31, .78);
    box-shadow: 0 4px 18px rgba(0, 0, 0, .18);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    font-size: 11px;
    line-height: 1.35;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: .04em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.latest-work-card h3 {
    margin-top: 0;
}

/* JS writes the measured common title height here; this fallback aligns normal cards before JS runs. */
.latest-work-card h3 {
    min-height: calc(1.22em * 3);
}

/* Inline article pictures and project gallery thumbnails fully fill their square windows. */
.project-section--split > .project-inline-image,
.project-section--result > .project-inline-image {
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 8px;
    background: #eef0f2;
}

.project-section--split > .project-inline-image img,
.project-section--result > .project-inline-image img,
.project-gallery__grid img {
    width: 100% !important;
    height: 100% !important;
    aspect-ratio: auto !important;
    object-fit: cover !important;
    object-position: center center !important;
}

.project-gallery__grid a {
    aspect-ratio: 1 / 1;
}


/* BTS 6.1.8 — transparent all-news header and homepage-style news cards. */
.page-template-page-novosti .site-header {
    position: absolute;
    top: 0;
    background: transparent;
}

.page-template-page-novosti .news-page__hero {
    padding-top: 150px;
}

.news-grid {
    align-items: stretch;
    grid-auto-rows: 1fr;
}

.news-card {
    height: 100%;
    min-height: 590px;
    background: linear-gradient(180deg, rgba(23,41,56,.98), rgba(15,31,44,.98));
    box-shadow: 0 20px 55px rgba(0,0,0,.18);
    transition: transform .25s ease, border-color .25s ease;
}

.news-card:hover {
    transform: translateY(-5px);
    border-color: rgba(232,201,151,.36);
}

.news-card__image {
    position: relative;
    height: 260px;
    flex: 0 0 260px;
}

.news-card__category {
    position: absolute;
    z-index: 2;
    top: 16px;
    left: 16px;
    max-width: calc(100% - 32px);
    padding: 6px 10px;
    border: 1px solid rgba(232,201,151,.36);
    border-radius: 999px;
    color: #e9c990;
    background: rgba(7,20,31,.78);
    box-shadow: 0 4px 18px rgba(0,0,0,.18);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    font-size: 11px;
    line-height: 1.35;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: .04em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.news-card__body {
    min-height: 0;
    padding: 23px 24px 25px;
}

.news-card h2 {
    min-height: calc(1.25em * 3);
    margin: 0 0 14px;
    font-size: 22px;
    line-height: 1.25;
    font-weight: 500;
    letter-spacing: -.025em;
}

.news-card__body > p {
    padding-bottom: 2px;
}

@media (max-width: 782px) {
    .page-template-page-novosti.admin-bar .site-header {
        top: 0;
    }
}

@media (max-width: 620px) {
    .page-template-page-novosti .news-page__hero {
        padding-top: 125px;
    }
    .news-card__image {
        height: 235px;
        flex-basis: 235px;
    }
}

/* Remove the reserved WordPress toolbar gap on the custom news page when the toolbar is hidden. */
html:has(body.page-template-page-novosti) {
    margin-top: 0 !important;
}

/* === BTS 6.1.9: contact page === */
body.page-template-page-kontakty .site-header,
body.page-template-page-kontakty-php .site-header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    background: transparent !important;
    color: #fff;
}
body.admin-bar.page-template-page-kontakty .site-header,
body.admin-bar.page-template-page-kontakty-php .site-header { top: 32px; }
.contact-page { overflow: hidden; background: #fff; color: var(--color-text); }
.contact-hero {
    min-height: 610px;
    display: flex;
    align-items: center;
    color: #fff;
    background-image: linear-gradient(90deg, rgba(4,15,25,.92) 0%, rgba(4,15,25,.74) 36%, rgba(4,15,25,.24) 72%, rgba(4,15,25,.12) 100%), var(--contact-hero);
    background-size: cover;
    background-position: center;
}
.contact-hero__inner { width: 100%; padding-top: 110px; padding-bottom: 88px; }
.contact-hero__copy { max-width: 570px; }
.contact-hero h1 { margin: 0 0 24px; color: #fff; font-size: clamp(50px, 6vw, 78px); font-weight: 400; line-height: 1; letter-spacing: -.04em; }
.contact-hero p { max-width: 540px; margin: 0; color: rgba(255,255,255,.88); font-size: clamp(17px, 1.7vw, 21px); line-height: 1.55; }
.contact-hero__buttons { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
.contact-button { min-height: 52px; display: inline-flex; align-items: center; justify-content: center; gap: 11px; padding: 0 24px; border: 1px solid rgba(255,255,255,.8); border-radius: 3px; font-weight: 600; transition: background .2s ease, color .2s ease, border-color .2s ease; }
.contact-button svg { width: 20px; height: 20px; }
.contact-button--light { border-color: #fff; background: #fff; color: var(--color-navy); }
.contact-button--outline { color: #fff; background: rgba(7,20,33,.14); backdrop-filter: blur(8px); }
.contact-button:hover { border-color: #dce4eb; background: #dce4eb; color: var(--color-navy); }
.contact-content { position: relative; padding: 0 0 90px; background: #fff; }
.contact-cards { position: relative; z-index: 3; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; margin-top: -48px; }
.contact-card { min-height: 142px; display: flex; align-items: center; gap: 20px; padding: 26px 28px; border: 1px solid #e1e6ea; border-radius: 8px; background: #fff; box-shadow: 0 16px 36px rgba(7,20,33,.08); transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.contact-card:hover { transform: translateY(-3px); border-color: #b8c3cc; box-shadow: 0 22px 48px rgba(7,20,33,.12); }
.contact-card__icon { flex: 0 0 54px; width: 54px; height: 54px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: var(--color-navy); }
.contact-card__icon svg { width: 25px; height: 25px; }
.contact-card__copy { min-width: 0; display: flex; flex-direction: column; }
.contact-card small { margin-bottom: 5px; color: #7a8793; font-size: 12px; }
.contact-card strong { overflow-wrap: anywhere; color: var(--color-navy); font-size: clamp(17px, 1.55vw, 22px); line-height: 1.25; }
.contact-card em { margin-top: 7px; color: #76818b; font-size: 12px; font-style: normal; }
.contact-map-section { padding-top: 86px; }
.contact-section-heading { max-width: 660px; margin-bottom: 28px; }
.contact-section-heading .eyebrow, .contact-arrival .eyebrow { color: #75818c; }
.contact-section-heading h2, .contact-arrival h2 { margin: 8px 0 14px; color: var(--color-navy); font-size: clamp(30px,4vw,48px); font-weight: 500; line-height: 1.08; letter-spacing: -.03em; }
.contact-section-heading p, .contact-arrival__copy > p { margin: 0; color: #5d6872; font-size: 16px; line-height: 1.65; }
.contact-map { overflow: hidden; height: 520px; border: 1px solid #dce2e7; border-radius: 10px 10px 0 0; background: #eef1f3; }
.contact-map iframe { width: 100%; height: 100%; display: block; border: 0; }
.contact-map__footer { min-height: 74px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 14px 18px; border: 1px solid #dce2e7; border-top: 0; border-radius: 0 0 10px 10px; background: #fff; }
.contact-coordinates { color: var(--color-navy); font-weight: 600; }
.contact-map__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.contact-map__actions a { min-height: 42px; display: inline-flex; align-items: center; padding: 0 18px; border: 1px solid #cbd4db; border-radius: 4px; color: var(--color-navy); font-weight: 600; }
.contact-map__actions a:hover { color: #fff; border-color: var(--color-navy); background: var(--color-navy); }
.contact-arrival { display: grid; grid-template-columns: minmax(0,.85fr) minmax(0,1.15fr); gap: 56px; align-items: stretch; margin-top: 78px; padding: 26px; border: 1px solid #e0e5e9; border-radius: 10px; background: #fff; }
.contact-arrival__copy { align-self: center; padding: 28px 10px 28px 22px; }
.contact-arrival ul { display: grid; gap: 12px; margin: 26px 0 0; padding: 0; list-style: none; }
.contact-arrival li { position: relative; padding-left: 22px; color: #46535f; }
.contact-arrival li::before { position: absolute; top: .65em; left: 0; width: 7px; height: 7px; border-radius: 50%; background: var(--color-navy); content: ""; }
.contact-arrival__media { overflow: hidden; min-height: 390px; border-radius: 7px; background: #e9edef; }
.contact-arrival__media img { width: 100%; height: 100%; display: block; object-fit: cover; object-position: center; }
.contact-home-cta { margin-top: 0; }
@media (max-width: 900px) {
    .contact-hero { min-height: 560px; background-position: 66% center; }
    .contact-cards { grid-template-columns: 1fr; margin-top: -34px; }
    .contact-card { min-height: 118px; }
    .contact-map { height: 440px; }
    .contact-arrival { grid-template-columns: 1fr; gap: 20px; }
    .contact-arrival__copy { padding: 20px 10px; }
}
@media (max-width: 700px) {
    body.admin-bar.page-template-page-kontakty .site-header,
    body.admin-bar.page-template-page-kontakty-php .site-header { top: 46px; }
    .contact-hero { min-height: 590px; background-position: 72% center; }
    .contact-hero__inner { padding-top: 126px; padding-bottom: 70px; }
    .contact-hero h1 { font-size: 48px; }
    .contact-hero__buttons, .contact-button { width: 100%; }
    .contact-content { padding-bottom: 58px; }
    .contact-card { padding: 22px; }
    .contact-map-section { padding-top: 62px; }
    .contact-map { height: 380px; }
    .contact-map__footer { align-items: stretch; flex-direction: column; }
    .contact-map__actions, .contact-map__actions a { width: 100%; }
    .contact-map__actions a { justify-content: center; }
    .contact-arrival { margin-top: 54px; padding: 16px; }
    .contact-arrival__media { min-height: 280px; }
}


/* === BTS 6.1.10: contact page spacing, overlap and address corrections === */
/* WordPress adds a toolbar offset to <html>. Remove only the reserved blank strip
   on this custom page; the toolbar itself remains fixed and visible. */
html:has(body.page-template-page-kontakty),
html:has(body.page-template-page-kontakty-php) {
    margin-top: 0 !important;
}

body.page-template-page-kontakty.admin-bar,
body.page-template-page-kontakty-php.admin-bar {
    padding-top: 0 !important;
}

body.page-template-page-kontakty .site-header,
body.page-template-page-kontakty-php .site-header {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    background: transparent !important;
    box-shadow: none !important;
}

body.admin-bar.page-template-page-kontakty .site-header,
body.admin-bar.page-template-page-kontakty-php .site-header {
    top: 32px !important;
}

.contact-hero__inner.container {
    width: min(calc(100% - 64px), var(--container)) !important;
    margin-inline: auto !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.contact-hero__copy {
    margin-left: 0 !important;
}

/* Card height is fixed at 160 px; -48 px equals a 30% overlap. */
.contact-cards {
    margin-top: -48px !important;
}

.contact-card {
    min-height: 160px !important;
    padding: 24px 24px !important;
    gap: 18px !important;
}

.contact-card strong {
    display: block;
    max-width: 100%;
    overflow: hidden;
    overflow-wrap: normal !important;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: clamp(15px, 1.15vw, 18px) !important;
    line-height: 1.25 !important;
    letter-spacing: -.015em;
}

.contact-address {
    margin: 0 0 7px !important;
    color: var(--color-navy) !important;
    font-size: clamp(18px, 2vw, 24px) !important;
    font-weight: 650 !important;
    line-height: 1.35 !important;
}

@media (max-width: 900px) {
    .contact-cards {
        margin-top: -48px !important;
    }

    .contact-card {
        min-height: 132px !important;
    }

    .contact-card strong {
        font-size: 18px !important;
    }
}

@media (max-width: 782px) {
    body.admin-bar.page-template-page-kontakty .site-header,
    body.admin-bar.page-template-page-kontakty-php .site-header {
        top: 46px !important;
    }
}

@media (max-width: 700px) {
    .contact-hero__inner.container {
        width: min(calc(100% - 36px), var(--container)) !important;
    }

    .contact-cards {
        margin-top: -38px !important;
    }

    .contact-card strong {
        white-space: normal;
        text-overflow: clip;
    }
}

/* =========================================================
   BTS 6.1.11 — white accents for news and project categories
   ========================================================= */
.latest-works {
    --latest-works-gold: #ffffff;
}

.latest-works::before {
    background: radial-gradient(circle at 78% 18%, rgba(255,255,255,.08), transparent 34%);
}

.latest-works__all {
    border-color: rgba(255,255,255,.78);
    color: #fff;
}

.latest-works__all:hover {
    background: rgba(255,255,255,.10);
}

.latest-work-card:hover {
    border-color: rgba(255,255,255,.34);
}

.latest-work-card__category {
    border-color: rgba(255,255,255,.48);
    color: #fff;
}

.latest-work-card__meta span,
.latest-work-card__more {
    color: #fff;
}

.latest-works__controls button {
    border-color: rgba(255,255,255,.52);
    color: #fff;
}

.latest-works__controls button:hover {
    background: rgba(255,255,255,.10);
}

/* Category badge at the top of individual project posts. */
.project-hero__meta span {
    border: 1px solid rgba(255,255,255,.46);
    color: #fff;
    background: rgba(7,20,31,.62);
}

/* All-news page: white eyebrow and category badges. */
.news-page__eyebrow {
    color: #fff;
}

.news-card:hover {
    border-color: rgba(255,255,255,.34);
}

.news-card__category {
    border-color: rgba(255,255,255,.48);
    color: #fff;
}

.news-card__meta span,
.news-card__more {
    color: #fff;
}
