/* ========================================
   GLOBAL TYPOGRAPHY & RESETS
   ======================================== */

* {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
}

h1 {
    font-size: 48px !important;
    font-weight: 700 !important;
    color: #1F2937 !important;
}

h2 {
    font-size: 36px !important;
    font-weight: 700 !important;
    color: #1F2937 !important;
}

h3, h4, h5, h6 {
    font-weight: 500 !important;
    color: #1F2937 !important;
}

h3 {
    font-size: 24px !important;
    font-weight: 500 !important;
    color: #1F2937 !important;
}

h4, h5, h6 {
    font-size: 20px !important;
    font-weight: 500 !important;
    color: #1F2937 !important;
}

p, li, span, div, a {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
}

/* ========================================
   DARK NAVBAR (GLOBAL)
   ======================================== */

.site-header,
.site-header.dynamic-header,
.site-header.header-full-width,
#site-header {
    background-color: #0f1623 !important;
    border-bottom: none !important;
}

.site-header a,
#site-header a,
.site-navigation a,
.main-navigation a {
    color: rgba(255, 255, 255, 0.85) !important;
}

.site-navigation a:hover,
.main-navigation a:hover {
    color: #c9933a !important;
}

.site-navigation .current-menu-item > a,
.main-navigation .current-menu-item > a {
    color: #1a5fa8 !important;
}

/* Dropdown arrow fix */
.site-navigation ul.menu li.menu-item-has-children {
    display: flex;
    flex-direction: row;
    align-items: center;
}

.site-navigation ul.menu li.menu-item-has-children::after {
    position: static;
    margin-left: 5px;
    color: rgba(255, 255, 255, 0.85);
}

/* ========================================
   GLOBAL DARK BACKGROUND
   ======================================== */

body,
#page,
#content,
.site-content,
main#main {
    background-color: #0f1623 !important;
}

.site-footer,
footer#colophon {
    background-color: #0f1623 !important;
    border-top: 1px solid rgba(26, 95, 168, 0.2) !important;
}

/* ========================================
   DARK TEMPLATE OVERRIDES
   (beats global h/p color rules above)
   ======================================== */

.research-area-title,
.research-hero-title,
.people-hero-title,
.publications-hero-title,
.media-hero-title,
.service-hero-title {
    color: white !important;
}

.research-area-description p,
.research-area-description {
    color: rgba(255, 255, 255, 0.75) !important;
}

.research-area-image-container {
    min-height: unset !important;
    background: transparent !important;
}

.coex-custom-footer {
    background: linear-gradient(to bottom, #0f1623 0%, #0a0f1a 100%) !important;
    border-top: none !important;
}

.site-footer,
footer#colophon {
    border-top: none !important;
}

/* ========================================
   OUTREACH DROPDOWN ARROW FIX
   ======================================== */

.site-header .site-navigation .menu > li::after {
    content: '';
    position: absolute;
    bottom: -20px;
    left: 0;
    right: 0;
    height: 20px;
    background: transparent;
}

/* Dropdown menu */
.site-navigation .sub-menu {
    background-color: #0f1623 !important;
    border: 1px solid rgba(26, 95, 168, 0.3) !important;
    border-radius: 8px !important;
}

.site-navigation .sub-menu li a {
    color: rgba(255, 255, 255, 0.85) !important;
    padding: 10px 20px !important;
}

.site-navigation .sub-menu li a:hover {
    color: #c9933a !important;
    background-color: rgba(26, 95, 168, 0.2) !important;
}

/* Mobile menu */
.site-navigation.show,
.site-navigation-dropdown.show,
nav.site-navigation-dropdown {
    background-color: #0f1623 !important;
}

.site-navigation-dropdown .menu li a,
nav.site-navigation-dropdown li a,
.menu-dropdown li a {
    color: rgba(255, 255, 255, 0.85) !important;
    background-color: #0f1623 !important;
}

.site-navigation-dropdown .menu li,
nav.site-navigation-dropdown li {
    background-color: #0f1623 !important;
    border-bottom: 1px solid rgba(26, 95, 168, 0.2) !important;
}

.site-navigation-dropdown .menu li a:hover,
nav.site-navigation-dropdown li a:hover {
    color: #c9933a !important;
}

/* Outreach dropdown indicator on mobile */
.site-navigation-dropdown .menu-item-has-children > a::after {
    content: ' ▾';
    color: #c9933a !important;
}

/* Sub menu styling */
.site-navigation-dropdown .sub-menu {
    background-color: #1a2740 !important;
    border-left: 3px solid #1a5fa8 !important;
}

.site-navigation-dropdown .sub-menu li {
    background-color: #1a2740 !important;
    border-bottom: 1px solid rgba(26, 95, 168, 0.15) !important;
}

.site-navigation-dropdown .sub-menu li a {
    background-color: #1a2740 !important;
    color: rgba(255, 255, 255, 0.75) !important;
    padding-left: 30px !important;
    font-size: 14px !important;
}

.site-navigation-dropdown .sub-menu li a:hover {
    color: #c9933a !important;
}

/* ========================================
   MOBILE RESPONSIVE
   ======================================== */

@media (max-width: 768px) {
    .research-area-title,
    .research-area-description,
    .research-area-description p {
        text-align: center !important;
    }

    .research-area-image-container {
        min-height: unset !important;
    }

    .funders-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }

    .funder-logo {
        max-width: 120px;
    }

    .funder-item:nth-child(4) .funder-logo {
        width: 120px;
        height: 120px;
    }
}