/* Critical CSS - Load First */
:root {
    --nav-color: #1B5687;
    --white-text: #ffffff;
    visibility: hidden;
}

/* Critical h1 overrides - Add this after the initial :root block */
h1,
.h1,
h1[class*="text-"],
[class*="site"] h1,
[class*="section"] h1,
.site-blocks-cover h1,
.inner-page-cover h1,
div h1,
section h1 {
    color: #fff !important;
    font-family: 'Sequel', sans-serif !important;
    font-weight: normal !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Preserve white text for h1 elements with text-white class */
h1.text-white,
.text-white h1,
[class*="cover"] h1.text-white {
    color: #ffffff !important;
}

/* Immediate Style Application */
html {
    visibility: hidden;
    opacity: 0;
}

html.fonts-loaded {
    visibility: visible;
    opacity: 1;
    transition: opacity 0.1s;
}

/* Global Font Loading */
@font-face {
    font-family: 'Sequel';
    src: url('../fonts/Sequel/Sequel-Regular.woff2') format('woff2') font-display: swap;
}

/* Prevent FOUC on Load */
.site-navbar *,
.site-navigation *,
.site-menu * {
    color: var(--nav-color) !important;
    font-family: 'Sequel', sans-serif !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000;
    contain: layout style paint;
}

/* Force White Text */
[class*="text-white"],
.text-white,
h1.text-white,
.text-white.font-weight-light,
.site-blocks-cover h1.text-white {
    color: var(--white-text) !important;
    font-family: 'Sequel', sans-serif !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transform: translateZ(0);
    contain: layout style paint;
}

/* Immediate text-white overrides */
.text-white.font-weight-light.text-uppercase.font-weight-bold,
h1.text-white.font-weight-light.text-uppercase.font-weight-bold {
    color: #ffffff !important;
    text-shadow: 
        -1px -1px 0 #fff,
        1px -1px 0 #fff,
        -1px 1px 0 #fff,
        1px 1px 0 #fff !important;
    -webkit-text-stroke: 1px #fff;
    text-stroke: 1px #fff;
    font-family: 'Sequel', sans-serif !important;
    letter-spacing: 0.05em !important;
}

/* Critical white text styling */
.text-white.font-weight-light.text-uppercase.font-weight-bold,
h1.text-white.font-weight-light.text-uppercase.font-weight-bold {
    color: #ffffff !important;
    -webkit-text-stroke: 1px #ffffff !important;
    text-stroke: 1px #ffffff !important;
    text-shadow: 
        2px 2px 0 #ffffff30,
        -2px -2px 0 #ffffff30,
        2px -2px 0 #ffffff30,
        -2px 2px 0 #ffffff30 !important;
    font-weight: normal !important;
    letter-spacing: 0.1em !important;
    font-family: 'Sequel', sans-serif !important;
    transform: translateZ(0);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    backface-visibility: hidden;
}

/* Font Weights */
:root {
  --font-light: 200;
  --font-regular: 400;
  --font-medium: 500;
  --font-bold: 700;
  --font-black: 900;
  
  /* Font Sizes */
  --text-xs: 0.75rem;    /* 12px */
  --text-sm: 0.875rem;   /* 14px */
  --text-base: 1rem;     /* 16px */
  --text-lg: 1.125rem;   /* 18px */
  --text-xl: 1.25rem;    /* 20px */
  --text-2xl: 1.5rem;    /* 24px */
  --text-3xl: 1.875rem;  /* 30px */
  --text-4xl: 2.25rem;   /* 36px */

  /* Primary Text Colors */
  --text-primary: #1892CA;      /* Default text color */
  --text-secondary: #1892CA;    /* Secondary text color */
  
  /* Heading Colors */
  --heading-h1: #1892CA;        /* H1 color */
  --heading-h2: #1892CA;        /* H2 color */
  --heading-h3: #1892CA;        /* H3 color */
  --heading-h4: #1892CA;        /* H4 color */
  --heading-h5: #1892CA;        /* H5 color */
  --heading-h6: #1892CA;        /* H6 color */
  
  /* Special Text Colors */
  --text-menu: #1892CA;         /* Navigation menu text */
  --text-footer: #ffffff;       /* Footer text */
  --text-links: #007bff;        /* Link text */
  --text-buttons: #ffffff;      /* Button text */
  
  /* Additional Text Colors */
  --text-muted: #1892CA;        /* Muted text */
  --text-highlight: #007bff;    /* Highlighted text */
  --text-error: #dc3545;        /* Error text */
  --text-success: #28a745;      /* Success text */

  /* Navbar Font Variables */
  --nav-font: 'Sequel', sans-serif;
  --nav-font-weight: Light;
  --nav-font-size: 14px;
  --nav-letter-spacing: 0.1em;
  --nav-text-transform: capitalize;

  --primary-color: #1892CA;
  --background-color: #93BDCE;
  --text-color: #1892CA;
  --link-color: #1892CA;
  --heading-color: #1892CA !important;
  --nav-text-color: #1892CA;
}

/* Font Face Declaration */
@font-face {
    font-family: 'Sequel';
    src: url('../fonts/Sequel/Sequel-Regular.woff2') format('woff2'),
         url('../fonts/Sequel/Sequel-Regular.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}

/* Global Reset - This ensures the font is applied everywhere */
*, 
*::before, 
*::after,
body,
html,
h1, h2, h3, h4, h5, h6,
p, span, a, div, 
button, input, select, textarea,
.site-menu,
.site-navbar,
.site-footer,
.btn,
.nav-link {
    font-family: 'Sequel', sans-serif !important;
    font-weight: normal !important;
    letter-spacing: normal !important;
}

/* Base Typography */
body {
    font-family: 'Sequel', sans-serif !important;
    font-weight: normal !important;
}

/* Prevent default underline on navigation items */
.site-navbar .site-navigation .site-menu > li > a:before,
.site-navbar .site-navigation .site-menu > li > a:after {
    display: none !important;
}

/* Ensure dropdown items are properly styled immediately */
.site-navbar .site-navigation .site-menu .has-children .dropdown > li > a {
    color: #1B5687 !important;
    text-decoration: none !important;
    font-family: 'Sequel', sans-serif !important;
}

/* Base Typography */
body {
  font-family: var(--primary-font);
  font-size: var(--text-base);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: var(--text-primary);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--heading-font);
  font-weight: 500;
}

/* Font Size Classes */
.text-xs { font-size: var(--text-xs); }
.text-sm { font-size: var(--text-sm); }
.text-base { font-size: var(--text-base); }
.text-lg { font-size: var(--text-lg); }
.text-xl { font-size: var(--text-xl); }
.text-2xl { font-size: var(--text-2xl); }
.text-3xl { font-size: var(--text-3xl); }
.text-4xl { font-size: var(--text-4xl); }

/* Font Weight Classes */
.font-light { font-weight: var(--font-light); }
.font-regular { font-weight: var(--font-regular); }
.font-medium { font-weight: var(--font-medium); }
.font-bold { font-weight: var(--font-bold); }
.font-black { font-weight: var(--font-black); }

/* Base Typography */
*, 
*::before, 
*::after {
    font-family: 'Sequel', sans-serif !important;
    font-weight: normal !important;
}

/* Reset Bold Fonts */
b, strong, h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6,
.font-weight-bold,
.btn,
.nav-link,
.site-menu > li > a {
    font-weight: normal !important;
}

/* Menu Items */
.site-navbar .site-navigation .site-menu > li > a {
    font-weight: normal !important;
    letter-spacing: 0.02em;
    text-transform: capitalize !important;
}

/* Headings */
.text-uppercase,
.site-blocks-cover h1,
.section-title,
.footer-heading {
    font-weight: normal !important;
}

/* Custom Classes Override */
.font-weight-light,
.font-weight-normal,
.font-weight-medium,
.font-weight-semibold,
.font-weight-bold,
.font-weight-bolder {
    font-weight: normal !important;
}

/* Navigation and News Specific Styles */
.site-menu,
.site-navbar .site-navigation .site-menu > li > a,
.site-navbar .site-navigation .site-menu .has-children .dropdown > li > a {
  font-family: var(--primary-font);
  font-weight: var(--font-medium);
}

.news-title,
.news-section h1,
.news-section h2,
.news-section h3,
.news-section .news-meta {
  font-family: var(--primary-font);
}

/* Global Text Colors */
body {
    color: var(--text-primary);
}

/* Heading Colors */
h1, .h1 { color: var(--heading-h1); }
h2, .h2 { color: var(--heading-h2); }
h3, .h3 { color: var(--heading-h3); }
h4, .h4 { color: var(--heading-h4); }
h5, .h5 { color: var(--heading-h5); }
h6, .h6 { color: var(--heading-h6); }

/* Navigation Colors */
.site-menu a { color: var(--text-menu); }

/* Footer Colors */
.site-footer {
    color: var(--text-footer);
}

/* Link Colors */
a { color: var(--text-links); }

/* Button Text Colors */
.btn { color: var(--text-buttons); }

/* Utility Classes */
.text-muted { color: var(--text-muted) !important; }
.text-highlight { color: var(--text-highlight) !important; }
.text-error { color: var(--text-error) !important; }
.text-success { color: var(--text-success) !important; }

/* Navbar Typography */
.site-navbar .site-navigation .site-menu,
.site-navbar .site-navigation .site-menu > li > a,
.site-navbar .site-navigation .site-menu .has-children .dropdown > li > a,
.site-mobile-menu .site-nav-wrap a {
    font-family: var(--nav-font) !important;
    font-weight: var(--nav-font-weight) !important;
    font-size: var(--nav-font-size);
    letter-spacing: var(--nav-letter-spacing);
    text-transform: var(--nav-text-transform);
}

/* Mobile Menu Typography */
.site-mobile-menu .site-nav-wrap > li > a {
    font-family: var(--nav-font) !important;
    font-weight: var(--nav-font-weight) !important;
}

/* Apply colors globally */
body {
    color: var(--text-color) !important;
    background-color: var(--background-color) !important;
}

/* All text elements */
p, span, div, li, td, th, input, select, textarea {
    color: var(--text-color) !important;
}

/* All headings */
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
    color: var(--heading-color) !important;
}

/* Navigation */
.site-navbar .site-navigation .site-menu > li > a,
.site-navbar .site-navigation .site-menu .has-children .dropdown > li > a {
    color: var(--nav-text-color) !important;
    text-transform: capitalize !important;
}

/* Remove all bold fonts */
.font-weight-bold,
strong,
b,
[class*="font-weight-"] {
    font-weight: normal !important;
}

/* Force font size hierarchy */
h1, .h1 { font-size: 2.5rem !important; }
h2, .h2 { font-size: 2rem !important; }
h3, .h3 { font-size: 1.75rem !important; }
h4, .h4 { font-size: 1.5rem !important; }
h5, .h5 { font-size: 1.25rem !important; }
h6, .h6 { font-size: 1rem !important; }

/* Navigation specific overrides */
.site-navbar {
    background: var(--background-color) !important;
}

.site-navbar .site-navigation .site-menu > li > a {
    font-size: 14px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.1em !important;
}

/* Add this at the bottom of the file to ensure it overrides all other styles */

/* Global Header Color Override */
h1, .h1,
h2, .h2,
h3, .h3,
h4, .h4,
h5, .h5,
h6, .h6,
.heading,
.site-blocks-cover h1,
.text-primary,
.section-title,
.site-section-heading,
.footer-heading,
[class*="heading"],
.unit-4 h3,
.leadership-card h3,
.news-section h1,
.news-section h2,
.news-section h3 {
    color: #1892CA !important;
}

/* Navigation header color override */
.site-navbar .site-navigation .site-menu > li > a,
.site-navbar .site-navigation .site-menu .has-children .dropdown > li > a {
    color: #1892CA !important;
}

/* Additional overrides for specific headings */
.text-primary,
.mb-4.text-primary,
h2.text-primary,
h3.text-primary,
h4.text-primary {
    color: #1892CA !important;
}

/* Override any dynamic or JavaScript-generated headers */
[class*="heading"],
[class*="title"],
[class*="header"] {
    color: #1892CA !important;
}

/* Footer headings override */
.site-footer h2,
.site-footer h3,
.site-footer h4,
.site-footer .footer-heading {
    color: #1892CA !important;
}

/* Force important styles for global header color */
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6,
.heading,
.title,
.section-title,
.site-blocks-cover h1,
.text-primary,
.breadcrumb-custom,
[class*="heading"],
[class*="title"],
[class*="header"],
.unit-4 h3,
.leadership-card h3,
.feature-1 .heading,
.service-title,
.news-title,
.footer-heading {
    color: #1B5687 !important;
    font-family: 'Sequel', sans-serif !important;
    font-weight: normal !important;
}

/* Global color overrides */
:root {
    --heading-color: #1B5687 !important;
    --text-color: #1B5687 !important;
}

/* Global Navbar Overrides */
.site-navbar,
.site-navigation,
.site-menu {
    font-family: 'Sequel', sans-serif !important;
}

/* Main Navigation Items */
.site-navbar .site-navigation .site-menu > li > a {
    color: #1B5687 !important;
    font-size: 18px !important;
    font-weight: normal !important;
    text-transform: capitalize !important;
    letter-spacing: 0.1em !important;
    font-family: 'Sequel', sans-serif !important;
}

/* Dropdown Menu */
.site-navbar .site-navigation .site-menu .has-children .dropdown {
    background: #E3DAC9 !important;
}

.site-navbar .site-navigation .site-menu .has-children .dropdown > li > a {
    color: #1892CA !important;
    font-family: 'Sequel', sans-serif !important;
    font-weight: normal !important;
    font-size: 14px !important;
    text-transform: capitalize !important;
}

/* Mobile Menu */
.site-mobile-menu .site-nav-wrap a {
    color: #1892CA !important;
    font-family: 'Sequel', sans-serif !important;
    font-weight: normal !important;
    text-transform: capitalize !important;
}

/* Active State */
.site-navbar .site-navigation .site-menu > li.active > a {
    color: #1892CA !important;
    font-weight: normal !important;
}

/* Global Navbar Settings - These will override all other styles */
.site-navbar {
    background: var(--background-color) !important;
    font-family: 'Sequel', sans-serif !important;
}

/* Main Navigation Links */
.site-navbar .site-navigation .site-menu > li > a {
    color: #1B5687 !important;
    font-size: 18px !important;
    font-family: 'Sequel', sans-serif !important;
    font-weight: normal !important;
    text-transform: capitalize !important;
    letter-spacing: 0.1em !important;
}

/* Dropdown Menu */
.site-navbar .site-navigation .site-menu .has-children .dropdown {
    background: #E3DAC9 !important;
    border: none !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1) !important;
}

