html.tg body.maps-gallery-page {
    background: radial-gradient(circle at top, #0f1a2e 0%, #070b12 45%, #04070d 100%) !important;
}

.maps-gallery-wrap {
    max-width: 1180px;
    margin: 0 auto;
    padding: 20px 16px 56px;
}

.maps-gallery-hero {
    text-align: center;
    padding: 28px 18px 24px;
    margin-bottom: 18px;
    border-radius: 14px;
    border: 1px solid rgba(212, 175, 55, 0.22);
    background: linear-gradient(135deg, rgba(15, 19, 26, 0.96) 0%, rgba(26, 34, 48, 0.92) 50%, rgba(15, 19, 26, 0.96) 100%);
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.28);
}

.maps-gallery-hero .hero-eyebrow {
    margin: 0 0 8px;
    font-size: 12px;
    letter-spacing: 0.22em;
    color: var(--tg-gold, #d4af37);
    font-weight: 700;
}

.maps-gallery-hero h1 {
    margin: 0 0 10px;
    font-size: clamp(24px, 4vw, 34px);
    color: #fff;
    font-weight: 800;
}

.maps-gallery-hero .hero-desc {
    margin: 0 auto 18px;
    max-width: 640px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 14px;
    line-height: 1.7;
}

.maps-gallery-hero .hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.maps-toolbar {
    position: sticky;
    top: 0;
    z-index: 40;
    margin-bottom: 16px;
    padding: 14px;
    border-radius: 12px;
    border: 1px solid rgba(97, 127, 172, 0.28);
    background: rgba(8, 13, 22, 0.92);
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.22);
}

.maps-search-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.maps-search-input {
    flex: 1 1 220px;
    min-width: 0;
    border: 1px solid rgba(97, 127, 172, 0.35);
    border-radius: 10px;
    background: rgba(10, 18, 31, 0.9);
    color: #e7efff;
    padding: 10px 14px;
    font-size: 14px;
}

.maps-search-input:focus {
    outline: none;
    border-color: rgba(0, 110, 255, 0.65);
    box-shadow: 0 0 0 3px rgba(0, 110, 255, 0.18);
}

.maps-filter-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 10px;
}

.maps-filter-group:last-child {
    margin-bottom: 0;
}

.maps-filter-label {
    flex: 0 0 auto;
    font-size: 12px;
    color: #8fa8cc;
    letter-spacing: 0.08em;
    min-width: 42px;
}

.maps-filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.maps-chip {
    border: 1px solid rgba(97, 127, 172, 0.32);
    border-radius: 999px;
    background: rgba(14, 23, 39, 0.82);
    color: #c8daf5;
    padding: 6px 12px;
    font-size: 12px;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s, color 0.2s;
}

.maps-chip:hover {
    border-color: rgba(0, 110, 255, 0.45);
    color: #fff;
}

.maps-chip.is-active {
    border-color: rgba(212, 175, 55, 0.65);
    background: linear-gradient(180deg, rgba(212, 175, 55, 0.22), rgba(212, 175, 55, 0.08));
    color: #f0d98a;
    font-weight: 700;
}

.maps-sort-tabs {
    display: inline-flex;
    gap: 6px;
    padding: 4px;
    border-radius: 999px;
    border: 1px solid rgba(97, 127, 172, 0.28);
    background: rgba(10, 18, 31, 0.75);
}

