/**
 * Critical layout CSS — variables, grid utilities, header shell (load before Bootstrap).
 */

/* ── Critical CSS: prevents FOUC before deferred CSS loads ── */
/* Suppress transitions during page load; removed after first paint (see script above) */
html.no-transition *,
html.no-transition *::before,
html.no-transition *::after {
    transition: none !important
}

/* Full CSS variable set — mirrors :root / [data-theme="dark"] in theme.css so variables
   are available at first paint even before the deferred theme.css finishes loading */
:root {
    --primary-color: #3b82f6;
    --primary-hover: #2563eb;
    --primary-light: #dbeafe;
    --secondary-color: #6b7280;
    --secondary-hover: #4b5563;
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --bg-card: #ffffff;
    --bg-overlay: rgba(0, 0, 0, .5);
    --text-primary: #111827;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;
    --text-inverse: #ffffff;
    --border-primary: #e5e7eb;
    --border-secondary: #d1d5db;
    --border-focus: #3b82f6;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, .1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, .1);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, .1);
    --success-color: #10b981;
    --success-bg: #d1fae5;
    --warning-color: #f59e0b;
    --warning-bg: #fef3c7;
    --error-color: #ef4444;
    --error-bg: #fee2e2;
    --info-color: #3b82f6;
    --info-bg: #dbeafe;
    --theme-toggle-bg: #ffffff;
    --theme-toggle-color: #374151;
    --theme-toggle-border: #e5e7eb;
    --input-bg: #ffffff;
    --input-border: #d1d5db;
    --input-focus: #3b82f6;
    --input-text: #111827;
    --input-placeholder: #9ca3af;
    --btn-primary-bg: #3b82f6;
    --btn-primary-hover: #2563eb;
    --btn-primary-text: #ffffff;
    --btn-secondary-bg: #f3f4f6;
    --btn-secondary-hover: #e5e7eb;
    --btn-secondary-text: #374151;
    --nav-bg: #ffffff;
    --nav-text: #111827;
    --nav-hover: #f3f4f6;
    --nav-border: #e5e7eb;
    --footer-bg: #f8fafc;
    --footer-text: #6b7280;
    --footer-link: #374151;
    --footer-link-hover: #3b82f6;
    --color-primary: #007bff;
    --color-body: #497696;
    --color-heading-1: #083A5E;
    --color-white: #fff;
    --font-primary: "Space Grotesk", sans-serif;
    --transition: .3s;
    --h1: 60px;
    --h2: 36px;
    --h3: 30px;
    --h4: 26px;
    --h5: 24px;
    --h6: 18px;
    --p-regular: 400;
    --s-bold: 700
}

[data-theme="dark"] {
    --primary-color: #3b82f6;
    --primary-hover: #2563eb;
    --primary-light: #1e3a8a;
    --secondary-color: #9ca3af;
    --secondary-hover: #d1d5db;
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --bg-card: #1e293b;
    --bg-overlay: rgba(0, 0, 0, .7);
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --text-inverse: #fff;
    --border-primary: #334155;
    --border-secondary: #475569;
    --border-focus: #3b82f6;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, .4);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, .4);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, .4);
    --success-color: #10b981;
    --success-bg: #064e3b;
    --warning-color: #f59e0b;
    --warning-bg: #78350f;
    --error-color: #ef4444;
    --error-bg: #7f1d1d;
    --info-color: #3b82f6;
    --info-bg: #1e3a8a;
    --theme-toggle-bg: #1e293b;
    --theme-toggle-color: #f8fafc;
    --theme-toggle-border: #334155;
    --input-bg: #1e293b;
    --input-border: #334155;
    --input-focus: #3b82f6;
    --input-text: #f8fafc;
    --input-placeholder: #94a3b8;
    --btn-primary-bg: #3b82f6;
    --btn-primary-hover: #2563eb;
    --btn-primary-text: #ffffff;
    --btn-secondary-bg: #334155;
    --btn-secondary-hover: #475569;
    --btn-secondary-text: #f8fafc;
    --nav-bg: #1e293b;
    --nav-text: #f8fafc;
    --nav-hover: #334155;
    --nav-border: #334155;
    --footer-bg: #0f172a;
    --footer-text: #94a3b8;
    --footer-link: #cbd5e1;
    --footer-link-hover: #3b82f6
}

*,
*::before,
*::after {
    box-sizing: border-box
}

html {
    margin: 0;
    padding: 0;
    font-size: 10px;
    overflow: hidden;
    overflow-y: auto
}

body {
    font-size: 16px;
    line-height: 26px;
    -webkit-font-smoothing: antialiased;
    font-family: "Space Grotesk", system-ui, sans-serif;
    color: #497696;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
    background-color: var(--bg-primary)
}

html[data-theme="dark"],
body[data-theme="dark"] {
    background-color: #0b1220;
    color: #e5e7eb
}

