/* General Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
} 

/* Background */
body {
    background: linear-gradient(to bottom,  #fdd4d4,#ffffff);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    position: relative;
    overflow: auto;
}

body::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: contain; /* Makes the image larger */
    opacity: 1; /* Adjust transparency (0 = fully transparent, 1 = fully visible) */
    z-index: 0;
}

body * {
    position: relative;
    z-index: 1;
}


/* Centering Form */
.container {
    position: relative;
    max-width: 850px;
    width: 80%;
    background: white;
    padding: 15px;
    border-radius: 5px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    animation: fadeIn 0.6s ease-in-out;
    overflow: hidden;
    flex-direction: column;
}

/* Form Heading */
h2 {
    margin-bottom: 20px;
    margin-top: 1px;
    font-size: 20px;
    color: #333;
    text-align: center;
}

.logo { 
    width: 20vh; /* Adjust size as needed */
    height: auto;
}

.logo-container {
    display: flex;
    gap: 15px; /* Adds spacing between logos */
    flex-wrap: wrap;
}

/* Form Layout */
form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Labels */
label {
    font-weight: 500;
    color: #222222;
    font-size: 14px;
    display: block;
    margin-bottom: 3px;
}

/* Input Fields */
input, select, textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 14px;
    height: 10px;
    transition: 0.3s ease-in-out;
}

input:focus, select:focus, textarea:focus {
    border-color: #facd39;
    box-shadow: 0 0 5px rgba(112, 105, 3, 0.5);
    outline: none;
}

select {
    height: 34px; /* Ensures dropdown fits well */
}

/* Textarea */
textarea {
    resize: none;
    height: 80px;
}
input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
    height: 32px; /* Makes input shorter */
}
/* Row for Age and Sex */
.input-row {
    display: flex;
    gap: 5px;
}
.address-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: flex-start; /* Align inputs from left to right */
}
.input-group {
    flex: 1; /* Makes both inputs equal width */
    min-width: 200px; /* Ensures fields don’t get too small */
}

select, input {
    width: 100%;
}

.input-group-reason {
    margin-top: 10px;
}

/* Adjust spacing between month and year in Flatpickr */
.flatpickr-months .flatpickr-month {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px; /* Adds space between month and year */
}

.flatpickr-months .flatpickr-month .flatpickr-current-month {
    display: flex;
    align-items: center;
    gap: 10px; /* Also ensures spacing between month & year inside the header */
}

.flatpickr-months .flatpickr-month .flatpickr-monthDropdown-months,
.flatpickr-months .flatpickr-month .numInputWrapper {
    margin: 0 5px; /* Optional: fine-tune spacing */
}

/* Next Button */
button {
    width: 100%;
    background: linear-gradient(to right,  #3e8e40,#48c432);
    color: white;
    border: none;
    padding: 8px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    transition: 0.3s ease-in-out;
    margin-top: 8px;
    margin-bottom: 8px;
}

button:hover {
    background: #3e8e41;
    transform: scale(1.01);
}

/* Fade-in Animation */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
    .container {
        width: 90%;
        padding: 10px;
    }

    .input-row {
        flex-direction: column;
        gap: 15px;
    }
    .form-container {
        grid-template-columns: 1fr; /* Stack fields for smaller screens */
    }
    button {
        padding: 10px;
        font-size: 14px;
    }
}

/* Responsive Design */
@media (max-width: 600px) {
    .container {
        width: 90%;
    }

    .input-row {
        flex-direction: column;
        gap: 15px;
    }
}

/* Ensure Back Button is properly aligned on mobile */
@media (max-width: 480px) {
    body {
        padding: 10px;
    }

    .container {
        width: 95%;
        padding: 15px;
    }

    .back-btn {
        top: 10px;
        left: 10px;
    }

    .back-btn button {
        font-size: 14px;
        padding: 8px 12px;
    }

    button {
        padding: 12px;
        font-size: 14px;
    }
}
