

body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #faf9f8;
    color: #333;
    padding-top: 80px;
    min-width: 1200px; /* The container will stop shrinking below this width */
}

header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4rem;
    background-color: #fefefe;
    color: #2a5d47;
    border-bottom: 1px solid #d1d1d1;
    text-align: center;
    z-index: 1000;
    display: flex;               /* Ensures that the h1 and dropdown button are in a row */
    align-items: center;         /* Vertically align the elements (e.g., center vertically) */
}

header h1 {
    margin: 0.5%;
    text-align: center;
    flex-grow: 1;
    padding-right: 0em;
    white-space: nowrap;      /* Prevent title from wrapping onto the next line */
    white-space: nowrap;      /* Prevent title from wrapping onto the next line */
    overflow: hidden;         /* Hide overflow text */
    text-overflow: ellipsis;  /* Show "..." if the title overflows */
    
}

article h1  {
    font-size: 2em;
    text-align: center;
}


/* Dropdown container */
.dropdown {
    position: relative;           /* So that the dropdown content can be positioned relative to this element */
    width: 4em;                  /* Ensure the dropdown takes up the full width of its parent */
    height: 100%;                 /* Ensure the dropdown takes up the full height of its parent */
    padding-left: 1%;
}

/* Dropdown button */
.dropdown button {
    background-color: #fefefe;
    color: white;
    border: none;                 /* Removed extra border value */
    cursor: pointer;
    font-size: 20px;
    display: flex;
    justify-content: center;
    align-items: center;          /* Ensures the content inside the button is also centered */
    width: 100%;                  /* Button takes full width of the dropdown container */
    height: 100%;                 /* Button takes full height of the dropdown container */
    margin: 0.5%;
    flex-grow: 1;
}

.dropdown img {
    padding: 10%;
    height: 50%;
    width: auto;
}

/* Dropdown menu (hidden by default) */
.dropdown-content {
    display: none;
    position: absolute;          /* Positions the dropdown content relative to the parent */
    left: 0%;                 /* Moves the dropdown to the right of the button */
    top: 100%;                      /* Aligns the dropdown with the top of the button */
    background-color: #fefefe;
    min-width: 160px;
    box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.2);
    z-index: 1;
}

/* Dropdown links (text-based) */
.dropdown-content a {
    padding: 12px 16px;
    text-decoration: none;
    color: #1abc9c;
    display: block;
}

.dropdown-content a:hover {
    background-color: #575757;
}

/* Show the dropdown menu when hovering over the dropdown container */
.dropdown:hover .dropdown-content {
    display: block;
}


nav {
    background-color: #34495e;
    overflow: hidden;
    position: fixed;
    top: 80px;
    width: 100%;
}

nav a {
    color: white;
    padding: 14px 20px;
    text-decoration: none;
    float: left;
}

nav a:hover {
    background-color: #1abc9c;
}

section {
    padding: 20px;
    margin: 20px;
}

#contact {
    display: flex; /* Use Flexbox */
    flex-direction: column; /* Stack elements vertically */
    align-items: center; /* Center horizontally */
    text-align: center; /* Center text within the section */
}


#contact_info {
    padding: 15px;
    text-align: center;
  }

.property-listing {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
}

.property {
    width: 30%;
    margin: 15px 0;
    background-color: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #d1d1d1;

}

.property img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.property h3 {
    color: #2c3e50;
}


.contact-form {
    max-width: 60%;

}

.contact-form input, .contact-form textarea {
    width: 100%;
    padding: 10px;
    margin: 10px 0;
    border-radius: 4px;
    border: 1px solid #ccc;

}

