/* ===== Переменные ===== */
:root {
    --primary:     #1D4ED8;
    --primary-dark:#1E40AF;
    --accent:      #F59E0B;
    --green:       #25D366;
    --tg:          #2AABEE;
    --bg:          #F8FAFC;
    --card-bg:     #FFFFFF;
    --text:        #1E293B;
    --text-muted:  #64748B;
    --border:      #E2E8F0;
    --shadow:      0 2px 16px rgba(0,0,0,.08);
    --shadow-lg:   0 8px 32px rgba(0,0,0,.12);
    --radius:      16px;
    --radius-sm:   8px;
    --transition:  .2s ease;
}

/* ===== Сброс и база ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font: inherit; }

.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== Кнопки ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    transition: var(--transition);
    white-space: nowrap;
}

.btn svg { width: 18px; height: 18px; flex-shrink: 0; }

.btn--primary {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 16px rgba(29,78,216,.35);
}
.btn--primary:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(29,78,216,.4); }

.btn--outline {
    border: 2px solid rgba(255,255,255,.6);
    color: #fff;
    backdrop-filter: blur(4px);
}
.btn--outline:hover { background: rgba(255,255,255,.15); }

.btn--large { padding: 16px 36px; font-size: 1.1rem; }

/* ===== Секции ===== */
.section-title {
    font-size: clamp(1.6rem, 4vw, 2.2rem);
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
}

.section-subtitle {
    font-size: 1.05rem;
    color: var(--text-muted);
    margin-bottom: 40px;
}

/* ===== Шапка ===== */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255,255,255,.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 1px 8px rgba(0,0,0,.06);
}

.header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    gap: 16px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--primary);
}

.logo__icon { width: 28px; height: 28px; flex-shrink: 0; }

.header__nav {
    display: flex;
    gap: 28px;
}

.nav__link {
    font-size: .95rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: color var(--transition);
}
.nav__link:hover { color: var(--primary); }

.header__phone {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: .95rem;
    color: var(--primary);
    padding: 8px 18px;
    border: 2px solid var(--primary);
    border-radius: 50px;
    transition: var(--transition);
    white-space: nowrap;
}
.header__phone svg { width: 16px; height: 16px; }
.header__phone:hover { background: var(--primary); color: #fff; }

/* ===== Герой ===== */
.hero {
    position: relative;
    background: linear-gradient(135deg, #1D4ED8 0%, #1E3A8A 60%, #1E293B 100%);
    padding: 80px 0 0;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero__inner {
    position: relative;
    text-align: center;
    padding-bottom: 60px;
}

.hero__title {
    font-size: clamp(2rem, 6vw, 3.2rem);
    font-weight: 800;
    color: #fff;
    margin-bottom: 16px;
    line-height: 1.15;
}

.hero__subtitle {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    color: rgba(255,255,255,.8);
    margin-bottom: 36px;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
}

.hero__actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.hero__wave {
    position: relative;
    line-height: 0;
}
.hero__wave svg { width: 100%; height: 60px; }

/* ===== Преимущества ===== */
.features {
    padding: 40px 0;
    background: var(--bg);
}

.features__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.feature {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 24px 16px;
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    gap: 12px;
}

.feature__icon { font-size: 2rem; }
.feature__text { font-size: .9rem; font-weight: 500; color: var(--text); line-height: 1.4; }

/* ===== Квартиры ===== */
.apartments {
    padding: 60px 0 80px;
    background: var(--bg);
}

.apartments__list {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

/* ===== Карточка квартиры ===== */
.apt-card {
    display: grid;
    grid-template-columns: 480px 1fr;
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: box-shadow var(--transition);
}
.apt-card:hover { box-shadow: var(--shadow-lg); }

/* ===== Слайдер ===== */
.slider {
    position: relative;
    overflow: hidden;
    background: #E2E8F0;
    aspect-ratio: 4/3;
    max-height: 360px;
}

.slider__track {
    display: flex;
    height: 100%;
    transition: transform .4s cubic-bezier(.25,.46,.45,.94);
}

.slider__slide {
    flex: 0 0 100%;
    height: 100%;
    overflow: hidden;
}

.slider__slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slider__slide--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #F1F5F9;
}

.placeholder-photo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: #94A3B8;
}
.placeholder-photo svg { width: 64px; height: 64px; }
.placeholder-photo span { font-size: .9rem; }

.slider__btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,.2);
    z-index: 10;
    transition: var(--transition);
}
.slider__btn:hover { background: #fff; transform: translateY(-50%) scale(1.05); }
.slider__btn svg { width: 20px; height: 20px; color: var(--text); }
.slider__btn--prev { left: 12px; }
.slider__btn--next { right: 12px; }

.slider__dots {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 10;
}

.slider__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,.6);
    transition: var(--transition);
    padding: 0;
}
.slider__dot.active { background: #fff; transform: scale(1.2); }

.apt-card__price-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--accent);
    color: #fff;
    font-weight: 800;
    font-size: 1.1rem;
    padding: 6px 14px;
    border-radius: 50px;
    box-shadow: 0 2px 8px rgba(0,0,0,.2);
    line-height: 1;
    z-index: 10;
}
.apt-card__price-badge span { font-size: .7rem; font-weight: 400; opacity: .9; }