.site-navbar .site-navigation .site-menu .has-children .dropdown > li > a {
    color: #1B5687 !important;
    font-family: 'Sequel', sans-serif !important;
    font-size: 16px !important;
    font-weight: normal !important;
    padding: 12px 20px !important;
    text-transform: capitalize !important;
}

/* Active and Hover States */
.site-navbar .site-navigation .site-menu > li.active > a,
.site-navbar .site-navigation .site-menu > li > a:hover {
    color: #1892CA !important;
}

/* Mobile Menu */
.site-mobile-menu {
    background: var(--background-color) !important;
}

.site-mobile-menu .site-nav-wrap a {
    color: #1B5687 !important;
    font-family: 'Sequel', sans-serif !important;
    font-weight: normal !important;
    font-size: 16px !important;
    text-transform: capitalize !important;
}

/* Global text-white overrides with high specificity */
.text-white,
h1.text-white,
.text-white.font-weight-light,
.text-white.text-uppercase,
.text-white.font-weight-bold,
h1.text-white.font-weight-light.text-uppercase.font-weight-bold {
    color: #ffffff !important;
}

/* Critical rendering path styles */
html {
    visibility: visible !important;
}

body:not(.loaded) .site-navbar * {
    color: #1B5687 !important;
    text-decoration: none !important;
    border: none !important;
}
