/* =========================================================
   Caucasus Build Group — styles.css
   ========================================================= */

/* Базовые стили и переменные */
:root{--primary:#1E3A8A;--accent:#F59E0B;--ink:#1F2937;--muted:#64748b;--surface:#f8fafc;--line:#e2e8f0;--header-h:82px}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;color:var(--ink);background:#fff;font-family:Montserrat,"Noto Sans Georgian",sans-serif;line-height:1.6}
body.lang-ka{font-family:"Noto Sans Georgian",Montserrat,sans-serif}
body.menu-open{overflow:hidden}
a{color:inherit;text-decoration:none}
button,input,select,textarea{font:inherit}
img{max-width:100%;display:block}
.container{width:min(1180px,calc(100% - 40px));margin-inline:auto}
.skip-link{position:fixed;top:10px;left:10px;z-index:100;transform:translateY(-150%);background:#fff;padding:10px 14px;border-radius:8px}
.skip-link:focus{transform:none}
.site-header{height:var(--header-h);position:fixed;inset:0 0 auto;z-index:50;background:rgba(255,255,255,.97);border-bottom:1px solid transparent;transition:background .3s ease,box-shadow .3s ease,border-color .3s ease}
.site-header.scrolled{background:rgba(255,255,255,.78);backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px);border-color:rgba(226,232,240,.8);box-shadow:0 8px 30px rgba(15,23,42,.06)}
.header-inner{height:100%;display:flex;align-items:center;justify-content:space-between;gap:22px}
.brand{display:flex;align-items:center;gap:10px;min-width:190px}
.brand-mark{width:42px;height:42px;display:grid;place-items:center;background:var(--primary);color:#fff;font-weight:800;letter-spacing:-1px;border-radius:8px}
.brand-name{font-size:11px;line-height:1.15;letter-spacing:.12em;color:#334155}
.brand-name strong{font-size:12px;color:var(--primary)}
.desktop-nav{display:flex;align-items:center;gap:25px}
.desktop-nav a,.mobile-menu a{font-size:13px;font-weight:600;color:#475569;transition:color .25s}
.desktop-nav a:hover,.desktop-nav a.active,.mobile-menu a:hover{color:var(--primary)}
.header-actions{display:flex;align-items:center;gap:12px}
.language-switcher{display:flex;border:1px solid var(--line);border-radius:7px;padding:2px}
.language-switcher button{border:0;background:transparent;padding:5px 8px;font-size:11px;font-weight:800;color:#64748b;cursor:pointer;border-radius:5px}
.language-switcher button.active{background:var(--primary);color:#fff}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;border:0;border-radius:8px;padding:13px 20px;font-weight:700;font-size:13px;cursor:pointer;transition:transform .3s ease,box-shadow .3s ease,background .3s ease}
.btn:hover{transform:translateY(-2px);box-shadow:0 10px 24px rgba(15,23,42,.13)}
.btn-primary{background:var(--primary);color:#fff}.btn-primary:hover{background:#172f72}
.btn-accent{background:var(--accent);color:#172033}.btn-light{background:#fff;color:var(--primary)}
.menu-toggle{display:none;border:0;background:transparent;width:42px;height:42px;padding:9px;cursor:pointer}
.menu-toggle span{height:2px;background:var(--ink);display:block;margin:5px 0;transition:.25s}
.mobile-menu{display:none}
main{padding-top:var(--header-h);min-height:70vh}
.hero{min-height:calc(100vh - var(--header-h));display:grid;align-items:center;background:linear-gradient(135deg,#1E3A8A 0%,#0f172a 100%);color:#fff}
.hero-content{max-width:760px;padding:90px 0}
.eyebrow{text-transform:uppercase;letter-spacing:.18em;font-size:11px;font-weight:800;color:var(--accent);margin:0 0 16px}
.hero h1{font-size:clamp(42px,7vw,78px);line-height:1.02;letter-spacing:-.045em;margin:0 0 24px;font-weight:800}
.hero p{font-size:clamp(17px,2vw,21px);max-width:680px;color:#e2e8f0;margin:0 0 34px}
.hero-actions{display:flex;flex-wrap:wrap;gap:12px}
.section{padding:100px 0}
.section-muted{background:var(--surface)}
.section-head{max-width:720px;margin-bottom:45px}
.section-title{font-size:clamp(32px,5vw,52px);line-height:1.08;letter-spacing:-.035em;margin:0 0 16px}
.section-text{color:var(--muted);font-size:17px}
.advantages,.services-grid,.project-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:18px}
.advantage,.service-card{border:1px solid var(--line);border-radius:14px;background:#fff;transition:transform .3s ease,box-shadow .3s ease,border-color .3s ease;overflow:hidden}
.advantage:hover,.service-card:hover{transform:translateY(-5px);box-shadow:0 18px 42px rgba(15,23,42,.1);border-color:#cbd5e1}
.advantage{padding:25px}
.icon-box{width:46px;height:46px;border-radius:10px;background:#eff6ff;color:var(--primary);display:grid;place-items:center;font-weight:800;margin-bottom:18px}
.advantage h3,.service-card h3{font-size:17px;margin:0 0 8px}.advantage p,.service-card p{font-size:14px;color:var(--muted);margin:0}
.services-grid{grid-template-columns:repeat(3,1fr)}
.service-card{padding:28px}
.service-number{color:var(--accent);font-size:12px;font-weight:800;letter-spacing:.1em;margin-bottom:24px}
.cta{background:var(--primary);color:#fff;border-radius:18px;padding:60px;display:flex;justify-content:space-between;gap:35px;align-items:center}
.cta h2{font-size:clamp(30px,4vw,46px);line-height:1.08;margin:0 0 12px}.cta p{margin:0;color:#cbd5e1;max-width:620px}
.page-hero{background:#f1f5f9;padding:90px 0 65px}.page-hero h1{font-size:clamp(38px,6vw,64px);line-height:1.05;margin:0}
.filter-bar{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:35px}.filter-btn{border:1px solid var(--line);background:#fff;padding:9px 15px;border-radius:999px;cursor:pointer;font-size:12px;font-weight:700}.filter-btn.active{background:var(--primary);border-color:var(--primary);color:#fff}
.contact-grid{display:grid;grid-template-columns:1fr 1.2fr;gap:50px}.contact-list{display:grid;gap:18px}.contact-item{padding:22px;border:1px solid var(--line);border-radius:12px}.contact-label{font-size:11px;text-transform:uppercase;letter-spacing:.1em;color:var(--muted);font-weight:800}.contact-value{font-size:22px;font-weight:700;color:var(--primary);display:block;margin-top:5px}.map{min-height:440px;border-radius:16px;overflow:hidden;background:#e2e8f0}.map iframe{width:100%;height:100%;min-height:440px;border:0}
.form-layout{display:grid;grid-template-columns:1.15fr .85fr;gap:50px}.form-card{border:1px solid var(--line);border-radius:16px;padding:30px;background:#fff}.field{margin-bottom:18px}.field label{display:block;font-size:12px;font-weight:700;margin-bottom:7px}.field input,.field select,.field textarea{width:100%;border:1px solid #cbd5e1;border-radius:8px;padding:12px 13px;background:#fff;outline:0;transition:border-color .2s,box-shadow .2s}.field textarea{min-height:150px;resize:vertical}.field input:focus,.field select:focus,.field textarea:focus{border-color:var(--primary);box-shadow:0 0 0 3px rgba(30,58,138,.1)}.field.invalid input,.field.invalid select,.field.invalid textarea{border-color:#dc2626}.field-error{color:#dc2626;font-size:11px;margin-top:5px;min-height:16px}.honeypot{position:absolute;left:-10000px;width:1px;height:1px;overflow:hidden}.captcha-box{display:flex;align-items:center;gap:10px;background:#f8fafc;padding:12px;border-radius:8px;margin-bottom:18px}.captcha-box input{max-width:100px}.form-status{display:none;padding:14px;border-radius:9px;margin-top:16px;font-size:13px}.form-status.show{display:block}.form-status.success{background:#dcfce7;color:#166534}.form-status.error{background:#fee2e2;color:#991b1b}.faq{display:grid;gap:10px}.faq details{border:1px solid var(--line);border-radius:10px;padding:17px 20px}.faq summary{cursor:pointer;font-weight:700}.faq p{color:var(--muted);font-size:14px;margin:12px 0 0}
.project-viewer{display:grid;grid-template-columns:1fr 1fr;gap:30px}.viewer-panel{border:1px solid var(--line);border-radius:14px;padding:20px;background:#fff}.viewer-image{width:100%;aspect-ratio:16/10;object-fit:contain;background:#f8fafc;border-radius:10px}.tab-row,.floor-row,.apt-grid{display:flex;flex-wrap:wrap;gap:7px;margin:15px 0}.tab,.floor-btn,.apt-btn{border:1px solid var(--line);background:#fff;border-radius:7px;padding:9px 12px;font-size:12px;font-weight:700;cursor:pointer}.tab.active,.floor-btn.active{background:var(--primary);color:#fff;border-color:var(--primary)}.apt-btn{border-left:5px solid #16a34a}.apt-btn.sold{border-left-color:#dc2626}.apt-btn.reserved{border-left-color:#f59e0b}.apartment-detail{margin-top:18px;padding:18px;background:#f8fafc;border-radius:10px}.spec-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:10px;margin-top:15px}.spec-grid div{font-size:12px;color:var(--muted)}.spec-grid strong{display:block;color:var(--ink);font-size:15px}
.legend{display:flex;gap:15px;flex-wrap:wrap;font-size:12px;margin:15px 0}.legend span{display:flex;align-items:center;gap:6px}.dot{width:9px;height:9px;border-radius:50%}.dot.available{background:#16a34a}.dot.sold{background:#dc2626}.dot.reserved{background:#f59e0b}
.modal-root{position:fixed;inset:0;z-index:100;display:none;background:rgba(2,6,23,.72);padding:25px;overflow:auto}.modal-root.open{display:block}.modal{width:min(1100px,100%);margin:30px auto;background:#fff;border-radius:16px;overflow:hidden;position:relative}.modal-close{position:absolute;right:15px;top:15px;z-index:2;width:38px;height:38px;border:0;border-radius:50%;background:#fff;box-shadow:0 5px 20px rgba(0,0,0,.12);cursor:pointer;font-size:20px}.modal-body{padding:30px}.modal h2{margin-top:0;font-size:32px}.modal-render{width:100%;max-height:500px;object-fit:cover;border-radius:10px;margin-bottom:20px}
.back-to-top{position:fixed;right:20px;bottom:20px;width:44px;height:44px;border:0;border-radius:50%;background:var(--primary);color:#fff;font-size:20px;cursor:pointer;opacity:0;pointer-events:none;transform:translateY(10px);transition:.3s;z-index:40}.back-to-top.visible{opacity:1;pointer-events:auto;transform:none}
.site-footer{background:#0f172a;color:#cbd5e1;padding:60px 0}.footer-grid{display:grid;grid-template-columns:1.5fr 1fr 1fr 1fr;gap:35px}.brand-footer{margin-bottom:20px}.site-footer h3{color:#fff;font-size:12px;text-transform:uppercase;letter-spacing:.1em}.site-footer a,.site-footer span{display:block;font-size:13px;margin:7px 0}.footer-copy{font-size:13px;max-width:280px}
.reveal{opacity:0;transform:translateY(18px);transition:opacity .6s ease,transform .6s ease}.reveal.in{opacity:1;transform:none}
.loading{padding:70px;text-align:center;color:var(--muted)}
[dir="rtl"] .brand-name{letter-spacing:0}

/* =========================================================
   PROJECT CARDS — премиум-стиль
   ========================================================= */

.project-card {
    position: relative;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
    overflow: hidden;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    transition: transform .35s ease, box-shadow .35s ease, border-color .35s ease;
}

.project-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 50px rgba(15, 23, 42, .13);
    border-color: #cbd5e1;
}

.project-card .thumb {
    position: relative;
    aspect-ratio: 16 / 10;
    background-size: cover;
    background-position: center;
    background-color: #e2e8f0;
    overflow: hidden;
}

.project-card .thumb::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(15, 23, 42, 0) 40%,
        rgba(15, 23, 42, .55) 100%
    );
    pointer-events: none;
    transition: opacity .35s ease;
}

.project-card:hover .thumb::after {
    opacity: .85;
}

.project-card .thumb .badge {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 2;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #fff;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    box-shadow: 0 4px 12px rgba(15, 23, 42, .18);
}

.project-card .thumb .badge.badge-ready {
    background: rgba(16, 185, 129, .95);
}

.project-card .thumb .badge.badge-building {
    background: rgba(245, 158, 11, .95);
}

.project-card .body {
    padding: 20px 22px 22px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.project-card h3 {
    margin: 0 0 8px;
    font-size: 19px;
    font-weight: 800;
    letter-spacing: -.015em;
    color: var(--ink);
}

.project-card .meta {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    color: #64748b;
    font-size: 13px;
    margin-bottom: 12px;
}

.project-card .meta span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.project-card .meta svg {
    width: 14px;
    height: 14px;
    color: var(--accent);
    flex-shrink: 0;
}

.project-card .project-location {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #6B7280;
    font-size: 13px;
    margin-bottom: 16px;
}

.project-card .project-location svg {
    width: 14px;
    height: 14px;
}

.project-card .cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
    align-self: flex-start;
    padding: 8px 14px;
    border-radius: 999px;
    background: #f1f5f9;
    color: var(--primary);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .02em;
    transition: background .25s ease, color .25s ease;
}

.project-card .cta svg {
    width: 14px;
    height: 14px;
    transition: transform .25s ease;
}

.project-card:hover .cta {
    background: var(--primary);
    color: #fff;
}

.project-card:hover .cta svg {
    transform: translateX(3px);
}

/* =========================================================
   PROJECT VIEWER — расширение
   ========================================================= */

.project-location {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #6B7280;
    font-size: 13px;
    margin-bottom: 16px;
}

.project-location svg {
    width: 15px;
    height: 15px;
}

.project-summary {
    color: #6B7280;
    margin: 0 0 24px;
}

.project-section-title {
    margin: 20px 0 8px;
    font-size: 16px;
    font-weight: 700;
}

.project-description {
    margin: 0 0 24px;
    color: #4B5563;
    line-height: 1.7;
}

.project-viewer {
    margin-top: 28px;
}

/* =========================================================
   PROJECT GALLERY
   ========================================================= */

.project-gallery {
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid #E5E7EB;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 10px;
    margin-top: 14px;
}

.gallery-item {
    border: 0;
    padding: 0;
    background: #F8FAFC;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 4 / 3;
    transition: transform .25s ease, box-shadow .25s ease;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .35s ease;
}

.gallery-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(15, 23, 42, .15);
}

.gallery-item:hover img {
    transform: scale(1.06);
}

/* =========================================================
   LIGHTBOX
   ========================================================= */

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(2, 6, 23, 0.92);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    animation: fadeIn .2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.lightbox img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, .5);
    animation: zoomIn .25s ease;
}

@keyframes zoomIn {
    from { transform: scale(0.95); opacity: 0; }
    to   { transform: scale(1);    opacity: 1; }
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: absolute;
    z-index: 2;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s ease, transform .2s ease;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    font-family: inherit;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.08);
}

.lightbox-close {
    top: 24px;
    right: 24px;
    font-size: 28px;
}

.lightbox-prev {
    left: 24px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 32px;
}

.lightbox-next {
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 32px;
}

.lightbox-prev:hover { transform: translateY(-50%) scale(1.08); }
.lightbox-next:hover { transform: translateY(-50%) scale(1.08); }

.lightbox-counter {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    font-family: inherit;
}

/* -----------------------------------------
   BUILDING TABS
   ----------------------------------------- */

.building-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 22px;
    flex-wrap: wrap;
}

.building-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 18px;
    border: 2px solid #E5E7EB;
    background: #fff;
    color: #4B5563;
    border-radius: 9px;
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    transition: all .2s ease;
}

.building-tab svg {
    width: 17px;
    height: 17px;
}

.building-tab:hover {
    border-color: #1E3A8A;
    color: #1E3A8A;
}

.building-tab.active {
    background: #1E3A8A;
    border-color: #1E3A8A;
    color: #fff;
}

/* -----------------------------------------
   BUILDING VIEWER
   ----------------------------------------- */

.building-viewer {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 22px;
}

.entrance-panel {
    background: #F8FAFC;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    padding: 16px;
}

.entrance-panel h4 {
    margin: 0 0 12px;
    color: #6B7280;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.entrance-buttons {
    display: grid;
    gap: 8px;
}

.entrance-btn {
    width: 100%;
    padding: 10px 12px;
    background: #fff;
    border: 2px solid #E5E7EB;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    color: #374151;
    transition: all .2s ease;
}

.entrance-btn:hover {
    border-color: #1E3A8A;
}

.entrance-btn.active {
    background: #1E3A8A;
    border-color: #1E3A8A;
    color: #fff;
}

.floor-heading {
    margin-top: 24px !important;
}

.floor-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}

.floor-btn {
    min-height: 38px;
    border: 2px solid #E5E7EB;
    background: #fff;
    border-radius: 7px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 800;
    color: #374151;
    transition: all .2s ease;
}

.floor-btn:hover {
    border-color: #F59E0B;
}

.floor-btn.active {
    background: #F59E0B;
    border-color: #F59E0B;
    color: #fff;
}

.building-main {
    min-width: 0;
}

/* -----------------------------------------
   FLOOR PLAN
   ----------------------------------------- */

.plan-view {
    background: #fff;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    padding: 18px;
    overflow: hidden;
}

.floor-plan-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 15px;
    color: #374151;
}

.floor-plan-header strong {
    font-size: 15px;
}

.floor-plan-header span {
    color: #6B7280;
}

.floor-area {
    font-weight: 700;
}

.generated-plan {
    display: block;
    width: 100%;
    height: auto;
}

.real-plan {
    width: 100%;
    overflow: hidden;
    border-radius: 8px;
    background: #F8FAFC;
}

.real-plan img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
}

.plan-fallback {
    padding: 60px 20px;
    text-align: center;
    color: #94a3b8;
    font-size: 13px;
    font-weight: 700;
    background: #F8FAFC;
    border-radius: 8px;
}

/* -----------------------------------------
   APARTMENTS
   ----------------------------------------- */

.apartment {
    cursor: pointer;
    outline: none;
    transition: opacity .15s ease;
}

.apartment:hover,
.apartment:focus {
    opacity: .78;
}

.apartment .apt-bg {
    transition: fill .2s ease;
}

.apartment-available .apt-bg {
    fill: #DBEAFE;
}

.apartment-reserved .apt-bg {
    fill: #FEF3C7;
}

.apartment-sold .apt-bg {
    fill: #FEE2E2;
}

.apt-number {
    font-size: 16px;
    font-weight: 800;
    fill: #1F2937;
    pointer-events: none;
}

.apt-info {
    font-size: 11px;
    font-weight: 600;
    fill: #374151;
    pointer-events: none;
}

.apt-area {
    font-size: 10px;
    fill: #6B7280;
    pointer-events: none;
}

/* -----------------------------------------
   LEGEND
   ----------------------------------------- */

.legend {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    margin-top: 14px;
    color: #6B7280;
    font-size: 12px;
}

.legend-item {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.legend-dot {
    width: 13px;
    height: 13px;
    border-radius: 4px;
    flex: 0 0 auto;
}

.available-dot { background: #DBEAFE; }
.reserved-dot  { background: #FEF3C7; }
.sold-dot      { background: #FEE2E2; }

/* -----------------------------------------
   APARTMENT DETAIL
   ----------------------------------------- */

.apt-detail {
    margin-top: 20px;
    background: #F8FAFC;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    padding: 20px;
}

.apt-detail-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 20px;
}

.detail-kicker {
    display: block;
    margin-bottom: 3px;
    color: #6B7280;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.apt-detail h3 {
    margin: 0;
    font-size: 24px;
    font-weight: 800;
}

.apt-detail-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 15px;
}

.apt-detail-item {
    background: #fff;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    padding: 12px;
}

.apt-detail-item .label {
    margin-bottom: 4px;
    color: #6B7280;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
}

.apt-detail-item .value {
    color: #1F2937;
    font-size: 17px;
    font-weight: 800;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 11px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
}

.status-available { background: #DBEAFE; color: #1E40AF; }
.status-reserved  { background: #FEF3C7; color: #92400E; }
.status-sold      { background: #FEE2E2; color: #991B1B; }

/* -----------------------------------------
   APARTMENT PLAN
   ----------------------------------------- */

.apartment-plan-box {
    margin-top: 22px;
    padding-top: 20px;
    border-top: 1px solid #E5E7EB;
}

.apartment-plan-title {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 12px;
    font-size: 14px;
    font-weight: 800;
}

.apartment-plan-title svg {
    width: 17px;
    height: 17px;
    color: #1E3A8A;
}

.apartment-plan {
    background: #fff;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    padding: 10px;
    overflow: hidden;
}

.apartment-plan svg,
.apartment-plan img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 6px;
}

/* -----------------------------------------
   GARAGE
   ----------------------------------------- */

.garage-view {
    background: #1F2937;
    color: #fff;
    border-radius: 12px;
    padding: 22px;
}

.garage-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.garage-header h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 5px;
    font-size: 18px;
}

.garage-header h3 svg {
    width: 20px;
    height: 20px;
}

.garage-header p {
    margin: 0;
    color: #9CA3AF;
    font-size: 13px;
}

.garage-plan-image {
    margin: 16px 0;
    background: #374151;
    border-radius: 8px;
    padding: 10px;
    overflow: hidden;
}

.garage-plan-image img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 6px;
}

.garage-legend {
    display: flex;
    gap: 18px;
    margin: 18px 0;
    color: #D1D5DB;
    font-size: 12px;
}

.garage-legend span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.garage-dot {
    width: 12px;
    height: 12px;
    border-radius: 3px;
}

.garage-dot.available { background: #10B981; }
.garage-dot.taken     { background: #EF4444; }

.garage-grid {
    display: grid;
    grid-template-columns: repeat(10, minmax(0, 1fr));
    gap: 6px;
}

.parking-spot {
    aspect-ratio: 1;
    border: 1px solid #4B5563;
    border-radius: 5px;
    background: #374151;
    color: #fff;
    cursor: pointer;
    font-family: inherit;
    font-size: 10px;
    font-weight: 800;
    transition: transform .15s ease;
}

.parking-spot:hover {
    transform: scale(1.06);
}

.parking-spot.available {
    background: #059669;
    border-color: #10B981;
}

.parking-spot.taken {
    background: #DC2626;
    border-color: #EF4444;
}

/* =========================================================
   MODAL — основная логика
   ========================================================= */

body.modal-open {
    overflow: hidden;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: none;
    background: rgba(2, 6, 23, 0.72);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    padding: 25px;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.modal-overlay.open {
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.modal {
    position: relative;
    width: min(1100px, 100%);
    margin: 0 auto;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(15, 23, 42, 0.25);
    max-height: calc(100vh - 50px);
    overflow-y: auto;
}

.modal-hero {
    height: 300px;
    background-size: cover;
    background-position: center;
    background-color: #E5E7EB;
    border-radius: 16px 16px 0 0;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 10;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    color: #1F2937;
    font-size: 22px;
    font-weight: 400;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.18);
    transition: transform 0.2s ease, background 0.2s ease;
    font-family: inherit;
}

.modal-close:hover {
    background: #fff;
    transform: scale(1.08);
}

.modal-close:focus-visible {
    outline: 2px solid #F59E0B;
    outline-offset: 2px;
}

.modal-body {
    padding: 30px;
}

.modal h2 {
    margin-top: 0;
    font-size: 32px;
}

/* =========================================================
   Планшет / мобильные
   ========================================================= */

@media (max-width: 1024px) {
    .desktop-nav { gap: 15px; }
    .header-call { display: none; }
    .advantages { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
    .project-viewer,
    .form-layout,
    .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
    .building-viewer { grid-template-columns: 1fr; }

    .entrance-panel {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 15px;
        align-items: start;
    }

    .entrance-panel h4 {
        grid-column: 1 / -1;
        margin-bottom: 0;
    }

    .floor-heading { margin-top: 0 !important; }

    .floor-list {
        grid-column: 1 / -1;
        grid-template-columns: repeat(9, minmax(38px, 1fr));
    }
}

@media (max-width: 768px) {
    :root { --header-h: 72px; }
    .container { width: min(100% - 28px, 1180px); }
    .desktop-nav,
    .language-switcher { display: none; }
    .menu-toggle { display: block; }

    .mobile-menu {
        position: fixed;
        top: var(--header-h);
        right: 0;
        width: min(360px, 90vw);
        height: calc(100vh - var(--header-h));
        background: #fff;
        padding: 35px 25px;
        display: flex;
        flex-direction: column;
        gap: 30px;
        transform: translateX(100%);
        transition: transform .3s ease;
        box-shadow: -20px 0 40px rgba(15, 23, 42, .1);
        z-index: 45;
    }

    .mobile-menu.open { transform: none; }
    .mobile-menu nav { display: grid; gap: 20px; }
    .mobile-menu a { font-size: 18px; }

    .header-actions { margin-left: auto; }
    .hero-content { padding: 70px 0; }
    .section { padding: 75px 0; }
    .advantages,
    .services-grid,
    .project-grid { grid-template-columns: 1fr; }
    .cta { padding: 35px; display: block; }
    .cta .btn { margin-top: 25px; }
    .page-hero { padding: 65px 0 45px; }
    .form-card { padding: 20px; }
    .footer-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
    .modal-overlay { padding: 10px; }
    .modal { max-height: calc(100vh - 20px); border-radius: 14px; }
    .modal-hero { height: 180px; }
    .modal-body { padding: 16px; }

    .modal-close {
        width: 36px;
        height: 36px;
        font-size: 20px;
        top: 10px;
        right: 10px;
    }

    .apt-detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .floor-list { grid-template-columns: repeat(5, 1fr); }
    .garage-grid { grid-template-columns: repeat(5, 1fr); }
    .floor-plan-header { flex-direction: column; align-items: flex-start; }
    .apt-detail-header { flex-direction: column; }

    .gallery-grid { grid-template-columns: repeat(2, 1fr); }

    .lightbox { padding: 15px; }
    .lightbox-close {
        top: 12px;
        right: 12px;
        width: 40px;
        height: 40px;
    }
    .lightbox-prev,
    .lightbox-next {
        width: 40px;
        height: 40px;
        font-size: 26px;
    }
    .lightbox-prev { left: 10px; }
    .lightbox-next { right: 10px; }
}

@media (max-width: 480px) {
    .hero h1 { font-size: 40px; }
    .hero-actions,
    .hero-actions .btn { width: 100%; }
    .contact-value { font-size: 18px; }
    .modal-overlay { padding: 8px; }
    .modal-body { padding: 20px; }
    .spec-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        scroll-behavior: auto !important;
        transition: none !important;
        animation: none !important;
    }
}