/* ===== МОБИЛЬНАЯ ВЕРСИЯ (ширина <= 768px) ===== */

/* Общие */
body {
    font-family: 'Roboto', sans-serif;
    background: #f8f9fa;
    color: #333;
    padding-top: 70px;
}

.container {
    width: 92%;
    max-width: 100%;
    margin: 0 auto;
    padding: 0 4%;
}

/* Скрываем десктопную шапку */
.header {
    display: none !important;
}

/* Мобильная шапка */
.mobile-header {
    display: block !important;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    padding: 10px 16px;
}

.mobile-header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.mobile-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #2c3e50;
}

.mobile-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: #2c3e50;
}

.mobile-burger {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.mobile-burger span {
    display: block;
    width: 28px;
    height: 3px;
    background: #2c3e50;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.mobile-burger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 6px);
}
.mobile-burger.active span:nth-child(2) {
    opacity: 0;
}
.mobile-burger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -7px);
}

/* Мобильная навигация */
.mobile-nav {
    display: none;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.3s ease;
    padding: 0 4px;
}

.mobile-nav.open {
    display: block;
    max-height: 500px;
    padding: 16px 0 8px 0;
}

.mobile-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-nav ul li {
    border-bottom: 1px solid #f0f0f0;
}

.mobile-nav ul li:last-child {
    border-bottom: none;
}

.mobile-nav ul li a {
    display: block;
    padding: 14px 8px;
    color: #2c3e50;
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
}

.mobile-nav ul li a:hover {
    color: #3498db;
}

.mobile-phone {
    font-weight: 700 !important;
    color: #3498db !important;
    font-size: 18px !important;
    padding: 16px 8px !important;
}

/* Планировки — 1 карточка */
.plans-grid-wrapper {
    overflow: hidden;
    touch-action: pan-y;
    margin: 10px 0;
}

.plans-grid {
    display: flex;
    transition: transform 0.4s ease;
    will-change: transform;
    gap: 20px;
}

.plans-grid .plan-card {
    flex: 0 0 100% !important;
    max-width: 100% !important;
    min-width: 0;
    padding: 0 5px;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

/* Скрываем стрелки на мобильных */
.plan-arrow {
    display: none !important;
}

/* Картинки планировок */
.plan-image {
    width: 100%;
    max-height: 250px;
    overflow: hidden;
}

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

/* Ипотека — вертикально */
.mortgage-banner {
    padding: 20px !important;
}

.mortgage-features {
    display: flex !important;
    flex-direction: column !important;
    gap: 15px !important;
}

.mortgage-feature {
    text-align: center;
}

.mortgage-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Интерьеры — 80vh */
#interiorSlider .slider-img {
    max-height: 80vh !important;
    width: 100% !important;
    object-fit: contain !important;
    display: block !important;
    margin: 0 auto !important;
}

/* Контакты */
.contact-wrapper {
    padding: 20px 0;
}

.contact-description {
    font-size: 16px;
    line-height: 1.4;
    margin-bottom: 20px;
}

/* Карта */
.map-placeholder {
    padding: 20px;
    text-align: center;
}

/* Футер */
.footer-content {
    display: flex;
    flex-direction: column;
    gap: 30px;
    padding: 20px 0;
}

.footer-bg-image {
    display: none !important;
}

/* ===== ГОРИЗОНТАЛЬНАЯ ОРИЕНТАЦИЯ НА МОБИЛЬНЫХ ===== */
@media (max-width: 1024px) and (orientation: landscape) {
    body {
        padding: 10px;
        padding-top: 70px;
    }
    
    .container {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 15px !important;
    }
    
    .plans-grid .plan-card {
        flex: 0 0 calc(33.333% - 15px) !important;
        max-width: calc(33.333% - 15px) !important;
    }
    
    .mortgage-features {
        flex-direction: row !important;
        gap: 20px !important;
    }
    
    .mortgage-feature {
        flex: 1;
    }
    
    .wrapper {
        padding: 10px !important;
    }
}