
@import url('https://fonts.googleapis.com/css2?family=Audiowide&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;700&display=swap');

/* Map and Contact Section */
#map-and-contact-section {
    padding: 60px 15px 0;
    margin-bottom: 50px;
}

/* Contact Section */
#contact-section {
    padding-left: 40px;
    padding-right: 40px;
    padding-top: 40px;
    padding-bottom: 20px;
    height: auto; /* Ensure height adjusts dynamically */
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    flex-direction: column;
    text-align: left;
}

/* Contact Section Heading */
#contact-section h2 {
    font-family: "Audiowide", system-ui;
    font-size: 1.5em;
    color: #001F62;
}

/* Contact Form */
#contact-section form {
    text-align: left;
    width: 100%;
    font-family: 'Outfit', sans-serif; 
}

#contact-section form input,
#contact-section form textarea {
    text-align: left;
    width: 100%;
    font-family: 'Outfit', sans-serif;
}

/* Ensure the Contact Form is visible and does not overlap */
#contact-form-container {
    margin-top: 20px;
    margin-bottom: 50px;
}

/* Styling for the custom submit button */
.submit-btn {
    background-color: #001F62;
    color: white;
    border: none;
    padding: 10px 20px;
    font-family: 'Outfit', sans-serif;
    font-size: 0.9em;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-top: 10px;
    box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.4); 
}

.submit-btn:hover {
    background-color: #1c3694;
    color: white;
}

/* Card Styling */
.map-card {
    background-color: #001F62;
    color: white;
    border-radius: 6px;
    box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.5); 
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
    text-align: center;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Hover effect for cards: reverse color */
.map-card:hover {
    background-color: white !important;
    color: #001F62;
}

.map-card:hover h5.card-title, 
.map-card:hover p.card-text, 
.map-card:hover .fas,
.map-card:hover .btn-link {
    color: #001F62 !important;
}

.map-card:hover .btn-link {
    color: #001F62;
}

.map-card:hover #map-image {
    filter: brightness(0.7);
}

/* Prevent the map from shrinking */
#map-image {
    object-fit: cover;
    width: 100%;
    height: auto;
    min-height: 200px;
}

/* Card Body */
.map-card .card-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    height: 42vh;
}

/* Card Title */
.map-card .card-body h5.card-title {
    font-size: 1em;
    margin-bottom: 8px;
}

/* Card Text */
.map-card .card-body p.card-text {
    font-size: 0.85em;
    margin-bottom: 12px;
    font-family: 'Outfit', sans-serif;
}

/* Button Link */
.map-card .card-body .btn-link {
    padding: 0;
    text-align: center;
    color: white;
    transition: color 0.3s ease;
}

/* Font Awesome Icons */
.map-card .card-body .fas {
    margin-right: 3px;
}

/* Ensure equal spacing between the map, addresses, and contact form */
.col-lg-4 {
    margin-bottom: 20px;
}

.row.g-4 > .col-lg-4 {
    padding-left: 20px;
    padding-right: 15px;
}

/* Large Screen Adjustments (Desktop) */
@media (min-width: 1920px) {
    /* Card Body */
    .map-card .card-body {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        text-align: center;
        height: 30vh;
    }   
}

/* Large Screen Adjustments (Desktop) */
@media (min-width: 992px) {
    #map-and-contact-section {
        padding-top: 80px;
    }

    .col-lg-4 {
        min-height: 350px;
    }

    #contact-section {
        min-height: 700px;
        padding-bottom: 0px;
    }

    .map-card .card-body h5.card-title {
        font-size: 1.2em;
    }

    .map-card .card-body p.card-text {
        font-size: 1em;
    }
}

/* Mobile and Tablet Responsiveness (max-width: 991px) */
@media (max-width: 991px) {
    #map-and-contact-section {
        padding-top: 40px;
    }

    #contact-section {
        padding-left: 5px;
        padding-right: 5px;
        padding-top: 30px;
        padding-bottom: 10px;
        min-height: auto;
    }

    /* Ensure all cards stack in mobile view */
    .col-md-6 {
        width: 50% !important;
        flex: 0 0 50% !important;
        max-width: 50% !important;
        padding-left: 10px;
        padding-right: 10px;
        box-sizing: border-box;
        height: auto;
    }

    .map-card {
        height: 100%;
        min-height: 220px;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }
}

/* Very Small Screen Adjustments (max-width: 480px) */
@media (max-width: 480px) {
    #map-and-contact-section {
        padding-top: 30px;
    }

    #contact-section {
        padding-left: 5px;
        padding-right: 5px;
        padding-top: 20px;
        padding-bottom: 5px;
    }

    /* Ensure each address card takes up 50% width for a 2x2 grid */
    .col-md-6 {
        width: 50% !important;
        flex: 0 0 50% !important;
        max-width: 50% !important;
        box-sizing: border-box;
        height: auto;
    }

    /* Ensure equal width and height for all address cards */
    .map-card {
        height: 100%;
        min-height: 200px;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }

    /* Ensure the map takes full width on very small screens */
    .col-lg-4:first-child {
        width: 100%;
        flex: 0 0 100%;
        max-width: 100%;
        margin-bottom: 10px;
    }

    /* Adjust the map image to fit very small screens */
    #map-image {
        height: auto !important;
        object-fit: cover;
        width: 100%;
        min-height: 200px;
    }

    /* Slightly reduce font size for smaller screens */
    .map-card .card-body h5.card-title {
        font-size: 0.9em;
    }

    .map-card .card-body p.card-text {
        font-size: 0.75em;
    }
}

/* Large Screens (2560px and above) */
@media (min-width: 2560px) {
    #map-and-contact-section {
        padding: 100px 40px 0;
        margin-bottom: 80px;
    }

    #contact-section {
        padding-left: 80px;
        padding-right: 80px;
        padding-top: 80px;
        padding-bottom: 50px;
        min-height: 85vh !important;
        margin-top: 180px !important;
    }

    #contact-section h2 {
        font-size: 2.8em;
    }

    #contact-section form input,
    #contact-section form textarea {
        font-size: 1.4em;
        padding: 12px;
    }

    .submit-btn {
        padding: 18px 40px;
        font-size: 1.3em;
    }

    .map-card {
        min-height: 450px;
        padding: 40px;
    }

    .map-card .card-body h5.card-title {
        font-size: 1.6em !important;
    }

    .map-card .card-body p.card-text {
        font-size: 1.4em !important;
    }

    #map-image {
        min-height: 450px;
    }

    .col-lg-4 {
        min-height: 450px;
    }

    .row.g-4 > .col-lg-4 {
        padding-left: 40px;
        padding-right: 40px;
    }
}