/* ===== Тело карточки ===== */
.apt-card__body {
    padding: 28px 32px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.apt-card__title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.2;
}

.apt-card__meta { display: flex; gap: 12px; flex-wrap: wrap; }

.apt-card__address {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: .9rem;
    color: var(--text-muted);
}
.apt-card__address svg { width: 14px; height: 14px; flex-shrink: 0; }

.apt-card__specs {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.spec {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: .85rem;
    color: var(--text-muted);
    font-weight: 500;
}
.spec svg { width: 14px; height: 14px; }

.apt-card__desc {
    font-size: .95rem;
    color: var(--text-muted);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ===== Удобства ===== */
.apt-card__amenities {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
}

.amenity {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: .8rem;
    color: var(--text);
    background: var(--bg);
    border: 1px solid var(--border);
    padding: 4px 10px;
    border-radius: 50px;
}
.amenity span { font-size: .8rem; }

/* ===== Контактные кнопки ===== */
.apt-card__contacts {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: auto;
    padding-top: 8px;
    border-top: 1px solid var(--border);
}

.contact-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 10px 18px;
    border-radius: 50px;
    font-size: .9rem;
    font-weight: 600;
    transition: var(--transition);
    flex: 1;
    justify-content: center;
    min-width: 120px;
}
.contact-btn svg { width: 18px; height: 18px; flex-shrink: 0; }

.contact-btn--phone {
    background: var(--primary);
    color: #fff;
}
.contact-btn--phone:hover { background: var(--primary-dark); transform: translateY(-1px); }

.contact-btn--whatsapp {
    background: var(--green);
    color: #fff;
}
.contact-btn--whatsapp:hover { filter: brightness(1.1); transform: translateY(-1px); }

.contact-btn--telegram {
    background: var(--tg);
    color: #fff;
}
.contact-btn--telegram:hover { filter: brightness(1.1); transform: translateY(-1px); }

/* ===== Контакты ===== */
.contacts {
    background: linear-gradient(135deg, #F0F9FF 0%, #EFF6FF 100%);
    padding: 80px 0;
    border-top: 1px solid var(--border);
}

.contacts__inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.contacts__text {
    color: var(--text-muted);
    font-size: 1.05rem;
    margin-bottom: 32px;
    line-height: 1.7;
}

.contacts__links {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.contacts__link {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 2px solid transparent;
}

.contacts__link:hover { transform: translateX(4px); border-color: var(--border); }
.contacts__link--phone:hover { border-color: var(--primary); }
.contacts__link--whatsapp:hover { border-color: var(--green); }
.contacts__link--telegram:hover { border-color: var(--tg); }

.contacts__link-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.contacts__link-icon svg { width: 24px; height: 24px; }

.contacts__link--phone .contacts__link-icon { background: #EFF6FF; color: var(--primary); }
.contacts__link--whatsapp .contacts__link-icon { background: #F0FDF4; color: var(--green); }
.contacts__link--telegram .contacts__link-icon { background: #F0F9FF; color: var(--tg); }

.contacts__link-label { font-size: .8rem; color: var(--text-muted); margin-bottom: 2px; }
.contacts__link-value { font-size: 1rem; font-weight: 600; color: var(--text); }

/* ===== CTA карточка ===== */
.cta-card {
    background: var(--primary);
    color: #fff;
    border-radius: var(--radius);
    padding: 40px;
    text-align: center;
    box-shadow: 0 12px 40px rgba(29,78,216,.3);
}

.cta-card__emoji { font-size: 3rem; margin-bottom: 16px; }
.cta-card h3 { font-size: 1.5rem; font-weight: 700; margin-bottom: 12px; }
.cta-card p { opacity: .85; margin-bottom: 28px; line-height: 1.6; }
.cta-card .btn--primary { background: #fff; color: var(--primary); width: 100%; justify-content: center; }
.cta-card .btn--primary:hover { background: #F0F9FF; }

/* ===== SEO-блок + FAQ ===== */
.seo-block {
    background: #fff;
    padding: 60px 0;
    border-top: 1px solid var(--border);
}

.seo-block__inner {
    max-width: 800px;
}

.seo-text h2, .faq h2 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 16px;
}

.seo-text p {
    font-size: .9rem;
    color: var(--text-muted);
    line-height: 1.8;
    margin-bottom: 12px;
}

.faq { display: flex; flex-direction: column; gap: 0; }

.faq__item {
    border-bottom: 1px solid var(--border);
    padding: 14px 0;
}

.faq__q {
    font-size: .92rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
    cursor: default;
}

.faq__a {
    font-size: .88rem;
    color: var(--text-muted);
    line-height: 1.7;
}

@media (max-width: 768px) {
    .seo-block__inner { grid-template-columns: 1fr; gap: 32px; }
}

/* ===== Подвал ===== */
.footer {
    background: var(--text);
    color: rgba(255,255,255,.6);
    padding: 28px 0;
}

.footer__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.footer__logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #fff;
}
.footer__logo .logo__icon { width: 22px; height: 22px; }

.footer__copy { font-size: .85rem; }

.footer__top {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}
.footer__top:hover { background: rgba(255,255,255,.2); transform: translateY(-2px); }
.footer__top svg { width: 20px; height: 20px; color: #fff; }

/* ===== FAB кнопка (мобильная) ===== */
.fab-call {
    display: none;
    position: fixed;
    bottom: 24px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(29,78,216,.5);
    z-index: 200;
    transition: var(--transition);
    animation: pulse 2s infinite;
}

.fab-call svg { width: 26px; height: 26px; }
.fab-call:hover { transform: scale(1.1); }

@keyframes pulse {
    0%, 100% { box-shadow: 0 4px 20px rgba(29,78,216,.5); }
    50% { box-shadow: 0 4px 32px rgba(29,78,216,.8); }
}

/* ===== Адаптив ===== */
@media (max-width: 900px) {
    .apt-card {
        grid-template-columns: 1fr;
    }
    .slider {
        aspect-ratio: 16/9;
        max-height: 280px;
    }
    .contacts__inner {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .features__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .header__nav { display: none; }
    .header__phone span { display: none; }
    .header__phone { padding: 8px 12px; }
    .logo { font-size: .8rem; }
    .logo__icon { width: 22px; height: 22px; }

    .hero { padding: 60px 0 0; }
    .hero__actions { flex-direction: column; align-items: center; }
    .btn { width: 100%; max-width: 320px; justify-content: center; }

    .features__grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .feature { padding: 18px 12px; }

    .apt-card__body { padding: 20px; }
    .apt-card__title { font-size: 1.2rem; }
    .contact-btn { padding: 10px 12px; font-size: .85rem; min-width: auto; }

    .contacts { padding: 50px 0; }
    .cta-card { padding: 28px 20px; }

    .fab-call { display: flex; }
    .footer__inner { justify-content: center; text-align: center; }
    .footer__top { display: none; }
}

@media (max-width: 360px) {
    .apt-card__contacts { flex-direction: column; }
    .contact-btn { min-width: 100%; }
}
