/* ==========================================================================
   Course Fund Page Styles
   ========================================================================== */

/* Hero Section
   ========================================================================== */
.course-fund-hero {
    position: relative;
    padding: 5rem 0 4rem;
    background: linear-gradient(135deg,
    var(--theme-bg-primary) 0%,
    var(--theme-bg-secondary) 50%,
    var(--theme-bg-primary) 100%
    );
    overflow: hidden;
}

.course-fund-hero .hero-pattern {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 20% 80%, rgba(var(--theme-primary-rgb), 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(var(--theme-secondary-rgb), 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.course-fund-hero .hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}

.hero-badge-row {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.hero-badge-image {
    width: 120px;
    height: 120px;
    object-fit: contain;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.15));
}

.course-fund-hero .hero-title {
    font-family: 'Karla', sans-serif;
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    color: var(--theme-text-primary);
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.course-fund-hero .hero-subtitle {
    font-size: 1.125rem;
    color: var(--theme-text-secondary);
    line-height: 1.6;
}

/* Main Content
   ========================================================================== */
.course-fund-content {
    padding: 3rem 0;
}

/* Section Base Styles
   ========================================================================== */
.fund-section {
    margin-bottom: 4rem;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fund-section.visible {
    opacity: 1;
    transform: translateY(0);
}

.section-header {
    margin-bottom: 2rem;
}

.section-number {
    display: inline-block;
    font-family: 'Karla', sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--theme-primary);
    margin-bottom: 0.5rem;
}

.section-title {
    font-family: 'Karla', sans-serif;
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-weight: 700;
    color: var(--theme-text-primary);
    margin: 0;
    letter-spacing: -0.01em;
}

.section-content {
    background: var(--theme-bg-secondary);
    border-radius: 16px;
    padding: 2rem;
    border: 1px solid var(--theme-border-color);
}

/* Highlight Card
   ========================================================================== */
.highlight-card {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    background: linear-gradient(135deg, rgba(var(--theme-primary-rgb), 0.1) 0%, rgba(var(--theme-primary-rgb), 0.05) 100%);
    border: 2px solid var(--theme-primary);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.highlight-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--theme-primary);
    color: white;
    border-radius: 50%;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.highlight-text {
    font-size: 1.125rem;
    color: var(--theme-text-primary);
    line-height: 1.5;
}

/* Lead Text
   ========================================================================== */
.lead-text {
    font-size: 1.125rem;
    color: var(--theme-text-secondary);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

/* Stats Row
   ========================================================================== */
.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.stat-card {
    text-align: center;
    padding: 1.5rem;
    background: var(--theme-bg-primary);
    border-radius: 12px;
    border: 1px solid var(--theme-border-color);
}

.stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--theme-primary);
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--theme-text-secondary);
}

.stats-footnote {
    margin-top: 1.5rem;
    text-align: center;
    color: var(--theme-text-tertiary);
}

.stats-footnote small {
    font-size: 0.8rem;
    line-height: 1.5;
}

.stats-footnote a {
    color: var(--theme-primary);
    text-decoration: none;
}

.stats-footnote a:hover {
    text-decoration: underline;
}

/* Two Column Layout
   ========================================================================== */
.two-column {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
}

@media (max-width: 768px) {
    .two-column {
        grid-template-columns: 1fr;
    }
}

.column-text p {
    color: var(--theme-text-secondary);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.column-text p:last-of-type {
    margin-bottom: 1.5rem;
}

/* Trust Badges
   ========================================================================== */
.trust-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.trust-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--theme-bg-primary);
    border: 1px solid var(--theme-border-color);
    border-radius: 100px;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    color: var(--theme-text-primary);
}

.trust-badge i {
    color: var(--theme-primary);
}

/* Process Steps
   ========================================================================== */
.process-steps {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.process-step {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--theme-bg-primary);
    border: 1px solid var(--theme-border-color);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    width: 100%;
    max-width: 300px;
}

.step-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(var(--theme-primary-rgb), 0.1);
    color: var(--theme-primary);
    border-radius: 50%;
    flex-shrink: 0;
}

.step-text {
    font-size: 0.875rem;
    color: var(--theme-text-primary);
}

