.cottage-gallery {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.main-image img {
    width: 100%;
    border-radius: 14px;
    height: 100%;
    object-fit: cover;
}

.thumbnail-images {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.thumbnail-images img {
    width: 100%;
    border-radius: 14px;
    object-fit: cover;
    height: 100%;
}

.show-more {
    position: relative;
    display: inline-block;
    overflow: hidden;
    border-radius: 12px;
}

.show-more img {
    display: block;
    width: 100%;
    height: auto;
    filter: brightness(50%);
    /* затемнення картинки */
    transition: filter 0.3s ease;
}

.show-more:hover img {
    filter: brightness(40%);
}

.show-more .overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 18px;
    font-weight: 600;
    background: rgba(0, 0, 0, 0.5);
    /* трохи прозорий фон */
    padding: 8px 16px;
    border-radius: 8px;
    pointer-events: none;
}

.zhytlo-content {
    margin-top: 25px;
}

.cottage-grid {
    grid-template-columns: repeat(2, 1fr);
}

.amenities {
    margin-top: 32px;
    border-bottom: 1px solid #DDD;
    padding-bottom: 5px;
}

.amenity-group {
    margin-bottom: 33px;
}

.amenities h2 {
    color: #000;
    font-family: Roboto;
    font-size: 20px;
    font-weight: 500;
    margin-bottom: 20px;
}

.amenity-group h3 {
    color: #000;
    font-family: "Open Sans";
    font-size: 16px;
    font-style: normal;
    font-weight: 600;
    display: flex;
    gap: 10px;
    margin-bottom: 11px;
}

.amenity-group ul {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    list-style: none;
    padding: 0;
}

.amenity-group ul li {
    display: flex;
    color: #000;
    font-family: "Open Sans";
    font-size: 14px;
    align-items: center;
    margin-left: 5px;
}

.view-all {
    display: inline-block;
    margin-top: 12px;
    color: #00bcd4;
    font-size: 14px;
}

@media (max-width: 768px) {
    .amenity-group ul {
        grid-template-columns: repeat(2, 1fr);
    }
}

.is-hidden {
    display: none;
}

.sidebar {
    border-radius: 20px;
    border: 1px solid #DDD;
    background: #FFF;
    padding: 16px;

}

.sidebar h4 {
    color: #000;
    font-family: Roboto;
    font-size: 20px;
    font-weight: 500;
    line-height: 24px;
}

.sidebar hr {
    border: none;
    border-top: 1px solid #6b6969;
    margin-bottom: 10px;
}

.sidebar p {
    display: flex;
    align-items: center;
    gap: 20px;
    margin: 20px 0;
}

.sidebar a {
    color: #14BBC5;
    font-family: Roboto;
    font-size: 18px;
    font-weight: 500;
    line-height: 24px;
    text-decoration: underline;
}

#route-iframe {
    width: 100%;
    height: 250px;
}


/* Mobile version */
@media(max-width: 768px) {
    .cottage-gallery {
        display: block;
    }

    .main-image,
    .thumbnail-images {
        width: 100%;
    }

    .thumbnail-images {
        display: none;
    }


}

@media(max-width: 991px) {
    .zhytlo-first {
        order: 2;
    }

    .zhytlo-second {
        order: 1;
    }
}


/* === Загальний рейтинг === */
.cottage-rating-overview {
    margin: 40px 0;
}

.rating-summary {
    display: flex;
    align-items: center;
    gap: 20px;
    padding-left: 70px;
}

.star-icon {
    font-size: 60px;
    color: #00b5ad;
}

.total-score {
    color: #14BBC5;
    font-family: Roboto;
    font-size: 64px;
    font-style: normal;
    font-weight: 400;
    line-height: 19px;
    border-right: 2px solid #14BBC5;
    padding-right: 100px;
}

.param-ratings {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-left: 20px;
}

.param-ratings li {
    display: flex;
    color: #000;
    font-family: Roboto;
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: 19px;
    justify-content: space-between;
    width: 300px;
}

/* === Кнопка === */
.open-review-btn {
    background-color: #00b5ad;
    color: white;
    border: none;
    padding: 10px 18px;
    font-size: 16px;
    border-radius: 5px;
    cursor: pointer;
}

/* === Модальне вікно === */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
}



.close-modal {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 22px;
    cursor: pointer;
}

.modal {
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    border-radius: 20px;
    background: #F5F5F5;
    padding: 30px;

    width: 75%;

    position: relative;
}

.close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 24px;
    cursor: pointer;
    color: #888;
}

.review-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 2fr;
    gap: 20px;
    margin-bottom: 20px;
}

.review-labels label,
.review-stars .stars {
    display: block;
    margin-bottom: 12px;
}

.review-textarea textarea {
    width: 100%;
    height: 100%;
    border-radius: 10px;
    resize: none;
    padding: 10px;
    font-size: 14px;
    border: none;
}

.title-review {
    display: flex;
    justify-content: space-around;
    margin-bottom: 10px;
}

.title-review span {
    font-family: Roboto;
    font-size: 20px;
    font-weight: 500;
}

.review-fields {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: start;
}

.review-fields input {
    padding: 10px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 6px;
}

.stars {
    display: flex;
    gap: 5px;
    cursor: pointer;
}

.star {}

.star.selected {
    color: #00B2A9;
}

.submit-button {
    background: #00B2A9;
    color: #fff;
    border: none;
    padding: 12px 20px;
    margin-top: 15px;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
}

.submit-button:hover {
    background: #009fa0;
}

