:root {
    --navy: #244471;
    --gold: #244471; /* Возвращен корпоративный синий */
    --bg: #FDFBF4;
    --radius: 20px;
    --text-gray: #666666;
}

body { background: var(--bg); font-family: 'Inter', sans-serif; margin: 0; }

.bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    padding-bottom: 50px;
    max-width: 1100px;
    margin: 0 auto;
}

.item {
    background: #fff;
    padding: 35px;
    border-radius: var(--radius);
    border: 1px solid rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
}

.wide { grid-column: span 2; }
.full { grid-column: span 3; }

/* ОБНОВЛЕННЫЙ ЗАГОЛОВОК С ЛИНИЕЙ-ГРАДИЕНТОМ (КОРПОРАТИВНЫЙ ЦВЕТ) */
h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    color: var(--navy);
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 0 0 25px 0;
    width: 100%;
}

h2::after {
    content: "";
    flex-grow: 1;
    height: 1px;
    /* Градиент от корпоративного синего до полной прозрачности */
    background: linear-gradient(to right, var(--navy) 0%, rgba(36, 68, 113, 0) 100%);
}

h2 i, h2 svg { color: var(--navy); width: 24px; flex-shrink: 0; }

.media-wrapper {
    width: 100%;
    height: 450px;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 20px;
    background: #eee;
}

.media-wrapper img, .media-wrapper iframe {
    width: 100%; height: 100%; object-fit: cover; border: none;
}

.description-block p { 
    font-size: 0.95rem; 
    color: var(--text-gray); 
    line-height: 1.7; 
    margin: 0; 
}

.route-step { display: flex; gap: 15px; margin-bottom: 12px; align-items: flex-start; }
.route-step span {
    background: var(--navy); color: #fff;
    min-width: 24px; height: 24px;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 0.75rem; font-weight: 700; margin-top: 3px;
}

.rules-grid-four {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 10px;
}

.rule-card {
    text-align: center;
    padding: 20px;
    border-radius: 15px;
    background: #fdfdfd;
    border: 1px solid #f0f0f0;
}

.rule-icon { color: var(--navy); width: 32px; height: 32px; margin-bottom: 15px; }

.rule-card h4 {
    font-size: 0.85rem;
    letter-spacing: 1px;
    margin-bottom: 10px;
    color: var(--navy);
}

.rule-card p { font-size: 0.85rem; color: #666; line-height: 1.4; }

.active-rule-card {
    border: 1px solid var(--navy);
    background: #f0f4f8;
}

.wifi-copy {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
    background: #fff;
    padding: 8px;
    border-radius: 8px;
    border: 1px solid #eee;
}

.btn-copy {
    background: var(--navy);
    color: #fff;
    border: none;
    padding: 6px;
    font-size: 0.65rem;
    border-radius: 5px;
    cursor: pointer;
}

.food-grid-three {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.food-vertical-card {
    background: #fff;
    padding: 30px 20px;
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    border: 1px solid #f0f0f0;
}

.food-vertical-card h3 { font-family: 'Playfair Display', serif; font-size: 1.5rem; margin: 15px 0 10px 0; color: var(--navy); }
.food-vertical-card p { font-size: 0.9rem; color: var(--text-gray); margin-bottom: 20px; flex-grow: 1; }

.rule-header { color: var(--navy); font-weight: 700; font-size: 0.75rem; display: flex; align-items: center; gap: 6px; text-transform: uppercase; }

.address-text { color: #000; font-weight: 600; font-size: 0.85rem; margin-bottom: 15px; display: block; }

.food-vertical-card .maps-btn {
    width: 100%;
    padding: 12px;
    background: var(--navy);
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.food-vertical-card .maps-btn::after {
    content: "\f124"; 
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
}

.info-pill-centered {
    background: #f8fafc; padding: 15px; border-radius: 15px;
    border: 1px dashed var(--navy); text-align: center; margin-bottom: 15px;
}

.code-val { font-family: 'Playfair Display', serif; font-size: 2rem; color: var(--navy); font-weight: 700; }

/* Стили для расширенного описания проезда */
.arrival-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 10px;
}

.arrival-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

/* Иконки корпоративного цвета */
.arrival-item i, 
.arrival-item svg {
    color: #244471;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-top: 3px;
}

.arrival-text {
    font-size: 0.95rem;
    color: #445;
    line-height: 1.6;
    margin: 0;
}

.arrival-text strong {
    color: #244471;
    font-weight: 700;
}

/* Унификация кнопки "Открыть в картах" со стилем из блока еды */
.item.wide .maps-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--navy);
    color: #fff;
    text-decoration: none;
    padding: 12px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
}

/* Добавление иконки стрелочки как в ТЗ для еды */
.item.wide .maps-btn::after {
    content: "\f124"; 
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
}
/* МОБИЛЬНАЯ АДАПТАЦИЯ */
@media (max-width: 1024px) {
    .rules-grid-four { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    main.container { padding: 0 15px !important; margin-top: 20px !important; width: 100% !important; box-sizing: border-box; }
    .section-header h1 { font-size: 1.8rem !important; }
    .bento-grid { grid-template-columns: 1fr !important; gap: 15px !important; width: 100% !important; }
    .item.wide, .item.full { grid-column: span 1 !important; }
    .item { padding: 20px !important; }
    .media-wrapper { height: 250px !important; }
    .rules-grid-four, .food-grid-three { grid-template-columns: 1fr !important; gap: 10px !important; }
    .code-val { font-size: 1.6rem !important; }
    .maps-btn { padding: 15px !important; font-size: 0.85rem !important; }
    /* Адаптивный градиент для мобилок */
    h2::after { background: linear-gradient(to right, var(--navy) 0%, rgba(36, 68, 113, 0) 90%); }
}

@media (max-width: 992px) {
    .details-grid { grid-template-columns: 1fr; }
    .sidebar-booking { position: static; order: -1; width: auto; }
}

@media (max-width: 768px) {
    /* Галерея */
    .full-gallery { grid-template-columns: 1fr; height: 300px; }
    .side-imgs { display: none; }

    /* Контентные блоки */
    .apartment-header { flex-direction: column; align-items: flex-start; gap: 10px; }
    .chips-container { gap: 8px; }
    .chip { padding: 6px 14px; font-size: 13px; }
    .sleeping-card { min-width: 100%; box-sizing: border-box; }
    
    /* Удобства */
    .amenity-list { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
    .apartment-header h1 { font-size: 22px; }
    .amenity-list { grid-template-columns: 1fr; }
    .description-block, .sleeping-section, .amenities-section, .rules-card-container { padding: 15px; }
    .full-gallery { height: 250px; }
}
