:root {
    --cg-ink: #13233a;
    --cg-muted: #667182;
    --cg-blue: #316bff;
    --cg-blue-dark: #1d4fc9;
    --cg-sand: #316bff;
    --cg-milk: #f4f6f9;
    --cg-paper: #ffffff;
    --cg-line: rgba(23, 32, 43, .12);
    --cg-radius-lg: 28px;
    --cg-radius-md: 18px;
    --cg-shadow: 0 24px 70px rgba(23, 32, 43, .12);
}

/* Unified site header: one level, one geometry, no competing promo button. */
.header,
.header._transparent,
.header.no-top {
    min-height: 88px;
    border-bottom: 1px solid rgba(19, 35, 58, .1) !important;
    background: rgba(255, 255, 255, .94) !important;
    box-shadow: 0 10px 36px rgba(20, 43, 79, .06);
    backdrop-filter: blur(18px);
}

.header .header-top {
    display: none !important;
}

.header .header-wrapper {
    width: min(1440px, calc(100% - 96px));
    min-width: 0;
    max-width: 1440px;
    padding: 0;
}

.header .navigation,
.header.no-top .navigation {
    min-height: 88px;
    padding: 14px 0 !important;
    align-items: center;
}

.header .navigation-left {
    gap: 36px;
    align-items: center;
}

.header .navigation-left .logo {
    width: 172px;
    margin: 0;
}

.header .navigation-left .logo svg {
    display: block;
    width: 100%;
    height: auto;
}

.header .logo svg path.c1 {
    fill: #445f94 !important;
}

.header .logo svg path.c2 {
    fill: #316bff !important;
}

.header .nav {
    display: flex;
    gap: 26px;
    align-items: center;
    margin: 0;
    padding: 0;
}

.header .nav li {
    margin: 0;
}

.header .nav a,
.header._transparent .nav a,
.header.no-top .nav a {
    color: #13233a !important;
    font-size: 13px;
    font-weight: 650;
}

.header .nav a:hover {
    color: #316bff !important;
}

.header .navigation-right {
    gap: 10px;
}

.header .navigation-right a {
    margin: 0 !important;
}

.header .navigation-right .promos-btn {
    display: none !important;
}

.header .navigation-right a.act-btn {
    min-height: 46px;
    padding: 0 20px;
    border-radius: 12px;
    background: #316bff;
    font-size: 13px;
    font-weight: 750;
}

.header .navigation-right .favorites-icon,
.header .navigation-right .menu-icon {
    width: 46px;
    height: 46px;
    border: 1px solid rgba(19, 35, 58, .1);
    border-radius: 12px;
    background: #f4f6f9;
}

.menu-opened .header,
.menu-opened .header._transparent,
.menu-opened .header.no-top {
    border-color: transparent !important;
    background: transparent !important;
    box-shadow: none;
    backdrop-filter: none;
}

.cg-page {
    min-height: 100vh;
    padding-top: 88px;
    background:
        radial-gradient(circle at 82% 8%, rgba(49, 107, 255, .1), transparent 28rem),
        linear-gradient(180deg, #fff 0, #f4f6f9 44rem, #fff 100%);
    color: var(--cg-ink);
    font-family: Montserrat, Arial, sans-serif;
}

.cg-shell {
    width: min(1440px, calc(100% - 120px));
    margin: 0 auto;
}

.cg-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(360px, .95fr);
    gap: 64px;
    align-items: end;
    padding: 76px 0 64px;
}

.cg-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 22px;
    color: var(--cg-blue-dark);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.cg-eyebrow::before {
    width: 32px;
    height: 2px;
    background: var(--cg-sand);
    content: "";
}

.cg-title {
    max-width: 900px;
    margin: 0;
    font-family: Unbounded, Montserrat, sans-serif;
    font-size: clamp(42px, 5vw, 82px);
    font-weight: 600;
    letter-spacing: -.055em;
    line-height: .98;
}

.cg-title em {
    color: var(--cg-sand);
    font-style: normal;
}

.cg-lead {
    max-width: 630px;
    margin: 0 0 8px;
    color: var(--cg-muted);
    font-size: clamp(17px, 1.4vw, 22px);
    line-height: 1.55;
}

.cg-note {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    margin-top: 26px;
    padding: 18px 20px;
    border: 1px solid rgba(217, 174, 105, .45);
    border-radius: 18px;
    background: rgba(255, 251, 242, .92);
    color: #665134;
    font-size: 13px;
    line-height: 1.45;
}

.cg-note::before {
    flex: 0 0 auto;
    content: "i";
    display: grid;
    width: 22px;
    height: 22px;
    place-items: center;
    border-radius: 50%;
    background: var(--cg-sand);
    color: #fff;
    font-weight: 800;
}

