
:root {
    --bg-dark: #0a0a0a;
    --bg-card: #161616;
    --accent: #e63946;
    --text-main: #ffffff;
    --text-gray: #a0a0a0;
    --container-width: 1300px;
    --transition: 0.3s ease;
    --header-top-height: 40px;
    --header-bot-height: 76px;
    --header-height: calc(var(--header-top-height) + var(--header-bot-height));
    --logo-width: 180px;
    --footer-padding-x: 20px;
    --footer-gap-row: 48px;
    --footer-gap-col: 56px;
    --footer-bottom-gap: 44px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
    padding-left: max(20px, env(safe-area-inset-left));
    padding-right: max(20px, env(safe-area-inset-right));
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* --- ШАПКА --- */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: #0d0d0d;
    border-bottom: 1px solid #1a1a1a;
    padding-top: env(safe-area-inset-top);
}

.header__logo {
    position: absolute;
    top: env(safe-area-inset-top, 0);
    left: max(20px, calc((100vw - var(--container-width)) / 2 + 20px));
    width: var(--logo-width);
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
}

.header__logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: left center;
    display: block;
}

/* Верхняя строка: телефон, соцсети, кнопка заказа */
.header-top {
    background: #000;
    font-size: 13px;
    border-bottom: 1px solid #1a1a1a;
    min-height: var(--header-top-height);
}

.header-top__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: var(--header-top-height);
    padding-left: calc(var(--logo-width) + 40px);
    padding-right: max(20px, env(safe-area-inset-right));
}

.header-top__left {
    display: flex;
    align-items: center;
}

.header-top__contacts {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-top__right {
    display: flex;
    align-items: center;
    gap: 24px;
}

.header-top__contacts a {
    color: var(--text-gray);
    font-size: 14px;
    font-weight: 600;
}

.header-top__contacts a:hover {
    color: #fff;
}

.header-top__messenger {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    color: #fff !important;
}

.header-top__messenger svg {
    width: 24px;
    height: 24px;
    display: block;
}

.header-top__nav {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-top__nav a {
    color: var(--text-gray);
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
}

.header-top__nav a:hover {
    color: #fff;
}

.header-top__write {
    background: var(--accent);
    color: #fff;
    padding: 8px 18px;
    border-radius: 0;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    white-space: nowrap;
}

.header-top__write:hover {
    opacity: 0.9;
    color: #fff;
}

/* Основная шапка: логотип + навигация */
.header-bot {
    background: #0d0d0d;
    height: var(--header-bot-height);
}

.header-bot__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 40px;
    height: 100%;
    padding-left: calc(var(--logo-width) + 30px);
    padding-right: max(20px, env(safe-area-inset-right));
}

.header-bot__navigation {
    flex: 1;
    min-width: 0;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2px;
    flex-wrap: wrap;
    padding-left: 20px;
}

.nav__item {
    position: relative;
}

.nav__link {
    font-size: 16px;
    text-transform: uppercase;
    font-weight: 600;
    padding: 10px 12px;
    white-space: nowrap;
    color: #e0e0e0;
}

.nav__link:hover {
    color: #fff;
}

.nav__item:hover>.nav__link {
    background: rgba(255, 255, 255, 0.08);
}

/* Невидимый «мост» под пунктом с подменю — только по ширине пункта, чтобы не переключать соседей */
.nav__item:has(.subnav)::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 24px;
    pointer-events: auto;
}

/* Невидимая «крыша» над подменю — курсор попадает в зону подменю при движении вниз */
.subnav::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    height: 24px;
}

/* Выпадающее меню — жёстко в контейнере шапки (не смещается при наведении на крайние пункты) */
.subnav {
    position: fixed;
    top: var(--header-height);
    left: 50%;
    transform: translateX(-50%) translateY(-12px);
    width: calc(100% - 40px);
    max-width: var(--container-width);
    box-sizing: border-box;
    background: var(--bg-card);
    padding: 20px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
    z-index: 999;
    border: 1px solid #222;
    border-top: 2px solid var(--accent);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0s linear 0.25s;
}

.nav__item:hover .subnav,
.subnav:hover {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0s linear 0s;
}

.subnav-link {
    display: flex;
    align-items: flex-start;
    padding: 16px;
    font-size: 14px;
    line-height: 1.3;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--text-main);
    min-height: 120px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
}

.subnav-link::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.45) 0%, rgba(0, 0, 0, 0.25) 40%, rgba(0, 0, 0, 0.85) 100%);
    pointer-events: none;
}

