/* General body styling */
body {
    font-family: Arial, sans-serif;
    background-color: #e8f5e9;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

/* Form container */
.container {
    background: white;
    width: 60%;
    max-width: 800px;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    border-left: 5px solid #4caf50;
    box-sizing: border-box;
}

/* Responsive Design */
@media (max-width: 1024px) {  /* Tablets */
    .container {
        width: 80%;
    }
}

@media (max-width: 768px) {  /* Mobile Devices */
    .container {
        width: 95%;
        padding: 15px;
    }
}

/* Headings */
h2, h3 {
    text-align: center;
    color: #4caf50;
    margin-bottom: 15px;
}

/* Labels with required star */
.label-required {
    font-weight: bold;
    color: #333;
    display: block;
    margin-bottom: 5px;
}

.label-required::after {
    content: " *";
    color: red;
    font-weight: bold;
}

/* Input fields */
input, select {
    width: 100%;
    padding: 12px;
    margin-bottom: 10px;
    border: 1px solid #000; /* Default black border */
    border-radius: 5px;
    font-size: 16px;
    transition: border-color 0.3s ease-in-out;
    box-sizing: border-box; /* Ensures padding doesn’t affect width */
}

/* Focus effect on input fields */
input:focus, select:focus {
    border-color: #4caf50;
    outline: none;
}

/* File upload section */
.file-upload {
    margin-bottom: 5px;
}

.file-upload label {
    font-weight: bold;
    color: #333;
    display: block;
    margin-bottom: 5px;
}

/* Remove border from file inputs */
.file-upload input[type="file"] {
    border: none;
    padding: 5px;
    cursor: pointer;
}

/* Buttons */
button {
    background: #4caf50;
    color: white;
    padding: 12px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    width: 100%;
    font-size: 16px;
    font-weight: bold;
    transition: transform 0.2s ease-in-out, background 0.3s;
}

/* Button hover effect */
button:hover {
    background: #388e3c;
    transform: scale(1.05);
}

/* Improved layout spacing */
.form-group {
    margin-bottom: 20px;
}

/* Child section styling */
.child {
    border-left: 3px solid #4caf50;
    padding-left: 10px;
    margin-bottom: 15px;
}

/* Ensure radio buttons & checkboxes align well */
input[type="radio"], input[type="checkbox"] {
    margin-right: 5px;
}

/* Ensure a neat list display for checkboxes */
.file-upload label {
    display: flex;
    align-items: center;
}

/* ✅ Fix: Properly Hide Spouse Details Initially */
#spouseDetails {
    display: none;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: opacity 0.3s ease-in-out, max-height 0.3s ease-in-out;
}

/* ✅ Fix: Smoothly Show Spouse Details When Married */
#spouseDetails.active {
    display: block;
    opacity: 1;
    max-height: 500px; /* Adjust based on content */
    transition: opacity 0.3s ease-in-out, max-height 0.3s ease-in-out;
}

/* ✅ Footnote Styling */
.footnote {
    font-size: 11px;
    color: #555;
    font-style: italic;
    margin-top: -8px; /* Reduce space between input and footnote */
    display: block;
}

/* ✅ Padding Fix for Input Fields */
input,
select,
textarea {
    padding: 12px; /* Consistent padding across all input types */
}

/* ✅ Fix Extra Spacing */
.shit {
    margin-top: 5px; /* Adjusted spacing */
}
