* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: #171717;
    font-family: Arial, Helvetica, sans-serif;
    color: #ffffff;
}

a {
    color: inherit;
}


/* =========================================================
   ОСНОВНОЙ ЭКРАН
========================================================= */

.hero {
    min-height: 100vh;
    padding: 28px 24px 40px;

    background:
        radial-gradient(
            circle at top,
            rgba(255, 255, 255, 0.05),
            transparent 35%
        ),
        #171717;
}

.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
}


/* =========================================================
   ШАПКА
========================================================= */

.header {
    display: grid;
    grid-template-columns: 310px 220px 1fr;
    align-items: center;
    gap: 38px;

    margin-bottom: 18px;
}

.logo {
    display: block;
    width: 310px;
    height: auto;
}


/* =========================================================
   INSTAGRAM
========================================================= */

.instagram-link {
    display: flex;
    align-items: center;
    gap: 14px;

    min-height: 70px;
    padding: 12px 18px;

    border: 1px solid #464646;
    border-radius: 14px;

    background: #1d1d1d;

    color: #ffffff;
    text-decoration: none;

    transition:
        transform 0.2s ease,
        border-color 0.2s ease,
        background 0.2s ease;
}

.instagram-link:hover {
    transform: translateY(-2px);
    border-color: #777777;
    background: #242424;
}

.instagram-icon {
    display: block;
    flex-shrink: 0;

    width: 46px;
    height: 46px;

    font-size: 0;

    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;

    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='3' y='3' width='18' height='18' rx='5' fill='none' stroke='white' stroke-width='1.8'/%3E%3Ccircle cx='12' cy='12' r='4.2' fill='none' stroke='white' stroke-width='1.8'/%3E%3Ccircle cx='17.4' cy='6.7' r='1.2' fill='white'/%3E%3C/svg%3E");
}

.instagram-text {
    display: flex;
    flex-direction: column;
    justify-content: center;

    line-height: 1.05;
}

.instagram-text strong {
    color: #ffffff;

    font-size: 18px;
    font-weight: 900;
}

.instagram-text small {
    margin-top: 6px;

    color: #a8a8a8;

    font-size: 13px;
    font-weight: 600;
}


/* =========================================================
   МЕНЮ
========================================================= */

.header-right {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;

    gap: 36px;
}

.nav {
    display: flex;
    align-items: center;

    gap: 28px;
}

.nav a {
    color: #d7d7d7;

    font-size: 17px;
    font-weight: 800;

    text-decoration: none;

    white-space: nowrap;

    transition: color 0.2s ease;
}

.nav a:hover {
    color: #ffffff;
}

.phone {
    color: #ffffff;

    font-size: 19px;
    font-weight: 900;

    text-decoration: none;

    white-space: nowrap;
}


/* =========================================================
   ГЛАВНЫЙ ТЕКСТ
========================================================= */

.hero-content {
    margin-bottom: 24px;

    text-align: center;
}

.eyebrow {
    margin-bottom: 14px;

    color: #b7b7b7;

    font-size: 14px;
    font-weight: 700;

    letter-spacing: 2px;
    text-transform: uppercase;
}

h1 {
    max-width: 1000px;

    margin: 0 auto 16px;

    color: #ffffff;

    font-size: clamp(38px, 5vw, 64px);
    font-weight: 900;
    line-height: 1;

    letter-spacing: -2px;
}

.brands {
    margin-bottom: 18px;

    color: #ffffff;

    font-size: clamp(20px, 3vw, 30px);
    font-weight: 900;
}

.subtitle {
    max-width: 720px;

    margin: 0 auto;

    color: #bdbdbd;

    font-size: 18px;
    line-height: 1.5;
}


/* =========================================================
   ЗАГОЛОВОК ТОЧЕК
========================================================= */

.locations-title {
    margin: 0 0 22px;

    color: #ffffff;

    text-align: center;

    font-size: 18px;
    font-weight: 900;

    letter-spacing: 1px;
}