.subnav-link span {
    position: relative;
    z-index: 1;
}

.subnav-link:hover::before {
    background: rgba(0, 0, 0, 0.35);
}

.subnav-link:hover {
    color: var(--text-main);
}

/* Пункт «В раздел» — в стиле сайта */
.subnav-link.subnav-link--section {
    grid-column: 1 / -1;
    background: rgba(255, 255, 255, 0.04) !important;
    color: var(--accent);
    min-height: 0;
    padding: 12px 16px;
    font-size: 12px;
    font-weight: 600;
    text-shadow: none;
    border: 1px solid #333;
}

.subnav-link.subnav-link--section::before {
    display: none;
}

.subnav-link.subnav-link--section:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    color: var(--accent);
    border-color: #444;
}

.nav__item--cta {
    margin-left: auto;
}

.nav__link--btn {
    background: var(--accent);
    color: #fff !important;
    padding: 10px 18px;
}

.nav__link--btn:hover {
    opacity: 0.9;
    color: #fff !important;
}

/* --- ГЛАВНАЯ: HERO --- */
.hero {
    height: 50vh;
    margin-top: calc(var(--header-height) + env(safe-area-inset-top, 0px));
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('/wp-content/themes/shelby/assets/шапка1.webp');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    text-align: center;
}

.hero__content h1 {
    font-size: 48px;
    text-transform: uppercase;
    line-height: 1.1;
    margin-bottom: 20px;
}

.hero__content h1 span {
    color: var(--accent);
    display: block;
    margin-top: 10px;
}

.hero__promo {
    background: rgba(230, 57, 70, 0.1);
    border-left: 4px solid var(--accent);
    padding: 15px;
    display: inline-block;
    margin-top: 20px;
}

/* --- СЕКЦИИ --- */
.section {
    padding: 80px 0;
}

.section-title {
    font-size: 32px;
    text-transform: uppercase;
    text-align: center;
    margin-bottom: 50px;
}

.section-title span {
    color: var(--accent);
}

/* Услуги */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    min-width: 0;
}

.service-card {
    background: var(--bg-card);
    border: 1px solid #222;
    transition: var(--transition);
    min-width: 0;
    overflow: hidden;
}

.service-card:hover {
    border-color: var(--accent);
    transform: translateY(-5px);
}

.service-card__img {
    height: 200px;
    width: 100%;
    min-width: 0;
    overflow: hidden;
    position: relative;
}

.service-card__img img {
    width: 100%;
    max-width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: 0.5s;
}

.service-card:hover .service-card__img img {
    transform: scale(1.1);
}

.service-card__body {
    padding: 25px;
}

.service-card__title {
    font-size: 18px;
    text-transform: uppercase;
    margin-bottom: 10px;
    height: 50px;
}

.service-card__desc {
    color: var(--text-gray);
    font-size: 14px;
    line-height: 1.45;
    margin-bottom: 12px;
    min-height: 60px;
}

.service-card__price {
    color: var(--accent);
    font-weight: bold;
    font-size: 20px;
    display: block;
    margin-bottom: 15px;
}

.btn-card {
    border: 1px solid #444;
    padding: 10px 20px;
    font-size: 12px;
    text-transform: uppercase;
    display: inline-block;
}

.btn-card:hover {
    background: var(--accent);
    border-color: var(--accent);
}

