/*
========================================
CSS Custom Properties (Universal Theme)
========================================
*/
:root {
    --color-background: #ffffff;
    --color-text-primary: #111827;
    --color-text-secondary: #6b7280;
    --color-primary-accent: #3b82f6;
    --color-border: #e5e7eb;
    --color-brand: #BE0F17;

    --font-family-sans-serif: ui-sans-serif, system-ui, -apple-system, sans-serif;
    --navbar-height: 70px;
    --container-width: 1280px;
    --transition-speed: 0.2s;
    --border-radius: 0.375rem;

    --footer-top-bg: #f8f9fa;
    --footer-top-text: #6c757d;
    --footer-top-heading: #343a40;
    --footer-top-link-hover: #0056b3;
    --footer-bottom-bg: #343a40;
    --footer-bottom-text: #adb5bd;
    --footer-bottom-link-hover: #ffffff;

    --fsi-bg-image: url('../img/hero.webp');
    --fsi-min-height: 60vh;
    --fsi-padding: 2rem 1.5rem;
    --fsi-text-color: #ffffff;
    --fsi-overlay-color: rgba(0, 0, 0, 0.65);
    --fsi-cta-border-color: #ffffff;
}

/*
========================================
Base & Page Styles
========================================
*/
*, *::before, *::after { box-sizing: border-box; }

body {
    margin: 0;
    font-family: "Source Serif 4", serif;
    line-height: 1.65;
    background-color: #f9fafb;
    color: var(--color-text-primary);
    display: grid;
    grid-template-rows: 1fr auto;
    min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
    font-family: "Montserrat", sans-serif;
    font-weight: 600;
    line-height: 1.2;
    margin-top: 0;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.6rem; }
h4 { font-size: 1.3rem; }

.content {
    max-width: 740px;
    margin: 0 auto;
    padding: 4rem 1.5rem;
}

ul { list-style: none; margin: 0; padding: 0; }

a {
    text-decoration: none;
    transition: color var(--transition-speed) ease;
    color: var(--color-primary-accent);
}

a:hover {
    color: var(--color-brand);
}

code, pre {
    font-family: "Source Code Pro", monospace;
}

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

/*
========================================
Main Navbar Structure
========================================
*/
.navbar {
    position: sticky; top: 0; z-index: 1000;
    height: var(--navbar-height); display: flex; align-items: center;
    background-color: var(--color-background); border-bottom: 1px solid var(--color-border);
}

.navbar__container {
    display: flex; align-items: center; justify-content: space-between;
    width: 100%; max-width: var(--container-width);
    margin: 0 auto; padding: 0 1.5rem;
}

.navbar__brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.navbar__logo {
    height: 28px;
    width: auto;
    display: block;
}

.navbar__brand,
.navbar__brand:hover,
.navbar__brand:focus {
    color: var(--color-brand);
}

/*
========================================
Mobile Navigation (Mobile-First Styles)
========================================
*/
.navbar__toggle {
    display: block;
    border: none; background: transparent; cursor: pointer; padding: 0.5rem;
}

.navbar__toggle .bar {
    display: block; width: 25px; height: 3px; margin: 5px auto;
    background-color: var(--color-text-primary); border-radius: 1px;
    transition: all var(--transition-speed) ease-in-out;
}

.navbar__toggle.is-active .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.navbar__toggle.is-active .bar:nth-child(2) { opacity: 0; }
.navbar__toggle.is-active .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

.navbar__menu {
    display: none;
    position: fixed;
    top: var(--navbar-height); left: 0;
    width: 100%;
    background-color: var(--color-background);
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    z-index: 999;
}

.navbar__menu.is-active { display: block; }
.navbar__item:not(:last-child) { border-bottom: 1px solid var(--color-border); }

.navbar__link {
    display: block; padding: 1rem 1.5rem; font-weight: 500;
    color: var(--color-text-secondary);
}

.navbar__link:hover, .navbar__link:focus { color: var(--color-primary-accent); }

:is(.navbar__toggle, .navbar__link):focus-visible { outline: 2px solid var(--color-primary-accent); outline-offset: 2px; }

/*
========================================
Desktop Navigation Styles
========================================
*/
@media (min-width: 1024px) {
    .navbar__toggle {
        display: none;
    }

    .navbar__menu {
        display: flex;
        position: static;
        width: auto;
        background: none;
        box-shadow: none;
    }

    .navbar__list {
        display: flex;
        align-items: center;
        gap: 1.5rem;
    }

    .navbar__item:not(:last-child) {
        border-bottom: none;
    }

    .navbar__link {
        padding: 0.5rem;
    }
}

/*
========================================
Footer
========================================
*/
.main-content {
    padding: 2rem;
}

.footer-twotier {
    color: var(--footer-top-text);
}

.footer-twotier > hr {
    margin: 0;
    border: none;
    border-top: 1px solid var(--color-border);
}

.footer-twotier__top {
    background-color: #f6f6f6;
    padding: 3rem 1.5rem;
}

.footer-twotier__top-container {
    max-width: 1140px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.footer-twotier__brand p {
    margin: 1rem 0 0 0;
    font-size: 0.9rem;
    line-height: 1.6;
}

.footer-twotier__brand .logo {
    width: 150px;
    fill: var(--footer-top-heading);
}

.footer-twotier__heading {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--footer-top-heading);
    margin-top: 0;
    margin-bottom: 1rem;
}

.footer-twotier__links ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.footer-twotier__links li {
    margin-bottom: 0.75rem;
}

.footer-twotier__links a {
    color: var(--footer-top-text);
    transition: color 0.2s ease-in-out;
}

.footer-twotier__links a:hover {
    color: var(--footer-top-link-hover);
    text-decoration: underline;
}