/* =========================================================
   СЕТКА КАРТОЧЕК
========================================================= */

.locations {
    display: grid;
    grid-template-columns: repeat(4, 1fr);

    gap: 16px;
}


/* =========================================================
   КАРТОЧКА
========================================================= */

.location-card {
    min-height: 350px;

    display: flex;
    flex-direction: column;

    padding: 24px;

    border: 1px solid #3c3c3c;
    border-radius: 16px;

    background: #202020;

    transition:
        transform 0.22s ease,
        border-color 0.22s ease,
        background 0.22s ease;
}

.location-card:hover {
    transform: translateY(-4px);

    border-color: #626262;

    background: #232323;
}

.location-top {
    min-height: 145px;
}

.location-type {
    margin-bottom: 25px;

    color: #bdbdbd;

    font-size: 14px;
    font-weight: 800;
    line-height: 1.35;

    letter-spacing: 0.25px;
}

.location-name {
    margin: 0 0 8px;

    color: #ffffff;

    font-size: 22px;
    font-weight: 900;
    line-height: 1.2;
}

.location-address {
    color: #ffffff;

    font-size: 30px;
    font-weight: 900;
    line-height: 1;
}

.location-subtext {
    margin-top: 11px;

    color: #bcbcbc;

    font-size: 14px;
    line-height: 1.35;
}


/* =========================================================
   ДЕЙСТВИЯ В КАРТОЧКЕ
========================================================= */

.location-actions {
    display: grid;
    grid-template-columns: 1fr;

    gap: 9px;

    margin-top: auto;
}


/* Суюнбая и Потанина */

.location-actions-three {
    grid-template-columns: 1fr 1fr;
}

.location-actions-three .action-button-wide {
    grid-column: 1 / -1;
}


/* =========================================================
   ОБЩАЯ КНОПКА
========================================================= */

.action-button {
    position: relative;

    min-height: 58px;

    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;

    padding: 9px 12px 9px 52px;

    border: 1px solid #474747;
    border-radius: 10px;

    background: #1a1a1a;

    color: #ffffff;

    text-decoration: none;

    transition:
        transform 0.18s ease,
        border-color 0.18s ease,
        background 0.18s ease;
}

.action-button:hover {
    transform: translateY(-2px);

    border-color: #747474;

    background: #222222;
}


/* =========================================================
   WHATSAPP
========================================================= */

.action-button-whatsapp {
    border-color: #315f43;
}

.action-button-whatsapp::before {
    content: "";

    position: absolute;

    left: 12px;
    top: 50%;

    width: 29px;
    height: 29px;

    transform: translateY(-50%);

    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;

    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ccircle cx='16' cy='16' r='15' fill='%2325D366'/%3E%3Cpath fill='white' d='M23.4 19.5c-.4-.2-2.4-1.2-2.8-1.3-.4-.1-.7-.2-1 .2-.3.4-1.1 1.3-1.4 1.6-.3.3-.5.3-.9.1-2.5-1.2-4.1-2.2-5.7-5-.4-.7.4-.7 1.2-2.2.1-.3.1-.6 0-.9-.1-.2-1-2.5-1.4-3.4-.4-.9-.8-.8-1-.8h-.9c-.3 0-.9.1-1.3.6-.4.5-1.7 1.7-1.7 4.1s1.8 4.8 2 5.1c.2.3 3.5 5.3 8.4 7.4 3.1 1.3 4.3 1.4 5.9 1.2.9-.1 2.4-1 2.8-1.9.3-.9.3-1.7.2-1.9-.1-.2-.4-.3-.8-.5z'/%3E%3C/svg%3E");
}

.action-button-whatsapp:hover {
    border-color: #3b9c60;

    background: #1c241f;
}


/* =========================================================
   2GIS
========================================================= */

