/* Стили для страницы квартиры Руслана */

.apartment-ruslan {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    margin: 0 !important;
    padding: 0 !important;
}

.apartment-ruslan * {
    box-sizing: border-box;
}

/* Главный заголовок hero с фоном и overlay */
.apartment-hero {
    background: url('/new/image/catalog/blog/luxury-modern-and-vintage-turquoise-interior-marble-kitchen-island-with-wooden-chockers-brown-wooden-table-with-metalic-tray-and-metalic-gold-vase-with-white-decorations-scaled.jpg') center center/cover no-repeat;
    min-height: 370px;
    height: 370px;
    margin-bottom: 0;
    padding: 0;
}
.apartment-hero__overlay {
    position: absolute;
    inset: 0;
    background: rgba(34,34,34,0.75);
    z-index: 1;
}
.apartment-hero__content {
    position: relative;
    z-index: 2;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.apartment-hero__content h1 {
    font-family: 'Poiret One', Sans-serif;
    font-size: 60px;
    font-weight: bold;
    text-transform: uppercase;
    color: rgba(255,255,241,0.82);
    margin: 0;
    text-align: center;
    letter-spacing: 0.04em;
    line-height: 1.1;
    text-shadow: none;
}

/* Секции комнат */
.room-section {
    padding: 0;
    margin: 0;
    background: none;
    border: none;
}

/* Фон и заголовок секции помещения */
.room-title-bg {
    background: #373737;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0;
    margin-top: 0;
    padding-bottom: 0;
    border: none;
    z-index: 2;
}

.room-title-bg h2 {
    font-family: 'Poiret One', Sans-serif;
    font-size: 50px;
    font-weight: bold;
    text-transform: uppercase;
    color: rgba(255,255,241,0.82);
    margin: 0;
    text-align: center;
    letter-spacing: 0.04em;
    line-height: 1.1;
    text-shadow: none;
}

.room-gallery-bg {
    background: #222;
    padding: 40px 0 60px 0;
    margin-top: 0;
    border: none;
    z-index: 1;
}

.room-inner {
    max-width: 1200px;
    margin: 0 auto;
}

.room-gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin: 60px auto;
    max-width: 1200px;
}

.room-gallery img {
    width: 372px !important;
    height: 496px !important;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    display: block;
    margin: 0 auto;
}

/* Горизонтальный слайдер */
.room-carousel {
    position: relative;
    margin: 0 auto 40px auto;
    overflow-x: auto;
    display: flex;
    flex-wrap: nowrap;
    gap: 15px;
    padding: 20px 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
    cursor: grab;
    min-height: 220px;
}
.room-carousel:active {
    cursor: grabbing;
}
.room-carousel::-webkit-scrollbar {
    display: none;
}
.carousel-item {
    flex: 0 0 280px;
    height: 200px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    background: #f0f0f0;
    min-width: 280px !important;
    min-height: 200px !important;
    width: 280px !important;
    height: 200px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}
.carousel-item img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    position: static !important;
    z-index: 2 !important;
    background: none !important;
}

/* Навигация карусели */
.carousel-nav {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #e2e8f0;
    border: none;
    cursor: pointer;
    transition: background 0.3s ease;
}

.carousel-dot.active {
    background: #667eea;
}

/* Адаптивность */
@media (max-width: 900px) {
    .apartment-hero, .apartment-hero__content { height: 200px; min-height: 200px; }
    .apartment-hero__content h1 { font-size: 28px; }
    .room-title-bg h2 { font-size: 32px; }
    .room-gallery img { height: 250px; }
}
@media (max-width: 768px) {
    .room-gallery { grid-template-columns: 1fr; gap: 15px; }
    .room-gallery img { height: 300px; }
    .carousel-item { flex: 0 0 240px; height: 160px; }
}
@media (max-width: 600px) {
    .apartment-hero, .apartment-hero__content { height: 120px; min-height: 120px; }
    .apartment-hero__content h1 { font-size: 16px; }
    .room-title-bg h2 { font-size: 18px; }
    .room-gallery img { height: 120px; }
}
@media (max-width: 480px) {
    .room-section { padding: 0; }
    .room-gallery img { height: 80px; }
    .carousel-item { flex: 0 0 200px; height: 140px; }
}

/* Отступы между секциями */
@media (min-width: 769px) {
    .room-section + .room-section {
        margin-top: 0;
    }
}

.room-anchor {
    scroll-margin-top: 100px;
}

/* Анимации */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.room-section {
    animation: fadeInUp 0.8s ease-out;
}

.kitchen-swiper {
    max-width: 1200px;
    margin: 0 auto 40px auto;
    padding: 20px 0;
    position: relative;
    overflow: hidden;
}

.kitchen-swiper .swiper-wrapper {
    display: flex !important;
    flex-wrap: nowrap !important;
    max-width: 100% !important;
}

.kitchen-swiper .swiper-slide {
    width: 260px !important;
    flex: 0 0 260px !important;
    height: 320px;
    background: #222;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
    display: flex;
    align-items: center;
    justify-content: center;
}

