/* ===================================================
   EPYGMALION - Responsive Form Styling
   LAMP Stack - Bootstrap 5 based
   =================================================== */

:root {
    --primary-color: #e23740;
    --secondary-color: #5b666b;
    --success-color: #22c55e;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --light-bg: #f8fafc;
    --border-color: #e2e8f0;
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    /*display: flex;*/
	align-items: center;
    padding: 20px;
}

.form-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    max-width: 800px;
    width: 100%;
    margin: 0 auto;
    overflow: hidden;
}

/* ===== HEADER SECTION ===== */
.header-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 40px 30px;
    text-align: center;
}

.school-info h1 {
    margin: 0;
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: 1px;
}

.school-tagline {
    margin: 8px 0 0 0;
    font-size: 1rem;
    opacity: 0.9;
    font-weight: 300;
}

.form-title h2 {
    margin: 15px 0 0 0;
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.95);
}

/* ===== PROGRESS SECTION ===== */
.progress-section {
    background: var(--light-bg);
    padding: 30px;
    border-bottom: 1px solid var(--border-color);
}

.progress-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    position: relative;
}

.progress-step {
    flex: 1;
    text-align: center;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.step-number {
    width: 50px;
    height: 50px;
    background: var(--border-color);
    border: 3px solid white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    color: #64748b;
    transition: all 0.3s ease;
    margin-bottom: 10px;
}

.progress-step.active .step-number {
    background: var(--secondary-color);
    color: white;
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
}

.step-label {
    font-size: 0.85rem;
    font-weight: 500;
    color: #64748b;
    margin-top: 5px;
}

.progress-step.active .step-label {
    color: var(--secondary-color);
    font-weight: 600;
}

.progress-bar-container {
    width: 100%;
    height: 4px;
    background: var(--border-color);
    border-radius: 2px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--secondary-color) 0%, var(--primary-color) 100%);
    transition: width 0.3s ease;
    border-radius: 2px;
}

/* ===== FORM CONTENT ===== */
#appForm {
    padding: 30px;
}

.form-step h3 {
    color: var(--primary-color);
    margin-bottom: 25px;
    font-size: 1.5rem;
    font-weight: 600;
}

.form-label {
    font-weight: 500;
    color: #334155;
    margin-bottom: 8px;
    display: flex;
    gap: 4px;
}

.required {
    color: var(--danger-color);
    font-weight: 700;
}

.form-control,
.form-select {
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 10px 12px;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
    outline: none;
}

.form-control.is-invalid,
.form-select.is-invalid {
    border-color: var(--danger-color);
}

.form-control.is-invalid:focus,
.form-select.is-invalid:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.invalid-feedback {
    color: var(--danger-color);
    font-size: 0.85rem;
    margin-top: 4px;
    display: block;
}

.form-check {
    padding-left: 0;
    margin-left: 28px;
}

.form-check-input {
    margin-left: -28px;
    margin-top: 2px;
    width: 1.2rem;
    height: 1.2rem;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.form-check-input:checked {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
}

.form-check-input:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

.form-check-label {
    color: #334155;
    cursor: pointer;
    margin-bottom: 0;
}

.form-check-label a {
    color: var(--secondary-color);
    text-decoration: none;
}

.form-check-label a:hover {
    text-decoration: underline;
}

small.text-muted {
    color: #94a3b8 !important;
    font-size: 0.8rem;
    display: block;
    margin-top: 4px;
}

/* ===== CHECKBOXES SECTION (Step 3) ===== */
.checkboxes-section {
    background: rgba(245, 158, 11, 0.05);
    border-color: rgba(245, 158, 11, 0.2) !important;
}

.checkboxes-section h5 {
    color: var(--primary-color);
    font-weight: 600;
}

/* ===== FORM NAVIGATION ===== */
.form-navigation {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
}

.btn {
    padding: 12px 30px;
    font-weight: 600;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.95rem;
    white-space: nowrap;
}

.btn-primary {
    background: var(--secondary-color);
    color: white;
}

.btn-primary:hover {
    background: #0284c7;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(14, 165, 233, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: #64748b;
    color: white;
}

.btn-secondary:hover {
    background: #475569;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

.btn-success {
    background: var(--success-color);
    color: white;
}

.btn-success:hover {
    background: #16a34a;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(34, 197, 94, 0.3);
}

.btn-success:disabled {
    background: #cbd5e1;
    cursor: not-allowed;
    transform: none;
}

.btn-outline-info {
    border: 2px solid var(--secondary-color);
    color: var(--secondary-color);
    background: white;
}

.btn-outline-info:hover {
    background: var(--secondary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(14, 165, 233, 0.3);
}

.btn-outline-info:disabled {
    border-color: #cbd5e1;
    color: #cbd5e1;
    cursor: not-allowed;
    transform: none;
}

.float-end {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .form-container {
        border-radius: 8px;
    }

    .header-section {
        padding: 30px 20px;
    }

    .school-info h1 {
        font-size: 1.8rem;
    }

    .form-title h2 {
        font-size: 1.2rem;
    }

    #appForm {
        padding: 20px;
    }

    .form-step h3 {
        font-size: 1.2rem;
        margin-bottom: 20px;
    }

    .progress-section {
        padding: 20px;
    }

    .progress-steps {
        margin-bottom: 15px;
    }

    .step-number {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .step-label {
        font-size: 0.75rem;
    }

    .row {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .col-md-6 {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .col-md-6:first-child {
        padding-right: 5px !important;
    }

    .col-md-6:last-child {
        padding-left: 5px !important;
    }

    .float-end {
        flex-direction: column;
        width: 100%;
    }

    .btn {
        width: 100%;
    }

    .form-navigation {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .school-info h1 {
        font-size: 1.5rem;
    }

    .form-title h2 {
        font-size: 1rem;
    }

    .progress-step {
        margin-bottom: 10px;
    }

    .step-number {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
        margin-bottom: 5px;
    }

    .step-label {
        font-size: 0.65rem;
    }

    .form-label {
        font-size: 0.9rem;
    }

    .form-control,
    .form-select {
        font-size: 0.9rem;
        padding: 8px 10px;
    }

    .checkboxes-section {
        padding: 15px !important;
    }

    .checkboxes-section h5 {
        font-size: 0.95rem;
    }
}

/* ===== ANIMATION ===== */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-step {
    animation: slideIn 0.3s ease;
}

/* ===== UTILITY ===== */
.ms-2 {
    margin-left: 12px !important;
}

.mt-4 {
    margin-top: 24px !important;
}

.mt-5 {
    margin-top: 48px !important;
}

.mb-3 {
    margin-bottom: 16px !important;
}

.mb-4 {
    margin-bottom: 24px !important;
}

.p-3 {
    padding: 16px !important;
}

.border {
    border: 1px solid var(--border-color) !important;
}

.border-warning {
    border-color: var(--warning-color) !important;
}

.rounded {
    border-radius: 6px !important;
}

.text-muted {
    color: #94a3b8 !important;
}