.action-button:not(.action-button-whatsapp)::before {
    content: "";

    position: absolute;

    left: 12px;
    top: 50%;

    width: 29px;
    height: 29px;

    transform: translateY(-50%);

    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;

    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ccircle cx='16' cy='16' r='15' fill='%2334A853'/%3E%3Cpath fill='white' d='M16 7.2a7.1 7.1 0 0 0-7.1 7.1c0 5.3 7.1 10.6 7.1 10.6s7.1-5.3 7.1-10.6A7.1 7.1 0 0 0 16 7.2zm0 10.1a3 3 0 1 1 0-6 3 3 0 0 1 0 6z'/%3E%3C/svg%3E");
}


/* =========================================================
   ТЕКСТ ВНУТРИ КНОПОК
========================================================= */

.action-main {
    display: block;

    color: #ffffff;

    font-size: 15px;
    font-weight: 900;
    line-height: 1.15;
}

.action-sub {
    display: block;

    margin-top: 3px;

    color: #a2a2a2;

    font-size: 11px;
    font-weight: 500;
    line-height: 1.15;
}


/* =========================================================
   ПОДРОБНЕЕ
========================================================= */

.details {
    min-height: 48px;

    display: flex;
    align-items: center;

    margin-top: 9px;

    padding: 0 14px;

    border: 1px solid #444444;
    border-radius: 10px;

    background: #1a1a1a;

    color: #ffffff;

    font-size: 14px;
    font-weight: 900;

    text-decoration: none;

    transition:
        transform 0.18s ease,
        border-color 0.18s ease,
        background 0.18s ease;
}

.details:hover {
    transform: translateY(-2px);

    border-color: #747474;

    background: #242424;
}


/* =========================================================
   ЦИФРЫ
========================================================= */

.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);

    gap: 20px;

    margin-top: 38px;
    padding-top: 28px;

    border-top: 1px solid #333333;
}

.stat {
    text-align: center;
}

.stat strong {
    display: block;

    margin-bottom: 6px;

    color: #ffffff;

    font-size: 26px;
    font-weight: 900;
}

.stat span {
    color: #9e9e9e;

    font-size: 14px;
}


/* =========================================================
   ЭКРАНЫ ДО 1250
========================================================= */

@media (max-width: 1250px) {

    .header {
        grid-template-columns: 260px 190px 1fr;
        gap: 24px;
    }

    .logo {
        width: 260px;
    }

    .instagram-link {
        min-height: 62px;
        padding: 10px 14px;
    }

    .instagram-icon {
        width: 40px;
        height: 40px;
    }

    .instagram-text strong {
        font-size: 16px;
    }

    .nav {
        gap: 20px;
    }

    .header-right {
        gap: 24px;
    }

}


/* =========================================================
   2 КАРТОЧКИ
========================================================= */

@media (max-width: 1100px) {

    .locations {
        grid-template-columns: repeat(2, 1fr);
    }

    .header {
        grid-template-columns: 240px 190px 1fr;
    }

    .logo {
        width: 240px;
    }

}


/* =========================================================
   ПЛАНШЕТ
========================================================= */

@media (max-width: 950px) {

    .header {
        grid-template-columns: 220px 1fr;
        gap: 24px;

        margin-bottom: 36px;
    }

    .logo {
        width: 220px;
    }

    .instagram-link {
        justify-self: end;
    }

    .header-right {
        grid-column: 1 / -1;

        justify-content: flex-end;
    }

    .nav {
        display: none;
    }

}


/* =========================================================
   ТЕЛЕФОН
========================================================= */

