/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Modal styles */
.map-modal {
    display: none;
    position: fixed;
    z-index: 1;
    padding-top: 60px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgb(0,0,0);
    background-color: rgba(0,0,0,0.4);
}

.map-modal-content {
    position: relative;
    background-color: #fefefe;
    margin: auto;
    padding: 0;
    border: 1px solid #888;
    width: 80%;
    height: 80%;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    animation-name: animatetop;
    animation-duration: 0.4s;
}

@keyframes animatetop {
    from {top: -300px; opacity: 0}
    to {top: 0; opacity: 1}
}

.map-close {
    color: white;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.map-close:hover,
.map-close:focus {
    color: #000;
    text-decoration: none;
    cursor: pointer;
}

.map-container {
    width: 100%;
    height: 100%;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('./images/background.jpg'); /* Ensure this path is correct */
    background-blend-mode: overlay;
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: fixed; /* Ensures the background image stays in place */
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* Ensures the body takes up at least the full viewport height */
}

/* Container styles */
.container {
    max-width: 1200px; /* Set a maximum width */
    margin: 0 auto; /* Center the container horizontally */
    padding: 0 20px;
}

/* Header styles */
header {
    padding: 20px 0;
    background-color: rgba(0, 0, 0, 0.8); /* Dark background for the header */
}

.header-content {
    display: flex;
    justify-content: space-between; /* Distribute space between left and right items */
    align-items: center; /* Vertically center the items */
}

.header-content h1 {
    color: #fff;
    margin: 0;
}

.header-social-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center; /* Vertically center the social links */
}

.header-social-links li {
    margin-left: 15px;
}

.header-social-links li a {
    color: #fff !important; /* Ensure social links are white */
    text-decoration: none;
    font-size: 24px;
}

.header-social-links li a:hover {
    color: #007bff !important; /* Ensure hover color is correct */
}

/* Property styles */
.property {
    display: flex;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.5); /* More transparent background */
    padding: 20px;
    margin: 20px auto; /* Center horizontally and add margin on top and bottom */
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3); /* Slightly more pronounced shadow */
    max-width: 1000px; /* Set a max width for property containers */
}

.property-thumbnails {
    display: flex;
    gap: 20px; /* Increased space between thumbnail and text */
    overflow-x: auto; /* Allow horizontal scroll if needed */
    flex: 1; /* Allow thumbnails to take up available space */
}

.thumbnail {
    width: 150px; /* Default larger thumbnail size */
    height: auto;
    cursor: pointer;
    border-radius: 5px;
}

.property-details {
    display: flex;
    flex: 1;
    justify-content: space-between;
    align-items: center;
    flex-direction: column; /* Align items vertically on small screens */
}

.property-info {
    max-width: 70%;
}

.property-info h2 {
    color: #f9f8f8;
    margin-bottom: 10px;
}

.property-info p {
    color: #fcf7f7;
    line-height: 1.8;
    margin-bottom: 20px;
}

.button {
    display: inline-block;
    padding: 10px 20px;
    background-color: #007bff;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s ease;
    margin: 5px; /* Space between buttons */
}

.button:hover {
    background-color: #0056b3;
}

/* Modal styles */
.modal {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8); /* Black background with opacity */
    padding: 20px;
}

.modal-content {
    position: relative;
    margin: auto;
    max-width: 90%;
    max-height: 80%;
    background-color: #5b5858a8;
    border-radius: 8px;
    overflow: hidden;
    padding: 20px;
}

.modal-images {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 10px;
}

.modal-images img {
    max-width: 100%;
    border-radius: 8px;
    display: none; /* Hide images by default */
}

.modal-images img.active {
    display: block; /* Show only active image */
}

.modal .close {
    position: absolute;
    top: 10px; /* Adjust the distance from the top */
    right: 10px; /* Adjust the distance from the right */
    color: #fff; /* White color for the close button */
    font-size: 28px; /* Font size for the close button */
    font-weight: bold;
    cursor: pointer; /* Pointer cursor on hover */
    transition: color 0.3s ease; /* Smooth transition for hover effect */
    z-index: 1000; /* Ensure it's above other content in the modal */
}

.modal .close:hover,
.modal .close:focus {
    color: #000; /* Change color on hover/focus */
    text-decoration: none; /* Remove underline */
}

.prev, .next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: #fff;
    border: none;
    font-size: 24px;
    padding: 10px;
    cursor: pointer;
}

.prev {
    left: 10px;
}

.next {
    right: 10px;
}

/* Footer styles */
footer {
    background-color: rgba(0, 0, 0, 0.8); /* Semi-transparent footer */
    color: #fff;
    text-align: center;
    padding: 20px 0;
    margin-top: auto; /* Pushes footer to the bottom */
}

footer p {
    margin-bottom: 10px;
}

.social-links {
    list-style-type: none;
    padding: 0;
    margin: 0; /* Remove default margin */
}

.social-links li {
    display: inline;
    margin-right: 10px;
}

.social-links li a {
    color: #fff;
    text-decoration: none;
    font-size: 20px;
    transition: color 0.3s ease;
}

.social-links li a:hover {
    color: #007bff;
}

.social-icon {
    display: inline-block;
    padding: 10px; /* Add padding around icons */
}

.social-icon i {
    font-size: 24px; /* Adjust icon size */
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 0 10px;
    }

    .property {
        flex-direction: column;
        align-items: flex-start;
        margin: 10px auto; /* Adjust margin for smaller screens */
    }

    .property-thumbnails {
        gap: 20px; /* Increase space between thumbnails and text */
    }

    .thumbnail {
        width: 80%; /* Thumbnail size to fill 80% of container width */
    }

    .property-details {
        flex-direction: column;
        align-items: flex-start;
    }

    .property-buttons {
        display: flex;
        gap: 10px; /* Space between buttons */
        flex-wrap: wrap; /* Allow buttons to wrap if there's not enough space */
    }

    .button {
        display: inline-block;
        text-align: center;
        margin: 5px; /* Margin around buttons */
    }

    .header-content {
        flex-direction: row;
        justify-content: space-between;
    }

    .header-social-links {
        margin-top: 0;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 24px;
    }

    .thumbnail {
        width: 100%; /* Thumbnail size to fill 80% of container width */
        height: auto;
        margin-top: 20px; /* Add space above the image */
    }

    .property-info h2 {
        font-size: 20px;
        margin-top: 10px; /* Add space above the image */
    }

    .property-info p {
        font-size: 14px;
    }

    .button {
        padding: 15px 15px; /* Larger padding for mobile */
        font-size: 16px; /* Larger font size for mobile */
        margin-bottom: 20px;
    }

    body {
        background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgb(0, 0, 0.5)), url('./images/mobile-background.jpg'); /* Mobile background image */
    }

    /* Add or modify this rule to adjust the background transparency */
    .property {
        background-color: rgba(255, 255, 255, 0.2); /* More transparent background for mobile */
    }

    /* Center header text and Instagram logo on mobile */
    .header-content {
        flex-direction: row;
        justify-content: space-between; /* Space between the title and social links */
    }

    .header-social-links {
        margin-top: 0;
    }
}
