/* Space Grotesk Font Override for Dark Mode */
/* This file ensures Space Grotesk font is maintained across all dark mode elements */

/* Global dark mode font family enforcement */
[data-bs-theme="dark"],
[data-bs-theme="dark"] *,
.dark-mode,
.dark-mode * {
    font-family: "Space Grotesk", sans-serif !important;
}

/* Body and root elements */
[data-bs-theme="dark"] body,
.dark-mode body {
    font-family: "Space Grotesk", sans-serif !important;
    background: #1a202c;
    color: #e2e8f0;
}

/* All heading elements */
[data-bs-theme="dark"] h1,
[data-bs-theme="dark"] .h1,
[data-bs-theme="dark"] h2,
[data-bs-theme="dark"] .h2,
[data-bs-theme="dark"] h3,
[data-bs-theme="dark"] .h3,
[data-bs-theme="dark"] h4,
[data-bs-theme="dark"] .h4,
[data-bs-theme="dark"] h5,
[data-bs-theme="dark"] .h5,
[data-bs-theme="dark"] h6,
[data-bs-theme="dark"] .h6,
.dark-mode h1,
.dark-mode .h1,
.dark-mode h2,
.dark-mode .h2,
.dark-mode h3,
.dark-mode .h3,
.dark-mode h4,
.dark-mode .h4,
.dark-mode h5,
.dark-mode .h5,
.dark-mode h6,
.dark-mode .h6 {
    font-family: "Space Grotesk", sans-serif !important;
    color: #e2e8f0;
}

/* All text elements */
[data-bs-theme="dark"] p,
[data-bs-theme="dark"] span,
[data-bs-theme="dark"] div,
[data-bs-theme="dark"] a,
[data-bs-theme="dark"] button,
[data-bs-theme="dark"] input,
[data-bs-theme="dark"] textarea,
[data-bs-theme="dark"] select,
[data-bs-theme="dark"] label,
[data-bs-theme="dark"] li,
[data-bs-theme="dark"] td,
[data-bs-theme="dark"] th,
[data-bs-theme="dark"] caption,
[data-bs-theme="dark"] small,
[data-bs-theme="dark"] .small,
[data-bs-theme="dark"] .lead,
.dark-mode p,
.dark-mode span,
.dark-mode div,
.dark-mode a,
.dark-mode button,
.dark-mode input,
.dark-mode textarea,
.dark-mode select,
.dark-mode label,
.dark-mode li,
.dark-mode td,
.dark-mode th,
.dark-mode caption,
.dark-mode small,
.dark-mode .small,
.dark-mode .lead {
    font-family: "Space Grotesk", sans-serif !important;
}