/* О компании */
.about-block {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.about-text p {
    margin-bottom: 20px;
    color: var(--text-gray);
}

/* Примеры работ */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.portfolio-item {
    position: relative;
    overflow: hidden;
    height: 250px;
}

.portfolio-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.portfolio-overlay {
    position: absolute;
    inset: 0;
    background: rgba(230, 57, 70, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

/* Преимущества */
.adv-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    text-align: center;
}

.adv-item i {
    font-size: 40px;
    color: var(--accent);
    margin-bottom: 15px;
    display: block;
}

.adv-item h3 {
    font-size: 16px;
    text-transform: uppercase;
    margin-bottom: 10px;
}

/* Отзывы */
.reviews-container {
    background: #111;
    padding: 40px;
    border-radius: 5px;
    text-align: center;
}

.yandex-placeholder {
    border: 1px dashed #444;
    padding: 50px;
    color: var(--text-gray);
}

/* Новости */
.news-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.news-header a:hover {
    color: var(--accent);
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.news-card {
    background: var(--bg-card);
    border: 1px solid transparent;
    transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
    overflow: hidden;
}

.news-card:hover {
    border-color: var(--accent);
    transform: translateY(-5px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.4);
}

.news-card img {
    height: 180px;
    width: 100%;
    object-fit: cover;
    transition: transform var(--transition);
}

.news-card:hover img {
    transform: scale(1.08);
}

.news-card__body {
    padding: 20px;
}

.news-card__meta {
    margin-bottom: 10px;
    color: var(--text-gray);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.news-card__title {
    font-size: 16px;
    margin-bottom: 10px;
    transition: color var(--transition);
}

.news-card__title a {
    color: inherit;
}

.news-card__excerpt {
    font-size: 13px;
    color: var(--text-gray);
    margin-bottom: 14px;
}

.news-card__link {
    display: inline-block;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-bottom: 1px solid rgba(255, 255, 255, 0.4);
}

.news-card:hover .news-card__title {
    color: var(--accent);
}

/* Подвал — отступы и сетка в ритме контейнера */
.footer {
    background: #050505;
    border-top: 1px solid #222;
}

.footer .container {
    padding-left: max(var(--footer-padding-x), env(safe-area-inset-left));
    padding-right: max(var(--footer-padding-x), env(safe-area-inset-right));
}

.footer__top {
    padding: 64px 0 52px;
    border-bottom: 1px solid #1a1a1a;
}

.footer__top .container {
    display: flex;
    justify-content: space-between;
    gap: var(--footer-gap-row) var(--footer-gap-col);
    align-items: start;
}

.footer-brand img {
    height: 44px;
    width: auto;
    margin-bottom: 18px;
    display: block;
}

.footer-brand p {
    color: var(--text-gray);
    font-size: 14px;
    line-height: 1.7;
    max-width: 300px;
}

.footer-nav-block .footer-h3 {
    margin-bottom: 18px;
}

.footer-nav-block .footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 32px;
}

.footer-nav-block .footer-links li {
    margin: 0;
}

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

.footer-contact .footer-h3 {
    margin-bottom: 6px;
}

.footer-contact-item {
    font-size: 14px;
    color: var(--text-gray);
    line-height: 1.55;
}

.footer-contact-item a {
    color: var(--text-gray);
}

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

.footer-order-btn {
    display: inline-block;
    margin-top: 10px;
    background: var(--accent);
    color: #fff;
    padding: 12px 24px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    transition: var(--transition);
    width: fit-content;
}

.footer-order-btn:hover {
    opacity: 0.9;
    color: #fff;
}

.footer__bottom {
    padding: 52px 0 64px;
}

.footer__bottom .container {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--footer-bottom-gap) var(--footer-gap-col);
}

.footer-col {
    min-width: 0;
}

.footer-h3 {
    text-transform: uppercase;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    margin-bottom: 22px;
    color: var(--accent);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 14px;
    font-size: 14px;
}

.footer-links li:last-child {
    margin-bottom: 0;
}

.footer-links a {
    color: var(--text-gray);
    transition: var(--transition);
}

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

.footer__copy {
    padding: 26px 0;
    border-top: 1px solid #111;
    font-size: 12px;
    color: #555;
    text-align: center;
}

/* Мобильное меню (бургер) */
.hamburger {
    display: none;
    cursor: pointer;
    background: none;
    border: none;
    padding: 12px;
    margin: 0;
    margin-left: auto;
    margin-right: env(safe-area-inset-right, 0);
    flex-shrink: 0;
    z-index: 1002;
    transition: var(--transition);
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    position: relative;
}

.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: #fff;
    margin: 5px 0;
    transition: var(--transition);
}

/* Крестик: обе линии в одну точку по центру, только поворот ±45° */
.hamburger.is-open span:nth-child(1),
.hamburger.is-open span:nth-child(3) {
    position: absolute;
    top: 50%;
    left: 50%;
    margin: 0;
    width: 24px;
    transform: translate(-50%, -50%) rotate(45deg);
}

.hamburger.is-open span:nth-child(2) {
    opacity: 0;
}

.hamburger.is-open span:nth-child(3) {
    transform: translate(-50%, -50%) rotate(-45deg);
}

.hamburger.is-open {
    padding-right: 16px;
}

/* Панель мобильного меню */
.mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 999;
    overflow-y: auto;
    padding: calc(var(--header-height) + 20px) max(20px, env(safe-area-inset-right)) 40px max(20px, env(safe-area-inset-left));
    -webkit-overflow-scrolling: touch;
}

.mobile-menu.is-open {
    display: block;
}

.mobile-menu__top {
    display: none;
    flex-direction: column;
    gap: 12px;
    padding-bottom: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid #222;
}

