/* ============================
   Magical Scholarship SVG
=============================== */
.scholarship-icon {
    display: flex;
    justify-content: center;
    margin: 2rem 0;
}
.scholarship-icon svg {
    width: 120px;
    height: 120px;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: filter 0.3s ease;
}
.scholarship-icon svg.glow {
    filter: drop-shadow(0 0 6px #ff0000)
            drop-shadow(0 0 6px #ffffff)
            drop-shadow(0 0 6px #008000);
    animation: pulse-glow 2s infinite alternate;
}
@keyframes pulse-glow {
    from { filter: drop-shadow(0 0 6px #ff0000); }
    to   { filter: drop-shadow(0 0 12px #008000); }
}

/* ============================
   Scroll Reveal
=============================== */
.welcome-section h2,
.welcome-section h3,
.welcome-section h4,
.welcome-section p,
.welcome-section .info-box,
.welcome-section .apply-btn {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.8s ease;
}
.welcome-section h2.show,
.welcome-section h3.show,
.welcome-section h4.show,
.welcome-section p.show,
.welcome-section .info-box.show,
.welcome-section .apply-btn.show {
    opacity: 1;
    transform: translateY(0);
}

/* ============================
   Apply Button Effects
=============================== */
.apply-btn {
    background: linear-gradient(90deg, #ff0000, #ffffff, #008000);
    color: #000;
    border: none;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.apply-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 12px rgba(0,0,0,0.3);
}
.apply-btn.bounce {
    animation: bounceAnim 0.6s;
}
@keyframes bounceAnim {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* ============================
   Step Indicator (Horizontal)
============================== */
.step-indicator {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 2rem 0 3rem;
    position: relative;
}

.step-indicator::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
    height: 2px;
    background: #ddd;
    z-index: 0;
}

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

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #666;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
}

.step.active .step-number {
    background: #006400;
    border-color: #006400;
    color: #fff;
    box-shadow: 0 0 10px rgba(0, 100, 0, 0.3);
}

.step.completed .step-number {
    background: #008000;
    border-color: #008000;
    color: #fff;
}

.step-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #666;
    text-align: center;
}

.step.active .step-label {
    color: #006400;
}

.step.completed .step-label {
    color: #008000;
}

/* ============================
   Form Steps
============================== */
.form-step {
    display: none;
    animation: fadeIn 0.3s ease;
}

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

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-step h3 {
    color: #006400;
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
    border-bottom: 2px solid #006400;
    padding-bottom: 0.5rem;
}

.form-step h4 {
    color: #333;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

.form-step h5 {
    color: #555;
    margin-top: 0.8rem;
    margin-bottom: 0.3rem;
}

/* ============================
   Form Navigation
============================== */
.form-navigation {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    justify-content: space-between;
}

.nav-btn {
    padding: 0.9rem 1.5rem;
    font-size: 1rem;
    background: #006400;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: transform 0.2s ease, background 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-btn:hover {
    transform: translateY(-2px);
    background: #004d00;
}

.nav-btn.submit-btn {
    background: linear-gradient(90deg, #006400, #bb0000, #000000);
    flex: 1;
}

.nav-btn.submit-btn:hover {
    background: linear-gradient(90deg, #000000, #bb0000, #006400);
}

/* ============================
   Bursary Form Styling
============================== */
#bursary-form {
    max-width: 900px;
    margin: 2rem auto;
    padding: 2rem;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.1);
}

#bursary-form h2 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: #006400;
}

form label {
    display: block;
    margin: 0.7rem 0 0.3rem;
    font-weight: 600;
}

form input, 
form select {
    width: 100%;
    padding: 0.6rem;
    border-radius: 6px;
    border: 1px solid #ccc;
    margin-bottom: 1rem;
    font-size: 1rem;
    box-sizing: border-box;
}

form input[type="file"] {
    padding: 0.4rem;
    background: #fff;
}

form input[type="checkbox"] {
    width: auto;
    margin-right: 0.5rem;
    margin-bottom: 0;
}

#upload-progress {
    position: relative;
    width: 100%;
    height: 14px;
    background: #eee;
    border-radius: 8px;
    margin: 10px 0 20px;
}

#upload-bar {
    width: 0%;
    height: 100%;
    background: #006400;
    border-radius: 8px;
    transition: width 0.2s ease;
}

#upload-percent {
    text-align: right;
    font-size: 0.9rem;
    color: #333;
}

.field-error {
    color: #bb0000;
    font-size: 0.9rem;
    margin-top: 4px;
}

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

.fade-in {
    opacity: 0;
    transform: translateY(10px);
    animation: fadeInUp 0.4s ease forwards;
}

@keyframes fadeInUp {
    to { opacity: 1; transform: translateY(0); }
}

#thank-you-message {
    text-align: center;
    padding: 2rem;
    background: #e6ffe6;
    border: 1px solid #008000;
    border-radius: 8px;
    margin-top: 1.5rem;
}

footer {
    text-align: center;
    padding: 1rem;
    margin-top: 2rem;
    background: #000;
    color: #fff;
}

/* ============================
   Success Message Styles
============================== */
.success-container {
    text-align: center;
    padding: 3rem;
    background: #e6ffe6;
    border: 2px solid #008000;
    border-radius: 12px;
    margin: 2rem 0;
}

.success-icon {
    font-size: 4rem;
    color: #008000;
    margin-bottom: 1rem;
}

.reference-number {
    background: #ffffff;
    padding: 1rem;
    border-radius: 8px;
    border: 2px dashed #008000;
    margin: 1.5rem 0;
    font-size: 1.2rem;
}

.note {
    color: #666;
    font-style: italic;
    margin: 1rem 0;
}

.new-app-btn {
    background: linear-gradient(90deg, #006400, #bb0000);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    margin-top: 1rem;
    transition: transform 0.2s ease;
}

.new-app-btn:hover {
    transform: translateY(-2px);
}

/* ============================
   Enhanced Success Container
============================== */
.enhanced-success-container {
    max-width: 800px;
    margin: 30px auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    overflow: hidden;
}

.success-header-banner {
    background: linear-gradient(135deg, #006400, #008000);
    color: white;
    padding: 40px 30px;
    text-align: center;
}

.success-checkmark {
    font-size: 4rem;
    margin-bottom: 20px;
    animation: successScale 0.5s ease-out;
}

@keyframes successScale {
    from { transform: scale(0); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.success-header-banner h2 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.reference-highlight {
    background: #e6ffe6;
    border: 3px solid #008000;
    padding: 25px;
    margin: 30px;
    border-radius: 8px;
    text-align: center;
}

.reference-highlight h3 {
    color: #006400;
    margin-bottom: 15px;
}

.ref-number-display {
    font-size: 2rem;
    font-weight: bold;
    color: #008000;
    letter-spacing: 2px;
    font-family: 'Courier New', monospace;
    padding: 15px;
    background: white;
    border-radius: 6px;
    border: 2px dashed #008000;
    margin: 10px 0;
}

.copy-ref-btn {
    background: #006400;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    margin-top: 10px;
    transition: background 0.3s;
}

.copy-ref-btn:hover {
    background: #004d00;
}

.email-notification-preview {
    margin: 30px;
    border: 2px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
}

.email-preview-title {
    background: #f8f9fa;
    padding: 15px 20px;
    border-bottom: 2px solid #ddd;
}

.email-preview-title h3 {
    color: #333;
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.email-meta-info {
    font-size: 0.9rem;
    color: #666;
    margin: 3px 0;
}

.email-body-preview {
    padding: 30px;
    background: white;
}

.email-kenyan-flag {
    text-align: center;
    padding: 20px;
    background: linear-gradient(90deg, #000000 33%, #ff0000 33%, #ff0000 66%, #006400 66%);
    color: white;
    margin-bottom: 20px;
    border-radius: 6px;
}

.application-summary-box {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 6px;
    margin: 20px 0;
    border-left: 4px solid #006400;
}

.summary-item {
    display: flex;
    padding: 8px 0;
    border-bottom: 1px solid #e0e0e0;
}

.summary-item:last-child {
    border-bottom: none;
}

.summary-label {
    font-weight: bold;
    color: #555;
    min-width: 180px;
}

.summary-value {
    color: #333;
}

.important-notice {
    background: #fff3cd;
    border: 2px solid #ffc107;
    padding: 15px;
    border-radius: 6px;
    margin: 20px 0;
}

.success-actions {
    padding: 30px;
    text-align: center;
    border-top: 2px solid #f0f0f0;
}

.success-action-btn {
    background: #006400;
    color: white;
    text-decoration: none;
    padding: 12px 30px;
    border-radius: 6px;
    display: inline-block;
    margin: 5px;
    font-weight: bold;
    transition: background 0.3s;
    border: none;
    cursor: pointer;
}

.success-action-btn:hover {
    background: #004d00;
}

.success-action-btn.secondary {
    background: #666;
}

.success-action-btn.secondary:hover {
    background: #555;
}

/* ============================
   Responsive Design
============================== */
@media (max-width: 600px) {
    .enhanced-success-container {
        margin: 15px;
    }
    .reference-highlight {
        margin: 15px;
    }
    .ref-number-display {
        font-size: 1.5rem;
    }
    .email-notification-preview {
        margin: 15px;
    }
    .summary-item {
        flex-direction: column;
    }
    .summary-label {
        min-width: auto;
        margin-bottom: 5px;
    }
    .step-indicator {
        margin: 1.5rem 0 2rem;
    }
    .step-number {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }
    .step-label {
        font-size: 0.8rem;
    }
    .form-navigation {
        flex-direction: column;
    }
    .nav-btn {
        width: 100%;
        justify-content: center;
    }
}
