/* ===========================================================================
   /contacts/ — редизайн 2026 (GLA-377).

   Старый css/pages/_contacts.css НЕ трогаем и сюда не тянем: его же грузят
   страницы залов /clubs/<клуб>/, которые владелец велел пока не менять. Общая
   основа (.rd-btn, .rd-page-head, .rd-sec, .rd-label) — css/base/_redesign.css,
   он подключён ДО этого файла (страница берёт верх). Заглушка карты .gc-map и её кнопки —
   css/components/_buttons.css, здесь только раскладка поверх схемы.
   Макет: ~/Downloads/GLAVCLUB_redesign/html/contacts.html. Брейкпоинт — 900 px.
   =========================================================================== */

.ct-main {
    padding-bottom: 96px;
    color: var(--rd-text, #fff);
}

/* ---------------------------------------------------------------------------
   Адрес, часы, связь + карта
   --------------------------------------------------------------------------- */
.ct-route {
    display: grid;
    grid-template-columns: 420px minmax(0, 1fr);
    gap: 24px;
}
.ct-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 4px 28px 28px;
    border-radius: var(--rd-r-xl);
    background: var(--rd-card);
    border: 1px solid var(--rd-border);
    box-sizing: border-box;
}
.ct-block {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 22px 0;
    border-bottom: 1px solid var(--rd-border);
}
/* последний блок карточки (с GLA-447 — «Реквизиты») — без черты: под ним кнопки */
.ct-block:nth-child(4) {
    border-bottom: 0;
}
.ct-label {
    margin: 0;
    line-height: 1.3;
}
.ct-address {
    margin: 0;
    font-size: 18px;
    font-weight: 800;
    line-height: 1.35;
    color: var(--rd-text);
}
.ct-hours {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 0;
}
.ct-hours > div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    font-size: 15px;
}
.ct-hours dt {
    font-weight: 500;
    color: var(--rd-text-2);
}
.ct-hours dd {
    margin: 0;
    font-weight: 700;
    color: var(--rd-text);
    white-space: nowrap;
}
.ct-hours dd.ct-hours-ask {
    font-weight: 600;
    color: var(--rd-muted);
}
.ct-contact {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    align-self: flex-start;
    min-height: 44px;
    font-size: 17px;
    font-weight: 800;
    color: var(--rd-text);
    text-decoration: none;
    /* номер не рвётся на две строки */
    white-space: nowrap;
}
/* Общее правило сайта подчёркивает tel:/mailto: и делает их inline-block (_reset.css) —
   тогда линия шла и под пробелом после иконки. Подчёркиваем только сам текст. */
.ct-card .ct-block a.ct-contact[href] {
    display: inline-flex;
    text-decoration: none;
}
.ct-contact span {
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-decoration-color: rgba(255, 255, 255, 0.35);
    text-underline-offset: 3px;
}
.ct-contact:hover span {
    text-decoration-color: currentColor;
}
.ct-block .ct-contact + .ct-contact {
    margin-top: -10px;
}
.ct-contact:hover {
    color: #D4D4D4;
}
.ct-contact svg,
.ct-route-btns svg,
.ct-help svg,
.ct-social svg,
.ct-sent-icon svg {
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex: 0 0 auto;
}
/* Маршрут и такси — одной ширины */
.ct-route-btns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: auto;
}
.ct-route-btns .rd-btn {
    padding: 0 12px;
    font-size: 14px;
    font-weight: 800;
    width: 100%;
    box-sizing: border-box;
}

/* Карта: схема на всю карточку, кнопки справа снизу. После «Показать карту»
   iframe встаёт в тот же .gc-map поверх схемы (js/inline-actions.js). */
.ct-map {
    position: relative;
    min-height: 500px;
    border-radius: var(--rd-r-xl);
    overflow: hidden;
    background: #141414;
    border: 1px solid var(--rd-border);
}
.ct-map .gc-map {
    position: absolute;
    inset: 0;
    display: block;
    padding: 0;
    background: #141414;
}
.ct-scheme {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    font-family: 'Montserrat', system-ui, sans-serif;
}
.ct-map .gc-map iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    z-index: 1;
}
/* Показанная карта — неинтерактивная, как и раньше на /contacts/ (GLA-256): прозрачная
   «крышка» поверх виджета, чтобы прокрутка страницы не застревала в карте. Ссылка
   «Яндекс Карты» стоит выше крышки и остаётся нажимаемой. */
