/* Updated to match index.html color scheme exactly */

/* Use same color variables as index.html */
:root {
    --primary: #06BBCC;
    --light: #F0FBFC;
    --dark: #181d38;
}

/* Enhanced consistency with index.html template */
body {
    font-family: 'Nunito', sans-serif !important;
    background-color: var(--light) !important;
    color: var(--dark);
}

/* Match template button styles exactly */
.btn {
    font-family: 'Nunito', sans-serif !important;
    font-weight: 600;
    transition: .5s;
}

.btn.btn-primary {
    background-color: var(--primary) !important;
    border-color: var(--primary) !important;
    color: #FFFFFF !important;
}

.btn.btn-primary:hover {
    background-color: #059AA9 !important;
    border-color: #059AA9 !important;
}

.btn-outline-secondary {
    border-color: var(--dark) !important;
    color: var(--dark) !important;
}

.btn-outline-secondary:hover {
    background-color: var(--dark) !important;
    border-color: var(--dark) !important;
}

/* Enhanced form container */
.form-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    padding: 40px;
    margin: 20px 0;
    position: relative;
}

/* Form header styling */
.form-header {
    text-align: center;
    margin-bottom: 40px;
}

.form-header h1 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 15px;
}

.form-header p {
    color: var(--dark);
}

/* Progress indicator styling */
.progress-container {
    margin-bottom: 40px;
    padding: 20px 0;
}

.progress-indicator {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 600px;
    margin: 0 auto;
}

.progress-line {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 4px;
    background: #e9ecef;
    border-radius: 2px;
    z-index: 1;
}

.progress-line-active {
    position: absolute;
    top: 50%;
    left: 0;
    height: 4px;
    background: linear-gradient(90deg, #007bff, #28a745);
    border-radius: 2px;
    z-index: 2;
    transition: width 0.5s ease;
}

.step {
    position: relative;
    z-index: 3;
    text-align: center;
    background: white;
    padding: 10px;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e9ecef;
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin: 0 auto 8px;
    transition: all 0.3s ease;
}

.step.active .step-number {
    background: #007bff;
    color: white;
    transform: scale(1.1);
}

.step.completed .step-number {
    background: #28a745;
    color: white;
}

.step-label {
    font-size: 0.85rem;
    font-weight: 500;
    color: #6c757d;
    transition: color 0.3s ease;
}

.step.active .step-label {
    color: #007bff;
    font-weight: 600;
}

/* Form step styling */
.form-step {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.form-step.active {
    display: block;
    opacity: 1;
}

/* Section titles */
.section-title {
    color: #343a40;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title i {
    color: #007bff;
    font-size: 1.3rem;
}

.section-subtitle {
    color: #64748B;
    margin-bottom: 2rem;
}

/* Form controls */
.form-control,
.form-select {
    border: 2px solid #E2E8F0;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 0.2rem rgba(6, 187, 204, 0.25) !important;
}

.form-label {
    font-weight: 600;
    color: var(--dark) !important;
    margin-bottom: 0.5rem;
}

/* Program cards */
.program-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.program-card {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.program-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border-color: #007bff;
}

.program-card.selected {
    border-color: #007bff;
    background: linear-gradient(135deg, #f8f9ff 0%, #e3f2fd 100%);
    transform: translateY(-2px);
}

.program-card i {
    font-size: 2.5rem;
    color: #007bff;
    margin-bottom: 15px;
    display: block;
}

.program-card h4 {
    color: #343a40;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.program-card p {
    color: #6c757d;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 0;
}

.program-card input[type="checkbox"] {
    display: none;
}

/* Form navigation */
.form-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #e9ecef;
}

/* Success message */
.success-message {
    display: none;
    text-align: center;
    padding: 60px 40px;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.success-message.show {
    display: block;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #28a745, #20c997);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 30px;
}

.success-icon i {
    color: white;
    font-size: 2rem;
}

.success-message h2 {
    color: var(--dark) !important;
}

/* Alert styling to match template */
.alert-info {
    background-color: var(--light) !important;
    border-color: var(--primary) !important;
    color: var(--dark) !important;
}

.alert-success {
    background-color: #d4edda !important;
    border-color: #c3e6cb !important;
    color: #155724 !important;
}

/* Form check inputs */
.form-check-input:checked {
    background-color: var(--primary) !important;
    border-color: var(--primary) !important;
}

.form-check-input:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 0.25rem rgba(6, 187, 204, 0.25) !important;
}

/* Links styling */
a {
    color: var(--primary) !important;
}

a:hover {
    color: #059AA9 !important;
}

/* Loading overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(5px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.loading-overlay.show {
    display: flex;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

/* Animated background to match index.html feel */
.animated-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(-45deg, #667eea, #764ba2, #f093fb, #f5576c);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    z-index: -1;
    opacity: 0.1;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .form-container {
        padding: 20px;
        margin: 10px;
    }
    
    .program-grid {
        grid-template-columns: 1fr;
    }
    
    .form-navigation {
        flex-direction: column;
        gap: 15px;
    }
    
    .step-label {
        display: none;
    }
}

/* Text color consistency */
.text-muted {
    color: #64748B !important;
}

/* Ensure all text uses consistent colors */
h1, h2, h3, h4, h5, h6 {
    color: var(--dark) !important;
}

p {
    color: var(--dark);
}

/* Form text styling */
.form-text {
    color: #64748B !important;
}

.is-valid {
    border-color: #28a745 !important;
}

.is-invalid {
    border-color: #dc3545 !important;
}