/**
 * IHM Aurangabad Admissions Portal - Main Stylesheet
 * Official Color Palette:
 * - Primary Gold: #C4A35A
 * - Navy Blue: #1E3A5F
 * - Light Gold: #D4B76A
 * - Dark Navy: #152A45
 * - Cream: #F9F7F2
 */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(180deg, #F9F7F2 0%, #FFFFFF 100%);
    min-height: 100vh;
    padding: 20px;
    line-height: 1.6;
    color: #333;
}

/* Form Container */
.form-container {
    max-width: 1100px;
    margin: 0 auto;
    background: #fff;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(30, 58, 95, 0.15);
    border: 1px solid #E8E4DC;
}

.form-main-title {
    text-align: center;
    color: #C4A35A;
    font-size: 42px;
    margin-bottom: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 3px;
}

.form-title {
    text-align: center;
    color: #1E3A5F;
    font-size: 32px;
    margin-bottom: 10px;
    font-weight: 600;
}

.batch-note {
    text-align: center;
    color: #C4A35A;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.browser-note {
    text-align: center;
    color: #1E3A5F;
    font-size: 13px;
    margin-bottom: 30px;
    font-style: italic;
    background: linear-gradient(135deg, #F9F7F2 0%, #FFFEF9 100%);
    padding: 15px;
    border-radius: 5px;
    border-left: 4px solid #C4A35A;
    border-right: 4px solid #C4A35A;
}

/* Alerts */
.alert {
    padding: 15px 20px;
    border-radius: 5px;
    margin-bottom: 20px;
    font-weight: 500;
}

.alert-warning {
    background: #FFF8E7;
    color: #8B6914;
    border: 1px solid #C4A35A;
    border-left: 4px solid #C4A35A;
}

.alert-success {
    background: #E8F5E9;
    color: #2E7D32;
    border: 1px solid #4CAF50;
    border-left: 4px solid #4CAF50;
}

.alert-error {
    background: #FFEBEE;
    color: #C62828;
    border: 1px solid #EF5350;
    border-left: 4px solid #EF5350;
}

/* Fieldsets */
fieldset {
    border: 2px solid #C4A35A;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 30px;
    background: linear-gradient(180deg, #FFFEF9 0%, #FFFFFF 100%);
    position: relative;
}

fieldset::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #C4A35A 0%, #D4B76A 50%, #C4A35A 100%);
    border-radius: 8px 8px 0 0;
}

legend {
    font-weight: 700;
    font-size: 18px;
    color: #1E3A5F;
    padding: 10px 20px;
    background: linear-gradient(135deg, #C4A35A 0%, #D4B76A 100%);
    border-radius: 25px;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 2px 10px rgba(196, 163, 90, 0.3);
}

/* Form Rows */
.form-row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -10px;
}

/* Form Groups */
.form-group {
    flex: 1;
    min-width: 200px;
    padding: 10px;
}

.form-group.full-width {
    flex: 100%;
}

.form-group.half-width {
    flex: 50%;
    min-width: 300px;
}

.form-group.third-width {
    flex: 33.33%;
    min-width: 200px;
}

.form-group.quarter-width {
    flex: 25%;
    min-width: 150px;
}

.form-group.fourth-width {
    flex: 20%;
    min-width: 120px;
}

/* Labels */
label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #1E3A5F;
    font-size: 14px;
}

label .required {
    color: #C62828;
    font-weight: bold;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-weight: 500;
    color: #1E3A5F;
}

.checkbox-label input[type="checkbox"] {
    margin-top: 3px;
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #C4A35A;
}

/* Inputs */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
input[type="number"],
input[type="file"],
select,
textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #E8E4DC;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.3s ease;
    background: #fff;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #C4A35A;
    box-shadow: 0 0 0 3px rgba(196, 163, 90, 0.2);
}

input:disabled,
select:disabled,
textarea:disabled {
    background: #F5F3EF;
    cursor: not-allowed;
    opacity: 0.6;
}

