/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #2c3e50;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header Styles */
.form-header {
    text-align: center;
    margin-bottom: 40px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    padding: 40px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.form-header h1 {
    color: #fff;
    font-size: 3rem;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    font-weight: 700;
    letter-spacing: -0.5px;
}

.form-header p {
    color: #f0f0f0;
    font-size: 1.3rem;
    opacity: 0.95;
    font-weight: 300;
    margin: 0;
}

/* Progress Indicator */
.progress-container {
    display: flex;
    justify-content: space-between;
    margin-bottom: 50px;
    position: relative;
    padding: 0 40px;
}

.progress-container::before {
    content: '';
    position: absolute;
    top: 30px;
    left: 12.5%;
    right: 12.5%;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    z-index: 1;
    border-radius: 2px;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
    flex: 1;
    transition: all 0.3s ease;
}

.step-number {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.4rem;
    margin-bottom: 12px;
    border: 3px solid transparent;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.step-label {
    color: #fff;
    font-size: 1rem;
    text-align: center;
    opacity: 0.8;
    transition: all 0.3s ease;
    font-weight: 500;
    letter-spacing: 0.3px;
}

.progress-step.active .step-number {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    border-color: #fff;
    box-shadow: 0 0 25px rgba(76, 175, 80, 0.5);
    transform: scale(1.1);
}

.progress-step.active .step-label {
    opacity: 1;
    font-weight: 600;
    color: #fff;
}

.progress-step.completed .step-number {
    background: linear-gradient(135deg, #2196F3, #1976D2);
    border-color: #fff;
    box-shadow: 0 0 20px rgba(33, 150, 243, 0.4);
}

.progress-step.completed .step-label {
    opacity: 1;
    font-weight: 600;
}

/* Form Container */
.form-container {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-radius: 25px;
    padding: 50px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
}

.form-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2, #667eea);
    background-size: 200% 100%;
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { background-position: 200% 0; }
    50% { background-position: -200% 0; }
}

.form-step {
    display: none;
    animation: fadeIn 0.5s ease-in-out;
}

.form-step.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.form-step h2 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 2.2rem;
    display: flex;
    align-items: center;
    gap: 15px;
    font-weight: 600;
    letter-spacing: -0.3px;
}

.form-step h2 i {
    color: #667eea;
    font-size: 2rem;
}

.step-description {
    color: #7f8c8d;
    font-size: 1.1rem;
    margin-bottom: 35px;
    font-weight: 400;
    line-height: 1.5;
}

/* Form Elements */
.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
}

.form-group {
    flex: 1;
    position: relative;
}

.form-group.full-width {
    flex: 100%;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 1rem;
    letter-spacing: 0.3px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid #e1e8ed;
    border-radius: 12px;
    font-size: 1.05rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: #fff;
    font-family: inherit;
    color: #2c3e50;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #95a5a6;
    font-weight: 400;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15);
    transform: translateY(-2px);
    background: #fbfcff;
}

.required {
    color: #e74c3c;
    font-weight: 700;
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
    font-family: inherit;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 1px solid #e9ecef;
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: #667eea;
}

.checkbox-group label {
    margin: 0;
    font-weight: 500;
    cursor: pointer;
    color: #495057;
}

/* Error Messages */
.error-message {
    display: block;
    color: #e74c3c;
    font-size: 0.9rem;
    margin-top: 8px;
    min-height: 22px;
    font-weight: 500;
    letter-spacing: 0.2px;
}

.form-group.error input,
.form-group.error select,
.form-group.error textarea {
    border-color: #e74c3c;
    box-shadow: 0 0 0 4px rgba(231, 76, 60, 0.15);
    background-color: #fdf2f2;
}

.form-group.error label {
    color: #e74c3c;
}

/* Buttons */
.btn {
    padding: 14px 32px;
    border: none;
    border-radius: 12px;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    min-width: 140px;
    justify-content: center;
    letter-spacing: 0.3px;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: linear-gradient(135deg, #95a5a6, #7f8c8d);
    color: #fff;
    box-shadow: 0 8px 25px rgba(149, 165, 166, 0.3);
}

.btn-secondary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(149, 165, 166, 0.4);
}

.btn-next {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: #fff;
    box-shadow: 0 8px 25px rgba(46, 204, 113, 0.3);
}

.btn-next:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(46, 204, 113, 0.4);
}

.btn-prev {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: #fff;
    box-shadow: 0 8px 25px rgba(243, 156, 18, 0.3);
}

.btn-prev:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(243, 156, 18, 0.4);
}



/* Form Navigation */
.form-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 50px;
    padding-top: 40px;
    border-top: 2px solid #f1f3f4;
    position: relative;
}

