/*_______LISTING PARTIAL________*/
.listing-partial {
    width: 100%;
    padding: 3vh 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3vh;
    background-color: #F2E0C3;
}
.listing-partial h1 {
    width: 80%;
    font-size: clamp(2rem, 3vw, 5rem);
}

/*_______SOLD LISTING PARTIAL______*/
.sold-listing-partial {
    width: 100%;
    padding: 3vh 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3vh;
    background-color: #BECBD2;
}
.sold-listing-partial h1 {
    width: 80%;
    font-size: clamp(2rem, 3vw, 5rem);
}

/*_______LISTING CARD________*/
.listing-card {
    aspect-ratio: 1 / 1.1;
    background-color: #FFFFFF;
    display: flex;
    align-items: center;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    text-align: center;

    transition: 0.2s ease-out;
}

.listing-card:hover {
    translate: 0 -10px;
    box-shadow: 4px 4px 4px rgba(0,0,0,0.4);
}

.listing-card img {
    width: 100%;
    height: 50%;
    object-fit: cover;
    object-position: center;
}

.listing-card h3 {
    font-family: "Afacad", serif;
    color: rgb(60, 60, 60);
    font-size: clamp(1.2rem, 0.9vw, 4px);
    font-weight: 400;
    padding: 2% 1%;
}

.listing-card p {
    font-size: clamp(2.4rem, 1vw, 5rem);
    line-height: normal;
}

.listing-card .details-button {
    width: 50%;
    padding: 3% 6%;
    margin-bottom: 4%;
    margin-top: auto;
    background-color: #365B6D;
    color: rgb(255, 255, 255);
    font-size: clamp(1.6rem, 1vw, 6rem);
    text-align: center;
    transition: 0.2s ease-out;
}

.listing-card .details-button:hover {
    translate: 0 -5px;
    box-shadow: 4px 4px 4px rgba(0,0,0,0.4);
}

/*_______SOLD CARD EDITS______*/

.listing-grid .sold{
    aspect-ratio: 1 / 1.5;
}

.listing-grid .sold p {
    margin: 0 10px 10px 10px;
    font-family: "Afacad", serif;
    font-size: clamp(1rem, 1.5vw, 4rem);
}

/*________LISTING GRID________*/
.listing-grid {
    margin: 0;
    padding: 16px;
    max-width: 95%;
    background-color: #F2F1EC; 
    box-shadow: 4px 4px 4px #00000040;
    display: grid;
    grid-template-columns: repeat(auto-fit, clamp(375px, 18vw, 600px));
    justify-content: center;
    gap: 16px;
}

/*_______LISTING PAGE________*/
.listing-page {
    background-color: #F2F1EC;
    width: 80%;
    padding: 4vh 10%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.listing-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 80vh;
    background-color: #BECBD2;
    z-index: -1;
}

.listing-page .back-btn {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    color: #000000;
}

.listing-page .horizontal-flex {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}

.listing-page .listing-images {
    flex-basis: 67%;
    height: auto;
}

.listing-page .aside-flex {
    flex-basis: 30%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 2rem;
}

/* DETAILS BOX */
.listing-page .listing-details {
    background-color: #F2F1EC;
    box-shadow: 4px 4px 4px #00000040;

    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}
.listing-page .listing-details ul {
    list-style: none;
    list-style-position: outside;
    text-align: center;
    padding: 1rem;
    margin: 0;
}
.listing-details #for-sale {
    color: rgb(53, 104, 51);
    font-size: 1rem;
    font-weight: 600;
    text-wrap: nowrap;
    display: inline-flex;
    align-items: center;
}
.listing-details #green-dot {
    height: 5px;
    width: 5px;
    background-color: rgb(53, 104, 51);
    border-radius: 50%;
    display: inline-block;
    margin-right: 5px;
}
.listing-details .price {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: space-evenly;
    font-size: 38px;
}
.listing-details .address {
    font-family: "Afacad", serif;
    font-size: clamp(1rem, 1.5vw, 4rem);
    margin-bottom: 1rem;
}