.process-arrow {
    color: var(--theme-primary);
    font-size: 1rem;
}

/* Flywheel Section
   ========================================================================== */
.flywheel-section .section-content {
    background: linear-gradient(180deg, var(--theme-bg-secondary) 0%, var(--theme-bg-primary) 100%);
}

.flywheel-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

@media (max-width: 992px) {
    .flywheel-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

.flywheel-visual {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    position: sticky;
    top: 2rem;
}

@media (max-width: 992px) {
    .flywheel-visual {
        position: static;
        order: -1;
    }
}

.flywheel-image {
    max-width: 100%;
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1),
    0 10px 15px rgba(0, 0, 0, 0.1),
    0 0 0 1px var(--theme-border-color);
    background: var(--theme-bg-secondary);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.flywheel-image:hover {
    transform: scale(1.01);
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.15),
    0 16px 24px rgba(0, 0, 0, 0.1),
    0 0 0 1px var(--theme-border-color);
}

.flywheel-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.flywheel-intro p {
    color: var(--theme-text-secondary);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.flywheel-intro p:last-child {
    margin-bottom: 0;
}

/* Flywheel Phases
   ========================================================================== */
.flywheel-phases {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.phase-card {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    background: var(--theme-bg-primary);
    border: 1px solid var(--theme-border-color);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.phase-card:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.phase-number {
    width: 32px;
    height: 32px;
    min-width: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--theme-primary);
    color: white;
    font-weight: 700;
    font-size: 0.875rem;
    border-radius: 50%;
}

.phase-content {
    flex: 1;
}

.phase-card h4 {
    font-family: 'Karla', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--theme-text-primary);
    margin: 0 0 0.25rem 0;
}

.phase-card p {
    font-size: 0.85rem;
    color: var(--theme-text-secondary);
    margin: 0;
    line-height: 1.5;
}

/* Flywheel Insight
   ========================================================================== */
.flywheel-insight {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    background: linear-gradient(135deg, rgba(var(--theme-warning-rgb, 255, 179, 71), 0.15) 0%, rgba(var(--theme-warning-rgb, 255, 179, 71), 0.05) 100%);
    border: 1px solid rgba(var(--theme-warning-rgb, 255, 179, 71), 0.3);
    border-radius: 12px;
    padding: 1rem 1.25rem;
}

.flywheel-insight i {
    font-size: 1.25rem;
    color: var(--theme-warning, #FFB347);
    flex-shrink: 0;
}

.flywheel-insight strong {
    color: var(--theme-text-primary);
}

.insight-detail {
    display: block;
    color: var(--theme-text-secondary);
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

/* Requirements Grid
   ========================================================================== */
.requirements-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

@media (max-width: 768px) {
    .requirements-grid {
        grid-template-columns: 1fr;
    }
}

.requirement-card {
    background: var(--theme-bg-primary);
    border: 1px solid var(--theme-border-color);
    border-radius: 12px;
    padding: 1.5rem;
}

.requirement-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(var(--theme-primary-rgb), 0.1);
    color: var(--theme-primary);
    border-radius: 12px;
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.requirement-card h4 {
    font-family: 'Karla', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: var(--theme-text-primary);
    margin-bottom: 0.5rem;
}

.requirement-card p {
    font-size: 0.875rem;
    color: var(--theme-text-secondary);
    margin: 0;
    line-height: 1.5;
}

/* Process CTA
   ========================================================================== */
.process-cta {
    text-align: center;
    padding: 2rem;
    background: var(--theme-bg-primary);
    border-radius: 12px;
    border: 1px solid var(--theme-border-color);
}

.process-cta h4 {
    font-family: 'Karla', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--theme-text-primary);
    margin-bottom: 0.5rem;
}

.process-cta p {
    color: var(--theme-text-secondary);
    margin-bottom: 1.5rem;
}

/* Uses Grid
   ========================================================================== */
.uses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.use-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--theme-bg-primary);
    border: 1px solid var(--theme-border-color);
    border-radius: 8px;
    font-size: 0.875rem;
    color: var(--theme-text-primary);
}