input[readonly],
select[readonly] {
    background: #F5F3EF;
}

textarea {
    resize: vertical;
    min-height: 80px;
}

select {
    height: 45px;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23C4A35A' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    padding-right: 40px;
}

/* Upload Section */
.upload-section {
    display: flex;
    gap: 30px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.upload-box {
    flex: 1;
    min-width: 280px;
    text-align: center;
    padding: 25px;
    border: 2px dashed #C4A35A;
    border-radius: 8px;
    background: linear-gradient(180deg, #FFFEF9 0%, #FFFFFF 100%);
    transition: all 0.3s ease;
}

.upload-box:hover {
    border-color: #1E3A5F;
    background: #F9F7F2;
    box-shadow: 0 4px 15px rgba(196, 163, 90, 0.2);
}

.upload-box label {
    font-weight: 700;
    margin-bottom: 15px;
    color: #1E3A5F;
    font-size: 15px;
}

.image-preview {
    margin: 15px 0;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-preview img {
    max-width: 200px;
    max-height: 200px;
    border: 2px solid #C4A35A;
    border-radius: 5px;
    box-shadow: 0 4px 15px rgba(30, 58, 95, 0.15);
}

.resize-controls {
    margin-top: 15px;
}

.btn-resize {
    background: linear-gradient(135deg, #1E3A5F 0%, #152A45 100%);
    color: white;
    padding: 10px 25px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-resize:hover {
    background: linear-gradient(135deg, #C4A35A 0%, #D4B76A 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(196, 163, 90, 0.4);
}

.upload-note {
    font-size: 12px;
    color: #1E3A5F;
    margin-top: 10px;
    line-height: 1.5;
}

.upload-note a {
    color: #C4A35A;
    text-decoration: none;
    font-weight: 600;
}

.upload-note a:hover {
    text-decoration: underline;
    color: #1E3A5F;
}

/* Tables */
.language-table,
.education-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    background: #fff;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(30, 58, 95, 0.1);
}

.language-table th,
.language-table td,
.education-table th,
.education-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #E8E4DC;
}

.language-table th,
.education-table th {
    background: linear-gradient(135deg, #1E3A5F 0%, #152A45 100%);
    color: #fff;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.language-table td {
    text-align: center;
}

.language-table input[type="checkbox"] {
    width: 22px;
    height: 22px;
    cursor: pointer;
    accent-color: #C4A35A;
}

.language-table .lang-input {
    width: 100%;
    padding: 8px;
    border: 1px solid #E8E4DC;
    border-radius: 4px;
}

.education-table td input {
    border: none;
    padding: 10px;
    width: 100%;
    background: transparent;
}

.education-table td input:focus {
    box-shadow: none;
    background: #F9F7F2;
}

/* Sibling Rows */
.sibling-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.sibling-row .form-group {
    flex: 1;
    min-width: 150px;
}

/* Reference Box */
.reference-box {
    border: 2px solid #C4A35A;
    padding: 25px;
    margin-bottom: 20px;
    border-radius: 8px;
    background: linear-gradient(180deg, #FFFEF9 0%, #FFFFFF 100%);
}

.reference-title {
    font-weight: 700;
    margin-bottom: 15px;
    color: #1E3A5F;
    font-size: 16px;
    border-bottom: 2px solid #C4A35A;
    padding-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Employment Entry */
.employment-entry {
    background: linear-gradient(180deg, #FFFEF9 0%, #FFFFFF 100%);
    margin-bottom: 25px;
    border: 1px solid #E8E4DC;
    border-radius: 8px;
    padding: 20px;
}

.employment-entry h4 {
    color: #1E3A5F;
    font-size: 15px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #C4A35A;
    font-weight: 700;
}

/* Declaration Text */
.declaration-text {
    background: linear-gradient(180deg, #FFFEF9 0%, #FFFFFF 100%);
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    line-height: 1.8;
    border-left: 4px solid #C4A35A;
    border: 1px solid #E8E4DC;
    border-left-width: 4px;
}

/* Section Note */
.section-note {
    font-size: 13px;
    color: #1E3A5F;
    margin-bottom: 15px;
    font-style: italic;
    background: #F9F7F2;
    padding: 10px 15px;
    border-radius: 5px;
    border-left: 3px solid #C4A35A;
}

/* Submit Button */
.submit-btn {
    background: linear-gradient(135deg, #C4A35A 0%, #D4B76A 100%);
    color: #1E3A5F;
    padding: 20px 80px;
    border: none;
    border-radius: 50px;
    font-size: 20px;
    font-weight: 700;
    cursor: pointer;
    display: block;
    margin: 40px auto 0;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(196, 163, 90, 0.4);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.submit-btn:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(196, 163, 90, 0.5);
    background: linear-gradient(135deg, #D4B76A 0%, #E5C87A 100%);
}

.submit-btn:disabled {
    background: #BDBDBD;
    cursor: not-allowed;
    box-shadow: none;
    color: #757575;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .form-container {
        padding: 20px;
    }
    
    .form-main-title {
        font-size: 28px;
        letter-spacing: 2px;
    }
    
    .form-title {
        font-size: 24px;
    }
    
    .batch-note {
        font-size: 18px;
    }
    
    .form-group.half-width,
    .form-group.third-width,
    .form-group.quarter-width,
    .form-group.fourth-width {
        flex: 100%;
        min-width: 100%;
    }
    
    .upload-section {
        flex-direction: column;
    }
    
    .sibling-row {
        flex-direction: column;
    }
    
    .language-table,
    .education-table {
        font-size: 12px;
    }
    
    .language-table th,
    .language-table td,
    .education-table th,
    .education-table td {
        padding: 8px;
    }
    
    fieldset {
        padding: 15px;
    }
    
    .submit-btn {
        padding: 15px 40px;
        font-size: 16px;
        width: 100%;
    }
}

/* Print Styles */
@media print {
    body {
        background: #fff;
        padding: 0;
    }
    
    .form-container {
        box-shadow: none;
        max-width: 100%;
        border: none;
    }
    
    .submit-btn,
    .browser-note,
    .btn-resize,
    .resize-controls {
        display: none;
    }
    
    fieldset {
        border: 1px solid #C4A35A;
        page-break-inside: avoid;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

fieldset {
    animation: fadeIn 0.5s ease-out;
}

/* Loading State */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    margin: -15px 0 0 -15px;
    border: 3px solid #F9F7F2;
    border-top: 3px solid #C4A35A;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Progress Indicator */
.form-progress {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
    gap: 10px;
}

.progress-step {
    display: flex;
    align-items: center;
    gap: 10px;
}

.progress-step-number {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: #E8E4DC;
    color: #1E3A5F;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
}

.progress-step.active .progress-step-number {
    background: linear-gradient(135deg, #C4A35A 0%, #D4B76A 100%);
    color: #1E3A5F;
}

.progress-step.completed .progress-step-number {
    background: linear-gradient(135deg, #1E3A5F 0%, #152A45 100%);
    color: #fff;
}

.progress-step-line {
    width: 50px;
    height: 2px;
    background: #E8E4DC;
}

.progress-step.completed + .progress-step-line {
    background: linear-gradient(90deg, #1E3A5F 0%, #C4A35A 100%);
}



/* Section Divider */
.section-divider {
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, #C4A35A 50%, transparent 100%);
    margin: 30px 0;
}

/* Info Box */
.info-box {
    background: linear-gradient(135deg, #E3F2FD 0%, #BBDEFB 100%);
    border-left: 4px solid #1E3A5F;
    padding: 15px 20px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.info-box-title {
    font-weight: 700;
    color: #1E3A5F;
    margin-bottom: 5px;
}

.info-box-text {
    color: #333;
    font-size: 13px;
}
