body, html {
    height: 100%;
    margin: auto;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 250px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.fa-bars {
    font-size: 30px;
    color: #5b7182;
    cursor: pointer;
}

.intro-text p {
    font-family: "Montserrat", sans-serif;
    font-size: 20px;
    color: #576b7b;
    line-height: 1.5;
    text-align: center;
    /* Keep the paragraph from stretching too wide */
    max-width: 900px;
    margin: 0 auto;
    padding-bottom: 40px;
}

.block {
    font-family: "Montserrat", sans-serif;
    font-weight: 300;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: #fff;
    text-align: center;
    cursor: pointer;
}

    .block img {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        z-index: 1;
    }

    .block::after {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.20);
        z-index: 2;
    }

    .block:hover::after {
        background: rgba(91, 113, 130, 0.5); /* Your brand blue with transparency */
        transition: background 0.3s ease;
    }

    .block:hover span {
        letter-spacing: 3px; /* Adds a subtle "expansion" effect to the text */
        transition: letter-spacing 0.3s ease;
    }

    .block span {
        font-family: "Montserrat", sans-serif;
        font-weight: 500;
        position: relative;
        z-index: 3;
        text-transform: uppercase;
        letter-spacing: 2px;
        font-size: 1.2rem;
        padding: 0 10px;
    }

.info-box {
    background-color: #5b6e7e;
    padding: 30px;
}

    .info-box p {
        position: relative;
        z-index: 3;
        font-size: 0.85rem;
        line-height: 1.5;
        margin: 0;
        font-weight: normal;
    }

    .info-box::after {
        display: none;
    }

.block.info-box img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60%;
    height: auto;
    opacity: 0.10;
    z-index: 1;
}

.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
    overflow-y: auto;
}

.modal-content {
    background-color: #fff;
    width: 90%;
    max-width: 650px;
    position: relative;
    padding: 15px;
    box-shadow: 0 15px 45px rgba(0,0,0,0.2);
    border-radius: 2px;
}

.close-btn {
    position: absolute;
    right: -30px;
    top: -10px;
    font-size: 35px;
    color: white;
    cursor: pointer;
}

.visit-btn {
    display: block;
    width: fit-content;
    margin: 30px auto 10px;
    background-color: #9abed3;
    color: white;
    padding: 12px 35px;
    text-decoration: none;
    font-family: sans-serif;
    font-size: 18px;
    letter-spacing: 1px;
    text-transform: uppercase;
}


h1 {
    font-family: "Montserrat Alternates", sans-serif;
    font-size: 52px;
    color: #576b7b;
    line-height: 60px;
    text-align: center;
    font-weight: 400;
}

h2 {
    font-family: "Montserrat", sans-serif;
    color: #576b7b;
    font-size: 29px;
    line-height: 20px;
    text-align: center;
    font-weight: 300;
}

p {
    font-family: "Montserrat", sans-serif;
    font-size: 20px;
    color: #576b7b;
    line-height: 20px;
    text-align: center;
    font-weight: 300;
}

.logo {
    margin: auto;
    color: white;
    text-align: center;
    margin-bottom: 30px;
}

#content {
    max-width: 1200px;
    background-color: white;
    padding: 30px 30px 5px 30px;
    margin: 0px auto 20px auto;
    font-size: 14px;
    line-height: 20px;
    font-weight: normal;
}

.let-property-container {
    display: flex;
    padding: 20px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

    .let-property-container h2 {
        padding: 20px;
        text-align: center;
        line-height: 40px;
    }

.button {
    text-decoration: none;
    padding: 1em 2em;
    background-color: #91b9d3;
    font-size: 1rem;
    border-radius: 0;
    text-align: center;
    position: relative;
    display: inline-block;
    margin: 0 0.25rem;
    vertical-align: middle;
    border: 0;
    line-height: 1em;
    text-transform: uppercase;
    padding: 1.1em 2em;
    top: -0.1em;
    color: #ffffff;
    font-family: "Montserrat", sans-serif;
    max-width: 100%;
    cursor: pointer;
}

.footer {
    font-family: "Montserrat", sans-serif;
    background-color: #eef0f2;
    width: 100%;
    padding: 40px 20px; /* Increased vertical padding for better breathing room */
    box-sizing: border-box; /* Ensures padding doesn't push width past 100% */
}

.copyright {
    line-height: 1.5 !important; /* Overrides the 20px fixed height to allow wrapping */
    margin-bottom: 10px;
    color: #576b7b;
    height: auto !important; /* Ensures the container grows with the text */
}

    .copyright a {
        text-decoration: none;
        color: #576b7b;
        font-weight: 500;
    }

.form-modal-content {
    max-width: 900px;
    margin: 0 auto;
}

#formModal {
    align-items: flex-start;
    padding: 30px 0;
    box-sizing: border-box;
}

    #formModal .close-btn {
        right: 12px;
        top: 8px;
        color: #5b7182;
        z-index: 2;
}