@media (max-width: 600px) {

    .hero {
        padding: 18px 16px 30px;
    }

    .header {
        grid-template-columns: 1fr auto;
        gap: 14px;

        margin-bottom: 30px;
    }

    .logo {
        width: 165px;
        max-width: 52vw;
    }

    .instagram-link {
        min-height: 52px;

        padding: 7px 10px;

        border-radius: 11px;
    }

    .instagram-icon {
        width: 34px;
        height: 34px;
    }

    .instagram-text strong {
        font-size: 13px;
    }

    .instagram-text small {
        font-size: 10px;
    }

    .header-right {
        grid-column: 1 / -1;
    }

    .phone {
        font-size: 15px;
    }

    h1 {
        font-size: 42px;

        letter-spacing: -1px;
    }

    .subtitle {
        font-size: 16px;
    }

    .locations {
        grid-template-columns: 1fr;
    }

    .location-card {
        min-height: 0;
    }

    .location-top {
        min-height: 0;

        margin-bottom: 24px;
    }

    .stats {
        grid-template-columns: 1fr;

        gap: 18px;
    }

}


/* =========================================================
   ОЧЕНЬ УЗКИЙ ТЕЛЕФОН
========================================================= */

@media (max-width: 390px) {

    .instagram-text small {
        display: none;
    }

    .instagram-link {
        gap: 7px;
    }

    .location-actions-three {
        grid-template-columns: 1fr;
    }

    .location-actions-three .action-button-wide {
        grid-column: auto;
    }

}