.mobile-menu__top .mobile-menu__phone {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
}

.mobile-menu__top .mobile-menu__order {
    display: inline-block;
    text-align: center;
    background: var(--accent);
    color: #fff;
    padding: 14px 20px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 13px;
}

.mobile-menu__top-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 14px;
}

.mobile-menu__top-nav a {
    font-size: 13px;
    color: #fff;
    opacity: 0.95;
}

.mobile-menu__messengers {
    display: flex;
    gap: 10px;
}

.mobile-menu .nav {
    display: flex;
    flex-direction: column;
    gap: 0;
    align-items: stretch;
}

.mobile-menu .nav__item {
    position: static;
    margin: 0;
    border-bottom: 1px solid #222;
}

.mobile-menu .nav__link {
    display: block;
    padding: 16px 0;
    font-size: 14px;
    white-space: normal;
}

.mobile-menu .nav__item:has(.subnav)::after,
.mobile-menu .subnav::before {
    display: none;
}

.mobile-menu .subnav {
    position: static;
    inset: auto;
    top: auto;
    left: auto;
    right: auto;
    bottom: auto;
    transform: none;
    width: auto;
    max-width: none;
    display: grid !important;
    grid-template-columns: 1fr;
    gap: 0;
    margin: 0;
    padding: 0 0 10px 16px;
    border: none;
    border-top: none;
    box-shadow: none;
    background: transparent;
    box-sizing: border-box;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    visibility: visible;
    pointer-events: auto;
    transition: max-height 0.3s ease, opacity 0.25s ease, padding 0.25s ease;
}

.mobile-menu .nav__item.is-open .subnav {
    max-height: 500px;
    opacity: 1;
}

.mobile-menu .nav__item:hover .subnav,
.mobile-menu .subnav:hover {
    transform: none;
}

.mobile-menu .subnav-link {
    min-height: 0;
    width: 100%;
    padding: 12px 16px;
    font-size: 13px;
    background-image: none !important;
    background: rgba(255, 255, 255, 0.05);
    margin-bottom: 4px;
    border-radius: 4px;
}

.mobile-menu .subnav-link.subnav-link--section {
    margin-bottom: 8px;
}

.mobile-menu .nav__item--cta {
    margin-left: 0;
    margin-top: 16px;
}

.mobile-menu .nav__link--btn {
    text-align: center;
}

/* Подменю триггер на мобильном */
.nav__link.has-sub::after {
    content: '▾';
    margin-left: 4px;
    font-size: 10px;
}

.mobile-menu .nav__link.has-sub::after {
    float: right;
    transition: transform 0.2s;
}

.mobile-menu .nav__item.is-open>.nav__link.has-sub::after {
    transform: rotate(180deg);
}

/* ========== АДАПТИВ: ПЛАНШЕТ И МЕНЬШЕ ========== */
@media (max-width: 1200px) {
    :root {
        --container-width: 100%;
    }

    .container {
        padding: 0 24px;
    }

    .section {
        padding: 60px 0;
    }

    .section-title {
        font-size: 28px;
        margin-bottom: 40px;
    }

    .services-grid {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
        gap: 20px;
    }

    .portfolio-grid {
        gap: 12px;
    }

    .portfolio-item {
        height: 220px;
    }

    .adv-grid {
        gap: 24px;
    }

    .footer__top {
        padding: 56px 0 44px;
    }

    .footer__top .container {
        gap: 40px 44px;
    }

    .footer__bottom {
        padding: 44px 0 52px;
    }

    .footer__bottom .container {
        gap: 36px 44px;
    }
}

@media (max-width: 1100px) {
    .header__logo {
        left: max(24px, env(safe-area-inset-left));
    }

    .header-top__inner {
        padding-left: calc(var(--logo-width) + 24px);
    }

    .header-bot__inner {
        padding-left: calc(var(--logo-width) + 24px);
    }

    .nav {
        display: none;
    }

    .hamburger {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        min-width: 44px;
        min-height: 44px;
    }

    .subnav {
        display: none !important;
    }

    .about-block {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .adv-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }

    .news-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .footer__top {
        padding: 48px 0 40px;
    }

    .footer__top .container {
        grid-template-columns: 1fr 1fr;
        gap: 36px 40px;
    }

    .footer__bottom {
        padding: 40px 0 48px;
    }

    .footer__bottom .container {
        grid-template-columns: repeat(2, 1fr);
        gap: 32px 40px;
    }

    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .hero {
        height: 70vh;
    }

    .hero__content h1 {
        font-size: 38px;
    }

    .hero__content h1 span {
        font-size: 20px;
    }
}

