/* Mobile and responsive styles (normalized breakpoints)
   Breakpoints: 1200, 992, 768, 576, 480 */

/* ===== Global container and overflow guards ===== */
html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

.container {
    width: 100%;
    padding-left: 16px;
    padding-right: 16px;
}

/* Desktop defaults: hide mobile UI */
.mobile-menu-toggle {
    display: none;
}

.mobile-drawer {
    display: none;
}

/* Кнопка закрытия скрыта по умолчанию на десктопе, но видна на мобильных и планшетах */
#mobile-filter-close {
    display: none;
}

/* Показываем кнопку закрытия на мобильных и планшетах */
@media (max-width: 991px) {
    #mobile-filter-close {
        display: flex !important;
    }
}

/* ===== Header (main-header) ===== */
@media (max-width: 992px) {
    .main-header .container {
        gap: 16px;
    }

    .main-nav {
        gap: 16px;
    }
}

@media (max-width: 768px) {
    .main-header {
        padding: 12px 0;
    }

    /* Одна строка: бургер | логотип | контакты */
    .main-header .container {
        display: block;
    }

    .header-row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        min-height: 48px;
        /* Минимальная высота для комфортного нажатия */
    }

    /* Бургер-меню - красивый стиль как на десктопе */
    .mobile-menu-toggle {
        display: inline-flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        border: 1px solid rgba(190, 175, 135, 0.3);
        background: rgba(190, 175, 135, 0.1);
        border-radius: 10px;
        flex-shrink: 0;
        cursor: pointer;
        transition: all 0.3s ease;
        position: relative;
        padding: 0;
    }

    .mobile-menu-toggle:hover {
        background: rgba(190, 175, 135, 0.2);
        border-color: rgba(190, 175, 135, 0.5);
        transform: scale(1.05);
        box-shadow: 0 2px 8px rgba(190, 175, 135, 0.3);
    }

    .mobile-menu-toggle:active {
        transform: scale(0.98);
    }

    .mobile-menu-toggle .menu-toggle-bar {
        display: block;
        width: 22px;
        height: 2.5px;
        background: var(--c21-gold, #BEAF87);
        margin: 2.5px 0;
        transition: all 0.3s ease;
        border-radius: 2px;
        position: relative;
        flex-shrink: 0;
    }

    .mobile-menu-toggle:hover .menu-toggle-bar {
        background: var(--c21-gold, #BEAF87);
        box-shadow: 0 0 4px rgba(190, 175, 135, 0.5);
    }

    .mobile-menu-toggle i {
        display: none;
    }

    /* Логотип */
    .header-left {
        display: flex;
        align-items: center;
        gap: 8px;
        flex: 1;
        min-width: 0;
        /* Позволяет сжиматься */
    }

    .logo {
        display: flex;
        align-items: center;
        transform: none;
    }

    .logo a {
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 2px;
    }

    .logo-text {
        font-size: 20px;
        line-height: 1;
        margin: 0;
        white-space: nowrap;
    }

    .logo-slogan {
        font-size: 10px;
        line-height: 1;
        margin: 0;
        white-space: nowrap;
    }

    /* Скрываем основную навигацию */
    .main-nav {
        display: none;
    }

    .nav-link,
    .dropdown-toggle {
        font-size: 14px;
    }

    /* Правая часть: только контакты (без избранного) */
    .header-right {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        gap: 8px;
        flex-shrink: 0;
    }

    /* СКРЫВАЕМ кнопку избранного в шапке на мобильных */
    .favorites-header-link {
        display: none !important;
    }

    /* Контактная информация */
    .contact-info {
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        justify-content: center;
        gap: 3px;
        line-height: 1;
        flex-shrink: 0;
        min-width: 140px;
    }

    .phone-number {
        font-size: 15px;
        line-height: 1.2;
        font-weight: 600;
    }

    .address,
    .address-link {
        font-size: 11px;
        color: #999;
        line-height: 1.3;
        white-space: normal !important;
        word-wrap: break-word;
        word-break: break-word;
        max-width: 180px;
        text-align: right;
        display: inline-block;
    }

    /* Enable drawer in mobile */
    .mobile-drawer {
        display: flex;
    }

    /* ===== Video detail explicit fixes ===== */
    .video-detail-layout {
        display: grid;
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .video-main-content {
        display: block;
        overflow: visible;
    }

    .video-player-container {
        min-height: 220px;
    }

    .video-embed {
        position: relative;
        padding-bottom: 56.25%;
        height: 0;
        overflow: visible;
    }

    .video-embed iframe {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        display: block;
    }
}

/* Очень узкие экраны: компактная одна линия */
@media (max-width: 420px) {
    .main-header {
        padding: 10px 0;
    }

    .header-row {
        gap: 8px;
        min-height: 44px;
    }

    /* Компактный бургер */
    .mobile-menu-toggle {
        width: 40px;
        height: 40px;
    }

    .mobile-menu-toggle .menu-toggle-bar {
        width: 20px;
        height: 2px;
        margin: 2px 0;
    }

    /* Логотип без слогана */
    .logo-text {
        font-size: 18px;
    }

    .logo-slogan {
        display: none;
    }

    /* Компактные контакты */
    .header-right {
        gap: 6px;
    }

    .contact-info {
        min-width: 110px;
        gap: 2px;
    }

    .phone-number {
        font-size: 14px;
    }

    .address,
    .address-link {
        font-size: 10px;
        max-width: 120px;
        white-space: normal !important;
        word-wrap: break-word;
        word-break: break-word;
        text-align: right;
        line-height: 1.3;
        display: inline-block;
    }
}

/* Экстремально узкие экраны: скрываем адрес, оставляем только телефон */
@media (max-width: 360px) {
    .header-row {
        gap: 6px;
    }

    .mobile-menu-toggle {
        width: 38px;
        height: 38px;
    }

    .mobile-menu-toggle .menu-toggle-bar {
        width: 18px;
        height: 2px;
        margin: 2px 0;
    }

    .logo-text {
        font-size: 16px;
    }

    .contact-info {
        min-width: 95px;
    }

    .phone-number {
        font-size: 13px;
    }

    .address {
        display: none;
    }

    /* Скрываем адрес на очень маленьких экранах */
}

/* ===== Fix: Special offers card media on mobile ===== */
@media (max-width: 768px) {
    .offers-section .offer-card>a {
        grid-template-columns: 110px 1fr !important;
        gap: 8px !important;
    }

    .offers-section .offer-card {
        height: 150px;
        padding: 10px;
        overflow: hidden;
    }

    .offers-section .offer-media {
        aspect-ratio: 1/1;
        width: 100%;
        overflow: hidden;
    }

    .offers-section .offer-media img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

    .offers-section .offer-content {
        position: relative;
        z-index: 1;
        overflow: hidden;
    }
}

@media (max-width: 480px) {
    .offers-section .offer-card>a {
        grid-template-columns: 1fr !important;
    }

    .offers-section .offer-card {
        height: auto;
    }

    .offers-section .offer-media {
        aspect-ratio: 16/9;
    }
}

@media (max-width: 576px) {
    .dropdown-menu {
        left: 0;
        transform: none;
        right: 0;
        margin: 0 auto;
    }
}

/* Off-canvas drawer */
@media (max-width: 768px) {
    .mobile-drawer {
        position: fixed;
        top: 0;
        bottom: 0;
        left: 0;
        width: 82%;
        max-width: 340px;
        background: #fff;
        box-shadow: 8px 0 24px rgba(0, 0, 0, .15);
        transform: translateX(-110%);
        transition: transform .3s ease;
        z-index: 2400;
        display: flex;
        flex-direction: column;
    }

    .mobile-drawer.open {
        transform: translateX(0);
    }

    .mobile-drawer-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 16px;
        border-bottom: 1px solid #eee;
    }

    .mobile-menu-close {
        border: none;
        background: #f3f4f6;
        width: 36px;
        height: 36px;
        border-radius: 8px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .mobile-drawer-nav {
        padding: 12px 8px;
        overflow-y: auto;
    }

    .drawer-link {
        display: block;
        padding: 12px 16px;
        text-decoration: none;
        color: #222;
        font-weight: 600;
    }

    .drawer-group {
        padding: 8px 0 12px 0;
    }

    .drawer-title {
        padding: 10px 16px;
        color: #666;
        font-size: 12px;
        text-transform: uppercase;
        letter-spacing: .08em;
    }

    .drawer-sublink {
        display: block;
        padding: 10px 24px;
        text-decoration: none;
        color: #333;
    }

    .drawer-sublink:hover,
    .drawer-link:hover {
        background: #faf7ee;
    }

    .mobile-drawer-footer {
        margin-top: auto;
        padding: 12px 16px;
        border-top: 1px solid #eee;
    }

    .drawer-phone {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        text-decoration: none;
        color: #333;
        font-weight: 700;
    }

    .mobile-drawer-backdrop {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
        backdrop-filter: blur(2px);
        opacity: 0;
        pointer-events: none;
        transition: opacity .3s ease;
        z-index: 2399;
    }

    .mobile-drawer-backdrop.open {
        opacity: 1;
        pointer-events: auto;
    }
}

/* ===== Offers carousel (homepage) ===== */
@media (max-width: 768px) {
    .offers-carousel {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        gap: 12px
    }

    .offers-carousel.no-snap {
        scroll-snap-type: none !important
    }

    .offers-carousel::-webkit-scrollbar {
        display: none
    }

    .offers-section .offer-slide {
        flex: 0 0 50%;
        padding: 0 6px
    }

    .offers-section .offer-slide {
        scroll-snap-align: center
    }

    .offers-section .offer-card {
        grid-template-columns: 100px 1fr;
        gap: 8px;
        height: 160px;
        padding: 8px
    }

    .offers-section .offer-media {
        aspect-ratio: 3/2;
        min-height: 60px
    }

    .offers-section .offer-content {
        min-height: 60px
    }

    .offers-section .offer-title {
        font-size: 13px
    }
}

@media (max-width: 480px) {
    .offers-section .offer-slide {
        flex: 0 0 100%;
        padding: 0 4px;
        scroll-snap-align: center
    }

    .offers-section .offer-card {
        grid-template-columns: 1fr;
        height: auto;
        padding: 8px
    }

    .offers-section .offer-media {
        aspect-ratio: 16/9;
        min-height: 120px
    }

    .offers-section .offer-content {
        min-height: auto
    }

    .offers-section .offer-title {
        font-size: 14px
    }
}

/* Prevent horizontal scroll for grid cards on home/articles/offers */
@media (max-width: 768px) {

    .home-grid,
    .offers-grid,
    .articles-grid {
        grid-template-columns: 1fr !important;
    }
}

/* ===== Home grid (top 9 complexes) ===== */
@media (max-width: 992px) {
    .home-grid {
        grid-template-columns: repeat(2, minmax(240px, 1fr))
    }
}

@media (max-width: 768px) {
    .home-grid {
        grid-template-columns: 1fr
    }

    .home-property-card {
        min-width: 0
    }
}

/* ===== Company gallery slider (homepage about section) ===== */
@media (max-width: 768px) {
    .company-gallery-slider {
        height: 300px;
        border-radius: 16px;
        margin-left: 10px;
    }

    .slider-btn {
        width: 35px;
        height: 35px;
    }

    .prev-btn {
        left: 10px;
    }

    .next-btn {
        right: 10px;
    }

    .slide-caption {
        padding: 15px;
    }

    .slide-caption h4 {
        font-size: 1rem;
    }

    .slide-caption p {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .company-gallery-slider {
        height: 250px;
        border-radius: 12px;
        margin-left: 0;
    }

    .slide img {
        border-radius: 12px;
    }

    .slider-btn {
        width: 30px;
        height: 30px;
    }

    .prev-btn {
        left: 8px;
    }

    .next-btn {
        right: 8px;
    }

    .slide-caption {
        padding: 12px;
    }

    .slide-caption h4 {
        font-size: 0.9rem;
    }

    .slide-caption p {
        font-size: 0.7rem;
    }
}

/* ===== Office map section (homepage) ===== */
@media (max-width: 768px) {
    .office-map-section .office-map-container {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .office-map-section .office-info-card {
        padding: 24px;
        order: 2;
    }

    .office-map-section .map-wrapper {
        order: 1;
    }

    #home-office-map {
        height: 300px !important;
    }
}

/* ===== Catalog page ===== */
@media (max-width: 1200px) {
    .catalog-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 20px !important;
    }
}

@media (max-width: 768px) {
    .catalog-grid {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }

    .catalog-section~.feedback-wrapper {
        margin-top: 16px !important;
        padding: 32px 0 72px 0 !important;
    }

    .catalog-section~.footer-transition {
        padding-top: 56px !important;
    }

    .catalog-section~.footer-transition .deco-logo.on-dark {
        top: 12px !important;
        z-index: 200 !important;
    }

    .catalog-section~.footer .footer-content {
        margin-top: 100px !important;
    }

    /* Кнопки элементов страницы */
    .view-toggle-right {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        align-items: center !important;
        gap: 8px !important;
    }

    /* Кнопка фильтров - первая в ряду */
    .mobile-filter-toggle {
        display: inline-flex !important;
        order: 1;
        flex: 0 0 auto;
        align-items: center;
        gap: 8px;
        padding: 10px 16px;
        border: 2px solid rgba(188, 175, 135, 0.3);
        border-radius: 8px;
        background: linear-gradient(135deg, rgba(188, 175, 135, 0.1), rgba(188, 175, 135, 0.05));
        font-weight: 700;
        font-size: 14px;
        color: var(--c21-dark);
        margin: 0;
        cursor: pointer;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    }

    .mobile-filter-toggle:hover {
        border-color: rgba(188, 175, 135, 0.6);
        background: linear-gradient(135deg, rgba(188, 175, 135, 0.15), rgba(188, 175, 135, 0.1));
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    }

    .mobile-filter-toggle:active {
        transform: translateY(0);
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    }

    /* Кнопки вида (Картой/Списком) */
    .view-toggle-buttons {
        order: 2;
        display: flex !important;
        gap: 8px !important;
        flex: 1 1 auto;
    }

    /* Кнопки количества элементов */
    .page-size-toggle {
        order: 4;
        margin-left: auto !important;
        padding-left: 8px !important;
        border-left: 1px solid rgba(15, 23, 42, 0.08) !important;
        border-top: none !important;
        padding-top: 0 !important;
        display: flex !important;
        align-items: center !important;
        gap: 6px !important;
        width: auto !important;
        justify-content: flex-end !important;
    }

    /* Переключатель списка/карточек слева от кол-ва элементов */
    .layout-toggle {
        order: 3;
        display: inline-flex;
        margin-left: 0 !important;
        margin-right: 8px !important;
        padding-left: 0 !important;
        border-left: none !important;
    }

    .filters-backdrop {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
        backdrop-filter: blur(4px);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s ease;
        z-index: 9999 !important;
    }

    .filters-backdrop.open {
        opacity: 1;
        pointer-events: auto;
    }

    /* Модальное окно фильтров в центре экрана */
    #filters-sheet.filters-section {
        position: fixed !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) scale(0.95) !important;
        width: calc(100% - 32px) !important;
        max-width: 500px !important;
        max-height: 85vh !important;
        z-index: 10000 !important;
        background: #fff !important;
        border-radius: 16px !important;
        padding: 0 !important;
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3) !important;
        margin: 0 !important;
        transition: transform 0.3s ease, opacity 0.3s ease !important;
        opacity: 0 !important;
        overflow: hidden !important;
        display: flex !important;
        flex-direction: column !important;
        pointer-events: none !important;
        visibility: hidden !important;
    }

    #filters-sheet.filters-section.open {
        transform: translate(-50%, -50%) scale(1) !important;
        opacity: 1 !important;
        pointer-events: auto !important;
        visibility: visible !important;
    }

    /* Отступы для элементов модального окна на мобильной версии */
    #filters-sheet.filters-section .filters-sheet-header {
        padding: 20px 24px !important;
    }

    #filters-sheet.filters-section .filters-form {
        padding: 24px !important;
    }

    #filters-sheet.filters-section .filters-actions {
        padding: 0 24px 24px 24px !important;
        margin-top: 12px !important;
    }

    /* Блокируем прокрутку body когда фильтр открыт */
    body.filter-open {
        overflow: hidden !important;
        position: fixed !important;
        width: 100% !important;
    }

    /* Кнопки элементов страницы в ряд для планшетов */
    .view-toggle-right {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        align-items: center !important;
        gap: 8px !important;
    }

    /* Кнопка фильтров на планшетах использует те же стили что и на мобильных */
    .mobile-filter-toggle {
        order: 1;
        flex: 0 0 auto;
    }

    /* Кнопки вида (Картой/Списком) на планшетах */
    .view-toggle-buttons {
        order: 2;
        display: flex !important;
        gap: 8px !important;
        flex: 1 1 auto;
    }

    /* Кнопки количества элементов на планшетах */
    .page-size-toggle {
        order: 3;
        margin-left: auto !important;
        padding-left: 8px !important;
        border-left: 1px solid rgba(15, 23, 42, 0.08) !important;
        border-top: none !important;
        padding-top: 0 !important;
        display: flex !important;
        align-items: center !important;
        gap: 6px !important;
        width: auto !important;
        justify-content: flex-end !important;
    }
}