.ct-map .gc-map.is-loaded::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 2;
}
.ct-map-btns {
    position: absolute;
    right: 28px;
    bottom: 28px;
    z-index: 3;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}
.ct-map .gc-map-show,
.ct-map .gc-map-open,
.ct-map .gc-map.is-loaded .gc-map-open {
    position: static;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    max-width: none;
    padding: 0 22px;
    border-radius: var(--rd-r-pill);
    font-family: inherit;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
}
.ct-map .gc-map-open,
.ct-map .gc-map.is-loaded .gc-map-open {
    border: 1px solid var(--rd-border-strong);
    background: rgba(11, 11, 11, 0.75);
    color: var(--rd-text);
}
.ct-map .gc-map-open:hover {
    background: rgba(40, 40, 40, 0.9);
    color: var(--rd-text);
}
.ct-map .gc-map-show {
    border: 0;
    background: #fff;
    color: #0B0B0B;
}
.ct-map .gc-map-show:hover {
    background: #E5E5E5;
}
.ct-map .gc-map-open:focus-visible,
.ct-map .gc-map-show:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 3px;
}

/* ---------------------------------------------------------------------------
   Чем помочь?
   --------------------------------------------------------------------------- */
.ct-help-sec.rd-sec {
    padding-top: 64px;
}
.ct-help {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}
.ct-help-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 32px;
    min-height: 180px;
    padding: 24px;
    border-radius: var(--rd-r-lg);
    background: var(--rd-card);
    border: 1px solid var(--rd-border);
    color: var(--rd-text);
    text-decoration: none;
    box-sizing: border-box;
    transition: border-color 0.2s ease;
}
.ct-help-card:hover {
    color: var(--rd-text);
    border-color: var(--rd-border-strong);
}
.ct-help-card:focus-visible,
.ct-social:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 3px;
}
.ct-help-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}
.ct-help-ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: var(--rd-r-md);
    background: var(--rd-fill);
}
.ct-help-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--rd-r-pill);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: background-color 0.2s ease, color 0.2s ease;
}
.ct-help-card:hover .ct-help-arrow {
    background: #fff;
    color: #0B0B0B;
}
.ct-help-title {
    font-size: 18px;
    font-weight: 800;
    line-height: 1.25;
}

/* ---------------------------------------------------------------------------
   Соцсети + форма
   --------------------------------------------------------------------------- */
.ct-bottom {
    display: grid;
    grid-template-columns: 420px minmax(0, 1fr);
    gap: 24px;
    align-items: stretch;
    margin-top: 64px;
}
.ct-social-sec {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
}
.ct-social-title {
    margin-bottom: 12px;
}
.ct-social {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 20px;
    border-radius: var(--rd-r-lg);
    background: var(--rd-card);
    border: 1px solid var(--rd-border);
    color: var(--rd-text);
    text-decoration: none;
    transition: border-color 0.2s ease;
}
.ct-social:hover {
    color: var(--rd-text);
    border-color: var(--rd-border-strong);
}
.ct-social-ico {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: var(--rd-r-sm);
    background: var(--rd-fill);
}
.ct-social-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1 1 auto;
    min-width: 0;
}
.ct-social-name {
    font-size: 17px;
    font-weight: 800;
}
.ct-social-note {
    font-size: 13px;
    font-weight: 500;
    color: var(--rd-muted);
}
.ct-meta-note {
    margin: 4px 0 0;
    font-size: 12px;
    line-height: 1.5;
    font-weight: 500;
    color: #8A8A8A;
}

