* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: sans-serif;
    background-color: #f4f6f9;
    color: #333333;
}

img {
    max-width: 100%;
    object-fit: cover;
}

/* Шапка */

.block1 {
    width: 100%;
    height: 70px;
    display: flex;
    justify-content: space-evenly;
    flex-direction: row;
    align-items: center;
    padding: 10px;
    position: fixed;
    top: 0;
    left: 0;
    border-bottom: 3px solid black;
    z-index: 100;
}

#images1 {
    width: 100%;
    height: 70px;
    z-index: -1;
    position: absolute;
}

/* Основные блоки */

.main-wrapper {
    margin-top: 70px;
    min-height: calc(100vh - 70px);
    position: relative;
    display: block;
}

.block3 {
    width: 20%;
    height: calc(100vh - 70px);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 70px;
    left: 0;
    border-right: 3px solid black;
    justify-content: space-evenly;
    padding: 5px 20px;
    z-index: 10;
    overflow-y: auto;
}

#images3 {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: -1;
}

.block2 {
    overflow: hidden;
    width: 80%;
    min-height: calc(100vh - 70px);
    margin-left: 20%;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Убрана минимальная высота изображения, выходившая за блок. */
#imajes2 {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

.window {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: 160px;
    font-size: 25px;
    z-index: 2;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.9);
}

/* Подвал */

footer {
    width: 80%;
    margin-left: 20%;
    background-color: #222222;
    color: #ffffff;
    padding: 30px 40px;
    position: relative;
    z-index: 90;
    clear: both;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    gap: 40px;
    align-items: stretch;
    flex-wrap: wrap;
}

.footer-info {
    flex: 1.2;
    min-width: min(100%, 240px);
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-family: sans-serif;
}

.footer-info h3 {
    font-size: 20px;
    color: #ffcc00;
    margin-bottom: 5px;
}

.footer-info p {
    font-size: 16px;
    line-height: 1.4;
    margin: 0;
}

.copyright {
    margin-top: 15px !important;
    opacity: 0.6;
    font-size: 14px !important;
}

/* Содержимое модальных окон */

.modal-content h2 {
    padding: 0 24px;
    font-size: 24px;
    color: #2c3e50;
    margin-bottom: 12px;
    text-align: center;
}

.modal-content ul {
    flex-direction: column !important;
    gap: 10px !important;
    font-size: 16px;
    margin: 15px 0;
    list-style-type: disc !important;
    padding-left: 20px;
}

.modal-content li {
    text-align: left !important;
}

.modal-content li:hover {
    color: initial !important;
}

#times {
    font-style: italic;
    color: #7f8c8d;
    text-align: center;
    margin-bottom: 10px;
}

/* Форма в окне бронирования */

.reg-content {
    max-width: 380px !important;
    padding: 35px 25px !important;
}

.reg-subtitle {
    font-size: 14px;
    color: #7f8c8d;
    text-align: center;
    margin-bottom: 25px;
}

.reg-form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 18px;
    width: 100%;
}

.reg-form-group label {
    font-size: 14px;
    font-weight: bold;
    color: #34495e;
    text-align: left;
}

.reg-form-group input {
    width: 100%;
    padding: 12px 14px;
    font-size: 16px;
    border: 2px solid #bdc3c7;
    border-radius: 8px;
    outline: none;
    text-align: left !important;
    color: #333333;
    transition: border-color 0.2s ease;
}

.reg-form-group input:focus {
    border-color: #3498db;
}

.fast-submit-button {
    width: 100%;
    padding: 14px;
    background-color: #27ae60;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 10px;
    transition: background-color 0.2s ease;
}

.fast-submit-button:hover {
    background-color: #219653;
}

/* Правила и прокручиваемый текст */

.rules-content {
    max-width: 750px !important;
    width: 90vw;
    max-height: min(85vh, calc(100dvh - 24px));
    display: flex;
    flex-direction: column;
}

.rules-scroll-area {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 15px;
    margin-top: 15px;
}

.rules-scroll-area p {
    font-size: 15px;
    line-height: 1.6;
    color: #4a5568;
    margin-bottom: 14px;
}

.rules-scroll-area::-webkit-scrollbar {
    width: 6px;
}

.rules-scroll-area::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.rules-scroll-area::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 4px;
}

.rules-scroll-area::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
}

