/* Form Container */
.application-form {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    margin: 50px auto;
    font-family: 'Inter', sans-serif;
    max-width: 900px;

}

.application-form h2 {
    font-family: 'Oswald', sans-serif;
    color: #a00000;
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 25px;
    border-bottom: 3px solid #a00000;
    padding-bottom: 15px;
    text-align: center;
}

.application-form h2 i {
    margin-right: 12px;

}

.institute-info {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
    border-left: 4px solid #a00000;
}

.institute-info p {
    margin: 5px 0;
    color: #555;
}

.application-form fieldset {
    /* width: 100%;   */
    box-sizing: border-box;
    border: 1px solid #800000;
    padding: 25px;
    margin: 30px 0;
    border-radius: 12px;
    background: #fafbfc;
}

.application-form legend {
    font-weight: 600;
    color: #a00000;
    font-size: 1.1rem;
    padding: 8px 15px;
    background: white;
    border: 1px solid #a00000;
    border-radius: 8px;
    margin-bottom: 15px;
}

.application-form legend i {
    margin-right: 8px;
}

.form-group {
    margin-bottom: 20px;

}

.application-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
    font-size: 0.95rem;
}

.application-form input,
.application-form textarea,
.application-form select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    margin-bottom: 15px;
    font-family: inherit;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background: white;
    border-color: 2px #800000;
}

.application-form input:focus,
.application-form textarea:focus,
.application-form select:focus {
    outline: none;
    border-color: #a00000;
    box-shadow: 0 0 0 3px rgba(160, 0, 0, 0.1);
}

.application-form *,
.application-form *::before,
.application-form *::after {
    box-sizing: border-box;
}