.review-grid-comment {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.review-card {
    border-radius: 20px;
    border: 1px solid #14BBC5;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.review-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;

}

.review-top::after {
    content: "";
    display: block;
    width: 60%;
    height: 1px;
    background-color: #14BBC5;
    margin-top: 8px;
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
}

.review-author-date {
    display: flex;
    flex-direction: column;
    font-size: 14px;
    color: #222;
    width: 100%;
    padding-left: 50px;
}

.review-author {
    font-weight: bold;
    margin: 0;
}

.review-date {
    font-style: normal;
    margin: 0;
    color: #777;
    font-size: 13px;
}

.review-ratings {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 14px;
    color: #333;
    width: 100%;
}

.review-ratings li {
    display: flex;
    justify-content: space-between;
    padding: 2px 0;

}

.review-ratings li:last-child {
    border-bottom: none;
}

.review-content {
    color: #000;

    font-family: Roboto;
    font-size: 14px;
    font-style: normal;
    font-weight: 500;
    line-height: 19px;
}

#reviews-section {
    text-align: center;
    padding-top: 10px;

}

#open-review-modal,
.submit-button {
    border-radius: 10px;
    background: #14BBC5;
    border: none;
    color: #FFF;
    padding: 10px 30px;
    font-family: "Open Sans";
    font-size: 16px;
    font-weight: 600;
}

.submit-button {
    margin: 0 auto;
}

#custom-review-form {
    display: flex;
    flex-direction: column;
}

.star svg path {

    /* колір неактивної зірки */
    transition: fill 0.2s ease;
}

.star.selected svg path {
    fill: #00B2A9;
    /* колір вибраної зірки */
}

/* New Style */

.review-grid {
    display: flex;
    grid-template-columns: 1fr 1fr 2fr;
    gap: 100px;
    margin-bottom: 20px;
    justify-content: space-between;
}

.rating-block {
    display: flex;
    justify-content: space-between;
    width: 50%;
}

.review-textarea {
    display: flex;
    flex-direction: column;
    width: 50%;
}

.mobile-title-review {
    display: none;
}

#close-review-modal svg {
    height: 20px;
    width: 20px;
    border-radius: 4px;
    border: 1px solid rgba(20, 187, 197, 0.30);
    background: rgba(20, 187, 197, 0.08);
    padding: 3px;
}

.title-head-rev {
    text-align: center;
    margin: 20px 0;
    font-family: Roboto;
    font-size: 20px;
    font-style: normal;
    font-weight: 500;
}

@media (max-width: 1240px) {
    .total-score {
        font-size: 40px;
    }

    .total-score svg {
        width: 60px;
    }
}

@media (max-width: 1100px) {
    .modal-content {
        width: 90%;
    }
}

@media (max-width: 960px) {
    .modal-content {
        width: 98%;
    }

    .rating-summary {
        justify-content: space-around;
    }
}


@media (max-width: 820px) {
    .modal-content {
        padding: 16px;
        width: 100%;

        margin: 0 auto;

        border-radius: 12px;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    }



    .close {
        top: 0;
        right: 5px;
    }

    .title-review {
        display: none;

    }

    .review-grid {
        display: flex;
        flex-direction: column;
        gap: 16px;
    }

    .rating-block {
        display: flex;
        width: 100%;

    }

    .review-labels {
        display: flex;
        flex-direction: column;

        font-size: 16px;
        margin-bottom: 4px;
    }

    .review-labels label,
    .review-stars .stars {

        margin-bottom: 3px;
    }

    .review-stars {
        display: flex;
        flex-direction: column;

    }

    .stars {
        display: flex;
        gap: 4px;
        align-items: center;
    }

    .stars .star svg {
        width: 20px;
        height: 20px;
    }

    .review-textarea {
        width: 100%;
    }

    .review-textarea textarea {
        width: 100%;
        min-height: 100px;
        padding: 10px;
        font-size: 14px;

        border-radius: 8px;
        resize: vertical;
    }

    .review-fields {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .review-fields input {
        padding: 10px;
        font-size: 14px;
        border: 1px solid #ccc;
        border-radius: 8px;
    }

    .submit-button {

        margin-top: 16px;
    }

    .mobile-title-review {
        display: flex;
        justify-content: center;
        color: #000;
        font-family: Roboto;
        font-size: 20px;
        font-weight: 500;
    }

}

textarea:focus,
input:focus {
    outline: none;
    border-color: #14BBC5;
    /* або будь-який колір фокусу, який підходить до дизайну */
    box-shadow: 0 0 0 2px rgba(20, 187, 197, 0.2);
    /* м'яке підсвічування */
}

@media (max-width: 768px) {
    .rating-summary {
        flex-direction: column;
        padding-left: 0;
    }

    .total-score {
        border-right: none;
        border-bottom: 2px solid #14BBC5;
        padding-right: 0;
    }

    .cottage-grid {
        grid-template-columns: 1fr;
    }
}

.amenities h3 {
    margin-bottom: 10px;
}

.route-link {

    color: #14BBC5;
    font-family: Inter;
    /* font-size: 14px; */
    font-style: normal;
    font-weight: 400;
    line-height: normal;
    text-decoration-line: underline;
    margin-left: 10px;

}

.listing-rating {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 15px;
    margin-top: 5px;
}

.listing-rating .star-icon {
    display: flex;
    align-items: center;
}

.listing-rating .rating-number {
    font-weight: 500;
    color: #000;
}

.listing-rating .reviews-count {
    text-decoration: underline;
    color: #000;
}

.cottage-img {
    height: 350px;
}