.cg-section {
    padding: 70px 0;
}

.cg-section--soft {
    background: #edf1f7;
}

.cg-section-head {
    display: flex;
    gap: 32px;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 34px;
}

.cg-section-title {
    max-width: 900px;
    margin: 0;
    font-family: Unbounded, Montserrat, sans-serif;
    font-size: clamp(30px, 3vw, 52px);
    font-weight: 550;
    letter-spacing: -.045em;
    line-height: 1.08;
}

.cg-section-copy {
    max-width: 620px;
    margin: 14px 0 0;
    color: var(--cg-muted);
    font-size: 16px;
    line-height: 1.65;
}

.cg-pill {
    display: inline-flex;
    padding: 9px 13px;
    border-radius: 999px;
    background: rgba(57, 117, 246, .1);
    color: var(--cg-blue-dark);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.cg-gallery {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 20px;
}

.cg-gallery-card {
    position: relative;
    grid-column: span 6;
    min-height: 480px;
    overflow: hidden;
    border: 0;
    border-radius: var(--cg-radius-lg);
    background: #dfe5ec;
    color: #fff;
    cursor: zoom-in;
    text-align: left;
    box-shadow: var(--cg-shadow);
}

.cg-gallery-card--wide {
    grid-column: span 8;
}

.cg-gallery-card--narrow {
    grid-column: span 4;
}

.cg-gallery-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .7s cubic-bezier(.2, .8, .2, 1);
}

.cg-gallery-card::after {
    position: absolute;
    inset: 35% 0 0;
    background: linear-gradient(180deg, transparent, rgba(10, 16, 24, .82));
    content: "";
}

.cg-gallery-card:hover img {
    transform: scale(1.035);
}

.cg-gallery-card__content {
    position: absolute;
    z-index: 2;
    right: 28px;
    bottom: 28px;
    left: 28px;
}

.cg-gallery-card__title {
    display: block;
    margin-top: 12px;
    font-family: Unbounded, Montserrat, sans-serif;
    font-size: clamp(22px, 2.3vw, 38px);
    font-weight: 500;
    letter-spacing: -.035em;
}

.cg-spec-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-top: 30px;
}

.cg-spec {
    min-height: 126px;
    padding: 24px;
    border: 1px solid var(--cg-line);
    border-radius: var(--cg-radius-md);
    background: rgba(255, 255, 255, .74);
}

.cg-spec strong {
    display: block;
    margin-bottom: 8px;
    font-family: Unbounded, Montserrat, sans-serif;
    font-size: 16px;
    font-weight: 550;
}

.cg-spec span {
    color: var(--cg-muted);
    font-size: 14px;
    line-height: 1.45;
}

.cg-compare-form {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
    gap: 12px;
    margin: 18px 0 38px;
    padding: 18px;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 14px 40px rgba(23, 32, 43, .08);
}

.cg-select {
    width: 100%;
    min-height: 52px;
    padding: 0 42px 0 16px;
    border: 1px solid var(--cg-line);
    border-radius: 12px;
    background: #f6f7fa;
    color: var(--cg-ink);
    font: 600 13px Montserrat, sans-serif;
}

.cg-button {
    display: inline-flex;
    min-height: 52px;
    padding: 0 24px;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 14px;
    background: var(--cg-blue);
    color: #fff;
    font: 700 14px Montserrat, sans-serif;
    text-decoration: none;
    cursor: pointer;
    transition: transform .2s ease, background .2s ease;
}

.cg-button:hover {
    background: var(--cg-blue-dark);
    transform: translateY(-2px);
}

.cg-compare-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.cg-apartment {
    overflow: hidden;
    border: 1px solid var(--cg-line);
    border-radius: 28px;
    background: #fff;
    box-shadow: 0 16px 46px rgba(23, 32, 43, .08);
}

.cg-apartment__plan {
    display: grid;
    min-height: 360px;
    padding: 28px;
    place-items: center;
    background: #f7f8fb;
}

.cg-apartment__plan img {
    width: 100%;
    max-height: 310px;
    object-fit: contain;
}

.cg-apartment__body {
    padding: 26px;
}

