/* --- RESET & BASE --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #2a1a1a;
    color: #ffffff;
    line-height: 1.4;
}

/* --- HEADER --- */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 40px;
    background-color: #3d2626;
    border-radius: 0 0 30px 30px;
    margin: 0 100px;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

body {
    padding-top: 80px;
}

.header-nav {
    display: flex;
    gap: 140px;
    align-items: center;
}

.nav-link {
    color: #c4a882;
    text-decoration: none;
    font-size: 18px;
    letter-spacing: 1px;
    text-transform: lowercase;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: #e8c4a0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: #e8c4a0;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.logo-link {
    display: block;
    text-decoration: none;
}

.logo-img {
    height: 50px;
    width: auto;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-main {
    font-size: 22px;
    font-weight: bold;
    letter-spacing: 2px;
    color: #ffffff;
}

.logo-sub {
    font-size: 10px;
    letter-spacing: 3px;
    color: #c4a882;
    text-transform: uppercase;
}

.header-right {
    display: flex;
    gap: 15px;
    align-items: center;
}

.btn-call-me {
    background-color: #5a3a3a;
    color: #c4a882;
    text-decoration: none;
    padding: 10px 25px;
    border-radius: 20px;
    font-size: 14px;
    letter-spacing: 1px;
    border: 1px solid #7a5a5a;
    transition: all 0.3s ease;
}

.btn-call-me:hover {
    background-color: #7a5a5a;
}

.phone-number {
    background-color: #5a3a3a;
    color: #c4a882;
    text-decoration: none;
    padding: 10px 25px;
    border-radius: 20px;
    font-size: 14px;
    letter-spacing: 1px;
    border: 1px solid #7a5a5a;
    transition: all 0.3s ease;
}

.phone-number:hover {
    background-color: #7a5a5a;
}

/* --- HERO SECTION --- */
.hero {
    background-color: #3d2626;
    border-radius: 30px;
    margin: 20px 100px;
    padding: 40px 60px 0;
    position: relative;
    overflow: hidden;
    min-height: 400px;
}

.hero-content {
    display: flex;
    align-items: flex-start;
    position: relative;
}

.hero-text h2 {
    font-size: 21px;
    font-weight: 400;
    letter-spacing: 3px;
    color: #e8c4a0;
    margin-top: -40px;
    margin-left: 50px;
}

.hero-image {
    position: absolute;
    left: 100px;
    z-index: 2;
    top: -5px;
}

.hero-image img {
    object-fit: contain;
    width: 300px;
    position: absolute;
    height: auto;
}

.hero-text {
    margin-left: 160px;
    z-index: 1;
}

.hero-text h1 {
    font-size: 42px;
    font-weight: 300;
    letter-spacing: 3px;
    color: #e8c4a0;
    margin-bottom: -10px;
    margin-top: -35px;
}

.hero-text p {
    font-size: 18px;
    color: #c4a882;
    letter-spacing: 2px;
}

.hero-1 {
    background-color: #3d2626;
    border-radius: 30px;
    margin: 20px 100px;
    padding: 40px 60px;
    position: relative;
    overflow: hidden;
    height: 100px;
}


@media (max-width: 768px) {
    .hero-divider {
        display: block;
        width: 85%;
        height: 1px;
        background: #c4a882;
        margin: 15px auto;
        opacity: 0.5;
    }
}

/* --- CITIES SECTION --- */
.cities {
    background-color: #3d2626;
    border-radius: 30px;
    margin: 20px 100px;
    padding: 30px 40px;
    text-align: center;
}

.section-title-cities {
    color: #e8c4a0;
    font-size: 24px;
    font-weight: 400;
    letter-spacing: 3px;
    text-align: center;
    margin-bottom: 30px;
}

/* ===== ДЕСКТОП: 2 ряда с точным скруглением краёв ===== */
.cities-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    row-gap: 6px;
    margin-bottom: 20px;
}