.ct-feedback {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 32px;
    border-radius: var(--rd-r-xl);
    background: var(--rd-card);
    border: 1px solid var(--rd-border);
    box-sizing: border-box;
}
.ct-feedback-title {
    margin: 0;
    font-size: 26px;
    font-weight: 900;
    line-height: 1.2;
    color: var(--rd-text);
}
.ct-feedback-lead {
    margin: 8px 0 18px;
    font-size: 15px;
    line-height: 1.55;
    font-weight: 500;
    color: var(--rd-muted);
}
.ct-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.ct-form-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}
.ct-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}
.ct-field label {
    font-size: 13px;
    font-weight: 700;
    color: #D4D4D4;
}
.ct-field input,
.ct-field textarea {
    width: 100%;
    box-sizing: border-box;
    border-radius: var(--rd-r-sm);
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: var(--rd-bg);
    color: var(--rd-text);
    font-family: inherit;
    /* 16 px: на iPhone поле мельче приближает страницу при фокусе */
    font-size: 16px;
    font-weight: 500;
}
.ct-field input {
    height: 50px;
    padding: 0 16px;
}
.ct-field textarea {
    min-height: 120px;
    padding: 14px 16px;
    line-height: 1.5;
    resize: vertical;
}
.ct-field input::placeholder,
.ct-field textarea::placeholder {
    color: #7A7A7A;
    opacity: 1;
}
.ct-field input:focus,
.ct-field textarea:focus {
    outline: 2px solid #fff;
    outline-offset: 1px;
    border-color: transparent;
}
/* Согласие — видно сразу (раньше появлялось по мере ввода) */
.ct-form .privacy-checkbox-container {
    display: block;
    opacity: 1;
    margin: 0;
    animation: none;
}
.ct-form .privacy-checkbox-wrapper {
    padding: 14px 16px;
    border-radius: var(--rd-r-sm);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--rd-border);
}
.ct-form .privacy-checkbox-label {
    font-size: 13px;
    color: var(--rd-text-2);
}
.ct-submit {
    align-self: flex-start;
    padding: 0 32px;
    font-weight: 800;
}
.ct-submit:disabled {
    opacity: 0.6;
    cursor: default;
}

/* Сообщение отправлено */
.ct-sent {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 24px 0;
    text-align: center;
}
.ct-sent[hidden] {
    display: none;
}
.ct-sent-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    margin-bottom: 4px;
    border-radius: var(--rd-r-pill);
    background: rgba(74, 222, 128, 0.12);
    color: var(--rd-success);
}
.ct-sent-title {
    margin: 0;
    font-size: 24px;
    font-weight: 900;
    line-height: 1.2;
    color: var(--rd-text);
}
.ct-sent-title:focus {
    outline: none;
}
.ct-sent-text {
    margin: 0 0 6px;
    font-size: 15px;
    line-height: 1.5;
    font-weight: 500;
    color: var(--rd-muted);
}
.ct-sent .rd-btn {
    font-weight: 800;
}

/* Между 901 и ~1100 px левой колонке 420 px тесно — делим поровну */
@media (max-width: 1100px) and (min-width: 901px) {
    .ct-route,
    .ct-bottom {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }
    .ct-help {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* ---------------------------------------------------------------------------
   Телефон
   --------------------------------------------------------------------------- */
@media (max-width: 900px) {
    .ct-main {
        padding-bottom: 64px;
    }
    .ct-route,
    .ct-bottom {
        grid-template-columns: minmax(0, 1fr);
    }
    .ct-card {
        padding: 4px 20px 20px;
    }
    .ct-route-btns {
        grid-template-columns: minmax(0, 1fr);
        margin-top: 4px;
    }
    .ct-map {
        min-height: 340px;
    }
    /* Узкий блок обрезает схему по бокам — подпись ТЦ осталась бы обрубком «»» у края */
    .ct-scheme-far {
        display: none;
    }
    .ct-map-btns {
        left: 16px;
        right: 16px;
        bottom: 16px;
        flex-direction: column;
        align-items: center;
    }
    .ct-help-sec.rd-sec {
        padding-top: 56px;
    }
    .ct-help {
        grid-template-columns: minmax(0, 1fr);
        gap: 10px;
    }
    /* Плитка → строка «иконка · текст · стрелка» */
    .ct-help-card {
        flex-direction: row;
        align-items: center;
        gap: 14px;
        min-height: 0;
        padding: 14px 16px;
    }
    .ct-help-top {
        display: contents;
    }
    .ct-help-ico {
        order: 1;
        flex: 0 0 auto;
        width: 44px;
        height: 44px;
    }
    .ct-help-title {
        order: 2;
        flex: 1 1 auto;
        font-size: 16px;
    }
    .ct-help-arrow {
        order: 3;
        flex: 0 0 auto;
    }
    .ct-bottom {
        margin-top: 56px;
        gap: 32px;
    }
    .ct-feedback {
        padding: 24px 20px;
    }
    .ct-form-2 {
        grid-template-columns: minmax(0, 1fr);
    }
    .ct-submit {
        align-self: stretch;
    }
}