.footer-twotier__bottom {
    background-color: var(--footer-bottom-bg);
    color: var(--footer-bottom-text);
    padding: 1.5rem;
}

.footer-twotier__bottom-container {
    max-width: 1140px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    font-size: 0.875rem;
    text-align: center;
}

.footer-twotier__bottom a {
    color: var(--footer-bottom-text);
    transition: color 0.2s ease-in-out;
}

.footer-twotier__bottom a:hover {
    color: var(--footer-bottom-link-hover);
}

@media (min-width: 768px) {
    .footer-twotier__top-container {
        grid-template-columns: 1.5fr 1fr 1fr;
        gap: 3rem;
    }

    .footer-twotier__bottom-container {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }
}

/*
========================================
Hero (FSI)
========================================
*/
.fsi-hero {
    position: relative;
    width: 100%;
    min-height: var(--fsi-min-height);
    padding: var(--fsi-padding);
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    background-image: var(--fsi-bg-image);
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
}

.fsi-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-color: var(--fsi-overlay-color);
    z-index: 1;
}

.fsi-hero-content {
    position: relative;
    z-index: 2;
    max-width: 700px;
}

.fsi-hero-title {
    color: var(--fsi-text-color);
    margin: 0 0 0.5rem 0;
    font-size: clamp(1.8rem, 8vw, 5.5rem);
    font-weight: 700;
    line-height: 1.1;
}

.fsi-hero-tagline {
    color: var(--fsi-text-color);
    margin: 0 0 2.5rem 0;
    font-size: clamp(0.95rem, 3vw, 1.5rem);
    opacity: 0.9;
    font-weight: 300;
    letter-spacing: 1px;
}

.fsi-hero-cta {
    display: inline-block;
    background: transparent;
    color: var(--fsi-text-color);
    border: 2px solid var(--fsi-cta-border-color);
    padding: 0.8rem 2.2rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
    text-transform: uppercase;
}

.fsi-hero-cta:hover {
    background-color: var(--fsi-cta-border-color);
    color: #000000;
}

@media (max-width: 600px) {
    .fsi-hero {
        min-height: 40vh;
        background-attachment: scroll; /* fixed causes issues on iOS */
    }
}

/*
========================================
Divider & CTA
========================================
*/
.divider {
    background-color: #2A4C69;
    color: #ffffff;
    padding: 2.5rem 2rem;
    text-align: center;
}

.divider-text {
    font-family: "Lora", serif;
    font-size: 2rem;
    letter-spacing: 0.05em;
    max-width: 800px;
    margin: 0 auto;
}

.body-cta {
    display: inline-block;
    background: white;
    color: #2A4C69;
    border: 2px solid #2A4C69;
    padding: 0.8rem 2.2rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
    text-transform: uppercase;
}

.body-cta:hover {
    border-color: var(--color-brand);
    color: var(--color-brand);
}

hr.accent {
    border: 0;
    height: 3px;
    width: 120px;
    background-color: #1F3546;
    margin: 4rem auto;
    border-radius: 2px;
}

/*
========================================
Accordion
========================================
*/
.accordion {
    background-color: #eee;
    color: #444;
    cursor: pointer;
    padding: 18px;
    width: 100%;
    text-align: left;
    border: none;
    outline: none;
    transition: 0.4s;
}

.active, .accordion:hover {
    background-color: #ccc;
}

.panel {
    padding: 0 18px;
    background-color: white;
    display: none;
    overflow: hidden;
}

.accordion:after {
    content: '\02795';
    font-size: 13px;
    color: #777;
    float: right;
    margin-left: 5px;
}

.active:after {
    content: "\2796";
}

/*
========================================
Table
========================================
*/
.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
    line-height: 1.5;
    border: 1px solid #4b5563;
}

.table thead {
    background-color: #f3f4f6;
}

.table th {
    font-weight: 600;
}

.table th,
.table td {
    padding: 0.9rem 1rem;
    text-align: left;
}

.table th:not(:last-child),
.table td:not(:last-child) {
    border-right: 1px solid #4b5563;
}

.table thead tr {
    border-bottom: 1px solid #4b5563;
}

.table tbody tr:not(:last-child) {
    border-bottom: 1px solid #4b5563;
}

.table tbody tr:nth-child(even) {
    background-color: #f3f4f6;
}

@media (max-width: 700px) {
    .table {
        border: none;
    }

    .table thead {
        display: none;
    }

    .table,
    .table tbody,
    .table tr,
    .table td {
        display: block;
        width: 100%;
    }

    .table tr {
        border: 1px solid #4b5563;
        margin-bottom: 1.5rem;
    }

    .table td {
        border: none;
        border-bottom: 1px solid #4b5563;
        position: relative;
        padding: 0.75rem 1rem 0.75rem 45%;
        font-size: 0.9rem;
    }

    .table td:last-child {
        border-bottom: none;
    }

    .table td::before {
        content: attr(data-label);
        position: absolute;
        left: 1rem;
        top: 0.75rem;
        width: 40%;
        font-weight: 600;
        color: var(--color-text-secondary);
    }

    .table tbody tr:nth-child(even) {
        background-color: #f3f4f6;
    }
}

.text-green {
    color: #1F6F43;
}

/*
========================================
Callout Boxes
========================================
*/
.callout {
    background-color: #F4F4F4;
    padding: 1rem 1.5rem;
    border-left: 5px solid;
    margin-bottom: 2rem;
    font-size: 1.2rem;
}

.callout--red  { border-color: #BE0F17; }
.callout--blue { border-color: #2A4C69; }

.redtext {color: #BE0F17;}
.big{color: #2A4C69;font-size: 2rem; }
