/**
 * Gas Impex Core — Адреса АГЗС v2 (тёмная тема, маршруты 2ГИС)
 *
 * Наследует классы .gi-addr-* / .gi-city-* из addresses.css,
 * добавляет кнопку маршрута.
 * Если v1 НЕ подключен — этот файл содержит полную копию стилей.
 */

.gi-addr-wrap *,
.gi-addr-wrap *::before,
.gi-addr-wrap *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.gi-addr-wrap {
    width: 100%;
    font-family: 'Onest', sans-serif;
    color: #fff;
}

.gi-addr-header {
    text-align: center;
    margin-bottom: 48px;
}

.gi-addr-tag {
    display: inline-block;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--gi-red);
    margin-bottom: 14px;
}

.gi-addr-title {
    font-family: 'Geologica', sans-serif;
    font-size: clamp(26px, 3.5vw, 40px);
    font-weight: 600;
    color: #fff;
    line-height: 1.15;
}

.gi-addr-title span { color: var(--gi-blue); }

.gi-addr-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2px;
    background: #1a1a1a;
    border: 1px solid #222;
    border-radius: 16px;
    overflow: hidden;
}

.gi-city-card {
    background: #111;
    transition: background 0.3s ease;
}
.gi-city-card:hover { background: #141414; }

.gi-city-card:nth-child(1),
.gi-city-card:nth-child(2) { border-bottom: 2px solid #1a1a1a; }
.gi-city-card:nth-child(1),
.gi-city-card:nth-child(3) { border-right: 2px solid #1a1a1a; }

.gi-city-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 26px 28px;
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.gi-city-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: rgba(var(--gi-blue-rgb), 0.1);
    border: 1px solid rgba(var(--gi-blue-rgb), 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.3s ease;
}
.gi-city-card.gi-open .gi-city-icon {
    background: rgba(var(--gi-red-rgb), 0.1);
    border-color: rgba(var(--gi-red-rgb), 0.25);
}
.gi-city-icon svg { width: 20px; height: 20px; fill: var(--gi-blue); transition: fill 0.3s ease; }
.gi-city-card.gi-open .gi-city-icon svg { fill: var(--gi-red); }

.gi-city-info { flex: 1; min-width: 0; }
.gi-city-name {
    font-family: 'Geologica', sans-serif;
    font-size: 17px;
    font-weight: 600;
    color: #fff;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.gi-city-meta { font-size: 12px; color: #555; margin-top: 3px; }

.gi-city-toggle {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: rgba(255,255,255,0.04);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.3s ease;
}
.gi-city-card.gi-open .gi-city-toggle { background: rgba(var(--gi-red-rgb), 0.08); }
.gi-city-toggle svg {
    width: 14px; height: 14px;
    stroke: #555; fill: none; stroke-width: 2;
    stroke-linecap: round; stroke-linejoin: round;
    transition: transform 0.35s ease, stroke 0.3s ease;
}
.gi-city-card.gi-open .gi-city-toggle svg { transform: rotate(180deg); stroke: var(--gi-red); }

.gi-city-body {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.4s ease;
}
.gi-city-card.gi-open .gi-city-body { grid-template-rows: 1fr; }

.gi-city-body-inner { overflow: hidden; padding: 0 28px; transition: padding 0.4s ease; } /* impeccable-disable-line layout-transition: старый аккордеон городов, 26px отступа при раскрытии; вне этой задачи */
.gi-city-card.gi-open .gi-city-body-inner { padding: 0 28px 26px; }

/* Офис */
.gi-office {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: rgba(var(--gi-blue-rgb), 0.06);
    border: 1px solid rgba(var(--gi-blue-rgb), 0.15);
    border-radius: 10px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}
.gi-office-info { flex: 1; min-width: 0; }
.gi-office-route { align-self: center; }
.gi-office-icon {
    width: 30px; height: 30px; border-radius: 7px;
    background: rgba(var(--gi-blue-rgb), 0.15);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; margin-top: 1px;
}
.gi-office-icon svg {
    width: 14px; height: 14px;
    fill: none; stroke: var(--gi-blue); stroke-width: 2;
    stroke-linecap: round; stroke-linejoin: round;
}
.gi-office-label {
    font-size: 10px; font-weight: 500;
    letter-spacing: 0.12em; text-transform: uppercase;
    color: var(--gi-blue); margin-bottom: 3px;
}
.gi-office-address { font-size: 13px; color: #ccc; line-height: 1.4; }
.gi-office-tel a {
    font-size: 12px; color: var(--gi-blue);
    margin-top: 2px; text-decoration: none;
    display: inline-block; transition: color 0.2s ease;
}
.gi-office-tel a:hover { color: #4d9ef5; }
.gi-office-hours { font-size: 12px; color: #9a9a9a; margin-top: 2px; }

/* Станции */
.gi-stations { display: flex; flex-direction: column; gap: 5px; }
.gi-station {
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    align-items: center;
    gap: 6px 10px;
    padding: 9px 12px;
    border-radius: 8px;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.04);
    transition: all 0.2s ease;
}
.gi-station:hover {
    background: rgba(255,255,255,0.04);
    border-color: rgba(255,255,255,0.08);
}

.gi-badge {
    font-size: 10px; font-weight: 600;
    font-family: 'Geologica', sans-serif;
    color: var(--gi-red);
    background: rgba(var(--gi-red-rgb), 0.1);
    border: 1px solid rgba(var(--gi-red-rgb), 0.2);
    border-radius: 5px; padding: 2px 7px;
    white-space: nowrap;
}
.gi-station-addr { font-size: 13px; color: #aaa; line-height: 1.3; min-width: 0; }
.gi-station-tel a {
    font-size: 11px; color: #4d9ef5;
    white-space: nowrap;
    text-decoration: none; transition: color 0.2s ease;
}
.gi-station-tel a:hover { color: #fff; }

/* ── Кнопка маршрута 2ГИС ── */
.gi-route-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--gi-blue);
    color: #fff !important;
    font-size: 12px;
    font-weight: 600;
    padding: 5px 11px;
    border-radius: 20px;
    text-decoration: none !important;
    white-space: nowrap;
    transition: background 0.2s, transform 0.15s;
    justify-self: end;
}
.gi-route-btn:hover {
    background: #1558c0;
    transform: translateY(-1px);
}
.gi-route-btn svg {
    width: 13px; height: 13px;
    stroke: #fff; fill: none; flex-shrink: 0;
}

/* Адаптив */
@media (max-width: 768px) {
    .gi-addr-grid { grid-template-columns: 1fr; }

    .gi-city-card:nth-child(1),
    .gi-city-card:nth-child(2),
    .gi-city-card:nth-child(3) {
        border-right: none;
        border-bottom: 2px solid #1a1a1a;
    }

    .gi-city-header { padding: 20px 18px; }
    .gi-city-body-inner { padding: 0 18px; }
    .gi-city-card.gi-open .gi-city-body-inner { padding: 0 18px 22px; }

    .gi-station {
        grid-template-columns: auto 1fr auto;
    }
    .gi-station-tel { display: none; }
}
