/* General Body Styles */
body {
    margin: 0;
    font-family: Arial, sans-serif;
    background-color: #f4f4f4;
    min-height: 100vh;
    /* Ensure the body takes full height */
    display: flex;
    flex-direction: column;
    /* Allow stacking header, main content, and footer */
}

/* Main Container */
.container {
    display: flex;
    flex-direction: row;
    /* Default layout for larger screens */
    height: auto;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    background: white;
}

/* Left Section */
.left {
    flex: 1;
    background-color: #4575a6;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    /* Ensures no content spills out */
}

.left img {
    width: 100%;
    height: auto;
    object-fit: cover;
    /* Ensure the image scales nicely */
    display: block
}

img {
    -webkit-touch-callout: none;
    /* Prevent interaction issues */
    -webkit-user-drag: none;
    /* Ensure smooth rendering */
}

/* Right Section */
.right {
    flex: 1;
    display: flex;
    flex-direction: column;
    /* Stacks items vertically */
    justify-content: flex-start;
    /* Aligns form at the top */
    align-items: center;
    padding: 20px;
    /* Add padding for better spacing */
    margin: 0;
    background-color: white;
    overflow: hidden;
    box-shadow: -4px 0 6px rgba(0, 0, 0, 0.1);
    /* Adds a subtle shadow between sections */
}

.right img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Ensure the image scales nicely */
}

/* Header Title */
h1 {
    text-align: center;
    color: #004080;
    margin-bottom: 20px;
    font-size: 24px;
}

/* Form Styling */
form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
    max-width: 400px;
    /* Limit form width for better design */
}

.form-group {
    display: flex;
    flex-direction: column;
    /* Stacks label and input vertically */
    gap: 8px;
    width: 100%;
}

/* Labels */
label {
    font-size: 14px;
    font-weight: bold;
    color: #333;
}

/* Input Fields */
input,
select,
button {
    padding: 12px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 5px;
    width: 100%;
    box-sizing: border-box;
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

/* Highlight Field When Filled */
input:valid,
select:valid {
    background-color: #147A73;
    /* Blue background */
    color: white;
    /* White text */
    border-color: #0F5F51;
    /* Matches the blue background */
}

/* Focus Styles for Inputs */
input:focus,
select:focus {
    outline: none;
    border-color: #147A73;
    box-shadow: 0 0 5px rgba(20, 122, 115, 0.5);
}

/* Submit Button */
button {
    background-color: #147A73;
    color: white;
    font-weight: bold;
    cursor: pointer;
    width: 100%;
    /* Make the button take full width on mobile */
    border: none;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

/* Hover Effects for Button */
button:hover {
    background-color: #0066cc;
    transform: scale(1.05);
    /* Slightly enlarges button */
}

/* Footer */
footer {
    background-color: #004080;
    color: white;
    text-align: center;
    padding: 10px 0;
    font-size: 14px;
    box-shadow: 0 -4px 6px rgba(0, 0, 0, 0.2);
    /* Adds a shadow above the footer */
    margin-top: auto;
    /* Push footer to the bottom */
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
        /* Stack sections vertically */
    }

    .left {
        height: 50vh;
        /* Adjust the height for smaller screens */
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .right {
        padding: 15px;
        height: auto;
        /* Allow right section to expand */
    }

    label {
        font-size: 12px;
        /* Adjust font size for smaller screens */
    }

    input,
    select,
    button {
        font-size: 14px;
        /* Ensure input and button text is readable */
    }

    button {
        width: 100%;
        /* Full-width button for better accessibility */
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 20px;
        /* Adjust header font size for very small screens */
    }

    .form-group {
        gap: 10px;
        /* Reduce gap between form fields */
    }

    input,
    select,
    button {
        font-size: 12px;
        padding: 10px;
        /* Adjust padding for smaller devices */
    }
}

span#error,
span#email-confirm-error {
    font-size: 12px;
    margin-top: 5px;
}