/* Планшетная версия: фильтр как на мобильном, но с большим max-width */
@media (min-width: 769px) and (max-width: 991px) {

    /* Показываем кнопку фильтра на планшетах */
    .mobile-filter-toggle {
        display: inline-flex !important;
        order: 1;
        flex: 0 0 auto;
        align-items: center;
        gap: 8px;
        padding: 10px 16px;
        border: 2px solid rgba(188, 175, 135, 0.3);
        border-radius: 8px;
        background: linear-gradient(135deg, rgba(188, 175, 135, 0.1), rgba(188, 175, 135, 0.05));
        font-weight: 700;
        font-size: 14px;
        color: var(--c21-dark);
        margin: 0;
        cursor: pointer;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    }

    .mobile-filter-toggle:hover {
        border-color: rgba(188, 175, 135, 0.6);
        background: linear-gradient(135deg, rgba(188, 175, 135, 0.15), rgba(188, 175, 135, 0.1));
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    }

    .mobile-filter-toggle:active {
        transform: translateY(0);
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    }

    .filters-backdrop {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
        backdrop-filter: blur(4px);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s ease;
        z-index: 9999 !important;
    }

    .filters-backdrop.open {
        opacity: 1;
        pointer-events: auto;
    }

    /* Модальное окно фильтров для планшетов - больше по размеру */
    #filters-sheet.filters-section {
        position: fixed !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) scale(0.95) !important;
        width: 90% !important;
        max-width: 600px !important;
        max-height: 85vh !important;
        z-index: 10000 !important;
        background: #fff !important;
        border-radius: 16px !important;
        padding: 0 !important;
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3) !important;
        margin: 0 !important;
        transition: transform 0.3s ease, opacity 0.3s ease !important;
        opacity: 0 !important;
        overflow: hidden !important;
        display: flex !important;
        flex-direction: column !important;
        pointer-events: none !important;
        visibility: hidden !important;
    }

    #filters-sheet.filters-section.open,
    body.filter-open #filters-sheet.filters-section {
        transform: translate(-50%, -50%) scale(1) !important;
        opacity: 1 !important;
        pointer-events: auto !important;
        visibility: visible !important;
        display: flex !important;
        z-index: 10001 !important;
    }

    /* Отступы для элементов модального окна на планшетах */
    #filters-sheet.filters-section .filters-sheet-header {
        padding: 20px 24px !important;
    }

    #filters-sheet.filters-section .filters-form {
        padding: 24px !important;
    }

    #filters-sheet.filters-section .filters-actions {
        padding: 0 24px 24px 24px !important;
        margin-top: 12px !important;
    }

    /* Блокируем прокрутку body когда фильтр открыт */
    body.filter-open {
        overflow: hidden !important;
        position: fixed !important;
        width: 100% !important;
    }

    .filters-sheet-header {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        padding: 20px 24px !important;
        border-bottom: 1px solid #e9ecef;
        position: relative !important;
        flex-direction: row !important;
    }

    .filters-modal-title {
        margin: 0 !important;
        font-size: 1.25rem !important;
        font-weight: 700 !important;
        color: #1f2937 !important;
        flex: 1 !important;
    }

    /* Используем стили filter-modal-close для кнопки закрытия - справа вверху */
    #filters-sheet .filter-modal-close,
    #filters-sheet .filters-sheet-header .filter-modal-close,
    #mobile-filter-close.filter-modal-close,
    .filters-sheet-header #mobile-filter-close {
        border: none !important;
        background: transparent !important;
        border-radius: 50% !important;
        width: 32px !important;
        height: 32px !important;
        font-size: 18px !important;
        color: #666 !important;
        cursor: pointer !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        transition: all 0.2s ease !important;
        flex-shrink: 0 !important;
        padding: 0 !important;
        position: relative !important;
        z-index: 10 !important;
        margin-left: auto !important;
    }

    #filters-sheet .filter-modal-close:hover,
    #filters-sheet .filters-sheet-header .filter-modal-close:hover,
    #mobile-filter-close.filter-modal-close:hover,
    .filters-sheet-header #mobile-filter-close:hover {
        background: #f8f9fa !important;
        color: #1f2937 !important;
    }

    .filters-reset-btn {
        border: none;
        background: transparent;
        color: #666;
        font-size: 14px;
        font-weight: 500;
        cursor: pointer;
        padding: 8px 12px;
        border-radius: 8px;
        transition: all 0.2s ease;
    }

    .filters-reset-btn:hover {
        background: #f8f9fa;
        color: #1f2937;
    }

    .filters-form {
        display: block !important;
        height: auto !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        padding: 24px !important;
        flex: 1;
        -webkit-overflow-scrolling: touch !important;
    }

    /* Дополнительная специфичность для мобильной версии */
    #filters-sheet .filters-form {
        padding: 24px !important;
    }

    /* Перестраиваем сетку фильтров под мобильный UX */
    .filters-row-grid {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }

    .filters-row-grid .filter-group {
        flex: 1 1 calc(50% - 10px);
    }

    @media (max-width: 520px) {
        .filters-row-grid .filter-group {
            flex-basis: 100%;
        }
    }

    /* Порядок: Город/Район/Улица → Комнаты (полная ширина) → Площадь → Цена */
    .filters-row-grid .filter-group:nth-child(1) {
        order: 1;
    }

    .filters-row-grid .filter-group:nth-child(2) {
        order: 2;
    }

    .filters-row-grid .filter-group:nth-child(3) {
        order: 3;
    }

    .filters-row-grid .filter-group:nth-child(6) {
        order: 4;
        flex-basis: 100%;
    }

    .filters-row-grid .filter-group:nth-child(4) {
        order: 5;
        flex-basis: 100%;
    }

    .filters-row-grid .filter-group:nth-child(5) {
        order: 6;
        flex-basis: 100%;
    }

    .filter-group {
        background: transparent;
        border: none;
        border-radius: 0;
        padding: 0;
        margin-bottom: 12px;
    }

    .filter-group:last-child {
        margin-bottom: 0;
    }

    .filter-group label {
        display: block;
        font-size: 16px;
        font-weight: 600;
        color: #1f2937;
        margin-bottom: 6px;
    }

    .filter-select-input {
        width: 100%;
        border: 1px solid #e5e7eb;
        border-radius: 12px;
        padding: 12px 14px;
        background: #fff;
        font-size: 15px;
        color: #111827;
        display: flex;
        align-items: center;
        justify-content: space-between;
        cursor: pointer;
        transition: border-color 0.2s ease, box-shadow 0.2s ease;
    }

    .filter-select-input:hover,
    .filter-select-input:focus {
        border-color: #bcaf87;
        box-shadow: 0 0 0 3px rgba(188, 175, 135, 0.15);
        outline: none;
    }

    .filter-select-input span {
        font-weight: 500;
        color: #1f2937;
    }

    .filter-select {
        width: 100%;
        height: 40px;
        padding: 0 12px;
        border-radius: 8px;
        border: 1px solid #e2e2e2;
        background: #fff;
        color: #222;
        font-size: 14px;
        appearance: none;
        -webkit-appearance: none;
        background-image: linear-gradient(45deg, transparent 50%, #999 50%), linear-gradient(135deg, #999 50%, transparent 50%);
        background-position: calc(100% - 18px) 16px, calc(100% - 12px) 16px;
        background-size: 6px 6px, 6px 6px;
        background-repeat: no-repeat;
    }

    .range-container {
        background: transparent;
        border: none;
        border-radius: 0;
        padding: 0;
    }

    /* Стили для полей ввода "От" и "до" */
    .range-input-group {
        display: flex;
        gap: 12px;
        margin-bottom: 0;
    }

    .range-input-wrapper {
        flex: 1;
    }

    .range-input-wrapper input[type="text"],
    .range-input-wrapper input[type="number"],
    .range-input {
        width: 100%;
        padding: 12px 16px;
        border: 2px solid #e9ecef;
        border-radius: 8px;
        font-size: 14px;
        background: #fff;
        color: #1f2937;
        box-sizing: border-box;
        transition: border-color 0.2s ease;
        -webkit-appearance: none;
        appearance: none;
    }

    .range-input-wrapper input[type="text"]:focus,
    .range-input-wrapper input[type="number"]:focus,
    .range-input:focus {
        outline: none;
        border-color: #bcaf87;
    }

    .range-input-wrapper input[type="text"]::placeholder,
    .range-input-wrapper input[type="number"]::placeholder,
    .range-input::placeholder {
        color: #9ca3af;
    }

    /* Убираем стрелки у number input */
    .range-input::-webkit-inner-spin-button,
    .range-input::-webkit-outer-spin-button {
        -webkit-appearance: none;
        margin: 0;
    }

    .range-input[type=number] {
        -moz-appearance: textfield;
    }

    /* Стили для чекбоксов комнат */
    .rooms-checkboxes {
        display: flex;
        flex-direction: column;
        gap: 4px;
    }

    .room-checkbox-item {
        display: flex;
        align-items: center;
        padding: 4px 0;
        cursor: pointer;
    }

    .room-checkbox-item input[type="checkbox"] {
        width: 18px;
        height: 18px;
        margin-right: 12px;
        cursor: pointer;
        border: 2px solid #d1d5db;
        border-radius: 4px;
        appearance: none;
        -webkit-appearance: none;
        background: #fff;
        position: relative;
        flex-shrink: 0;
    }

    .room-checkbox-item input[type="checkbox"]:checked {
        background: #bcaf87;
        border-color: #bcaf87;
    }

    .room-checkbox-item input[type="checkbox"]:checked::after {
        content: '✓';
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        color: #fff;
        font-size: 12px;
        font-weight: bold;
    }

    .room-checkbox-item span {
        font-size: 14px;
        color: #1f2937;
    }

    /* Стили для radio buttons сортировки */
    .sorting-radio-group {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    .sorting-radio-item {
        display: flex;
        align-items: center;
        padding: 8px 0;
        cursor: pointer;
    }

    .sorting-radio-item input[type="radio"] {
        width: 18px;
        height: 18px;
        margin-right: 12px;
        cursor: pointer;
        border: 2px solid #d1d5db;
        border-radius: 50%;
        appearance: none;
        -webkit-appearance: none;
        background: #fff;
        position: relative;
        flex-shrink: 0;
    }

    .sorting-radio-item input[type="radio"]:checked {
        border-color: #bcaf87;
        background: #fff;
    }

    .sorting-radio-item input[type="radio"]:checked::after {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 10px;
        height: 10px;
        border-radius: 50%;
        background: #bcaf87;
    }

    .sorting-radio-item span {
        font-size: 14px;
        color: #1f2937;
    }

    /* Стили для сегментированного контрола ЖК/Квартиры */
    .content-toggle-segmented {
        display: flex;
        background: #f3f4f6;
        border-radius: 8px;
        padding: 4px;
        gap: 0;
    }

    .content-toggle-btn-segmented,
    .offers-toggle-btn {
        flex: 1;
        padding: 10px 16px;
        border: none;
        background: transparent;
        color: #6b7280;
        font-size: 14px;
        font-weight: 500;
        cursor: pointer;
        transition: all 0.2s ease;
        border-radius: 6px;
        white-space: nowrap;
    }

    .content-toggle-btn-segmented[data-active="true"],
    .offers-toggle-btn[data-active="true"] {
        background: #fff;
        color: #1f2937;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    }

    .content-toggle-btn-segmented:hover,
    .offers-toggle-btn:hover {
        color: #1f2937;
    }

    /* Общие модальные окна фильтров */
    .filter-modal {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: 10000;
    }

    .filter-modal.active {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .filter-modal-backdrop {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(37, 37, 38, 0.85);
        backdrop-filter: blur(8px);
    }

    .filter-modal-content {
        position: relative;
        background: #fff;
        border-radius: 16px;
        width: min(90%, 520px);
        max-height: 80vh;
        display: flex;
        flex-direction: column;
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
        z-index: 10001;
    }

    .filter-modal-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 20px 24px;
        border-bottom: 1px solid #e9ecef;
    }

    .filter-modal-header h3 {
        margin: 0;
        font-size: 1.25rem;
        font-weight: 700;
        color: #1f2937;
    }

    .filter-modal-close {
        border: none;
        background: transparent;
        border-radius: 50%;
        width: 32px;
        height: 32px;
        font-size: 18px;
        line-height: 1;
        color: #666;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.2s ease;
        padding: 0;
    }

    .filter-modal-close:hover {
        background: #f8f9fa;
        color: #1f2937;
    }

    .filter-modal-body {
        flex: 1;
        overflow-y: auto;
        padding: 16px 24px;
    }

    .filter-modal-list {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    .filter-modal-item {
        display: flex;
        align-items: center;
        padding: 12px 0;
        cursor: pointer;
    }

    .filter-modal-item input[type="checkbox"] {
        width: 18px;
        height: 18px;
        margin-right: 12px;
        cursor: pointer;
        border: 2px solid #d1d5db;
        border-radius: 4px;
        appearance: none;
        -webkit-appearance: none;
        background: #fff;
        position: relative;
        flex-shrink: 0;
    }

    .filter-modal-item input[type="checkbox"]:checked {
        background: #bcaf87;
        border-color: #bcaf87;
    }

    .filter-modal-item input[type="checkbox"]:checked::after {
        content: '✓';
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        color: #fff;
        font-size: 12px;
        font-weight: bold;
    }

    .filter-modal-item span {
        font-size: 14px;
        color: #1f2937;
    }

    .filter-modal-search {
        margin-bottom: 12px;
    }

    .filter-modal-search input {
        width: 100%;
        padding: 10px 12px;
        border: 1px solid #e5e7eb;
        border-radius: 8px;
        font-size: 14px;
        color: #1f2937;
        box-sizing: border-box;
    }

    .filter-modal-search input:focus {
        outline: none;
        border-color: #bcaf87;
        box-shadow: 0 0 0 2px rgba(188, 175, 135, 0.2);
    }

    .filter-modal-empty {
        padding: 16px;
        text-align: center;
        color: #9ca3af;
        font-size: 14px;
    }

    .filter-modal-footer {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 16px 24px;
        border-top: 1px solid #e9ecef;
        gap: 12px;
    }

    .filter-modal-reset {
        border: none;
        background: transparent;
        color: #666;
        font-size: 14px;
        font-weight: 500;
        cursor: pointer;
        padding: 8px 12px;
        border-radius: 8px;
        transition: all 0.2s ease;
    }

    .filter-modal-reset:hover {
        background: #f8f9fa;
        color: #e74c3c;
    }

    .filter-modal-actions {
        display: flex;
        gap: 8px;
    }

    .filter-modal-cancel,
    .filter-modal-apply {
        padding: 10px 20px;
        border: none;
        border-radius: 8px;
        font-size: 14px;
        font-weight: 500;
        cursor: pointer;
        transition: all 0.2s ease;
    }

    .filter-modal-cancel {
        background: #f3f4f6;
        color: #1f2937;
    }

    .filter-modal-cancel:hover {
        background: #e9ecef;
    }

    .filter-modal-apply {
        background: #bcaf87;
        color: #fff;
    }

    .filter-modal-apply:hover {
        background: #a89a75;
    }

    .range-display {
        display: flex;
        justify-content: center;
        gap: 8px;
        font-size: 14px;
        color: #1f2937;
        margin-bottom: 0;
    }

    .range-value {
        color: #1f2937;
    }

    .range-value strong {
        font-weight: 600;
    }

    .range-slider {
        position: relative;
        height: 28px;
    }

    .range-slider-input {
        width: 100%;
        -webkit-appearance: none;
        appearance: none;
        background: transparent;
        pointer-events: auto;
        height: 28px;
    }

    .range-slider-input::-webkit-slider-thumb {
        -webkit-appearance: none;
        appearance: none;
        width: 18px;
        height: 18px;
        background: #bcaf8a;
        border-radius: 50%;
        border: none;
        box-shadow: 0 2px 6px rgba(0, 0, 0, .2);
    }

    .range-track {
        position: absolute;
        left: 8px;
        right: 8px;
        top: 50%;
        height: 4px;
        background: #eee;
        border-radius: 999px;
        transform: translateY(-50%);
    }

    .range-fill {
        height: 100%;
        background: #bcaf8a;
        border-radius: 999px;
    }

    .filters-actions {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        margin-top: 12px !important;
        padding: 0 24px 24px 24px !important;
    }

    /* Дополнительная специфичность для мобильной версии */
    #filters-sheet .filters-actions {
        padding: 0 24px 24px 24px !important;
        margin-top: 12px !important;
    }

    .filters-actions .btn {
        padding: 10px 14px;
        font-size: 14px;
        border-radius: 10px;
    }

    .clear-filters {
        font-size: 12px;
        color: #a77;
        display: inline-flex;
        align-items: center;
        gap: 6px;
    }

    .results-count {
        font-size: 12px;
        color: #666;
    }

    /* Show mobile-only controls on small screens and tablets */
    @media (max-width: 991px) {
        .mobile-filter-toggle {
            display: inline-flex;
        }

        .filters-sheet-header {
            display: flex;
        }

        #mobile-filter-open,
        #mobile-filter-close {
            display: inline-flex;
        }
    }

    /* Стили для чекбоксов */
    .custom-dropdown-item,
    .complex-filter-item {
        display: flex;
        align-items: center;
        padding: 8px 0;
        cursor: pointer;
    }

    .custom-dropdown-item input[type="checkbox"],
    .complex-filter-item input[type="checkbox"] {
        width: 18px;
        height: 18px;
        margin-right: 12px;
        cursor: pointer;
        border: 2px solid #d1d5db;
        border-radius: 4px;
        appearance: none;
        -webkit-appearance: none;
        background: #fff;
        position: relative;
        flex-shrink: 0;
    }

    .custom-dropdown-item input[type="checkbox"]:checked,
    .complex-filter-item input[type="checkbox"]:checked {
        background: #bcaf87;
        border-color: #bcaf87;
    }

    .custom-dropdown-item input[type="checkbox"]:checked::after,
    .complex-filter-item input[type="checkbox"]:checked::after {
        content: '✓';
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        color: #fff;
        font-size: 12px;
        font-weight: bold;
    }

    .custom-dropdown-item span,
    .complex-filter-item .complex-name {
        font-size: 14px;
        color: #1f2937;
    }

    /* Стили для dropdown */
    .custom-dropdown-input {
        padding: 12px 16px;
        border: 2px solid #e9ecef;
        border-radius: 8px;
        background: #fff;
        cursor: pointer;
        transition: border-color 0.2s ease;
    }

    .custom-dropdown-input:hover {
        border-color: #bcaf87;
    }

    .dropdown-text {
        font-size: 14px;
        color: #1f2937;
    }

    .dropdown-arrow {
        color: #9ca3af;
        font-size: 12px;
    }

    /* Горизонтальная лента кнопок комнат */
    .button-filter {
        display: flex;
        gap: 8px;
        overflow-x: auto;
        padding-bottom: 4px;
    }

    .button-filter::-webkit-scrollbar {
        display: none
    }

    .filter-btn,
    .filter-chip-btn {
        padding: 10px 16px;
        border: 2px solid #e9ecef;
        border-radius: 8px;
        background: #fff;
        color: #1f2937;
        font-size: 14px;
        font-weight: 500;
        cursor: pointer;
        transition: all 0.2s ease;
        white-space: nowrap;
    }

    .filter-btn:hover,
    .filter-chip-btn:hover {
        border-color: #bcaf87;
        background: #faf7ee;
    }

    .filter-btn[data-active="true"],
    .filter-chip-btn[data-active="true"] {
        background: #bcaf87;
        border-color: #bcaf87;
        color: #fff;
    }

    .filter-btn {
        padding: 8px 12px;
        border: 1px solid #e5e5e5;
        border-radius: 999px;
        background: #fff;
        font-size: 13px;
        white-space: nowrap;
    }

    .filter-btn.active,
    [data-active="true"] {
        background: #1f2937;
        color: #bcaf8a;
        border-color: #1f2937;
    }

    /* Карточки результатов — мобильная компактная карточка */
    .catalog-grid {
        gap: 12px !important;
        grid-template-columns: 1fr !important;
    }

    .property-card-compact {
        width: 100% !important;
        margin: 0 !important;
        display: grid;
        grid-template-columns: 110px 1fr;
        gap: 10px;
        padding: 10px;
        border-radius: 12px;
    }

    .compact-card-image {
        aspect-ratio: 3/2;
        border-radius: 10px;
        overflow: hidden
    }

    .compact-card-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block
    }

    .compact-card-title {
        font-size: 16px;
        margin: 0 0 4px 0
    }

    .compact-card-location {
        font-size: 12px
    }

    .compact-detail-item {
        font-size: 12px
    }

    .compact-price-text {
        font-size: 14px
    }

    @media (max-width: 480px) {
        .property-card-compact {
            grid-template-columns: 1fr;
        }

        .compact-card-image {
            aspect-ratio: 16/9;
        }
    }

    /* Компактные табы Новостройки/Вторичная */
    .catalog-tabs {
        gap: 10px;
    }

    .catalog-tab {
        padding: 6px 12px;
        font-size: 14px;
        border-radius: 999px;
    }

    @media (max-width: 420px) {
        .catalog-tab {
            padding: 5px 10px;
            font-size: 13px;
        }
    }
}