/* Планшет портрет */
@media (max-width: 768px) {
    :root {
        --header-top-height: 36px;
        --header-bot-height: 60px;
        --logo-width: 140px;
    }

    .container {
        padding: 0 16px;
    }

    .section {
        padding: 48px 0;
    }

    .section-title {
        font-size: 24px;
        margin-bottom: 32px;
    }

    .header__logo {
        left: max(16px, env(safe-area-inset-left));
    }

    .header-top {
        min-height: var(--header-top-height);
        background: #0d0d0d;
        border-bottom-color: #1a1a1a;
    }

    .header-top__inner {
        padding-left: calc(var(--logo-width) + 16px);
        padding-right: max(12px, env(safe-area-inset-right));
        flex-wrap: nowrap;
        gap: 12px;
        min-height: var(--header-top-height);
    }

    .header-top__left {
        flex-shrink: 0;
    }

    .header-top__contacts {
        gap: 10px;
        flex-shrink: 1;
        min-width: 0;
    }

    .header-top__contacts a {
        font-size: 12px;
        white-space: nowrap;
    }

    .header-top__messenger {
        width: 22px;
        height: 22px;
    }

    .header-top__messenger svg {
        width: 20px;
        height: 20px;
    }

    .header-top__nav {
        gap: 10px;
    }

    .header-top__nav a {
        font-size: 11px;
    }

    .header-top__write {
        padding: 8px 14px;
        font-size: 10px;
        flex-shrink: 0;
    }

    .header-bot__inner {
        padding-left: calc(var(--logo-width) + 16px);
        padding-right: max(12px, env(safe-area-inset-right));
    }

    .hero {
        height: 60vh;
        min-height: 320px;
    }

    .hero__content h1 {
        font-size: 28px;
    }

    .hero__content h1 span {
        font-size: 16px;
        margin-top: 6px;
    }

    .hero__promo {
        padding: 12px;
        font-size: 13px;
        margin-top: 16px;
    }

    .services-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .service-card__img {
        height: 180px;
    }

    .service-card__body {
        padding: 20px;
    }

    .service-card__title {
        font-size: 16px;
        height: auto;
        min-height: 44px;
    }

    .service-card__price {
        font-size: 18px;
    }

    .about-block {
        gap: 28px;
    }

    .about-block .section-title {
        font-size: 22px;
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .portfolio-item {
        height: 240px;
    }

    .adv-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        text-align: center;
    }

    .adv-item i {
        font-size: 36px;
    }

    .adv-item h3 {
        font-size: 15px;
    }

    .reviews-container {
        padding: 24px 16px;
    }

    .yandex-placeholder {
        padding: 32px 16px;
        font-size: 14px;
    }

    .news-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
        margin-bottom: 24px;
    }

    .news-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .news-card img {
        height: 160px;
    }

    .news-card__body {
        padding: 16px;
    }

    .news-card__title {
        font-size: 15px;
    }

    .footer__top {
        padding: 44px 0 32px;
    }

    .footer__top .container {
        gap: 32px 0;
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .footer-brand {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .footer-brand p {
        max-width: none;
    }

    .footer-nav-block .footer-links {
        justify-content: center;
    }

    .footer-contact {
        align-items: center;
    }

    .footer-order-btn {
        align-self: center;
    }

    .footer__bottom {
        padding: 36px 0 44px;
    }

    .footer__bottom .container {
        grid-template-columns: 1fr;
        gap: 36px 24px;
        text-align: center;
    }

    .footer-col {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .footer-h3 {
        font-size: 14px;
        margin-bottom: 16px;
    }

    .footer-links li {
        margin-bottom: 8px;
    }
}

/* Мобильный альбом и маленький планшет */
@media (max-width: 600px) {
    .header-top__inner {
        padding-left: calc(var(--logo-width) + 12px);
        padding-right: max(12px, env(safe-area-inset-right));
    }

    .header-top__right {
        gap: 10px;
        flex-shrink: 0;
    }

    .header-top__contacts a:not([href^="tel:"]) {
        display: none;
    }

    .header-top__contacts a[href^="tel:"] {
        font-size: 13px;
    }

    .header-top__write {
        padding: 8px 12px;
        font-size: 10px;
    }
}

/* Мобильный портрет: одна строка шапки (логотип + бургер), контакты в меню */
@media (max-width: 480px) {
    :root {
        --header-top-height: 0px;
        --header-bot-height: 52px;
        --logo-width: 110px;
    }

    .container {
        padding: 0 12px;
    }

    .section {
        padding: 36px 12px;
    }

    .section-title {
        font-size: 20px;
        margin-bottom: 24px;
    }

    .header-top {
        display: none;
    }

    .header__logo {
        left: max(12px, env(safe-area-inset-left));
        height: 52px;
        top: env(safe-area-inset-top, 0);
    }

    .header-bot__inner {
        padding-left: calc(var(--logo-width) + 12px);
        padding-right: max(8px, env(safe-area-inset-right));
    }

    .mobile-menu__top {
        display: flex;
    }

    .hero {
        height: 55vh;
        min-height: 280px;
    }

    .hero__content h1 {
        font-size: 22px;
        line-height: 1.2;
    }

    .hero__content h1 span {
        font-size: 14px;
    }

    .hero__promo {
        padding: 10px;
        font-size: 12px;
        margin-top: 12px;
    }

    .hero__promo p {
        line-height: 1.4;
    }

    .service-card__img {
        height: 160px;
    }

    .service-card__body {
        padding: 16px;
    }

    .service-card__title {
        font-size: 15px;
    }

    .btn-card {
        padding: 12px 18px;
        font-size: 11px;
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .portfolio-item {
        height: 200px;
    }

    .footer__top {
        padding: 32px 0 28px;
    }

    .footer__bottom {
        padding: 28px 0 32px;
    }

    .footer__bottom .container {
        gap: 28px 20px;
    }

    .footer__copy {
        padding: 22px 0;
        font-size: 11px;
    }
}

/* Очень маленькие экраны */
@media (max-width: 360px) {
    :root {
        --header-top-height: 0px;
        --header-bot-height: 48px;
        --logo-width: 90px;
    }

    .header-top {
        display: none;
    }

    .header__logo {
        left: max(8px, env(safe-area-inset-left));
        height: 48px;
        top: env(safe-area-inset-top, 0);
    }

    .header-bot__inner {
        padding-left: calc(var(--logo-width) + 8px);
        padding-right: max(8px, env(safe-area-inset-right));
    }

    .mobile-menu__top {
        display: flex;
    }

    .hero__content h1 {
        font-size: 18px;
    }

    .hero__content h1 span {
        font-size: 12px;
    }

    .section-title {
        font-size: 18px;
    }

    .container {
        padding: 0 10px;
    }
}

/* Отключение hover-эффектов на тач-устройствах (опционально) */
@media (hover: none) {
    .service-card:hover {
        transform: none;
    }

    .service-card:hover .service-card__img img {
        transform: none;
    }

    .news-card:hover {
        transform: none;
    }

    .news-card:hover img {
        transform: none;
    }

    .portfolio-item .portfolio-overlay {
        opacity: 0.85;
    }
}

/* --- ВНУТРЕННИЕ СТРАНИЦЫ --- */
.inner-hero {
    margin-top: calc(var(--header-height) + env(safe-area-inset-top, 0px));
    min-height: 250px;
    display: flex;
    align-items: flex-end;
    padding: 80px 0 70px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.inner-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0.78) 100%);
}

.inner-hero__content {
    position: relative;
    z-index: 1;
    max-width: 760px;
}

.breadcrumbs {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
    color: rgba(255, 255, 255, 0.75);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.breadcrumbs span:last-child {
    color: #fff;
}

.inner-hero h1 {
    font-size: 44px;
    line-height: 1.08;
    text-transform: uppercase;
    margin-bottom: 18px;
}

.inner-hero p {
    max-width: 680px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 17px;
}

.page-lead {
    max-width: 860px;
    margin: 0 auto;
    text-align: center;
    color: var(--text-gray);
}

.page-text {
    background: var(--bg-card);
    border: 1px solid #222;
    padding: 32px;
}

.page-text p {
    color: var(--text-gray);
    margin-bottom: 16px;
}

.page-text p:last-child {
    margin-bottom: 0;
}

.page-meta-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
    gap: 24px;
}

.contact-card,
.price-placeholder,
.service-price {
    background: var(--bg-card);
    border: 1px solid #222;
    padding: 32px;
}

.contact-card h3,
.price-placeholder h3,
.service-price h3 {
    font-size: 22px;
    text-transform: uppercase;
    margin-bottom: 18px;
}

.contact-card p,
.price-placeholder p,
.service-price p {
    color: var(--text-gray);
}

.contact-list {
    display: grid;
    gap: 12px;
    margin: 22px 0 26px;
}

.contact-list a,
.contact-list span {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid #252525;
    color: #fff;
}

.contact-list small {
    color: var(--text-gray);
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.08em;
}

.btn-primary {
    display: inline-block;
    padding: 12px 24px;
    margin-top: 20px;
    width: 100%;
    background: var(--accent);
    color: #fff;
    border: 0;
    cursor: pointer;
    text-transform: uppercase;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-align: center;
}

.btn-primary:hover {
    opacity: 0.92;
    color: #fff;
}

.price-placeholder__note {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    padding: 8px 12px;
    border: 1px solid rgba(230, 57, 70, 0.35);
    background: rgba(230, 57, 70, 0.1);
    color: #fff;
    font-size: 12px;
    text-transform: uppercase;
}

.price-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 22px;
}