/* Дополнительные секции и доступные элементы управления */
[hidden] { display: none !important; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid #73d594; outline-offset: 4px; }
[id] { scroll-margin-top: 24px; }
.container, .header-right, .location-card, .info-card { min-width: 0; }
.container { overflow-wrap: anywhere; }
.instagram-text { min-width: 0; }
.location-card { container-type: inline-size; }
.action-button { min-width: 0; }
.details { width: 100%; text-align: left; }
.menu-toggle { display: none; }

.content-section { padding: 64px 24px; border-top: 1px solid #333; }
.content-section:nth-of-type(odd) { background: #1b1b1b; }
.content-section h2 { margin: 0 0 20px; font-size: clamp(28px, 4vw, 42px); line-height: 1.15; }
.section-intro { max-width: 800px; margin: 0 0 28px; color: #c7c7c7; font-size: 18px; line-height: 1.65; }
.info-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 26px; }
.info-card { padding: 24px; background: #202020; border: 1px solid #3c3c3c; border-radius: 16px; }
.info-card h3 { margin: 0 0 12px; font-size: 22px; }
.info-card p, .section-note { color: #bdbdbd; line-height: 1.65; }
.info-card p { margin: 0; }
.section-note { max-width: 850px; margin: 24px 0; }
.text-button, .menu-toggle, .close-button { border: 1px solid #4b4b4b; background: #202020; border-radius: 10px; color: #fff; }
.text-button { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 12px 18px; text-decoration: none; font-weight: 700; line-height: 1.4; text-align: center; }
.text-button:hover, .menu-toggle:hover, .close-button:hover { background: #2b2b2b; border-color: #73a584; }
.section-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.service-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding: 0; list-style: none; }
.service-list li { padding: 20px; border: 1px solid #3c3c3c; border-radius: 12px; background: #202020; line-height: 1.5; }
.footer { padding: 36px 24px; border-top: 1px solid #333; }
.footer-content { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 24px; }
.footer strong { font-size: 20px; }
.footer p { color: #bdbdbd; line-height: 1.65; margin-bottom: 0; }
.footer nav { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }
.footer a { display: inline-flex; align-items: center; min-height: 44px; text-underline-offset: 5px; }

/* Native dialog provides focus containment and Escape support. */
body.modal-open { position: fixed; width: 100%; overflow: hidden; }
dialog { color: #fff; background: #202020; border: 1px solid #555; border-radius: 18px; padding: 0; overscroll-behavior: contain; }
dialog::backdrop { background: rgb(0 0 0 / 78%); }
.location-dialog { width: min(880px, calc(100% - 32px)); max-width: none; max-height: calc(100dvh - 32px); }
.dialog-toolbar { display: flex; justify-content: flex-end; position: sticky; top: 0; z-index: 1; padding: 10px 14px; background: #202020; border-bottom: 1px solid #333; }
.close-button { width: 44px; height: 44px; font-size: 30px; line-height: 1; flex-shrink: 0; }
.dialog-content { padding: 20px 28px 28px; overflow-wrap: anywhere; }
.dialog-content h2 { margin: 0 0 16px; font-size: clamp(25px, 4vw, 34px); }
.dialog-content h3 { margin: 26px 0 12px; font-size: 20px; }
.dialog-content p, .dialog-content li { line-height: 1.6; color: #c7c7c7; }
.dialog-content .eyebrow { font-size: 12px; }
.dialog-address { font-weight: 700; }
.dialog-content ul { padding-left: 22px; }
.contact-list { display: grid; gap: 12px; }
.contact-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; padding: 14px; border: 1px solid #414141; border-radius: 12px; }
.contact-row > a { min-height: 44px; display: inline-flex; align-items: center; }
.contact-row strong { min-width: 80px; }
.map-block { margin-top: 24px; padding: 20px; border: 1px solid #414141; border-radius: 12px; background: #191d1a; }
.map-block h3 { margin-top: 0; }
.gallery-status { padding: 14px 18px; background: #191919; border-radius: 10px; font-size: 14px; }
.gallery-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.gallery-thumbnail { display: block; padding: 0; border: 1px solid #4b4b4b; border-radius: 10px; overflow: hidden; background: #171717; aspect-ratio: 4 / 3; }
.gallery-thumbnail img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-dialog { width: min(1100px, calc(100% - 32px)); max-width: none; max-height: calc(100dvh - 32px); }
.photo-viewer { margin: 0; padding: 12px 16px; text-align: center; }
.photo-stage { display: flex; align-items: center; justify-content: center; min-height: 100px; }
.photo-stage img { display: block; max-width: 100%; max-height: max(100px, calc(100dvh - 240px)); object-fit: contain; }
.photo-viewer figcaption { color: #c7c7c7; font-size: 14px; line-height: 1.5; padding-top: 12px; overflow-wrap: anywhere; }
.photo-controls { display: flex; justify-content: center; gap: 14px; padding: 0 16px 16px; }

/* Stack narrow card controls before their labels can overflow. */
@container (max-width: 270px) {
    .location-actions-three { grid-template-columns: 1fr; }
    .location-actions-three .action-button-wide { grid-column: auto; }
}
@media (min-width: 951px) and (max-width: 1250px) {
    .header-right { gap: 12px; }
    .nav { flex-wrap: wrap; justify-content: flex-end; gap: 12px 18px; }
}
@media (max-width: 950px) {
    .header-right { justify-content: space-between; gap: 12px; }
    .menu-toggle { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 14px; }
    .nav { display: flex; flex-wrap: wrap; width: 100%; order: 3; gap: 8px; }
    .js .nav { display: none; }
    .js .nav.is-open { display: flex; }
    .nav a { padding: 12px 16px; min-height: 44px; background: #202020; border-radius: 8px; }
    .info-grid, .service-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
    .header { grid-template-columns: minmax(0, 1fr) auto; }
    .logo { max-width: 100%; }
    h1 { font-size: clamp(34px, 8vw, 42px); }
    .content-section { padding: 42px 16px; }
    .info-grid, .service-list { grid-template-columns: 1fr; }
    .section-intro { font-size: 16px; }
    .footer { padding: 28px 16px; }
    .footer nav { flex-direction: column; align-items: flex-start; gap: 4px; }
    .dialog-content { padding: 16px; }
    .dialog-content .eyebrow { letter-spacing: 1px; }
    .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .contact-row { gap: 8px 16px; }
    .contact-row strong { width: 100%; }
    .map-block { padding: 16px; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition: none !important; animation: none !important; }
    .instagram-link:hover, .location-card:hover, .action-button:hover, .details:hover { transform: none; }
}