/* Radio Button Styling */
.radio-group {
    display: flex;
    gap: 25px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.radio-option {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 10px 15px;
    border-radius: 8px;
    transition: all 0.3s ease;
    background: white;
    border: 1px solid #e9ecef;
    min-width: 100px;
}

.radio-option:hover {
    background: #f8f9fa;
    border-color: #a00000;
}

.radio-option input[type="radio"] {
    width: auto;
    height: 18px;
    margin: 0 10px 0 0;
    cursor: pointer;
    accent-color: #a00000;
}

.radio-option label {
    margin: 0;
    cursor: pointer;
    font-weight: 500;
    color: #555;
}

.radio-option input[type="radio"]:checked+label {
    color: #a00000;
    font-weight: 600;
}

.radio-option:has(input[type="radio"]:checked) {
    background: rgba(160, 0, 0, 0.05);
    border-color: #a00000;
}

/* Date Input Styling */
.date-input {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-bottom: 20px;
}

.date-input label {
    margin-bottom: 0;
    min-width: 140px;
}

.date-input input {
    margin-bottom: 0;
    max-width: 200px;
}

.application-form button {
    width: 100%;
    background: linear-gradient(135deg, #a00000, #800000);
    color: #fff;
    padding: 18px;
    font-size: 1.2rem;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 30px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.application-form button:hover {
    background: linear-gradient(135deg, #800000, #600000);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(160, 0, 0, 0.3);
}

.application-form button i {
    margin-right: 10px;
}

/* Declaration Section */
.declaration-text {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    line-height: 1.5;
    color: #856404;
}

/* Two Column Layout for some fields */
.two-column {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.experience-dates {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.experience-dates input {
    flex: 1;
    /* makes them equal width in a row */
}

/* Responsive */
@media (max-width: 768px) {
    .application-form {
        padding: 20px;
        margin: 10px 1px;
    }

    .application-form h2 {
        font-size: 1.6rem;
    }

    .application-form fieldset {
        padding: 15px;
    }

    .radio-group {
        flex-direction: column;
        gap: 10px;
    }

    .two-column {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .date-input {
        flex-direction: column;
        align-items: flex-start;
    }

    .date-input label {
        min-width: auto;

    }

    .date-input input {
        max-width: 100%;
    }
}

/* On small screens, stack them */
@media (max-width: 768px) {
    .experience-dates {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .application-form {
        padding: 20px;
    }

    .application-form h2 {
        font-size: 1.4rem;
    }

    .radio-option {
        min-width: auto;
        padding: 8px 12px;
    }
}

.application-form .form-group input[type="date"] {
    max-width: 200px;
    min-width: 0;
}

.application-form .form-group>div[style*="display:flex"] {
    flex-wrap: wrap;
}

/* Required asterisk */
.required {
    color: #e74c3c;
    font-weight: bold;
}

/* Field hint text */
.field-hint {
    color: #666;
    font-size: 0.85rem;
    margin-bottom: 15px;
    font-style: italic;
}

/* Add More Button */
.add-more-btn {
    background: transparent !important;
    color: #a00000 !important;
    border: none !important;
    padding: 10px 0 !important;
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    cursor: pointer;
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
    margin-top: 10px !important;
    transition: all 0.3s ease;
    width: auto !important;
    text-transform: none !important;
}

.add-more-btn:hover {
    color: #800000 !important;
    transform: none !important;
    box-shadow: none !important;
    background: transparent !important;
}

.add-more-btn i {
    font-size: 0.9rem;
    background: #a00000;
    color: white !important;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
}

.add-more-btn:hover i {
    background: #800000;
}

/* Entry Header with Remove Button */
.entry-header {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.remove-entry-btn {
    background: transparent !important;
    color: #a00000 !important;
    border: 1px solid rgba(160, 0, 0, 0.3) !important;
    border-radius: 4px !important;
    width: auto !important;
    height: auto !important;
    padding: 5px 10px !important;
    font-size: 0.75rem !important;
    cursor: pointer;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 5px;
    margin: 0 !important;
    transition: all 0.3s ease;
}

.remove-entry-btn:hover {
    background: rgba(160, 0, 0, 0.08) !important;
    color: #800000 !important;
    border-color: #a00000 !important;
    transform: none !important;
    box-shadow: none !important;
}

.remove-entry-btn i {
    font-size: 0.7rem !important;
}

/* Education and Experience Entry Containers */
.education-entry,
.experience-entry {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
    position: relative;
}

.education-entry:first-child,
.experience-entry:first-child {
    border-color: #e9ecef;
}

/* Checkbox Group Styling */
.checkbox-group {
    display: flex;
    align-items: center;
    margin-bottom: 0 !important;
    padding-top: 28px;
}

.checkbox-label {
    display: flex !important;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-weight: 500 !important;
    margin-bottom: 0 !important;
}

.checkbox-label input[type="checkbox"] {
    width: auto !important;
    height: 18px;
    margin: 0 !important;
    cursor: pointer;
    accent-color: #a00000;
}

.checkbox-label span {
    color: #555;
    font-size: 0.9rem;
}

/* File Upload Improvements */
.file-upload {
    position: relative;
    overflow: hidden;
    border: 1px dashed #e9ecef;
    border-radius: 8px;
    transition: all 0.3s ease;
    background: white;
}

.file-upload:hover {
    border-color: #a00000;
    background: rgba(160, 0, 0, 0.02);
}

.file-upload input[type="file"] {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    margin: 0;
    padding: 0;
}

.file-upload-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 20px;
    color: #666;
    font-size: 0.95rem;
    cursor: pointer;
}

.file-upload-btn i {
    color: #a00000;
    font-size: 1.2rem;
}

/* Resume Upload Special Styling */
.resume-upload {
    border-color: #a00000;
    background: rgba(160, 0, 0, 0.02);
}

.resume-btn {
    background: transparent;
}

/* Photo Upload Styling */
.photo-upload {
    min-height: 50px;
}

/* Relieving Date Group */
.relieving-date-group {
    transition: opacity 0.3s ease;
}

/* Date Input Width Fix */
.application-form .two-column .form-group input[type="date"] {
    max-width: 100%;
    width: 100%;
}

/* Select Dropdown Arrow Fix */
.application-form select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px;
}

/* Form Responsive Adjustments */
@media (max-width: 768px) {
    .checkbox-group {
        padding-top: 10px;
    }

    .education-entry,
    .experience-entry {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .file-upload-btn {
        padding: 12px 15px;
        font-size: 0.85rem;
    }

    .add-more-btn {
        font-size: 0.85rem !important;
    }
}