.kitchen-swiper .swiper-button-next,
.kitchen-swiper .swiper-button-prev {
    background: none !important;
    background-image: none !important;
    color: #fff;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    top: 50%;
    transform: translateY(-50%);
    position: absolute;
    z-index: 100;
    box-shadow: none;
    opacity: 1;
    transition: opacity 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.kitchen-swiper .swiper-button-next:after,
.kitchen-swiper .swiper-button-prev:after {
    content: '';
    display: block;
    width: 24px;
    height: 24px;
    background-size: contain;
    background-repeat: no-repeat;
}
.kitchen-swiper .swiper-button-next:after {
    background-image: url("data:image/svg+xml;utf8,<svg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'><path d='M8 4L16 12L8 20' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/></svg>");
}
.kitchen-swiper .swiper-button-prev:after {
    background-image: url("data:image/svg+xml;utf8,<svg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'><path d='M16 4L8 12L16 20' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/></svg>");
}

.kitchen-swiper .swiper-pagination {
    bottom: 30px !important;
    z-index: 101;
}
.kitchen-swiper .swiper-pagination-bullet {
    background: #808080;
    opacity: 1;
    width: 6px;
    height: 6px;
    margin: 0 4px !important;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    border: none;
    transition: background 0.2s;
}
.kitchen-swiper .swiper-pagination-bullet-active {
    background: #000000;
    border: none;
    opacity: 1;
}

@media (max-width: 900px) {
    .kitchen-swiper .swiper-slide { height: 180px; }
}
@media (max-width: 600px) {
    .kitchen-swiper .swiper-slide { height: 120px; }
}

/* Принудительное отображение слайдов Swiper */
.swiper-slide {
    visibility: visible !important;
    opacity: 1 !important;
    display: block !important;
}

.swiper-slide img {
    visibility: visible !important;
    opacity: 1 !important;
    display: block !important;
}

/* Восстановление видимости после закрытия Fancybox */
.swiper-slide:not(.swiper-slide-duplicate) {
    visibility: visible !important;
    opacity: 1 !important;
}

/* Универсальные стили для всех Swiper */
.swiper {
    border-radius: 16px !important;
    background: #222 !important;
    padding-bottom: 40px !important;
    margin-bottom: 0 !important;
    min-height: 276px !important;
    margin-top: 60px !important;
    position: relative !important;
}

.swiper .swiper-wrapper {
    align-items: center;
}

.swiper .swiper-slide {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 392px !important;
    height: 392px !important;
    min-width: 392px !important;
    min-height: 392px !important;
    max-width: 392px !important;
    max-height: 392px !important;
    box-sizing: border-box;
}

.swiper .swiper-slide img {
    width: 392px !important;
    height: 392px !important;
    object-fit: cover;
    border-radius: 10px;
    display: block;
}

.swiper .swiper-button-next,
.swiper .swiper-button-prev {
    color: #fff !important;
    background: rgba(0,0,0,0.3) !important;
    border-radius: 50% !important;
    width: 40px !important;
    height: 40px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
}

.swiper .swiper-pagination {
    position: absolute !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 12px !important;
    z-index: 10 !important;
    text-align: center !important;
    width: 100% !important;
    pointer-events: none !important;
}

.swiper .swiper-pagination-bullet {
    width: 6px !important;
    height: 6px !important;
    background: #888 !important;
    opacity: 1 !important;
    margin: 0 3px !important;
    pointer-events: auto !important;
}

.swiper .swiper-pagination-bullet-active {
    background: #111 !important;
}

@media (max-width: 1200px) {
    .swiper .swiper-slide { min-height: 220px !important; height: 220px !important; max-height: 220px !important; width: 220px !important; min-width: 220px !important; max-width: 220px !important; }
}
@media (max-width: 900px) {
    .swiper .swiper-slide {
        min-width: 160px !important;
        max-width: 1fr !important;
        height: 140px !important;
        min-height: 140px !important;
        max-height: 140px !important;
        margin-right: 8px !important;
    }
}
@media (max-width: 600px) {
    .swiper .swiper-slide,
    .swiper .swiper-slide img {
        width: 90vw !important;
        height: 90vw !important;
        min-width: 90vw !important;
        min-height: 90vw !important;
        max-width: 90vw !important;
        max-height: 90vw !important;
    }
    .room-gallery img {
        width: 90vw !important;
        height: 120vw !important;
        min-width: 90vw !important;
        min-height: 120vw !important;
        max-width: 90vw !important;
        max-height: 120vw !important;
    }
}
.swiper .swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
    display: block;
}

/* --- ROOM-GALLERY КАРТИНКИ НА ПК --- */
@media (min-width: 1025px) {
    .room-gallery img {
        width: 570px !important;
        height: 719px !important;
        transition: transform 0.3s ease, box-shadow 0.3s ease;
        box-shadow: 0 8px 32px rgba(0,0,0,0.1);
        border-radius: 12px;
        object-fit: cover;
        display: block;
        margin: 0 auto;
    }
    .room-gallery img:hover {
        transform: translateY(-5px) scale(1.04);
        box-shadow: 0 12px 40px rgba(0,0,0,0.15);
        z-index: 2;
    }
}

/* --- АДАПТИВ ДЛЯ МОБИЛЬНЫХ --- */
@media (max-width: 1024px) {
    .room-gallery img {
        width: 372px !important;
        height: 496px !important;
    }
}
@media (max-width: 600px) {
    .room-gallery img {
        width: 90vw !important;
        height: 120vw !important;
    }
} 