@media (max-width: 576px) {
    .catalog-section~.feedback-wrapper {
        margin-top: 12px !important;
        padding: 24px 0 56px 0 !important;
    }

    .catalog-section~.footer-transition {
        padding-top: 48px !important;
    }

    .catalog-section~.footer-transition .deco-logo.on-dark {
        top: 10px !important;
        z-index: 200 !important;
    }

    .catalog-section~.footer .footer-content {
        margin-top: 80px !important;
    }
}

/* ===== Detail page: agent properties section ===== */
@media (max-width: 768px) {
    .agent-properties-section {
        padding: 24px 16px;
    }
}

/* Detail page: complex offers grid (inside detail template) */
@media (max-width: 768px) {
    .offers-grid {
        grid-template-columns: 1fr;
        gap: 16px
    }

    .offer-card {
        grid-template-columns: 1fr;
        max-width: 100%
    }

    .offer-media {
        aspect-ratio: 16/9
    }

    .offer-content {
        min-height: auto
    }

    .offer-title {
        font-size: 18px
    }
}

@media (max-width: 480px) {
    .offer-card {
        padding: 12px;
        gap: 12px
    }

    .offer-title {
        font-size: 16px
    }
}

/* ===== Video detail page ===== */
@media (max-width: 992px) {
    .video-detail-layout {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .video-main-content {
        order: 1;
    }

    .video-sidebar {
        position: static;
        order: 2;
    }

    .sidebar-videos {
        max-height: none;
    }
}

@media (max-width: 768px) {
    .video-title {
        font-size: 1.5rem;
    }

    .video-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .complex-link-btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }

    .similar-videos-full-section {
        padding: 2rem 0;
    }

    .similar-videos-full-section .section-title {
        font-size: 1.5rem;
    }

    .similar-videos-full-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .sidebar-video-card {
        padding: 0.5rem;
    }

    .sidebar-video-image {
        width: 60px;
        height: 45px;
    }

    .sidebar-video-title {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .video-header {
        padding: 1rem;
    }

    .video-title {
        font-size: 1.3rem;
    }

    .video-description,
    .complex-link-section {
        padding: 1rem;
    }

    .complex-link-btn {
        padding: 0.75rem 1rem;
        font-size: 0.85rem;
        gap: 0.5rem;
    }

    .similar-videos-full-section {
        padding: 1.5rem 0;
    }

    .similar-videos-full-section .section-title {
        font-size: 1.3rem;
    }

    .similar-videos-full-section .section-subtitle {
        font-size: 1rem;
    }
}

/* ===== Tag detail page ===== */
@media (max-width: 768px) {
    .tag-header {
        margin: 20px 0;
        padding: 30px 20px;
    }

    .tag-title {
        font-size: 28px;
    }

    .tag-description {
        font-size: 16px;
    }

    .articles-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        margin: 20px 0;
    }

    .article-content {
        padding: 20px;
    }

    .article-title {
        font-size: 18px;
    }

    .popular-tags {
        margin: 40px 0;
        padding: 30px 20px;
    }

    .tags-cloud {
        gap: 8px;
    }

    .tags-cloud .tag-link {
        padding: 8px 16px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .tag-title {
        font-size: 24px;
    }

    .tag-description {
        font-size: 14px;
    }

    .article-image {
        height: 180px;
    }

    .article-content {
        padding: 16px;
    }

    .article-title {
        font-size: 16px;
    }

    .article-footer {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ===== Privacy page ===== */
@media (max-width: 768px) {
    .privacy-title {
        font-size: 28px;
    }

    .privacy-content {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .office-map-section .office-info-card {
        padding: 20px;
    }

    .office-map-section .office-info-card h3 {
        font-size: 20px;
    }

    .office-map-section .contact-item {
        font-size: 14px;
    }
}

/* ===== About Company Section - Improved Mobile Text ===== */
@media (max-width: 768px) {

    /* Улучшенный текст цитаты для мобильных */
    .about-quote {
        font-size: 14px !important;
        line-height: 1.65 !important;
        letter-spacing: 0.3px !important;
        padding: 20px !important;
        background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%) !important;
        border-radius: 12px !important;
        border: 1px solid rgba(255, 255, 255, 0.1) !important;
        backdrop-filter: blur(5px) !important;
    }

    .about-quote p {
        margin-bottom: 0.9em !important;
        hyphens: auto !important;
        word-spacing: 0.05em !important;
    }

    .about-quote p:first-of-type {
        font-weight: 500 !important;
        color: rgba(255, 255, 255, 1) !important;
    }

    /* Более красивая кнопка "Читать далее" */
    .read-more-btn {
        font-size: 13px !important;
        padding: 10px 18px !important;
        max-width: 100% !important;
        width: 100% !important;
        margin-top: 16px !important;
        background: linear-gradient(135deg, rgba(190, 175, 135, 0.2) 0%, rgba(190, 175, 135, 0.1) 100%) !important;
        border: 1px solid rgba(190, 175, 135, 0.4) !important;
        color: rgba(255, 255, 255, 0.95) !important;
        font-weight: 600 !important;
    }

    .read-more-btn:hover {
        background: linear-gradient(135deg, rgba(190, 175, 135, 0.3) 0%, rgba(190, 175, 135, 0.15) 100%) !important;
        border-color: rgba(190, 175, 135, 0.6) !important;
        transform: translateY(-2px) !important;
        box-shadow: 0 4px 12px rgba(190, 175, 135, 0.3) !important;
    }

    /* Уменьшаем кавычки для лучшей читаемости */
    .about-quote::before,
    .about-quote::after {
        font-size: 40px !important;
        opacity: 0.2 !important;
    }

    .about-quote::before {
        top: -10px !important;
        left: -15px !important;
    }

    .about-quote::after {
        bottom: -25px !important;
        right: -15px !important;
    }

    /* Более красивая подпись */
    .about-signature {
        padding: 24px !important;
        background: linear-gradient(135deg, rgba(190, 175, 135, 0.15) 0%, rgba(190, 175, 135, 0.05) 100%) !important;
        border-radius: 16px !important;
        border: 1px solid rgba(190, 175, 135, 0.3) !important;
    }

    .signature-line {
        font-size: 22px !important;
        letter-spacing: 0.5px !important;
        background: linear-gradient(135deg, #fff 0%, rgba(190, 175, 135, 1) 100%) !important;
        -webkit-background-clip: text !important;
        -webkit-text-fill-color: transparent !important;
        background-clip: text !important;
        margin-bottom: 6px !important;
    }

    .founder-title {
        opacity: 0.9 !important;
    }
}

@media (max-width: 480px) {

    /* Максимально улучшенная цитата для очень малых экранов */
    .about-quote {
        font-size: 13px !important;
        line-height: 1.7 !important;
        padding: 16px !important;
        letter-spacing: 0.2px !important;
        background: linear-gradient(135deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.03) 100%) !important;
        border-radius: 10px !important;
        border: 1px solid rgba(255, 255, 255, 0.12) !important;
    }

    .about-quote p {
        margin-bottom: 0.8em !important;
    }

    .about-quote p:first-of-type {
        margin-bottom: 1em !important;
    }

    /* Компактная красивая кнопка "Читать далее" */
    .read-more-btn {
        font-size: 12px !important;
        padding: 10px 16px !important;
        margin-top: 12px !important;
        background: linear-gradient(135deg, rgba(190, 175, 135, 0.25) 0%, rgba(190, 175, 135, 0.12) 100%) !important;
        border: 1px solid rgba(190, 175, 135, 0.5) !important;
        border-radius: 10px !important;
    }

    /* Еще меньше кавычки */
    .about-quote::before,
    .about-quote::after {
        font-size: 35px !important;
        opacity: 0.15 !important;
    }

    .about-quote::before {
        top: -8px !important;
        left: -12px !important;
    }

    .about-quote::after {
        bottom: -20px !important;
        right: -12px !important;
    }

    /* Компактная подпись с градиентом */
    .about-signature {
        padding: 20px !important;
        margin-top: 30px !important;
        border-radius: 14px !important;
        background: linear-gradient(135deg, rgba(190, 175, 135, 0.18) 0%, rgba(190, 175, 135, 0.08) 100%) !important;
        border: 1px solid rgba(190, 175, 135, 0.35) !important;
    }

    .signature-line {
        font-size: 20px !important;
        letter-spacing: 0.4px !important;
    }
}

/* ===== Mortgage page ===== */
@media (max-width: 1024px) {
    .mortgage-page .container {
        padding: 0 16px;
    }
}

@media (max-width: 768px) {

    /* Основной контейнер */
    .mortgage-page {
        padding: 0;
    }

    .mortgage-page .container {
        padding: 0 12px;
    }

    /* Шапка страницы */
    .mortgage-page .page-header {
        padding: 40px 16px 30px;
        margin-bottom: 24px;
        border-radius: 0 0 20px 20px;
    }

    .mortgage-page .page-title {
        font-size: 32px;
        margin-bottom: 16px;
    }

    .mortgage-page .page-subtitle {
        font-size: 16px;
        line-height: 1.5;
    }

    /* Калькулятор ипотеки */
    .mortgage-page .mortgage-section {
        margin: 20px 0;
    }

    .mortgage-page .mortgage-grid {
        grid-template-columns: 1fr !important;
        gap: 0;
    }

    .mortgage-page .mortgage-card {
        padding: 16px 18px !important;
    }

    .mortgage-page .mortgage-card+.mortgage-card {
        border-left: none;
        border-top: 1px solid #eee;
    }

    /* Секции преимуществ и недостатков */
    .mortgage-page .section-header {
        text-align: center;
        margin-bottom: 24px;
    }

    .mortgage-page .section-title {
        font-size: 24px;
    }

    .mortgage-page .section-subtitle {
        font-size: 15px;
    }

    .mortgage-page .benefits-grid,
    .mortgage-page .disadvantages-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .mortgage-page .benefit-card,
    .mortgage-page .disadvantage-card {
        padding: 20px;
    }
}

@media (max-width: 576px) {

    /* Компактный вид на малых экранах */
    .mortgage-page .page-header {
        padding: 32px 12px 24px;
        margin-bottom: 20px;
    }

    .mortgage-page .page-title {
        font-size: 28px;
    }

    .mortgage-page .page-subtitle {
        font-size: 15px;
    }

    .mortgage-page .mortgage-card {
        padding: 14px 16px !important;
    }

    .mortgage-page .section-title {
        font-size: 22px;
    }

    .mortgage-page .benefit-card,
    .mortgage-page .disadvantage-card {
        padding: 16px;
    }
}

@media (max-width: 480px) {

    /* Максимально компактный вид */
    .mortgage-page .page-header {
        padding: 24px 12px 20px;
        margin-bottom: 16px;
        border-radius: 0 0 16px 16px;
    }

    .mortgage-page .page-header-content {
        padding: 0;
    }

    .mortgage-page .page-title {
        font-size: 24px;
        margin-bottom: 12px;
    }

    .mortgage-page .page-subtitle {
        font-size: 14px;
    }

    .mortgage-page .mortgage-section {
        margin: 16px 0;
    }

    .mortgage-page .mortgage-card {
        padding: 12px 14px !important;
    }

    .mortgage-page .section-header {
        margin-bottom: 20px;
    }

    .mortgage-page .section-title {
        font-size: 20px;
    }

    .mortgage-page .section-subtitle {
        font-size: 14px;
    }

    .mortgage-page .benefits-grid,
    .mortgage-page .disadvantages-grid {
        gap: 12px;
    }

    .mortgage-page .benefit-card,
    .mortgage-page .disadvantage-card {
        padding: 14px;
        border-radius: 12px;
    }

    .mortgage-page .mortgage-with-us-section,
    .mortgage-page .self-mortgage-section {
        margin-bottom: 32px;
    }

    /* Компактные карточки ЖК */
    .mortgage-page .catalog-grid {
        gap: 12px;
        grid-template-columns: 1fr !important;
    }

    .mortgage-page .property-card-compact {
        padding: 10px;
        border-radius: 12px;
    }

    .mortgage-page .compact-card-title {
        font-size: 16px;
    }

    .mortgage-page .compact-card-location {
        font-size: 12px;
    }

    .mortgage-page .compact-detail-item {
        font-size: 11px;
    }

    .mortgage-page .compact-price-text {
        font-size: 14px;
    }

}