.cg-apartment__meta {
    color: var(--cg-blue-dark);
    font-size: 12px;
    font-weight: 750;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.cg-apartment__title {
    margin: 10px 0 22px;
    font-family: Unbounded, Montserrat, sans-serif;
    font-size: 25px;
    font-weight: 550;
    letter-spacing: -.035em;
}

.cg-apartment__facts {
    display: grid;
    gap: 0;
    margin: 0;
}

.cg-apartment__fact {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding: 13px 0;
    border-top: 1px solid var(--cg-line);
    color: var(--cg-muted);
    font-size: 13px;
}

.cg-apartment__fact strong {
    color: var(--cg-ink);
    font-weight: 700;
    text-align: right;
}

.cg-apartment__price {
    margin: 22px 0 0;
    font-family: Unbounded, Montserrat, sans-serif;
    font-size: 23px;
    font-weight: 600;
}

.cg-apartment__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 20px;
}

.cg-mini-gallery {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 20px;
}

.cg-mini-gallery button {
    position: relative;
    height: 116px;
    overflow: hidden;
    padding: 0;
    border: 0;
    border-radius: 14px;
    cursor: zoom-in;
}

.cg-mini-gallery img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cg-mini-gallery span {
    position: absolute;
    right: 8px;
    bottom: 8px;
    left: 8px;
    padding: 6px 8px;
    border-radius: 9px;
    background: rgba(12, 18, 28, .72);
    color: #fff;
    font-size: 10px;
    font-weight: 650;
}

.cg-lightbox {
    position: fixed;
    z-index: 100000;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background: rgba(8, 13, 20, .94);
}

.cg-lightbox.is-open {
    display: flex;
}

.cg-lightbox__figure {
    max-width: min(1500px, 94vw);
    margin: 0;
}

.cg-lightbox__image {
    display: block;
    max-width: 100%;
    max-height: 82vh;
    border-radius: 18px;
    box-shadow: 0 30px 100px rgba(0, 0, 0, .5);
}

.cg-lightbox__caption {
    margin-top: 16px;
    color: #fff;
    font: 500 14px/1.5 Montserrat, sans-serif;
    text-align: center;
}

.cg-lightbox__close,
.cg-lightbox__nav {
    position: absolute;
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .28);
    border-radius: 50%;
    background: rgba(255, 255, 255, .1);
    color: #fff;
    font: 300 28px/1 Arial, sans-serif;
    cursor: pointer;
}

.cg-lightbox__close { top: 24px; right: 24px; }
.cg-lightbox__nav--prev { left: 24px; }
.cg-lightbox__nav--next { right: 24px; }

@media (max-width: 1500px) {
    .nav-secondary-link { display: none; }
}

@media (max-width: 1180px) {
    .header .header-wrapper { width: calc(100% - 48px); }
    .header .navigation-left { gap: 22px; }
    .header .nav { gap: 18px; }
    .header .nav a { font-size: 12px; }
}

@media (max-width: 980px) {
    .header,
    .header._transparent,
    .header.no-top { min-height: 74px; }
    .header .header-wrapper { width: calc(100% - 32px); }
    .header .navigation,
    .header.no-top .navigation { min-height: 74px; padding: 10px 0 !important; }
    .header .navigation-left .logo { width: 136px; }
    .header .navigation-left .nav { display: none; }
    .header .navigation-right > .act-btn { display: none; }
    .header .navigation-right .favorites-icon,
    .header .navigation-right .menu-icon { width: 42px; height: 42px; }
    .cg-page { padding-top: 74px; }
    .cg-shell { width: min(100% - 36px, 760px); }
    .cg-hero { grid-template-columns: 1fr; gap: 30px; padding: 52px 0 40px; }
    .cg-gallery-card,
    .cg-gallery-card--wide,
    .cg-gallery-card--narrow { grid-column: span 12; min-height: 390px; }
    .cg-spec-grid { grid-template-columns: 1fr 1fr; }
    .cg-compare-form { grid-template-columns: 1fr; }
    .cg-compare-grid { grid-template-columns: 1fr; }
    .cg-apartment__plan { min-height: 300px; }
}

@media (max-width: 560px) {
    .cg-page { padding-top: 74px; }
    .header .header-wrapper { width: calc(100% - 24px); }
    .header .navigation-right { gap: 8px; }
    .header .navigation-right .favorites-icon { display: none; }
    .header .navigation-right .menu-icon { margin-left: 0; }
    .cg-shell { width: calc(100% - 24px); }
    .cg-title { font-size: 38px; }
    .cg-section { padding: 48px 0; }
    .cg-section-head { align-items: flex-start; flex-direction: column; }
    .cg-gallery-card { min-height: 320px; border-radius: 24px; }
    .cg-gallery-card__content { right: 18px; bottom: 18px; left: 18px; }
    .cg-spec-grid { grid-template-columns: 1fr; }
    .cg-lightbox { padding: 12px; }
    .cg-lightbox__nav { display: none; }
    .cg-lightbox__close { top: 12px; right: 12px; }
}