h1,
h2,
h3,
h4,
h5,
h6,
.h1,
.h2,
.h3,
.h4,
.h5,
.h6 {
    margin: 0 0 20px;
    font-family: "Space Grotesk", sans-serif;
    line-height: 1.4074;
    color: #083A5E;
    font-weight: 700;
    word-break: break-word
}

[data-theme="dark"] h1,[data-theme="dark"] h2,[data-theme="dark"] h3,[data-theme="dark"] h4,[data-theme="dark"] h5,[data-theme="dark"] h6 {
    color: #e2e8f0
}

a {
    text-decoration: none;
    color: inherit
}

img {
    max-width: 100%;
    height: auto
}

p {
    margin: 0 0 20px;
    color: #497696;
    font-size: 16px;
    line-height: 26px
}

@media(max-width:767px) {

    h1,
    .h1 {
        font-size: 34px
    }

    h2,
    .h2 {
        font-size: 28px
    }

    h3,
    .h3 {
        font-size: 24px
    }
}

/* Bootstrap 5 grid — exact match prevents CLS when bootstrap.min.css loads */
.container,
.container-fluid {
    width: 100%;
    padding-right: var(--bs-gutter-x, .75rem);
    padding-left: var(--bs-gutter-x, .75rem);
    margin-right: auto;
    margin-left: auto
}

@media(min-width:576px) {
    .container {
        max-width: 540px
    }
}

@media(min-width:768px) {
    .container {
        max-width: 720px
    }
}

@media(min-width:992px) {
    .container {
        max-width: 960px
    }
}

@media(min-width:1200px) {
    .container {
        max-width: 1140px
    }
}

@media(min-width:1400px) {
    .container {
        max-width: 1320px
    }
}

.row {
    --bs-gutter-x: 1.5rem;
    --bs-gutter-y: 0;
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-flex-wrap: wrap;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    margin-top: calc(-1*var(--bs-gutter-y));
    margin-right: calc(-.5*var(--bs-gutter-x));
    margin-left: calc(-.5*var(--bs-gutter-x))
}

.row>* {
    -webkit-flex-shrink: 0;
    -ms-flex-negative: 0;
    flex-shrink: 0;
    width: 100%;
    max-width: 100%;
    padding-right: calc(var(--bs-gutter-x)*.5);
    padding-left: calc(var(--bs-gutter-x)*.5);
    margin-top: var(--bs-gutter-y)
}

.col-12 {
    -webkit-box-flex: 0;
    flex: 0 0 auto;
    width: 100%
}

.col-6 {
    -webkit-box-flex: 0;
    flex: 0 0 auto;
    width: 50%
}

@media(min-width:576px) {
    .col-sm-12 {
        flex: 0 0 auto;
        width: 100%
    }

    .col-sm-6 {
        flex: 0 0 auto;
        width: 50%
    }
}

@media(min-width:768px) {
    .col-md-12 {
        flex: 0 0 auto;
        width: 100%
    }

    .col-md-6 {
        flex: 0 0 auto;
        width: 50%
    }
}

@media(min-width:992px) {
    .col-lg-12 {
        flex: 0 0 auto;
        width: 100%
    }

    .col-lg-6 {
        flex: 0 0 auto;
        width: 50%
    }

    .col-lg-4 {
        flex: 0 0 auto;
        width: 33.333%
    }

    .col-lg-3 {
        flex: 0 0 auto;
        width: 25%
    }

    .col-lg-8 {
        flex: 0 0 auto;
        width: 66.667%
    }

    .col-lg-9 {
        flex: 0 0 auto;
        width: 75%
    }
}

@media(min-width:1200px) {
    .col-xl-12 {
        flex: 0 0 auto;
        width: 100%
    }

    .col-xl-6 {
        flex: 0 0 auto;
        width: 50%
    }

    .col-xl-4 {
        flex: 0 0 auto;
        width: 33.333%
    }
}

/* Bootstrap 5 display utilities — critical for hiding nav on mobile */
.d-none {
    display: none !important
}

.d-inline {
    display: inline !important
}

.d-inline-block {
    display: inline-block !important
}

.d-block {
    display: block !important
}

.d-flex {
    display: -webkit-box !important;
    display: -webkit-flex !important;
    display: -ms-flexbox !important;
    display: flex !important
}

@media(min-width:576px) {
    .d-sm-none {
        display: none !important
    }

    .d-sm-block {
        display: block !important
    }

    .d-sm-flex {
        display: flex !important
    }
}

@media(min-width:768px) {
    .d-md-none {
        display: none !important
    }

    .d-md-block {
        display: block !important
    }

    .d-md-flex {
        display: flex !important
    }
}

@media(min-width:992px) {
    .d-lg-none {
        display: none !important
    }

    .d-lg-block {
        display: block !important
    }

    .d-lg-flex {
        display: flex !important
    }
}