.hubspot-form-status {
    margin: 20px 0 0;
    color: #576b7b;
    font-family: "Montserrat", sans-serif;
    font-size: 16px;
    line-height: 1.6;
}

.hubspot-form-loader {
    display: flex;
    min-height: 160px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 14px;
}

    .hubspot-form-loader .hubspot-form-status {
        margin: 0;
    }

.hubspot-form-loader[hidden] {
    display: none;
}

.hubspot-form-spinner {
    width: 42px;
    height: 42px;
    border: 3px solid rgba(145, 185, 211, 0.25);
    border-top-color: #91b9d3;
    border-radius: 50%;
    animation: hubspot-form-spin 0.8s linear infinite;
}

.hubspot-form-status.is-error {
    color: #a24b4b;
}

#hubspotFormContainer {
    min-height: 80px;
}

@keyframes hubspot-form-spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

    .form-modal-content .hs-form-frame {
        width: 100%;
        text-align: left;
        margin-top: 20px;
    }

/*MOBILE SIZINGS TO CHANGE THE BLOCK STYLING AND PADDING*/
@media (max-width: 768px) {
    /* 1. Kill the body margins and centering */
    body, html {
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
        overflow-x: hidden; /* Stops horizontal shifting */
    }

    .grid-container {
        display: grid !important;
        grid-template-columns: 1fr !important; /* Single column */
        grid-auto-rows: minmax(180px, auto); /* Flexible height */
        width: 100% !important; /* Use 100% instead of 100vw to avoid scrollbar push */
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        left: 0 !important;
        position: relative;
    }

    /* 2. The Blue Box - Perfect Edge-to-Edge */
    .info-box {
        grid-row: 1;
        /* CHANGE: Use min-height instead of height */
        height: auto !important;
        min-height: 250px;
        /* Ensures the box expands as text wraps on smaller screens */
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        padding: 40px 20px !important;
        box-sizing: border-box !important;
    }

        .info-box p {
            /* Ensure the paragraph can expand vertically */
            height: auto !important;
            margin: 0 !important;
            line-height: 1.6 !important; /* Improves readability on narrow screens */
        }

    .block.info-box img {
        /* Reduce the size significantly for mobile */
        width: 40% !important;
        max-width: 150px !important; /* Cap it so it doesn't overwhelm the text */
        height: auto !important;
        /* Keep it centered behind the text */
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        /* Optional: Lower opacity even more if text is hard to read */
        opacity: 0.07 !important;
    }

    /* 3. The Image Strips */
    .block {
        width: 100% !important;
        margin: 0 !important;
        height: 200px; /* Fixed height for the images */
    }

        .block:not(.info-box) {
            grid-row: auto;
        }

        .block img {
            width: 100% !important;
            height: 100% !important;
            object-fit: cover !important;
            left: 0;
        }

    .form-modal-content {
        width: 92% !important;
        max-width: 92% !important;
        padding: 20px 15px !important;
    }

    #formModal {
        padding: 16px 0 !important;
    }

    .logo {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important; /* Centering the logo */
        position: relative !important;
        padding: 10px 20px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

        .logo img {
            /* Adjust size for mobile header */
            width: 180px !important;
            height: auto !important;
            margin: 0 auto !important; /* Forces centering */
        }

    .fa-bars {
        /* Remove the float and use absolute positioning to pin it to the right */
        float: none !important;
        position: absolute !important;
        right: 20px !important;
        top: 50% !important;
        transform: translateY(-50%) !important; /* Perfectly vertically centered */
        font-size: 24px !important;
    }

    /* 1. Prevent the modal from hitting the screen edges */
    .modal-content {
        width: 85% !important; /* Forces visible space on the left and right */
        max-width: 400px !important; /* Prevents it from getting too large on tablets */
        margin: auto !important;
        padding: 20px !important;
    }

        /* 2. Shrink the main image inside the modal to fit the new width */
        .modal-content img {
            width: 100% !important;
            height: auto !important;
            margin-bottom: 15px !important;
        }

    /* 3. Scale down the 'Visit Website' button */
    .visit-btn {
        width: 90% !important; /* Slightly narrower than the box */
        font-size: 16px !important;
        padding: 10px 0 !important;
        margin: 20px auto 0 auto !important;
    }

    /* 4. Fix the Close Button (X) position */
    .close-btn {
        right: 10px !important; /* Keep it inside the white box on mobile */
        top: 5px !important;
        color: #5b7182 !important; /* Use your blue color so it's visible on white */
        font-size: 24px !important;
    }

    .footer {
        padding: 30px 15px !important;
        text-align: center;
    }

    .copyright {
        font-size: 13px !important;
        display: block; /* Forces each p tag to be its own block */
        width: 100%;
    }
}