.price-table th,
.price-table td {
    padding: 14px 16px;
    border-bottom: 1px solid #252525;
    text-align: left;
}

.price-table th {
    color: #fff;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.06em;
}

.price-table td {
    color: var(--text-gray);
}

.price-table td:last-child,
.price-table th:last-child {
    text-align: right;
    color: #fff;
    white-space: nowrap;
}

.highlight-list {
    display: grid;
    gap: 14px;
    margin-top: 22px;
}

.highlight-list li {
    position: relative;
    padding-left: 18px;
    color: var(--text-gray);
}

.highlight-list li::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 0;
    width: 8px;
    height: 8px;
    background: var(--accent);
}

.gallery-caption {
    text-align: center;
    color: var(--text-gray);
    max-width: 760px;
    margin: -24px auto 32px;
}

.template-empty {
    padding: 24px;
    border: 1px dashed #333;
    color: var(--text-gray);
    text-align: center;
}

.content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: 24px;
    align-items: start;
}

.contact-map,
.contact-form,
.news-archive,
.gallery-archive,
.info-panel {
    background: var(--bg-card);
    border: 1px solid #222;
}

.contact-map iframe {
    width: 100%;
    height: 100%;
    min-height: 420px;
    border: 0;
    display: block;
    filter: grayscale(1) contrast(1.1) brightness(0.9);
}