@media(min-width:1200px) {
    .d-xl-none {
        display: none !important
    }

    .d-xl-block {
        display: block !important
    }

    .d-xl-flex {
        display: flex !important
    }
}

/* Bootstrap 5 flex/alignment utilities */
.align-items-center {
    -webkit-box-align: center !important;
    -webkit-align-items: center !important;
    -ms-flex-align: center !important;
    align-items: center !important
}

.flex-wrap {
    -webkit-flex-wrap: wrap !important;
    -ms-flex-wrap: wrap !important;
    flex-wrap: wrap !important
}

.justify-content-between {
    -webkit-box-pack: justify !important;
    -webkit-justify-content: space-between !important;
    -ms-flex-pack: justify !important;
    justify-content: space-between !important
}

.justify-content-center {
    -webkit-box-pack: center !important;
    -webkit-justify-content: center !important;
    -ms-flex-pack: center !important;
    justify-content: center !important
}

/* Bootstrap 5 spacing utilities */
.py-0 {
    padding-top: 0 !important;
    padding-bottom: 0 !important
}

.py-1 {
    padding-top: .25rem !important;
    padding-bottom: .25rem !important
}

.py-2 {
    padding-top: .5rem !important;
    padding-bottom: .5rem !important
}

.py-3 {
    padding-top: 1rem !important;
    padding-bottom: 1rem !important
}

.py-4 {
    padding-top: 1.5rem !important;
    padding-bottom: 1.5rem !important
}

.py-5 {
    padding-top: 3rem !important;
    padding-bottom: 3rem !important
}

.px-0 {
    padding-right: 0 !important;
    padding-left: 0 !important
}

.px-1 {
    padding-right: .25rem !important;
    padding-left: .25rem !important
}

.px-2 {
    padding-right: .5rem !important;
    padding-left: .5rem !important
}

.px-3 {
    padding-right: 1rem !important;
    padding-left: 1rem !important
}

.px-4 {
    padding-right: 1.5rem !important;
    padding-left: 1.5rem !important
}

.mt-0 {
    margin-top: 0 !important
}

.mt-1 {
    margin-top: .25rem !important
}

.mt-2 {
    margin-top: .5rem !important
}

.mt-3 {
    margin-top: 1rem !important
}

.mt-4 {
    margin-top: 1.5rem !important
}

.mt-5 {
    margin-top: 3rem !important
}

.mb-0 {
    margin-bottom: 0 !important
}

.mb-1 {
    margin-bottom: .25rem !important
}

.mb-2 {
    margin-bottom: .5rem !important
}

.mb-3 {
    margin-bottom: 1rem !important
}

.mb-4 {
    margin-bottom: 1.5rem !important
}

.mb-5 {
    margin-bottom: 3rem !important
}

.ms-0 {
    margin-left: 0 !important
}

.ms-1 {
    margin-left: .25rem !important
}

.ms-2 {
    margin-left: .5rem !important
}

.ms-3 {
    margin-left: 1rem !important
}

.ms-auto {
    margin-left: auto !important
}

.me-0 {
    margin-right: 0 !important
}

.me-1 {
    margin-right: .25rem !important
}

.me-2 {
    margin-right: .5rem !important
}

.me-3 {
    margin-right: 1rem !important
}

.me-auto {
    margin-right: auto !important
}

.g-0 {
    --bs-gutter-x: 0;
    --bs-gutter-y: 0
}

.g-1 {
    --bs-gutter-x: .25rem;
    --bs-gutter-y: .25rem
}

.g-2 {
    --bs-gutter-x: .5rem;
    --bs-gutter-y: .5rem
}

.g-3 {
    --bs-gutter-x: 1rem;
    --bs-gutter-y: 1rem
}

.text-center {
    text-align: center !important
}

.text-start {
    text-align: left !important
}

.text-end {
    text-align: right !important
}

.text-white {
    color: #fff !important
}

.fw-bold {
    font-weight: 700 !important
}

.fw-normal {
    font-weight: 400 !important
}

.fw-semibold {
    font-weight: 600 !important
}

/* Header */
.rts-header-area-five {
    border-bottom: 1px solid #ECECEC;
    background: #fff
}

[data-theme="dark"] .rts-header-area-five {
    border-bottom-color: #1e293b;
    background: #0b1220
}

.header--sticky {
    position: relative;
    z-index: 999
}

.header--sticky.sticky {
    position: fixed !important;
    width: 100%;
    background: #fff;
    box-shadow: 0 7px 18px rgba(0, 0, 0, .05)
}

[data-theme="dark"] .header--sticky.sticky {
    background: #0b1220
}

@media(max-width:767px){.header-main-wrapper.four-header.header--sticky{height:65px;background:#fff;display:flex;align-items:center}[data-theme="dark"] .header-main-wrapper.four-header.header--sticky {
    background: #0b1220
}
}
