/* Contact Image Container */
.contact_image_container {
    position: relative;
    max-width: 100%;
    max-height: 300px;
    overflow: hidden;
}

.contact_image_container {
    background-image: url('img/contact_us_1.jpeg');
    background-size: cover;
    background-position: center calc(50% - 80px);
    /* background-attachment: fixed; */
    height: clamp(200px, 30vw, 300px);
}

/* Black overlay */
.contact_image_container::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
}

/* Overlay Text */
.overlay_text {
    position: absolute;
    top: 25%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-weight: bold;
    text-align: center;
    opacity: 0;
    transition: opacity 0.1s ease;
    z-index: 2;
}

/* Animations */
.text1 {
    display: block;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1s ease, transform 0.6s ease;
    text-transform: uppercase;
    font-size: clamp(1rem, 4vw, 2rem);
}

.text2 {
    display: block;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1s ease, transform 0.6s ease;
    text-transform: uppercase;
    font-size: clamp(2rem, 6vw, 4rem);
}

.contact_image_container.in-view .overlay_text {
    opacity: 1;
}

.contact_image_container.in-view .text1 {
    opacity: 1;
    transform: translateY(0);
}

.contact_image_container.in-view .text2 {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.5s;
    /* Delayed appearance */
}

/* Contact Container 1 */
.contact_container_1 {
    margin: 3rem auto;
    max-width: 1200px;
    padding: 0 10px;
    /* Ensure there's some space on small screens */
}

/* Contact Paragraph */
.contact_container_1 p {
    font-size: clamp(1.5rem, 4vw, 2rem);
    /* Responsive font size using clamp */
    line-height: 1.6;
    color: #333;
    text-align: justify;
}

/* Google Map */
.map {
    padding: 20px;
}

.map iframe {
    width: 100%;
    height: clamp(300px, 50vw, 550px);
    /* Responsive height using clamp */
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Form */
.form {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    max-width: 500px;
    margin: auto;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    height: clamp(500px, 50vw, 550px);
    /* Responsive height using clamp */
}

/* Form Title */
.form h2 {
    font-size: clamp(1.8rem, 4vw, 2.2rem);
    /* Responsive font size using clamp */
    color: #01396f;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Input Fields */
.data {
    width: 100%;
    padding: 14px;
    margin: 12px 0;
    border: 2px solid transparent;
    border-radius: 6px;
    font-size: clamp(1.5rem, 4vw, 1.8rem);
    /* Responsive font size using clamp */
    outline: none;
    background: rgba(255, 255, 255, 0.2);
    color: #01396f;
    transition: all 0.3s ease;
}

.data::placeholder {
    color: rgba(1, 57, 111, 0.6);
    font-size: clamp(1.5rem, 4vw, 1.8rem);
    /* Responsive placeholder font size */
}

.data:focus {
    border-color: #0057b7;
    background: rgba(255, 255, 255, 0.4);
    box-shadow: 0 0 8px rgba(0, 87, 183, 0.5);
}

/* Textarea */
textarea {
    height: clamp(120px, 20vw, 130px);
    /* Responsive height using clamp */
    resize: none;
}

/* Submit Button */
.button {
    width: 100%;
    padding: 14px;
    font-size: clamp(1rem, 4vw, 1.2rem);
    /* Responsive font size using clamp */
    font-weight: bold;
    background: linear-gradient(45deg, #0057b7, #00aaff);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 87, 183, 0.4);
}

.button:hover {
    background: linear-gradient(45deg, #0046a5, #008fd1);
    box-shadow: 0 6px 15px rgba(0, 87, 183, 0.6);
    transform: translateY(-2px);
}

/* Modal container (hidden by default) */
.error-modal {
    display: none;
    /* Hidden initially */
    position: fixed;
    z-index: 1000;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    background: rgba(255, 0, 0, 0.9);
    /* Red translucent background */
    color: white;
    text-align: center;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.3);
    animation: fadeIn 0.3s ease-in-out;
}

/* Close button */
.error-modal .close-btn {
    background: white;
    color: red;
    border: none;
    padding: 8px 15px;
    font-size: 1rem;
    cursor: pointer;
    margin-top: 10px;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.error-modal .close-btn:hover {
    background: #ff3333;
    color: white;
}

/* Fade-in animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -60%);
    }

    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

/* Mobile View Adjustment */
@media screen and (max-width: 768px) {
    .contact_container_1 p {
        font-size: clamp(1.2rem, 5vw, 1.5rem);
        /* Adjust paragraph font size on mobile */
    }

    .map iframe {
        height: clamp(250px, 40vw, 350px);
        /* Adjust map height on mobile */
    }

    /* Form */
    .form {
        max-width: 90%;
        padding: 2rem;
        /* Adjust padding on mobile */
        margin: auto;
    }

    /* Input Fields */
    .data {
        font-size: clamp(1.4rem, 4vw, 1.6rem);
        /* Responsive font size for inputs on mobile */
    }

    /* Row to Column Conversion */
    .row {
        flex-direction: column;
        /* Change from row to column */
    }

    .col-6 {
        width: 100%;
        /* Make columns full width on mobile */
    }
}