.news-archive {
    padding: 32px;
}

.contact-form,
.info-panel {
    padding: 32px;
}

.contact-form h3,
.info-panel h3 {
    font-size: 22px;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.contact-form p,
.info-panel p {
    color: var(--text-gray);
}

.contact-form__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 24px;
}

.contact-form__field {
    display: grid;
    gap: 8px;
}

.contact-form__field--full {
    grid-column: 1 / -1;
}

.contact-form label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #fff;
}

.contact-form input,
.contact-form textarea,
.contact-form select {
    width: 100%;
    background: #101010;
    border: 1px solid #2a2a2a;
    color: #fff;
    padding: 14px 16px;
    font: inherit;
}

.contact-form textarea {
    min-height: 140px;
    resize: none;
}

.contact-form input:focus,
.contact-form textarea:focus,
.contact-form select:focus {
    outline: none;
    border-color: var(--accent);
}

.contact-form__notice {
    margin-top: 16px;
    padding: 12px 14px;
    font-size: 14px;
    border: 1px solid #2a2a2a;
    background: #141414;
}

.contact-form__notice--ok {
    border-color: var(--accent);
    color: #e8e8e8;
}

.contact-form__notice--err {
    border-color: #8b3a3a;
    color: #f0c0c0;
}

.form-note {
    margin-top: 16px;
    color: var(--text-gray);
    font-size: 13px;
}

.contact-form__consent {
    margin-top: 14px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: var(--text-gray);
    font-size: 13px;
    line-height: 1.45;
    text-transform: none;
    letter-spacing: normal;
    cursor: pointer;
}

.contact-form__consent input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin-top: 2px;
    flex: 0 0 auto;
    accent-color: var(--accent);
}

.info-panel__list {
    display: grid;
    gap: 12px;
    margin-top: 20px;
}

.info-panel__item {
    padding: 16px;
    border: 1px solid #252525;
    background: rgba(255, 255, 255, 0.03);
}

.info-panel__item small {
    display: block;
    margin-bottom: 6px;
    color: var(--text-gray);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.archive-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-top: 24px;
}

.archive-card {
    position: relative;
    min-height: 280px;
    overflow: hidden;
    background: #111;
    border: 1px solid #222;
}

.archive-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.5s;
}

.archive-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.15) 0%, rgba(0, 0, 0, 0.88) 100%);
    z-index: 1;
}