.maps-sort-tab {
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #a8bddf;
    padding: 7px 14px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.maps-sort-tab.is-active {
    background: linear-gradient(180deg, #006eff, #0050c8);
    color: #fff;
    box-shadow: 0 2px 0 rgba(0, 70, 150, 0.45);
}

.maps-result-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin: 0 0 12px;
    color: #8fa8cc;
    font-size: 13px;
}

.maps-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.maps-card {
    width: calc(33.333% - 10px);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(165deg, rgba(10, 18, 31, 0.94), rgba(7, 12, 22, 0.97));
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.maps-card:hover {
    transform: translateY(-3px);
    border-color: rgba(0, 110, 255, 0.35);
    box-shadow: 0 12px 32px rgba(0, 110, 255, 0.12);
}

.maps-card-media {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 16 / 10;
    min-height: 168px;
    background: #0a1220;
    border: 0;
    padding: 8px;
    width: 100%;
    cursor: zoom-in;
    box-sizing: border-box;
}

.maps-card-media img {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
}

.maps-card-preview-btn {
    position: absolute;
    right: 10px;
    bottom: 10px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 11px;
    padding: 5px 8px;
    cursor: pointer;
}

.maps-card-body {
    padding: 12px 12px 14px;
}

.maps-card-title {
    margin: 0 0 8px;
    font-size: 15px;
    font-weight: 700;
    color: #eef4ff;
    line-height: 1.45;
}

.maps-card-title a {
    color: inherit;
    text-decoration: none;
}

.maps-card-title a:hover {
    color: #9fcbff;
}

.maps-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}

.maps-tag {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 600;
    border: 1px solid rgba(97, 127, 172, 0.35);
    color: #b8ccef;
    background: rgba(14, 23, 39, 0.7);
}

.maps-tag--gold {
    border-color: rgba(212, 175, 55, 0.45);
    color: #f0d98a;
    background: rgba(212, 175, 55, 0.1);
}

.maps-tag--blue {
    border-color: rgba(0, 110, 255, 0.4);
    color: #9fcbff;
    background: rgba(0, 110, 255, 0.12);
}

.maps-card-summary {
    margin: 0 0 10px;
    color: #9eb2d0;
    font-size: 13px;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.maps-card-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #7f95b8;
}

.maps-card-link {
    color: #73b0ff;
    text-decoration: none;
    font-weight: 700;
}

.maps-card-link:hover {
    color: #9fcbff;
}

.maps-empty,
.maps-loading {
    width: 100%;
    text-align: center;
    padding: 36px 16px;
    color: #8fa8cc;
    font-size: 14px;
}

.maps-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 22px;
}

.maps-pagination .maps-page-btn {
    min-width: 96px;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 13px;
    border: none;
    cursor: pointer;
    background: linear-gradient(180deg, #006eff, #0050c8);
    color: #fff;
    box-shadow: 0 3px 0 rgba(0, 70, 150, 0.45);
}

.maps-pagination .maps-page-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.maps-pagination .maps-page-indicator {
    font-size: 14px;
    color: #aeb8c6;
}

.maps-consult-banner {
    margin: 28px 0 22px;
    padding: 18px 16px;
    border-radius: 12px;
    border: 1px solid rgba(212, 175, 55, 0.35);
    background: linear-gradient(120deg, rgba(212, 175, 55, 0.12), rgba(0, 110, 255, 0.1));
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.maps-consult-banner p {
    margin: 0;
    color: #dce7fb;
    font-size: 14px;
    line-height: 1.6;
}

.maps-consult-banner strong {
    color: var(--tg-gold, #f0d98a);
}

.maps-lightbox {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.86);
}

.maps-lightbox.is-open {
    display: flex;
}

.maps-lightbox-panel {
    position: relative;
    width: min(960px, 100%);
    max-height: calc(100vh - 40px);
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(212, 175, 55, 0.35);
    background: #0b1018;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
}

.maps-lightbox-img {
    width: 100%;
    max-height: min(70vh, 640px);
    object-fit: contain;
    background: #05080f;
    display: block;
}

.maps-lightbox-meta {
    padding: 14px 16px 16px;
}

.maps-lightbox-meta h3 {
    margin: 0 0 8px;
    color: #f4f8ff;
    font-size: 18px;
}

.maps-lightbox-meta p {
    margin: 0 0 12px;
    color: #aeb8c6;
    font-size: 13px;
    line-height: 1.6;
}

.maps-lightbox-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.maps-lightbox-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

@media (max-width: 980px) {
    .maps-card {
        width: calc(50% - 7px);
    }
    .maps-toolbar {
        top: 52px;
    }
}

@media (max-width: 580px) {
    .maps-card {
        width: 100%;
    }
    .maps-toolbar {
        position: static;
    }
}
