@media (min-width: 821px) and (max-width: 1155px) {
    .team-container {
        display: flex;
        flex-wrap: wrap; /* Allow items to wrap to the next row */
        justify-content: center;

    }

    .team-member {
        max-width: 292.88px; /* Prevent exceeding half the container's width */
    }
}



@media (min-width: 541px) and (max-width: 767px) {
.left-section {
    margin: auto;
}
}



@media (max-width: 767px) {
    .team-member {
        flex: 1 1 100%; /* Stack all members in one column */
        max-width: 100%;
    }

    .form-group-row {
        flex-direction: column; /* Stack inputs vertically */
    }

    .form-group {
        margin-bottom: 15px; /* Add spacing between stacked fields */
    }


    .footer-logo {
        text-align: center;
        font-family: 'Sarina';
        margin-top: 0;
        font-size: 20px;
        font-weight: bold;
        margin-bottom: 10px;        
    }
    .footer-container {
        flex-direction: column;
        text-align: center;
        justify-content: center;
        align-items: center;
        
        
    }
    
    .footer-row {
        width: 100%;
    }


    .right-section {
        width: 100%;
    }

    address {
        text-align: center;
        margin-bottom: 10px;
        
    }

    .logo-and-address, .sitemap, .reviews {
        flex: 1; /* Each section gets equal width */
        min-width: 100px; /* Set a minimum width to prevent shrinking too much */
    }
    
}

/* Adjust footer layout for iPhone SE dimensions */
@media (max-width: 540px){
    footer .footer-container {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 20px; /* Space between rows */
        
    }

    /* Row 1: Address and Sitemap */
    .footer-container .left-section {
        display: flex;
        flex-direction: column; /* Stack items vertically */
        align-items: center;   /* Center items horizontally */
        flex-wrap: wrap;
        justify-content: center;
        gap: 20px;
        width: 100%; /* Full width */
    }

    .right-section {
        display: flex;
        flex-direction: column; /* Stack items vertically */
        align-items: center;   /* Center items horizontally */
        flex-wrap: wrap;
        justify-content: center;
        width: 100%;
    }

}

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
  }

* {
    box-sizing: border-box;
  }

  html, body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
  }

body {
    font-family: 'Afacad';
    margin: 0;
    padding: 0;

}

.styled-form {
    position: relative;
    z-index: 2; /* Place the form above the background */
    background-color: rgba(255, 255, 255, 0.9); /* Slightly transparent to show the background */
    max-width: 600px;
    margin: 0; /* Remove default centering */
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* Form group styling - Align label and input on the same line */
.form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 15px;
}


/* Style the labels */
label {
    pointer-events: none;
    margin-bottom: 10px;  /* Space between label and input */
}

/* Style the input fields and textarea */
input[type="text"],
input[type="email"],
input[type="date"],
input[type="tel"],
select,
textarea {
    
    flex-grow: 1;  /* Makes input fields take the remaining space */
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
    margin-bottom: 5px;
}

.form-group input:hover {
    border-color: #007bff;
    background-color: #f0f8ff;
}

/* Specific styling for textarea */
.form-group input[type="text"]:hover,
.form-group input[type="email"]:hover,
.form-group input[type="date"]:hover,
.form-group input[type="tel"]:hover,
.form-group select:hover,
textarea:hover {
    border-color: #007bff;
    background-color: #f0f8ff;
}


/* Button styling */
.button {
    text-align:center;
}

button {
    font-weight: bold;
    padding: 10px 15px;
    font-size: 14px;
    color: white;
    background-color: #e2ad74;
    border: 1px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
}

button:hover {
    background-color: #e0e0e0;
}

/* Styling for grouping state and zip code in a row */
.form-group-row {
    display: flex;
    gap: 10px; /* Space between fields */
}


.form-group-row .form-group {
    flex: 1; /* Each field takes equal width in the row */
}

