.contact-container {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-evenly;
    gap: 3rem; /* Add space between stacked form and image */
}


.contact-left {
    display: flex;
    flex-direction: column;
    align-items: start;
    gap: 20px;
}


.contact-left-title h2 {
    font-weight: 600;
    color: var(--black-color);
    font-size: 40px;
    margin-bottom: 5px;
}


.contact-left-title hr {
    border: none;
    width: 120px;
    height: 5px;
    background-color: var(--primary-color);
    border-radius: 10px;
    margin-bottom: 20px;
}


/* --- RIGHT COLUMN & IMAGE STYLES --- */
.contact-right {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1.5rem; /* Space between image and text */
    text-align: center;
}


.contact-image {
    width: 100%;
    max-width: 900px; /* Prevents the image from being too large on desktop */
    height: auto;
    border-radius: 16px; /* A modern, softer corner */
    object-fit: cover;
}


.contact-info {
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--fourth-color);
}


.contact-info a {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
}


.contact-info a:hover {
    text-decoration: underline;
}


.contact-form {
    display: flex;
    flex-direction: column;
    align-items: start;
    justify-content: center;
    max-width: 600px;
    padding: 1rem;
    color: var(--black-color);
}


.contact-input {
    width: 450px;
    height: 50px;
    border: 1px solid var(--third-color);
    padding-left: 25px;
    font-weight: 500;
    margin: 0.5rem 0;
    background-color: var(--white-color);
    border-radius: 50px;
    font-size: 1rem;
    color: var(--black-color);
    transition: all ease-in-out 0.3s;
}


.contact-left textarea {
    height: 140px;
    padding-top: 15px;
    padding-left: 25px;
    border-radius: 20px;
}


.contact-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 5px var(--primary-color);
}


#service {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-right: 40px; 
    background: var(--white-color) url("data:image/svg+xml;utf8,<svg fill='%23999' height='16' viewBox='0 0 24 24' width='16' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/></svg>") no-repeat right 15px center/20px 20px;
    border-radius: 50px;
    
}


::placeholder {
    color: #999999;
    opacity: 1;
}


option {
    margin-top: 0.5rem;
    border-radius: 50px;
}


#service option:first-child {
    color: #999;
    display: none;
}

#service:invalid {
    color: #999;
}

#service option:not(:first-child) {
    color: var(--black-color);
}

#service:focus,
#service:valid {
    color: var(--black-color);
}


.dropdown-selected:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 5px var(--primary-color);
}


.contact-submit {
    margin: 0.5rem 0;
    padding: 1rem 1.25rem;
    background-color: var(--white-color);
    color: var(--black-color);
    border: 1px solid var(--black-color);
    border-radius: 50px;
    cursor: pointer;
    font-size: 1rem;
    transition: all ease-in-out 0.3s;
}


.contact-submit:hover {
    background-color: var(--primary-color);
    color: var(--white-color);
    transform: scale(1.05);
}


.custom-dropdown {
    position: relative;
    width: 400px;
    font-size: 1rem;
}

.dropdown-selected {
    position: relative; /* Create a positioning context for the arrow */
    width: 450px;
    height: 50px;
    margin: 0.5rem 0;
    /* Increase right padding to make space for the absolute-positioned arrow */
    padding: 1rem 3rem 1rem 1.25rem;
    border-radius: 50px;
    border: 1px solid var(--third-color);
    background: var(--white-color);
    color: var(--black-color);
    text-align: left;
    cursor: pointer;
    transition: all ease-in-out 0.3s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dropdown-selected:after {
    content: "\f078";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute; /* Position the arrow independently */
    right: 1.5rem; /* Place it within the padding area */
    color: var(--gray-color);
    animation: rotateOut 0.3s;
    /* Removed float: right; */
}

.custom-dropdown.open .dropdown-list {
    display: block;
    animation: fadeIn 0.2s;
}


.custom-dropdown.open .dropdown-selected::after {
    content: "\f077";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    animation: rotate 0.3s;
}


@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px);}
    to { opacity: 1; transform: translateY(0);}
}


@keyframes rotate {
    from { transform: rotate(180deg); }
    to { transform: rotate(360deg); }
}


@keyframes rotateOut {
    from { transform: rotate(180deg); }
    to { transform: rotate(0deg); }
}


.dropdown-list li {
    padding: 0.75rem 1.5rem;
    border-radius: 40px;
    margin: 0.25rem 1rem;
    color: var(--black-color);
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}


.dropdown-list li:hover, .dropdown-list li.selected {
    background: var(--primary-color);
    color: var(--white-color);
}


.custom-dropdown,
.dropdown-selected,
.dropdown-list,
.dropdown-list li {
    font-family: inherit;
    font-size: 1rem;
}

.dropdown-selected.placeholder {
    color: #999;
}


.dropdown-list {
    display: none;
    position: absolute;
    width: 450px;
    top: 110%;
    left: 0;
    background: var(--white-color);
    border: 1px solid var(--third-color);
    border-radius: 20px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.10);
    z-index: 10;
    padding: 0;
    margin: 0;
    list-style: none;
    max-height: 300px;
    overflow-y: auto;
    overflow-x: hidden;
    box-sizing: border-box;
    scrollbar-width: none;
}


::-webkit-scrollbar {
    display: 12px;
}


.dropdown-list::-webkit-scrollbar-track {
    -webkit-box-shadow: inset 0 0 6 px rgba (0,0,0,0.3);
    border-radius: 10px;
}


.dropdown-list::-webkit-scrollbar-thumb {
    border-radius: 10px;
    -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,05)
}


@media (max-width: 960px) {
    /* --- UNIFIED MOBILE STYLES --- */
    .contact-container {
        display: grid; /* Ensure display is grid */
        grid-template-columns: 1fr; /* Stack items vertically */
        place-items: center; /* Center items horizontally and vertically */
        height: auto; /* Allow height to adjust to content */
        padding: 3rem 1rem;
        gap: 3rem;
    }

    .contact-form {
        align-items: start; /* Change this from 'center' to 'start' */
    }

    .contact-right {
        display: none;
    }

    /* Add this rule to center the form content */
    .contact-form-title {
        align-content: center;
    }

    .contact-left-title {
        align-self: center;
       
    }

    .contact-left-title h2 {
        margin-bottom: 0;
    }

    .contact-left-title hr {
        justify-self: center;
    }

    .contact-input,
    .dropdown-selected,
    .dropdown-list {
        width: 80vw;
        max-width: 450px; /* Set a max-width for larger mobile screens */
    }

    .custom-dropdown {
        width: 80vw;
        max-width: 450px; /* Set a max-width for larger mobile screens */
        text-overflow: unset;
    }
}

@media (max-width: 800px) {
    .contact-right {
        display: none; /* Hide the image on smaller phone screens */
    }
}