*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* MainPage */
.form-container {
    flex-grow: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    margin-top: 5%; /* Odstęp od nagłówka */
}

.main-content {
    margin-top: 160px; /* Wysokość headera, gdy menu jest zamknięte */
    transition: margin-top 0.1s ease;
    max-width: 100%;
}

body.menu-open .main-content {
    margin-top: 270px; /* Wysokość headera, gdy menu jest otwarte (powinna odpowiadać max-height z nav.menu-open) */
}

#mainForm {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 900px;
}

#mainForm h2 {
    margin-bottom: 20px;
    text-align: center;
    color: #343a40;
}

.input-wrapper {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    width: 100%;
}

.input-wrapper input {
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

input#city {
    flex: 1 1 30%;
    min-width: 0;
    max-width: 100%;
}

input#address {
    flex: 1 1 45%;
    min-width: 0;
    max-width: 100%;
}

input#buildingNumber {
    flex: 1 1 15%;
    min-width: 0;
    max-width: 100%;
}

/* Dla większych ekranów - trzy pola w jednym rzędzie */
@media (max-width: 800px) and (min-width: 601px) {   
    .input-wrapper {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
    }

    .input-wrapper input {
        flex: 1 1 calc(33.33% - 10px);
        min-width: 0;
    }
}

/* Dla małych ekranów - wszystkie pola w jednej kolumnie */
@media (max-width: 600px) {
    .input-wrapper {
        flex-direction: column;
    }

    .input-wrapper input {
        width: 100%;
    }
}

#mainForm button {
    padding: 10px 20px;
    background-color: #000000;  
    color: #ffffff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    width: 100%;
    max-width: 300px;
    font-family: Fredoka, Arial, sans-serif; 
    font-weight: 500;
}

#mainForm button:hover {
    background-color: #4d4d4d;
    transition: 0.3s;
}

.reviews-container {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    margin-top: 5%;
    margin-bottom: 5%;
}

.reviews-slider {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
    height: auto;
    width: 85%;
    max-width: 1200px;
}

.review-card {
    display: grid;
    grid-template-rows: 80% 20%;
    grid-template-columns: 60% 40%;
    background-color: #f8f9fa;
    border-radius: 8px;
    box-sizing: border-box;
    padding: 15px;
    margin: 15px 10px;
    gap: 5px;
    font-size: 16px;
    height: 400px;
    width: calc(50% - 40px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

@media (max-width: 600px) {
    .review-card {
        font-size: 14px;
    }
}

.left {
    grid-row: 1;
    grid-column: 1;
}

.right {
    grid-row: 1;
    grid-column: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bottom {
    grid-row: 2;
    grid-column: 1 / span 2;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 20px;
}

.review-title {
    margin-bottom: 10px;
}

.star-rating {
    display: flex;
    flex-direction: column;
}

.star-rating span {
    font-size: 16px;
    color: #f5a623;
}

.star-rating span::before {
    content: attr(data-title);
    color: black;
    margin-right: 1px;
    font-weight: 500;
}

.review-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

p.address::before {
    content: "\f3c5"; /* Font Awesome code for a map pin */
    font-family: "Font Awesome 5 Free"; /* Upewnij się, że Font Awesome jest zaimportowany */
    font-weight: 900;
    margin-right: 3px;
    font-size: 1.2rem;
    color: #f86969; /* Kolor pasujący do motywu */
}

.review-text {
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word; 
    white-space: break-spaces;
    max-width: 100%;
}

p {
    max-width: 100%;
}

.review-details-button {
    background-color: #000000;
    color: white;
    border: none;
    padding: 10px;
    cursor: pointer;
    border-radius: 5px;
    font-family: Fredoka, Arial, sans-serif;
    font-weight: 500;
    width: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.review-details-button:hover {
    background-color: #4d4d4d;
    transition: 0.3s;
}

button.prev-button, button.next-button {
    background-color: #000000;
    border: none;
    color: #ffffff;
    padding: 10px;
    cursor: pointer;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    font-size: 18px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

button.prev-button {
    left: 0px;
}

button.next-button {
    right: 0px;
}

@media (max-width: 1200px) {
    .review-card {
        width: 100%;
        margin: 15px 0;
    }
    .reviews-slider {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 800px) {
    .main-content {
        width: 100%;
    }

    .review-card {
        width: 100%;
        margin: 15px 0;
    }
    .reviews-slider {
        flex-direction: column;
        align-items: center;
    }

    button.prev-button {
        margin-top: 157px;
        left: 15%;
    }
    
    button.next-button {
        margin-top: 157px;
        right: 15%;
    }
}