/* Календарь */

.custom-calendar {
    width: 100%;
    background: #f8f9fa;
    border-radius: 12px;
    padding: 15px;
    border: 1px solid #e6e9ed;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.calendar-header h3 {
    font-size: 16px;
    color: #2c3e50;
    font-weight: 700;
}

.cal-nav-btn {
    background: #ffffff;
    border: 1px solid #cbd5e0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    color: #7f8c8d;
    display: flex;
    justify-content: center;
    align-items: center;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-weight: 600;
    font-size: 12px;
    color: #a0aec0;
    margin-bottom: 10px;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
}

.calendar-days .calendar-day-item {
    height: 52px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 2px !important;
    padding: 4px 0 !important;
    background: #ffffff;
    border: 1px solid #edf2f7;
    border-radius: 6px;
    cursor: pointer;
    position: relative;
    box-sizing: border-box;
}

.calendar-day-item span:first-child {
    font-size: 14px;
    font-weight: 600;
    color: #2d3748;
    z-index: 5;
}

.calendar-day-item .day-price {
    font-size: 9px !important;
    font-weight: 700 !important;
    color: #2ecc71;
    display: block !important;
    z-index: 5;
}

/* Прошедшие даты */

.calendar-days .calendar-day-item.past-day {
    background: #f1f2f6 !important;
    border-color: #e2e5e9 !important;
    color: #a0a0a0 !important;
    cursor: not-allowed !important;
    opacity: 0.55;
}

.calendar-day-item.past-day .day-price {
    display: none !important;
}

/* Занятые даты */

.calendar-days .calendar-day-item.day-booked {
    background: #fce8e6 !important;
    border-color: #f5b7b1 !important;
    cursor: not-allowed !important;
}

.calendar-day-item.day-booked span:first-child {
    color: #c0392b !important;
    text-decoration: line-through;
}

.calendar-day-item.day-booked .day-price {
    color: #e74c3c !important;
}

/* Дни стыковки */

.calendar-days .calendar-day-item.day-checkin-available {
    background: linear-gradient(
        135deg,
        #ffeaa7 50%,
        #ffffff 50%
    ) !important;
    border-color: #e0b83f !important;
}

.calendar-days .calendar-day-item.day-checkout-available {
    background: linear-gradient(
        135deg,
        #ffffff 50%,
        #ffeaa7 50%
    ) !important;
    border-color: #e0b83f !important;
}

/* Выбранные даты */

.calendar-days .calendar-day-item.selected-start {
    background: #2980b9 !important;
    border: 2px solid #1f6391 !important;
    color: #ffffff !important;
    z-index: 10;
}

.calendar-days .calendar-day-item.selected-end {
    background: #27ae60 !important;
    border: 2px solid #1e8449 !important;
    color: #ffffff !important;
    z-index: 10;
}

.calendar-day-item.selected-start span,
.calendar-day-item.selected-end span {
    color: #ffffff !important;
    text-shadow: none !important;
}

.calendar-day-item.selected-start .day-price,
.calendar-day-item.selected-end .day-price {
    color: #ffffff !important;
}

.calendar-days .calendar-day-item.in-range {
    background: #e8f4fd !important;
    border-color: #90c8ed !important;
    border-radius: 0 !important;
    color: #2d3748 !important;
}

.calendar-days .calendar-day-empty {
    background: transparent !important;
    border: none !important;
    height: 52px !important;
    cursor: default;
}

#calendar-summary-box {
    margin-top: 16px;
    line-height: 1.5;
}

/* Телефоны и планшеты */

@media (max-width: 900px) {
    .block1 {
        padding: 0;
    }

    .block3 {
        width: 100%;
        height: auto;
        position: relative;
        top: 0;
        border-right: none;
        border-bottom: 2px solid black;
        padding: 20px;
    }
    #open-rules-btn {
      font-size: 19px;
    }
    #open-info-btn {
      font-size: 19px;
    }
    .foto {
      font-size: 19px;
    }
    .block2 {
        width: 100%;
        margin-left: 0;
        min-height: 215px;
    }

    footer {
        width: 100%;
        margin-left: 0;
    }

    .footer-container {
        flex-direction: column;
        gap: 25px;
    }

    .window {
        text-align: center;
        height: 100px;
        top: 12px;
        position: relative;
    }
}