.form-navigation::before {
    content: '';
    position: absolute;
    top: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 2px;
}

.submit-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 50px;
    padding-top: 40px;
    border-top: 2px solid #f1f3f4;
    gap: 20px;
    position: relative;
}

.submit-actions::before {
    content: '';
    position: absolute;
    top: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 2px;
}

/* Education Sections */
.education-section, .family-section, .address-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    padding: 30px;
    border-radius: 18px;
    margin-bottom: 30px;
    border: 1px solid #e9ecef;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.education-section::before, .family-section::before, .address-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2);
}

.education-section h3, .family-section h3, .address-section h3 {
    color: #2c3e50;
    margin-bottom: 25px;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
}

.education-section h3 i, .family-section h3 i, .address-section h3 i {
    color: #667eea;
    font-size: 1.3rem;
}

/* Review Container */
.review-container {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    padding: 40px;
    border-radius: 18px;
    margin-bottom: 40px;
    border: 1px solid #e9ecef;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

.review-section {
    margin-bottom: 35px;
    background: #fff;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #f1f3f4;
    position: relative;
    overflow: hidden;
}

.review-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2);
}

.review-section h3 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 1.4rem;
    font-weight: 600;
    padding-bottom: 12px;
    border-bottom: 2px solid #f1f3f4;
    letter-spacing: -0.2px;
}

.review-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #f8f9fa;
    align-items: center;
}

.review-item:last-child {
    border-bottom: none;
}

.review-label {
    font-weight: 600;
    color: #495057;
    flex: 1;
    font-size: 1rem;
}

.review-value {
    color: #2c3e50;
    flex: 2;
    text-align: right;
    font-size: 1rem;
    font-weight: 500;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: #fff;
    margin: 5% auto;
    padding: 0;
    border-radius: 20px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-header {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: #fff;
    padding: 25px 30px;
    border-radius: 20px 20px 0 0;
    text-align: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.modal-header i {
    font-size: 2rem;
}

.modal-body {
    padding: 30px;
    text-align: center;
}

.modal-body p {
    margin-bottom: 15px;
    font-size: 1.1rem;
    line-height: 1.6;
}

.contact-info {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin-top: 20px;
    text-align: left;
}

.contact-info h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    text-align: center;
}

.contact-info p {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.contact-info i {
    color: #3498db;
    width: 20px;
}

.modal-footer {
    padding: 20px 30px 30px;
    display: flex;
    justify-content: center;
    gap: 15px;
}

/* Loading Overlay */
.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    backdrop-filter: blur(3px);
}

.loading-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #fff;
}

.loading-spinner i {
    font-size: 3rem;
    margin-bottom: 20px;
    display: block;
}

.loading-spinner p {
    font-size: 1.2rem;
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .form-header {
        padding: 20px;
    }
    
    .form-header h1 {
        font-size: 2rem;
    }
    
    .form-container {
        padding: 20px;
    }
    
    .form-row {
        flex-direction: column;
        gap: 15px;
    }
    
    .progress-container {
        flex-wrap: wrap;
        gap: 20px;
    }
    
    .progress-step {
        flex: none;
        width: calc(50% - 10px);
    }
    
    .step-number {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .step-label {
        font-size: 0.8rem;
    }
    
    .form-navigation, .submit-actions {
        flex-direction: column;
        gap: 15px;
    }
    
    .btn {
        width: 100%;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
    
    .review-item {
        flex-direction: column;
        gap: 5px;
    }
    
    .review-value {
        text-align: left;
    }
}

@media (max-width: 480px) {
    .form-header h1 {
        font-size: 1.5rem;
    }
    
    .form-header p {
        font-size: 1rem;
    }
    
    .form-step h2 {
        font-size: 1.4rem;
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .progress-step {
        width: 100%;
    }
    
    .education-section {
        padding: 15px;
    }
    
    .modal-header {
        padding: 20px;
    }
    
    .modal-header h2 {
        font-size: 1.2rem;
        flex-direction: column;
        gap: 10px;
    }
    
    .modal-body {
        padding: 20px;
    }
}

/* Print Styles */
@media print {
    body {
        background: #fff;
    }
    
    .container {
        max-width: none;
        margin: 0;
        padding: 0;
    }
    
    .form-header {
        background: none;
        border: none;
        color: #000;
        backdrop-filter: none;
    }
    
    .progress-container,
    .form-navigation,
    .submit-actions,
    .btn {
        display: none;
    }
    
    .form-container {
        background: #fff;
        box-shadow: none;
        border: none;
        backdrop-filter: none;
    }
    
    .form-step {
        display: block;
        page-break-inside: avoid;
    }
    
    .review-container {
        background: #fff;
    }
}