.archive-card__body {
    position: absolute;
    inset: auto 0 0 0;
    z-index: 2;
    padding: 24px 22px;
}

.archive-card__meta {
    display: inline-block;
    margin-bottom: 10px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.archive-card__title {
    font-size: 22px;
    line-height: 1.2;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.archive-card__text {
    color: rgba(255, 255, 255, 0.78);
    font-size: 14px;
    margin-bottom: 18px;
}

.archive-card__link {
    display: inline-block;
    border-bottom: 1px solid rgba(255, 255, 255, 0.4);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.archive-card:hover img {
    transform: scale(1.08);
}

.about-page .about-block {
    margin-bottom: 0;
}

.section-panel {
    background: var(--bg-card);
    border: 1px solid #222;
    padding: 36px;
}

.section-panel p {
    color: var(--text-gray);
    margin-bottom: 16px;
}

.section-panel p:last-child {
    margin-bottom: 0;
}

.news-single__content {
    background: var(--bg-card);
    border: 1px solid #222;
    padding: 36px;
}

.news-single__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
    color: var(--text-gray);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.news-single__content .entry-content,
.news-single__content .entry-content p,
.news-single__content .entry-content li {
    color: var(--text-gray);
}

.news-single__content .entry-content p {
    margin-bottom: 16px;
}

.news-single__content .entry-content p:last-child {
    margin-bottom: 0;
}

.service-full-description .entry-content,
.service-full-description .entry-content p,
.service-full-description .entry-content li {
    color: var(--text-gray);
}

.service-full-description .entry-content p {
    margin-bottom: 16px;
}

.service-full-description .entry-content p:last-child {
    margin-bottom: 0;
}

.service-full-description .entry-content ul,
.service-full-description .entry-content ol {
    margin: 0 0 16px;
    padding-left: 24px;
}

.service-full-description .entry-content ul {
    list-style: disc;
}

.service-full-description .entry-content ol {
    list-style: decimal;
}

.service-full-description .entry-content li + li {
    margin-top: 8px;
}

.service-full-description .entry-content li > p {
    margin: 0;
}

@media (max-width: 1100px) {
    .inner-hero {
        min-height: 360px;
        padding: 64px 0 56px;
    }

    .inner-hero h1 {
        font-size: 38px;
    }

    .page-meta-grid {
        grid-template-columns: 1fr;
    }

    .content-grid {
        grid-template-columns: 1fr;
    }

    .archive-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .inner-hero {
        min-height: 300px;
        padding: 48px 0 40px;
    }

    .inner-hero h1 {
        font-size: 28px;
    }

    .inner-hero p {
        font-size: 15px;
    }

    .breadcrumbs {
        gap: 8px;
        font-size: 11px;
    }

    .page-text,
    .contact-card,
    .price-placeholder,
    .service-price {
        padding: 22px 18px;
    }

    .contact-card h3,
    .price-placeholder h3,
    .service-price h3 {
        font-size: 18px;
    }

    .price-table th,
    .price-table td {
        padding: 12px 10px;
        font-size: 13px;
    }

    .gallery-caption {
        margin: -16px auto 24px;
    }

    .news-archive,
    .contact-form,
    .info-panel,
    .section-panel {
        padding: 22px 18px;
    }

    .contact-form h3,
    .info-panel h3 {
        font-size: 18px;
    }

    .contact-form__grid {
        grid-template-columns: 1fr;
    }

    .archive-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .archive-card {
        min-height: 240px;
    }

    .archive-card__title {
        font-size: 18px;
    }

    .contact-map iframe {
        min-height: 320px;
    }
}



.adv-item__icon svg {
    width: 50px;
    height: 50px;
}

.cookie-banner {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 9999;
}

.cookie-banner__inner {
    max-width: 760px;
    margin: 0 auto;
    background: #111111;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: 14px 16px;
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

.cookie-banner__text {
    margin: 0;
    color: #ffffff;
    font-size: 14px;
    line-height: 1.5;
}

.cookie-banner__btn {
    border: 0;
    border-radius: 8px;
    background: #da2027;
    color: #ffffff;
    font-weight: 600;
    cursor: pointer;
    padding: 10px 16px;
    white-space: nowrap;
}

.cookie-banner__btn:hover {
    background: #be141b;
}

.cookie-banner__btn:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

@media (max-width: 640px) {
    .cookie-banner__inner {
        flex-direction: column;
        align-items: stretch;
    }

    .cookie-banner__btn {
        width: 100%;
    }
}