.listing-details .beds-baths {
    font-family: "Aboreto", serif;
    font-size: clamp(0.8rem, 1.2vw, 3.5rem);
}

.listing-details .size {
    font-family: "Aboreto", serif;
    font-size: clamp(0.8rem, 1.2vw, 3.5rem);
}

.listing-page #tour-open-button {
    width: 100%;
    padding: 1rem 2rem;
    font-family: "Aboreto", serif;
    font-size: 2rem;
    color: #F2F1EC;
    background-color: #365B6D;
    border: none;

    transition: 0.2s ease-out;
}

.listing-page #tour-open-button:hover {
    translate: 0 -3px;
    box-shadow: 4px 4px 4px rgba(0,0,0,0.4);
}

.listing-page #listing-description {
    font-family: "Afacad", serif;
    text-indent: 2rem;
    height: 10vh;
    background-color: #F2F1EC;
    overflow-y: hidden;
}

.listing-page .open {
    height: max-content !important;
}

.listing-page #read-more-button {
    align-self: flex-start;
    text-decoration: underline;
    border: none;
    color: #365B6D;
    font-family: "Afacad", serif;
    font-size: 1rem;
}

/* _________TOUR POPUP_________ */
.listing-page #tour-popup {
    position: fixed;
    max-height: 90vh;
    width: clamp(340px, 50vw, 1000vw);
    top: 7vh;
    margin: 0 auto;
    background-color: rgba(255, 255, 255, 0.224);
    backdrop-filter: blur(4px);
    box-shadow: 5px 5px 10px rgba(0,0,0,0.4);
    border-radius: 5px;
    z-index: 11;
    overflow-y: auto;
    display: none;
}

.listing-page .open-tour {
    display: block !important;
}

#tour-popup .top-bar {
    width: 100%;
    background-color: #365B6D;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

#tour-popup .error-message {
    color: red;
}

#tour-close-button {
    background-color: #365B6D;
    border: none;
    display: block;
    text-decoration: none;
    text-align: center;
}

.tour-form-section {
    margin: 20px;
}

.tour-form {
    margin: 1rem 0; 
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-auto-rows: minmax(max-content, 3rem);
    gap: 1rem;
}

.tour-form input[type=text] {
    padding: 12px;
    box-sizing: border-box;
    border-radius: 0;
    border: 1px solid rgb(60, 60, 60);
    font-family: "Afacad", serif;
    font-size: 1rem;
    outline: none;
    transition: 0.2s ease-out;
}

.tour-form input[type=text]:focus {
    border-radius: 0;
    border: 1.8px solid rgb(60, 60, 60);
}

.tour-form textarea {
    box-sizing: border-box;
    border-radius: 0;
    border: 1px solid rgb(60, 60, 60);
    padding: 12px;
    font-family: "Afacad", serif;
    font-size: 1rem;
    outline: none;
    transition: 0.2s ease-out;
}

.tour-form textarea:focus {
    border-radius: 0;
    border: 1.8px solid rgb(60, 60, 60);
}

.tour-form .message {
    grid-row-end: span 2;
    grid-column-end: span 2;
}

.tour-form .submit-button {
    border: none;
    font-family: "Aboreto", serif;
    font-size: clamp(1rem, 2vw, 3rem);
    background-color: #365B6D;
    color: #F2F1EC;
}

/* ______SOLD LISTING PAGE_____ */
.sold-listing-page .listing-story{
    background-color: #F2E0C3;
    padding: 1rem;
    box-shadow: 4px 4px 4px rgba(0,0,0,0.4);
}

.sold-listing-page .listing-story p {
    font-family: "Afacad", serif;
}

@media (max-width: 1250px) {
    .tour-form {
        grid-template-columns: 1fr;
    }

    .tour-form .message {
        grid-column-end: span 1;
    }

    .tour-form .cap {
        grid-row-start: 7;
    }
    .listing-page .horizontal-flex {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
}

