.contact-section {
    padding: 6rem 0;
    background: linear-gradient(to bottom, #F9FAFB, #E5E7EB);
}

.contact-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    gap: 2rem;
    align-items: stretch;
    padding: 0 1rem;
    height: 500px; /* Fixed height for desktop */
}

.contact-image, .contact-form {
    flex: 1;
    height: 100%;
}

.contact-image {
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-img {
    width: 100%;
    max-width: 500px;
    height: 100%;
    object-fit: cover;
    border-radius: 0.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.contact-form {
    background: #FFFFFF;
    padding: 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    overflow: hidden; /* Prevent overflow */
}

.contact-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1F2937;
    margin-bottom: 0.75rem;
    text-align: center;
}

.contact-description {
    font-size: 1rem;
    color: #4B5563;
    margin-bottom: 1rem;
    text-align: center;
    line-height: 1.5;
}

.contact-form-inner {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    flex-grow: 1;
    overflow-y: auto; /* Allow scrolling if content overflows */
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #1F2937;
    margin-bottom: 0.25rem;
}

.form-input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #D1D5DB;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    color: #1F2937;
    background-color: #F9FAFB;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-input:focus {
    border-color: #22C55E;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
    outline: none;
}

.form-input::placeholder {
    color: #9CA3AF;
}

.form-button-container {
    display: flex;
    justify-content: center;
    margin-top: 0.5rem;
}

.form-button {
    background-color: #22C55E;
    color: #FFFFFF;
    padding: 0.5rem 1.5rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
    width: auto;
}

.form-button:hover {
    background-color: #16A34A;
    transform: translateY(-2px);
}

.form-button:active {
    transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 768px) {
    .contact-container {
        flex-direction: column;
        gap: 1.5rem;
        height: auto;
    }

    .contact-image, .contact-form {
        height: auto;
    }

    .contact-image {
        order: 1;
    }

    .contact-form {
        order: 2;
    }

    .contact-img {
        max-width: 100%;
        height: 250px;
    }

    .contact-form {
        padding: 1rem;
    }

    .contact-title {
        font-size: 1.5rem;
    }

    .contact-description {
        font-size: 0.875rem;
    }
}

@media (max-width: 480px) {
    .contact-section {
        padding: 4rem 0;
    }

    .contact-img {
        height: 200px;
    }

    .contact-form {
        padding: 0.75rem;
    }

    .contact-title {
        font-size: 1.25rem;
    }

    .form-button {
        padding: 0.5rem 1rem;
    }
}