.form-group select,
.form-group input[type="text"] {
    width: 100%; /* Ensures each input fills its container */
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

.tooltip {
    position: absolute;
    top: -40px; /* Position the tooltip above the form */
    left: 50%;
    transform: translateX(-50%);
    padding: 10px;
    background-color: #333;
    color: white;
    border-radius: 5px;
    font-size: 14px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
    pointer-events: none;
    white-space: nowrap;
}

button:hover + .tooltip,
select:hover + .tooltip,
textarea:hover + .tooltip,
input:hover + .tooltip {
    opacity: 1;
    visibility: visible;
}

.error-message {
    color: red;
    font-size: 0.9em;
    margin-top: 5px;

}

input[type="text"].error, input[type="email"].error, input[type="tel"].error, select.error, textarea.error {
    border: 2px solid red;
}


/* ---------------------------------------------------------------------------------------------------------------------------------------------------------------------*/


/* Introductions Section Background */
.introductions-section {
    background-image: url('../IMAGES/introduction-bg.jpg'); /* Replace with your image file */
    background-size: cover;
    background-position: center;
    background-attachment: fixed; /* Optional: Creates a parallax effect */
    color: #333;
    height: 100vh;
    padding: 60px 20px; /* Add more vertical padding */
    height: auto; /* Let it adjust dynamically */
    
}

 
.introductions-section h1 {
    color: aliceblue;
    text-align: center;
    font-size: 2em;
    font-weight: bold;
    text-shadow: 2px 2px 4px #000000;
}



/* Form Section Background */
.form-section {
    background-image: linear-gradient(to bottom, #D5AF8D 0%, #948476 95%, #745F4D 100%);
    background-size: cover;
    background-position: center;
    color: #333;
    padding: 20px;
}

.form-section h1 {
    color: black;
    text-align: left;
    font-size: 2em;
    font-weight: bold;
    margin-top: 0%;
    margin-bottom: 20px;
}

/* Image styling */
.team-member img {
    
    width: 100%;          /* Make the image take up the full width */
    height: auto;        /* Set a consistent height */
    object-fit: cover;
    border-radius: 10px;  /* Optional rounded corners */
    border: 2px solid #000000;
}

/* Container for team members */
.team-container {
    display: flex;
    flex-wrap: wrap;
    
    padding: 20px;
    gap: 20px;
    max-width: 95%; /* Constrain the width to allow background to pop */
    margin: 0 auto; /* Center the container horizontally */
    background-color: rgba(0, 0, 0, 0.1);
    border-radius: 20px; /* Curves the corners */
    
}   

/* Individual member styling */
.team-member {

    overflow: hidden; /* Prevent content from overflowing */
    box-sizing: border-box; /* Ensure padding and border are included in dimensions */
    background-color: white;
    flex: 1;
    min-width: 250px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.9);
    padding: 20px;
    transition: transform 0.2s;
}

.team-member:hover {
    transform: scale(1.02); /* Slight zoom on hover */
}



/* Name and role styling */
.team-member p.name {
    font-weight: bold;
    font-size: 1.2em;
    color: #007acc;
    margin: 15px 0 5px;
    background-color: #eef7fc;
    padding: 10px;
    border-radius: 8px;
    text-align: center;
}

/* Text content styling */
.team-member-text {
    text-align: justify;
    text-align-last: left; /* Aligns the last line to the left */
    line-height: 1.8; /* Adds more space between lines */
    hyphens: auto; /* Enables automatic hyphenation */
}

/* Style for the footer element */
/* Style for the footer element */
footer {
    background-color: #D9D9D9;  /* Dark background for footer */
    color: rgb(0, 0, 0);        /* Black text color */
    padding: 20px;              /* Padding around the footer */
}

/* Style for the container holding all sections */
.footer-container {
    flex-wrap: wrap; /* Allows content to wrap on smaller screens */
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    
}

.footer-row {
    display: flex;
    flex-wrap: wrap; /* Allow wrapping if necessary */
    justify-content: space-between; /* Ensure even spacing between items */
    gap: 10px; /* Consistent spacing between child elements */
    
}


/* Left section styling */
.left-section {
    
    display: flex; /* Makes the left section a row */
    flex-direction: row; /* Ensures horizontal alignment */
    gap: 50px; /* Adds spacing between the logo-and-address and sitemap-reviews */
    align-items: flex-start; /* Ensures elements align neatly at the top */
}

.logo-and-address {
    
    flex: 1; /* Allows the logo and address to occupy appropriate space */

}



.footer-logo {
    color: #000;
    font-family: 'Sarina';
    margin-top: 0%;
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 10px;
}

address {
    
    font-size: 14px;
    font-style: normal;
    line-height: 1.85;
}

.logo-and-address p {
    margin-top: 0%;
}

.sitemap-reviews {
    display: flex;
    gap: 50px;
}

.sitemap ul, .reviews ul {
    
    list-style: none;
    padding: 0;
    margin: 0;
}

.sitemap ul li, .reviews ul li {
    margin-bottom: 5px;
}

.sitemap a, .reviews a {
    color: #000;
    text-decoration: none;
    font-size: 14px;
}

.sitemap p, .reviews p {
    margin-top: 0%;
}

.sitemap a:hover, .reviews a:hover {
    color: #007BFF;
}

/* Right section styling */
.right-section {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 15px;
}

.contact-info p {
    text-align: right;
    margin: 5px 0;
    font-size: 14px;
}

.contact-info a {
    text-align: right;
    color: #000;
    text-decoration: none;
}

.contact-info a:hover {
    color: #007BFF;
}

/* Style for the social icons container */
.social-icons {
    display: flex;
    gap: 10px;
}

.social-icon img {
    width: 30px;
    height: 30px;
    transition: transform 0.3s ease;
}

.social-icon img:hover {
    transform: scale(1.2);
}

/* Background image styling */
.form-background-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../IMAGES/form-background.jpg'); /* Replace with your image file */
    background-size: cover;
    background-position: center;
    z-index: 1; /* Ensure it is behind the form */
    border-radius: 10px; /* Optional rounded corners for aesthetic */
    filter: brightness(50%)

}

.form-container {
    position: relative;
    max-width: 1200px; /* Adjust width to your preference */
    margin: 0 auto; /* Center the container horizontally */
    padding: 20px;
    
}