.city-tag {
    background-color: #5a3a3a;
    color: #c4a882;
    padding: 10px 20px;
    font-size: 17px;
    border: 1px solid #c4a88229;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1 1 0;
    min-width: 120px;
    text-align: center;
}

/* Первый ряд — 6 карточек */
.city-tag:nth-child(1) {
    border-radius: 40px 0 0 0;
}

.city-tag:nth-child(6) {
    border-radius: 0 40px 0 0;
}

.city-tag:nth-child(-n+6):not(:nth-child(1)):not(:nth-child(6)) {
    border-radius: 0;
}

/* Второй ряд — 5 карточек */
.city-tag:nth-child(8) {
    border-radius: 0 0 0 40px;
}

.city-tag:nth-child(12) {
    border-radius: 0 0 40px 0;
}

.city-tag:nth-child(n+8):not(:nth-child(8)):not(:nth-child(12)) {
    border-radius: 0;
}

.break {
    flex-basis: 100%;
    height: 0;
}

.dubai-text {
    color: #d4a843;
    font-size: 14px;
    letter-spacing: 2px;
    font-weight: 500;
}

/* --- PROPERTY TYPES --- */
.property-types {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.property-card {
    flex: 1;
    position: relative;
    overflow: hidden;
    height: 500px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.property-card:first-child {
    border-radius: 40px 0 0 40px;
}

.property-card:last-child {
    border-radius: 0 40px 40px 0;
}

.property-card:not(:first-child):not(:last-child) {
    border-radius: 0;
}

.property-card:hover {
    transform: translateY(-5px);
}

.property-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: sepia(100%) hue-rotate(310deg) saturate(100%) brightness(0.6);
    transition: filter 0.5s ease;
}

.property-card:hover img {
    filter: grayscale(0%);
}

.property-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(to bottom, rgba(0,0,0,0.6) 0%, transparent 100%);
}

.property-overlay h3 {
    color: hsl(0, 0%, 0%);
    padding-top: 10px;
    font-size: 20px;
    font-weight: bold;
    letter-spacing: 1px;
    line-height: 1.3;
    text-align: center;
}

/* --- SERVICES & CALCULATOR --- */
.services-calculator {
    display: flex;
    background-color: #3d2626;
    border-radius: 30px;
    margin: 20px 100px;
    padding: 40px;
    gap: 40px;
}

.calculator-section {
    flex: 1;
}

.section-title {
    background-color: #5a3a3a;
    color: #e8c4a0;
    padding: 15px 30px;
    font-size: 24px;
    font-weight: 500;
    letter-spacing: 3px;
    text-align: center;
    margin-bottom: 30px;
    border: 1px solid #c4a88229;
    border-radius: 0;
}

.calculator-section .section-title {
    border-radius: 30px 0 0 30px;
}

.services-section .section-title {
    border-radius: 0 30px 30px 0;
}

.calculator-form {
    padding: 0 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    color: #c4a882;
    font-size: 14px;
    margin-bottom: 8px;
    letter-spacing: 1px;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border-radius: 10px;
    border: none;
    background-color: #f5e6d8;
    color: #3d2626;
    font-size: 14px;
    outline: none;
}

.form-group input::placeholder {
    color: #9a8a7a;
}

.form-row {
    display: flex;
    gap: 15px;
}

.form-group.half {
    flex: 1;
}

.form-group.half:first-child input {
    border-radius: 12px 0 0 12px;
}

.form-group.half:last-child input {
    border-radius: 0 12px 12px 0;
}

.down-payment-wrapper {
    display: flex;
    align-items: center;
}

.down-payment-wrapper input {
    flex: 1;
    padding: 12px 15px;
    margin-right: 10px;
    border-radius: 10px;
    border: none;
    background-color: #f5e6d8;
    color: #3d2626;
    font-size: 14px;
    outline: none;
}

.down-payment-toggle {
    display: flex;
    background-color: #f5e6d8;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #d4c4b4;
}

.toggle-btn {
    padding: 10px 15px;
    border: none;
    background: transparent;
    color: #8b6f5e;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.toggle-btn.active {
    background-color: #8b6f5e;
    color: #ffffff;
}