.use-item.approved i {
    color: var(--theme-success, #28a745);
}

.uses-note {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 0.875rem;
    color: var(--theme-text-secondary);
    background: rgba(var(--theme-info-rgb, 23, 162, 184), 0.1);
    border-radius: 8px;
    padding: 1rem;
    margin: 0;
}

.uses-note i {
    color: var(--theme-info, #17a2b8);
    flex-shrink: 0;
    margin-top: 0.125rem;
}

/* CTA Section - Matches HowItWorks.cshtml styling
   ========================================================================== */
.cta-section {
    margin-bottom: 0;
}

.cta-section .cta-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    padding: 2.5rem 3rem;
    background: linear-gradient(135deg,
    rgba(var(--theme-primary-rgb, 0, 169, 160), 0.08) 0%,
    var(--theme-bg-secondary) 100%
    );
    border: 1px solid var(--theme-border-color);
    border-radius: 20px;
}

.cta-content h3 {
    font-family: 'Karla', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--theme-text-primary);
    margin: 0 0 0.375rem;
}

.cta-content p {
    font-size: 1rem;
    color: var(--theme-text-secondary);
    margin: 0;
}

.cta-actions {
    display: flex;
    gap: 1rem;
    flex-shrink: 0;
}

@media (max-width: 991px) {
    .cta-section .cta-card {
        flex-direction: column;
        text-align: center;
        padding: 2rem;
    }

    .cta-actions {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .cta-section .cta-card {
        padding: 1.5rem;
    }

    .cta-actions {
        flex-direction: column;
        gap: 0.75rem;
    }

    .cta-actions .btn-theme-base {
        width: 100%;
        justify-content: center;
    }
}

/* Dark Mode Adjustments
   ========================================================================== */
[data-bs-theme="dark"] .course-fund-hero {
    background: linear-gradient(135deg,
    var(--theme-bg-primary) 0%,
    var(--surface-2, #1a1a2e) 50%,
    var(--theme-bg-primary) 100%
    );
}

[data-bs-theme="dark"] .course-fund-hero .hero-pattern {
    background-image: radial-gradient(circle at 20% 80%, rgba(var(--theme-primary-rgb, 0, 169, 160), 0.12) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(var(--theme-primary-rgb, 0, 169, 160), 0.08) 0%, transparent 40%);
}

[data-bs-theme="dark"] .hero-badge-image {
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
}

[data-bs-theme="dark"] .section-content {
    background: var(--surface-2, #1f1f2e);
}

[data-bs-theme="dark"] .highlight-card {
    background: linear-gradient(135deg, rgba(var(--theme-primary-rgb), 0.15) 0%, rgba(var(--theme-primary-rgb), 0.08) 100%);
}

[data-bs-theme="dark"] .stat-card,
[data-bs-theme="dark"] .process-step,
[data-bs-theme="dark"] .phase-card,
[data-bs-theme="dark"] .requirement-card,
[data-bs-theme="dark"] .use-item,
[data-bs-theme="dark"] .process-cta {
    background: var(--surface-2, #1f1f2e);
}

[data-bs-theme="dark"] .flywheel-image {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2),
    0 10px 20px rgba(0, 0, 0, 0.3),
    0 0 0 1px var(--theme-border-color);
}

[data-bs-theme="dark"] .trust-badge {
    background: var(--surface-2, #1f1f2e);
}

[data-bs-theme="dark"] .cta-section .cta-card {
    background: linear-gradient(135deg,
    rgba(var(--theme-primary-rgb, 0, 169, 160), 0.12) 0%,
    var(--surface-2, #1f1f2e) 100%
    );
}

/* ============================================
   RESPONSIVE - Hero and Sections
   ============================================ */
@media (max-width: 768px) {
    .course-fund-hero {
        padding: 3rem 0 2.5rem;
    }

    .course-fund-hero .hero-title {
        font-size: 1.75rem;
    }

    .course-fund-hero .hero-subtitle {
        font-size: 1rem;
    }

    .hero-badge-image {
        width: 100px;
        height: 100px;
    }

    .fund-section {
        margin-bottom: 3rem;
    }

    .section-title {
        font-size: 1.375rem;
    }

    .section-content {
        padding: 1.5rem;
    }

    .highlight-card {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
}