.contact-form button {
    background-color: #2a5d47;
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.contact-form button:hover {
    background-color: #1abc9c;
}

.profile, .office {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.profile img {
    border-radius: 4%;
    width: 300px;
    height: 300px;
    object-fit: cover;
    margin-right: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);

}

.office img {
    width: 300px;
    height: auto;
    object-fit: cover;
    margin-right: 20px;
}
header .office img {
    width: 100px;
    height: auto;
    object-fit: cover;
    margin: 0.5%;
    flex-grow: 1;
    padding-right: 2em;
    padding-top: 1em;
}

.profile-info, .office-info {
    max-width: 800px;
    min-width: 800px;
    padding-left: 50px;
}

p {
    font-size: 1.2rem; /* Same as the root font size */
}

@media only screen and (max-width: 767px) {

    body {
        padding-top: 0vw;
        min-width: 80vw; /* The container will stop shrinking below this width */
        overflow-x: hidden; /* Prevent horizontal scrolling */
        width: 100%; /* Ensure full width is utilized */
        margin: 0; /* Remove default margin */
        padding: 0; /* Remove default padding */
        box-sizing: border-box; /* Include padding in width calculations */
    }   
    

    header {
        padding: 1vw;
        font-size: 2.5vw;
        height: auto;
        max-height: 40px;
    }

    /* Show dropdown on active (mobile/tablet) */
    .dropdown button:active + .dropdown-content {
        display: block;
    }

    .dropdown img {
        height: 0.75em;
        width: auto;
    }

    #brokerage {
        padding-bottom: 0vw;
        padding-left: 0vw;
        padding-right: 0vw;
    }

    #about, #brokerge, #properties, #contact {
        padding-bottom: 0vw;
        padding-top: 10vw;
        margin: 0vw;
    }

    
    .property {
        display: block; /* Stack the divs vertically on mobile */
        padding: 2vw;
        width: 100%; /* Make each box take up full width on mobile */
        height: auto;
        margin-bottom: 0vw; /* Add spacing between the stacked boxes */
        font-size: 5vw;
    }

   
    .property p {
        font-size: 3.5vw;
        line-height: 20%;
    }

    .profile, .office {
        display: block; /* Stack the image and text vertically on mobile */
        padding: 0vw;
    }


    .profile img {
        width: 50vw; /* Adjust image size for mobile */
        height: 50vw;
        margin-bottom: 10px; /* Space between image and text */
        display: block;
        margin: 0 auto; /* Horizontally centers the image */
    }

    .office img {
        width: 50vw; /* Adjust image size for mobile */
        height: auto;
        margin-bottom: 10px; /* Space between image and text */
        display: block;
        margin: 0 auto; /* Horizontally centers the image */
    }

    .profile-info, .office-info {
        max-width: 100%;
        min-width: 100%;
        padding-left: 0vw;
    }

    .profile p, .office-info p {
        width: 100%; /* Make profile-info take almost the full width */
        margin-top: 5vw;
        text-align: justify; /* Align text left for better readability */
        font-size: 4vw; /* Increase text size for mobile */
    }


    h2  {
        font-size: 1.5rem;
        padding: 0vw;
        text-align: center;
    }

    h3 {
        font-size: 4.5vw;
    }

    a {
        font-size: 4vw;
    }


    .contact-form {
    max-width: 100%;
    }

    .contact-form form input {
        margin-top: 0vw;
        margin-bottom: 2vw;
    }

    #contact_info h2 {
        padding: 0vw;
        font-size: 4vw;
    }

    #contact_info {
        margin: 0vw;
    }

    #contact {
        margin: 0vw;
    }

    #contact p {
        font-size: 4vw;
    }
    
    .contact-form {
        padding: 0vw; /* Increase padding on mobile to make the form larger */
        width: 100%; /* Make the form take up the full width of the screen */
        padding-right: 4vw; /* Add extra padding on the right side to avoid being too close to the edge */
        box-sizing: border-box; /* Ensure padding is included in the element's width */
    }

    .contact-form input, 
    .contact-form textarea {
        padding: 2vw; /* Increase padding inside form fields for better touch experience */
        font-size: 5vw; /* Increase the font size of text inside inputs and button */
    }

    .contact-form input, 
    .contact-form textarea {
        font-size: 4vw; /* Ensure input text is larger on mobile */
    }

    .contact-form button {
        padding: 0vw;
        height: 6vw;
        width: 25vw;
        font-size: 3vw; /* Make the button text bigger */
        text-align: center;
    }

    .hide-on-small-screen {
        display: none;

    }

}

@media screen and (min-width: 767px) {
    .hide-on-large-screen {
      display: none;
    }
  }