.toggle-btn:hover:not(.active) {
    background-color: #e8d8c8;
}

.down-payment-equals {
    color: #c4a882;
    font-size: 16px;
    font-weight: 500;
}

.down-payment-result {
    color: #e8c4a0;
    font-size: 14px;
    white-space: nowrap;
}

.calculator-results {
    display: flex;
    justify-content: space-around;
    margin: 25px 0;
    padding: 20px;
    background-color: #4a3030;
    border-radius: 15px;
}

.result-item {
    text-align: center;
    flex: 1;
}

.result-item-loan {
    border-left: 1px solid #7a5a5a;
    border-right: 1px solid #7a5a5a;
    padding: 0 15px;
}

.result-value {
    display: block;
    font-size: 22px;
    color: #ffffff;
    font-weight: 300;
    margin-bottom: 5px;
}

.result-label {
    display: block;
    font-size: 12px;
    color: #c4a882;
    letter-spacing: 1px;
}

.btn-calculate {
    width: 100%;
    padding: 15px;
    background-color: #7a5a5a;
    color: #ffffff;
    border: 1px solid #9a7a7a;
    border-radius: 25px;
    font-size: 13px;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-calculate:hover {
    background-color: #a77d7d;
    color: #ffffff;
}

.calculator-buttons {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.btn-calculate-action {
    flex: 0 0 auto;
    padding: 15px 30px;
    background-color: #5a3a3a;
    color: #c4a882;
    border: 1px solid #7a5a5a;
    border-radius: 25px;
    font-size: 13px;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-calculate-action:hover {
    background-color: #7f6262;
}

.btn-calculate {
    flex: 1;
}

.calculator-disclaimer {
    text-align: center;
    font-size: 10px;
    color: #8a7a6a;
    margin-top: 15px;
    letter-spacing: 0.5px;
}

.divider {
    width: 1px;
    background-color: #7a5a5a;
    align-self: stretch;
}

.services-section {
    flex: 1;
}

.services-list {
    list-style: none;
    padding: 20px;
}

.services-list li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 18px;
    color: #e8c4a0;
    font-size: 15px;
    letter-spacing: 1px;
    line-height: 1.4;
}

.services-list li::before {
    content: "‣";
    position: absolute;
    left: 0;
    color: #c4a882;
    font-size: 18px;
    line-height: 1;
}

.service-text {
    position: relative;
    padding-left: 20px;
    margin-bottom: 40px;
    color: #e8c4a0;
    font-size: 20px;
    letter-spacing: 1px;
    line-height: 2;
}

/* ========== КАСТОМНЫЙ DROPDOWN ========== */
.custom-dropdown {
    position: relative;
    width: 100%;
    user-select: none;
}

.dropdown-selected {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    border-radius: 10px;
    background-color: #f5e6d8;
    color: #3d2626;
    font-size: 14px;
    cursor: pointer;
    transition: border-radius 0.2s ease;
}

.dropdown-selected:hover {
    background-color: #ede0d4;
}

.dropdown-arrow {
    transition: transform 0.3s ease;
    flex-shrink: 0;
    margin-left: 10px;
}

.custom-dropdown.open .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: #f5e6d8;
    border-radius: 0 0 10px 10px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    opacity: 0;
    z-index: 100;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.custom-dropdown.open .dropdown-options {
    max-height: 320px;
    overflow-y: auto;
    opacity: 1;
}

.custom-dropdown.open .dropdown-selected {
    border-radius: 10px 10px 0 0;
}

.dropdown-option {
    padding: 12px 15px;
    color: #5a3a3a;
    font-size: 14px;
    cursor: pointer;
    border-bottom: 1px solid #e0d0c0;
    transition: background-color 0.2s ease;
}

.dropdown-option:last-child {
    border-bottom: none;
    border-radius: 0 0 10px 10px;
}

.dropdown-option:hover {
    background-color: #e8d8c8;
}

.dropdown-option.selected {
    background-color: #d4c4b4;
    font-weight: 500;
}

.dropdown-options::-webkit-scrollbar {
    width: 6px;
}

.dropdown-options::-webkit-scrollbar-track {
    background: #f5e6d8;
}

.dropdown-options::-webkit-scrollbar-thumb {
    background: #c4a882;
    border-radius: 3px;
}

/* --- FOOTER --- */
.footer {
    display: flex;
    justify-content: space-between;
    background-color: #3d262680;
    border-radius: 30px 30px 0 0;
    margin: 20px 100px 0 100px;
    padding: 40px 60px;
    gap: 40px;
}

.footer-left {
    flex: 1;
}

.footer-logo {
    height: 50px;
    width: auto;
}

.footer-logo-text {
    display: flex;
    flex-direction: column;
}

.footer-nav {
    flex: 1;
}

.footer-nav h4,
.footer-services h4,
.footer-contacts h4 {
    color: #e8c4a0;
    font-size: 16px;
    letter-spacing: 2px;
    margin-bottom: 20px;
    font-weight: 400;
}

.footer-nav-link {
    color: #e8c4a0;
    text-decoration: none;
    font-size: 16px;
    letter-spacing: 2px;
    transition: color 0.3s ease;
    cursor: pointer;
    border-bottom: 1px solid transparent;
    padding-bottom: 3px;
}

.footer-nav-link:hover {
    color: #ffffff;
    border-bottom-color: #e8c4a0;
}

.footer-services {
    flex: 1;
}

.footer-services ul {
    list-style: none;
}

.footer-services li {
    color: #c4a882;
    font-size: 12px;
    margin-bottom: 10px;
    letter-spacing: 0.5px;
    line-height: 1.3;
}

.footer-contacts {
    flex: 1;
}

.footer-contacts p {
    margin-bottom: 10px;
    letter-spacing: 0.5px;
    line-height: 1.6;
}

.contact-label {
    color: #c4a882;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-contact-link {
    color: #e8c4a0;
    text-decoration: none;
    font-size: 13px;
    transition: all 0.3s ease;
    border-bottom: 1px solid transparent;
    padding-bottom: 2px;
}

.footer-contact-link:hover {
    color: #ffffff;
    border-bottom-color: #e8c4a0;
}

.social-links {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.social-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #5a3a3a;
    color: #c4a882;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    border: 1px solid #7a5a5a;
    transition: all 0.3s ease;
}

.social-btn:hover {
    background-color: #7a5a5a;
    color: #ffffff;
}

.social-btn-vk {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #5a3a3a;
    color: #c4a882;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    border: 1px solid #7a5a5a;
    transition: all 0.3s ease;
}

.social-btn-vk:hover {
    background-color: #7a5a5a;
    color: #ffffff;
}

.social-btn-tg {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #5a3a3a;
    color: #c4a882;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    border: 1px solid #7a5a5a;
    transition: all 0.3s ease;
}

.social-btn-tg:hover {
    background-color: #7a5a5a;
    color: #ffffff;
}

.copyright {
    text-align: center;
    padding: 15px;
    color: #8a7a6a;
    font-size: 11px;
    letter-spacing: 1px;
}

/* ========== МОДАЛЬНОЕ ОКНО ========== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal {
    background-color: #3d2626;
    padding: 40px;
    width: 90%;
    max-width: 400px;
    position: relative;
    border: 1px solid #7a5a5a;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    color: #c4a882;
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
}

.modal-close:hover {
    color: #ffffff;
}

.modal h3 {
    color: #e8c4a0;
    font-size: 18px;
    font-weight: 300;
    letter-spacing: 2px;
    margin-bottom: 10px;
    margin-top: 20px;
}

.modal h3:first-child {
    margin-top: 0;
}

.modal input,
.modal textarea {
    width: 100%;
    padding: 12px 15px;
    border: none;
    background-color: #f5e6d8;
    color: #3d2626;
    font-size: 14px;
    border-radius: 0;
    outline: none;
}

.modal input::placeholder,
.modal textarea::placeholder {
    color: #9a8a7a;
}

.modal textarea {
    min-height: 100px;
    resize: vertical;
}

.modal-submit {
    width: 100%;
    padding: 15px;
    margin-top: 25px;
    background-color: #5a3a3a;
    color: #e8c4a0;
    border: 1px solid #7a5a5a;
    border-radius: 25px;
    font-size: 16px;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-submit:hover {
    background-color: #7a5a5a;
    color: #ffffff;
}

.thank-you-content {
    text-align: center;
    padding: 40px 20px;
}

.thank-you-content h2 {
    color: #e8c4a0;
    font-size: 28px;
    font-weight: 300;
    letter-spacing: 3px;
    margin-bottom: 20px;
}

.thank-you-content p {
    color: #c4a882;
    font-size: 16px;
    letter-spacing: 1px;
    line-height: 1.6;
}

/* ========== КАСТОМНЫЙ СКРОЛЛБАР ========== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #2a1a1a;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #5a3a3a;
    border-radius: 4px;
    border: 2px solid #2a1a1a;
}

::-webkit-scrollbar-thumb:hover {
    background: #7a5a5a;
}

::-webkit-scrollbar-thumb:active {
    background: #9a7a7a;
}

::-webkit-scrollbar-corner {
    background: #2a1a1a;
}

* {
    scrollbar-width: thin;
    scrollbar-color: #5a3a3a #2a1a1a;
}

/* СТРЕЛОЧКА ВВЕРХ */
.scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: #8B5E3C;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 999;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.scroll-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-top:hover {
    background: #6d4a2e;
    transform: translateY(-3px);
}

.scroll-top svg {
    width: 24px;
    height: 24px;
}

/* ============================================================ */
/* ======================= АДАПТИВ ============================ */
/* ============================================================ */

/* ========== ЯКОРНЫЕ ССЫЛКИ ========== */
html {
    scroll-behavior: smooth;
}

/* Смещение якоря с учётом фиксированного хедера */
:target {
    scroll-margin-top: 100px;
}

@media (max-width: 768px) {
    :target {
        scroll-margin-top: 80px;
    }
}

/* ========== ПЛАНШЕТЫ (до 1200px) ========== */
@media (max-width: 1200px) {
    .header {
        margin: 0 40px;
        padding: 15px 30px;
    }

    .header-nav {
        gap: 60px;
    }

    .hero,
    .hero-1,
    .cities,
    .services-calculator,
    .footer {
        margin: 20px 40px;
    }

    .hero-image {
        position: relative;
        left: auto;
        bottom: auto;
        margin: 0 auto 20px;
        text-align: center;
    }

    .hero-image img {
        height: 350px;
        position: relative;
    }

    .hero-content {
        flex-direction: column;
        align-items: center;
    }

    .hero-text {
        margin-left: 0;
        text-align: center;
    }

    .hero-text h1 {
        font-size: 36px;
        margin-top: 0;
    }

    .hero-text h2 {
        margin-left: 0;
    }

    .property-types {
        flex-wrap: wrap;
    }

    .property-card {
        flex: 1 1 45%;
        height: 350px;
    }

    .property-card:first-child {
        border-radius: 40px 0 0 0;
    }

    .property-card:nth-child(2) {
        border-radius: 0 40px 0 0;
    }

    .property-card:nth-child(3) {
        border-radius: 0 0 0 40px;
    }

    .property-card:last-child {
        border-radius: 0 0 40px 0;
    }

    .property-card:not(:first-child):not(:nth-child(2)):not(:nth-child(3)):not(:last-child) {
        border-radius: 0;
    }

    .services-calculator {
        flex-direction: column;
        gap: 30px;
    }

    .calculator-section .section-title,
    .services-section .section-title {
        border-radius: 30px;
    }

    .divider {
        width: 100%;
        height: 1px;
        margin: 10px 0;
    }

    .footer {
        flex-wrap: wrap;
        gap: 30px;
    }

    .footer-left,
    .footer-nav,
    .footer-services,
    .footer-contacts {
        flex: 1 1 45%;
    }
}

/* ========== IPAD / ПЛАНШЕТЫ (768px – 1200px) ========== */
@media (max-width: 1200px) and (min-width: 769px) {
    
    /* --- Города: фикс сетки --- */
    .cities {
        margin: 20px 40px;
        padding: 30px;
    }

    .cities-grid {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
        row-gap: 10px;
    }

    .city-tag {
        flex: 0 1 auto;          /* не растягиваемся на всю ширину */
        min-width: auto;
        padding: 12px 20px;
        font-size: 13px;
        border-radius: 25px !important;
    }

    .break {
        display: none;           /* убираем принудительный перенос */
    }

    .dubai-text {
        font-size: 14px;
        margin-top: 15px;
    }

    /* --- Карточки "я продаю": 2×2 сетка --- */
    .property-types {
        display: grid;
        grid-template-columns: 1fr 1fr;  /* 2 колонки */
        gap: 15px;
        margin-top: 25px;
    }

    .property-card {
        flex: none;              /* сброс flex-правил */
        width: 100%;
        height: 280px;           /* фикс высоты, не вытягивается */
        border-radius: 20px !important;
        overflow: hidden;
    }

    /* Сброс левых/правых радиусов, которые ломают 2×2 */
    .property-card:first-child,
    .property-card:nth-child(2),
    .property-card:nth-child(3),
    .property-card:last-child {
        border-radius: 20px !important;
    }

    .property-card img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .property-overlay h3 {
        font-size: 16px;
        line-height: 1.3;
    }
}

/* ========== IPAD MINI / УЗКИЕ ПЛАНШЕТЫ (768px – 900px) ========== */
@media (max-width: 900px) and (min-width: 769px) {
    
    .cities {
        margin: 15px 20px;
        padding: 25px;
    }

    .city-tag {
        padding: 10px 16px;
        font-size: 12px;
    }

    .property-card {
        height: 240px;
    }

    .property-overlay h3 {
        font-size: 14px;
    }

    .section-title-cities {
        font-size: 20px;
    }
}

/* ========== IPAD PRO 12.9" / БОЛЬШИЕ ПЛАНШЕТЫ (1024px – 1200px) ========== */
@media (max-width: 1200px) and (min-width: 1025px) {
    
    .property-card {
        height: 320px;           /* чуть выше для больших экранов */
    }

    .property-overlay h3 {
        font-size: 18px;
    }
}

/* ========== МАЛЕНЬКИЕ ПЛАНШЕТЫ (до 900px) ========== */
@media (max-width: 900px) {
    .header {
        margin: 0 20px;
        padding: 12px 20px;
    }

    .header-nav {
        display: none;
    }

    .header-right {
        gap: 10px;
    }

    .btn-call-me {
        padding: 8px 16px;
        font-size: 12px;
    }

    .phone-number {
        padding: 8px 16px;
        font-size: 12px;
    }

    .hero,
    .hero-1,
    .cities,
    .services-calculator,
    .footer {
        margin: 15px 20px;
        padding: 30px;
    }

    .hero {
        min-height: auto;
        padding: 30px;
    }

    .hero-image img {
        height: 280px;
    }

    .hero-text h1 {
        font-size: 28px;
    }

    .hero-text h2 {
        font-size: 18px;
    }

    .property-card {
        flex: 1 1 100%;
        height: 280px;
    }

    .property-card:first-child {
        border-radius: 40px 40px 0 0;
    }

    .property-card:last-child {
        border-radius: 0 0 40px 40px;
    }

    .property-card:not(:first-child):not(:last-child) {
        border-radius: 0;
    }

    .calculator-results {
        flex-direction: column;
        gap: 15px;
    }

    .result-item-loan {
        border-left: none;
        border-right: none;
        border-top: 1px solid #7a5a5a;
        border-bottom: 1px solid #7a5a5a;
        padding: 15px 0;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .form-group.half:first-child input,
    .form-group.half:last-child input {
        border-radius: 10px;
    }

    .down-payment-wrapper {
        flex-direction: column;
        align-items: stretch;
    }

    .down-payment-wrapper input {
        margin-right: 0;
        margin-bottom: 10px;
    }

    .down-payment-toggle {
        align-self: flex-start;
    }

    .calculator-buttons {
        flex-direction: column;
    }

    .btn-calculate-action {
        width: 100%;
        text-align: center;
        padding: 15px 30px;
    }

    .footer-left,
    .footer-nav,
    .footer-services,
    .footer-contacts {
        flex: 1 1 100%;
    }
}

/* ========== МОБИЛЬНЫЕ (до 768px) ========== */
@media (max-width: 768px) {
    body {
        padding-top: 70px;
    }

    .header {
        margin: 0 10px;
        padding: 10px 15px;
        border-radius: 0 0 20px 20px;
    }

    .logo-img {
        height: 40px;
    }

    .logo-main {
        font-size: 18px;
    }

    .logo-sub {
        font-size: 8px;
        letter-spacing: 2px;
    }

    .header-right {
        flex-direction: row;
        gap: 8px;
    }

    .btn-call-me {
        padding: 6px 12px;
        font-size: 11px;
        border-radius: 15px;
    }

    .phone-number {
        padding: 6px 12px;
        font-size: 11px;
        border-radius: 15px;
    }

    .hero,
    .hero-1,
    .cities,
    .services-calculator,
    .footer {
        margin: 10px;
        border-radius: 20px;
    }

    .hero {
        padding: 20px;
    }

    .hero-image {
        position: relative;
        left: auto;
        top: auto;
        margin: 0 auto -40px;
        text-align: center;
    }
    .hero-image img {
        width: 200px;
        height: auto;
        position: relative;
    }
    .hero-text {
        margin-left: 0;
        text-align: center;
        padding-top: 20px;
    }

    .hero-text h1 {
        font-size: 22px;
        letter-spacing: 2px;
    }

    .hero-text h2 {
        font-size: 14px;
        letter-spacing: 2px;
    }

    .section-title-cities {
        font-size: 18px;
        margin-bottom: 15px;
    }

    .hero-text p {
        font-size: 14px;
        padding-top: 5px;
    }

    .cities {
        padding: 20px 15px;
    }

    .cities-grid {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
        row-gap: 6px;
    }

    .city-tag {
        flex: 1 1 auto;
        min-width: 100px;
        padding: 10px 15px;
        font-size: 11px;
        border-radius: 20px !important;
    }


    .break {
        display: none;
    }

    .dubai-text {
        font-size: 12px;
    }

    .property-card {
        height: 220px;
    }

    .property-overlay h3 {
        font-size: 16px;
    }

    .section-title {
        font-size: 18px;
        padding: 12px 20px;
        letter-spacing: 2px;
    }

    .calculator-form {
        padding: 0 10px;
    }

    .form-group label {
        font-size: 12px;
    }

    .form-group input,
    .modal input,
    .modal textarea {
        padding: 10px 12px;
        font-size: 13px;
    }

    .result-value {
        font-size: 18px;
    }

    .result-label {
        font-size: 10px;
    }

    .btn-calculate,
    .btn-calculate-action,
    .modal-submit {
        padding: 12px;
        font-size: 12px;
        letter-spacing: 1px;
    }

    .calculator-disclaimer {
        font-size: 9px;
    }

    .services-list li,
    .service-text {
        font-size: 13px;
    }

    .modal {
        padding: 25px;
        width: 95%;
    }

    .modal h3 {
        font-size: 14px;
        margin-top: 15px;
    }

    .modal-close {
        font-size: 24px;
        top: 10px;
        right: 15px;
    }

    .thank-you-content {
        padding: 20px 10px;
    }

    .thank-you-content h2 {
        font-size: 22px;
    }

    .thank-you-content p {
        font-size: 14px;
    }

    .footer {
        padding: 25px 20px;
        gap: 25px;
    }

    .footer-nav h4,
    .footer-services h4,
    .footer-contacts h4 {
        font-size: 14px;
        margin-bottom: 15px;
    }

    .footer-nav-link {
        font-size: 14px;
    }

    .footer-services li {
        font-size: 11px;
    }

    .contact-label {
        font-size: 10px;
    }

    .footer-contact-link {
        font-size: 12px;
    }

    .social-btn,
    .social-btn-vk,
    .social-btn-tg {
        width: 35px;
        height: 35px;
        font-size: 10px;
    }

    .social-btn-vk {
        font-size: 16px;
    }

    .social-btn-tg {
        font-size: 35px;
    }

    .copyright {
        font-size: 10px;
        padding: 10px;
    }
}

/* ========== МАЛЕНЬКИЕ МОБИЛЬНЫЕ (до 480px) ========== */
@media (max-width: 480px) {
    .header {
        margin: 0 5px;
        padding: 8px 10px;
    }

    .logo-img {
        height: 35px;
    }

    .btn-call-me {
        padding: 5px 10px;
        font-size: 10px;
    }

    .phone-number {
        padding: 5px 10px;
        font-size: 10px;
    }

    .hero-text h1 {
        font-size: 18px;
    }

    .hero-image img {
        height: 180px;
    }

    .hero-text p {
        font-size: 13px !important;
        padding-top: 15px;
    }

    /* Города на маленьких мобильных - 3 в ряд */
    .cities-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
        row-gap: 6px;
    }

    .city-tag {
        font-size: 9px;
        padding: 6px 2px;
        border-radius: 20px !important;
    }

    .property-card {
        height: 180px;
    }

    .section-title {
        font-size: 16px;
        padding: 10px 15px;
    }

    .result-value {
        font-size: 16px;
    }

    .btn-calculate-action {
        padding: 12px 20px;
        font-size: 11px;
    }
}

/* ========== ОЧЕНЬ МАЛЕНЬКИЕ ЭКРАНЫ (до 360px) ========== */
@media (max-width: 360px) {
    .header {
        margin: 0 3px;
        padding: 6px 8px;
    }

    .logo-img {
        height: 30px;
    }

    .btn-call-me {
        padding: 4px 8px;
        font-size: 9px;
    }

    .phone-number {
        padding: 4px 8px;
        font-size: 9px;
    }

    .hero-text h1 {
        font-size: 16px;
    }

    .hero-text h2 {
        font-size: 12px;
    }

    .hero-image img {
        height: 150px;
    }

    /* Города на самых маленьких экранах - 3 в ряд */
    .cities-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 5px;
        row-gap: 6px;
    }

    .city-tag {
        font-size: 8px;
        padding: 5px 2px;
        border-radius: 20px !important;
    }

    .property-card {
        height: 160px;
    }

    .property-overlay h3 {
        font-size: 14px;
    }

    .section-title {
        font-size: 14px;
        padding: 8px 12px;
    }

    .form-group input {
        padding: 8px 10px;
        font-size: 12px;
    }

    .result-value {
        font-size: 14px;
    }

    .result-label {
        font-size: 9px;
    }

    .btn-calculate-action {
        padding: 10px 15px;
        font-size: 10px;
    }

    .services-list li,
    .service-text {
        font-size: 12px;
    }

    .footer {
        padding: 20px 15px;
    }

    .footer-nav-link {
        font-size: 12px;
    }

    .footer-services li {
        font-size: 10px;
    }

    .footer-contact-link {
        font-size: 11px;
    }

    .social-btn,
    .social-btn-vk,
    .social-btn-tg {
        width: 30px;
        height: 30px;
    }

    .social-btn-vk {
        font-size: 14px;
    }

    .social-btn-tg {
        font-size: 30px;
    }
}

/* ========== ГОРИЗОНТАЛЬНАЯ ОРИЕНТАЦИЯ ========== */
@media (max-height: 500px) and (orientation: landscape) {
    .modal-overlay {
        align-items: flex-start;
        padding-top: 20px;
        overflow-y: auto;
    }

    .modal {
        margin-bottom: 20px;
    }

    .hero-image img {
        height: 200px;
    }
}