/* Bootstrap components */
[data-bs-theme="dark"] .btn,
[data-bs-theme="dark"] .nav-link,
[data-bs-theme="dark"] .navbar-brand,
[data-bs-theme="dark"] .dropdown-item,
[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-select,
[data-bs-theme="dark"] .form-label,
[data-bs-theme="dark"] .card,
[data-bs-theme="dark"] .card-title,
[data-bs-theme="dark"] .card-text,
[data-bs-theme="dark"] .badge,
[data-bs-theme="dark"] .alert,
[data-bs-theme="dark"] .breadcrumb,
[data-bs-theme="dark"] .pagination,
[data-bs-theme="dark"] .modal,
[data-bs-theme="dark"] .tooltip,
[data-bs-theme="dark"] .popover,
.dark-mode .btn,
.dark-mode .nav-link,
.dark-mode .navbar-brand,
.dark-mode .dropdown-item,
.dark-mode .form-control,
.dark-mode .form-select,
.dark-mode .form-label,
.dark-mode .card,
.dark-mode .card-title,
.dark-mode .card-text,
.dark-mode .badge,
.dark-mode .alert,
.dark-mode .breadcrumb,
.dark-mode .pagination,
.dark-mode .modal,
.dark-mode .tooltip,
.dark-mode .popover {
    font-family: "Space Grotesk", sans-serif !important;
}

/* Display classes */
[data-bs-theme="dark"] .display-1,
[data-bs-theme="dark"] .display-2,
[data-bs-theme="dark"] .display-3,
[data-bs-theme="dark"] .display-4,
[data-bs-theme="dark"] .display-5,
[data-bs-theme="dark"] .display-6,
.dark-mode .display-1,
.dark-mode .display-2,
.dark-mode .display-3,
.dark-mode .display-4,
.dark-mode .display-5,
.dark-mode .display-6 {
    font-family: "Space Grotesk", sans-serif !important;
    color: #e2e8f0;
}

/* Override any specific font families that might be set elsewhere */
[data-bs-theme="dark"] .font-monospace,
.dark-mode .font-monospace {
    font-family: "Space Grotesk", monospace !important;
}

/* CSS Variables override for dark mode */
[data-bs-theme="dark"] {
    --bs-body-font-family: "Space Grotesk", sans-serif !important;
    --bs-font-sans-serif: "Space Grotesk", sans-serif !important;
}

.dark-mode {
    --bs-body-font-family: "Space Grotesk", sans-serif !important;
    --bs-font-sans-serif: "Space Grotesk", sans-serif !important;
}

/* Specific section overrides */
[data-bs-theme="dark"] .hero-section,
[data-bs-theme="dark"] .hero-section *,
.dark-mode .hero-section,
.dark-mode .hero-section * {
    font-family: "Space Grotesk", sans-serif !important;
}

[data-bs-theme="dark"] .navbar,
[data-bs-theme="dark"] .navbar *,
.dark-mode .navbar,
.dark-mode .navbar * {
    font-family: "Space Grotesk", sans-serif !important;
}

[data-bs-theme="dark"] .footer,
[data-bs-theme="dark"] .footer *,
.dark-mode .footer,
.dark-mode .footer * {
    font-family: "Space Grotesk", sans-serif !important;
}

/* Statistics section */
[data-bs-theme="dark"] .statistics-section,
[data-bs-theme="dark"] .statistics-section *,
.dark-mode .statistics-section,
.dark-mode .statistics-section * {
    font-family: "Space Grotesk", sans-serif !important;
}

/* How it works section */
[data-bs-theme="dark"] .how-it-works-section,
[data-bs-theme="dark"] .how-it-works-section *,
.dark-mode .how-it-works-section,
.dark-mode .how-it-works-section * {
    font-family: "Space Grotesk", sans-serif !important;
}

/* Partner institutions section */
[data-bs-theme="dark"] .partner-institutions-section,
[data-bs-theme="dark"] .partner-institutions-section *,
.dark-mode .partner-institutions-section,
.dark-mode .partner-institutions-section * {
    font-family: "Space Grotesk", sans-serif !important;
}

/* Security section */
[data-bs-theme="dark"] .security-section,
[data-bs-theme="dark"] .security-section *,
.dark-mode .security-section,
.dark-mode .security-section * {
    font-family: "Space Grotesk", sans-serif !important;
}

/* Dark mode color adjustments while maintaining Space Grotesk */
[data-bs-theme="dark"] .bg-warning,
.dark-mode .bg-warning {
    background-color: #ffc107 !important;
    color: #1a202c !important;
}

[data-bs-theme="dark"] .text-warning,
.dark-mode .text-warning {
    color: #ffc107 !important;
}

[data-bs-theme="dark"] .btn-warning,
.dark-mode .btn-warning {
    background-color: #ffc107 !important;
    border-color: #ffc107 !important;
    color: #1a202c !important;
    font-family: "Space Grotesk", sans-serif !important;
}

[data-bs-theme="dark"] .btn-outline-warning,
.dark-mode .btn-outline-warning {
    color: #ffc107 !important;
    border-color: #ffc107 !important;
    font-family: "Space Grotesk", sans-serif !important;
}

[data-bs-theme="dark"] .btn-outline-warning:hover,
.dark-mode .btn-outline-warning:hover {
    background-color: #ffc107 !important;
    border-color: #ffc107 !important;
    color: #1a202c !important;
}

/* Responsive font maintenance */
@media (max-width: 1200px) {
    [data-bs-theme="dark"] *,
    .dark-mode * {
        font-family: "Space Grotesk", sans-serif !important;
    }
}

@media (max-width: 992px) {
    [data-bs-theme="dark"] *,
    .dark-mode * {
        font-family: "Space Grotesk", sans-serif !important;
    }
}

@media (max-width: 768px) {
    [data-bs-theme="dark"] *,
    .dark-mode * {
        font-family: "Space Grotesk", sans-serif !important;
    }
}

@media (max-width: 576px) {
    [data-bs-theme="dark"] *,
    .dark-mode * {
        font-family: "Space Grotesk", sans-serif !important;
    }
}

/* Accessibility - maintain font even with reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    [data-bs-theme="dark"] *,
    .dark-mode * {
        font-family: "Space Grotesk", sans-serif !important;
    }
}

/* Print media - maintain font */
@media print {
    [data-bs-theme="dark"] *,
    .dark-mode * {
        font-family: "Space Grotesk", sans-serif !important;
    }
}
