/* Site-wide responsive header, navigation, footer and global helpers. Loaded on every page via includes/header.php. */
:root {
    --rs-chrome-navy: #0b1c2c;
    --rs-chrome-navy-light: #142c40;
    --rs-chrome-accent: #c99a3f;
    --rs-chrome-border: #24384a;
}

/* ---------- Global safety rules (apply everywhere) ---------- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

img,
picture,
video,
iframe,
embed,
object {
    max-width: 100%;
    height: auto;
}

iframe[src*="google.com/maps"],
.map-embed {
    aspect-ratio: 16 / 9;
    display: block;
    height: auto;
    width: 100%;
}

a,
p,
li,
td,
th,
address {
    overflow-wrap: anywhere;
    word-break: break-word;
}

table {
    max-width: 100%;
}

.table-responsive {
    -webkit-overflow-scrolling: touch;
    overflow-x: auto;
    width: 100%;
}

:focus-visible {
    outline: 3px solid var(--rs-chrome-accent);
    outline-offset: 2px;
}

/* ---------- Header ---------- */
.site-header {
    align-items: center;
    background: var(--rs-chrome-navy);
    display: flex;
    flex-wrap: wrap;
    gap: 12px 20px;
    justify-content: space-between;
    padding: 14px 20px;
    position: relative;
    z-index: 1000;
}

.site-header .site-logo {
    display: inline-flex;
    flex-shrink: 0;
    line-height: 0;
}

.site-header .site-logo img {
    height: 100px;
    width: auto;
}

.site-nav-toggle {
    align-items: center;
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    display: none;
    flex-direction: column;
    gap: 5px;
    height: 44px;
    justify-content: center;
    padding: 0;
    width: 44px;
}

.site-nav-toggle span {
    background: #fff;
    border-radius: 2px;
    display: block;
    height: 2px;
    transition: transform 0.2s ease, opacity 0.2s ease;
    width: 22px;
}

.site-nav-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.site-nav-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}

.site-nav-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.site-navigation ul {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.site-navigation a {
    align-items: center;
    color: #dbe4ec;
    display: flex;
    font-size: 0.95rem;
    font-weight: 600;
    min-height: 44px;
    padding: 10px 14px;
    text-decoration: none;
}

.site-navigation a:hover,
.site-navigation a:focus-visible,
.site-navigation a[aria-current="page"] {
    color: #fff;
}

/* Mobile: collapse behind a hamburger toggle. Guarded by .js so the menu
   stays visible (accessible) if JavaScript fails to load. */
@media (max-width: 991px) {
    .site-nav-toggle {
        display: inline-flex;
    }

    .js .site-navigation {
        background: var(--rs-chrome-navy-light);
        border-top: 1px solid var(--rs-chrome-border);
        display: none;
        left: 0;
        position: absolute;
        right: 0;
        top: 100%;
        width: 100%;
    }

    .js .site-navigation.is-open {
        display: block;
    }

    .site-navigation ul {
        flex-direction: column;
        gap: 0;
        width: 100%;
    }

    .site-navigation li {
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        width: 100%;
    }

    .site-navigation a {
        padding: 14px 20px;
        width: 100%;
    }
}

/* ---------- Footer ---------- */
.site-footer {
    background: var(--rs-chrome-navy);
    color: #cfdbe6;
    padding: 48px 0 20px;
}

.site-footer__inner {
    margin: 0 auto;
    max-width: 1180px;
    padding: 0 20px;
}

.site-footer__grid {
    display: grid;
    gap: 30px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.site-footer__col h2 {
    color: #fff;
    font-size: 1rem;
    margin: 0 0 14px;
}

.site-footer__col ul {
    list-style: none;
    margin: 0 0 20px;
    padding: 0;
}

.site-footer__col li {
    margin-bottom: 8px;
}

.site-footer__col a {
    color: #cfdbe6;
    text-decoration: none;
}

.site-footer__col a:hover,
.site-footer__col a:focus-visible {
    color: #fff;
    text-decoration: underline;
}

.site-footer__about .site-footer__logo img {
    height: 40px;
    width: auto;
}

.site-footer__about p {
    margin: 12px 0 0;
}

.site-footer__social {
    display: flex;
    gap: 12px;
    list-style: none;
    margin: 16px 0 0;
    padding: 0;
}

.site-footer__legacy-nav {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    margin-top: 30px;
    padding-top: 20px;
}

.site-footer__legacy-nav a {
    color: #9fb1c1;
    font-size: 0.85rem;
    min-height: 44px;
    align-items: center;
    display: inline-flex;
    text-decoration: none;
}

.site-footer__copy {
    color: #8ea0b1;
    font-size: 0.85rem;
    margin: 14px 0 0;
}

@media (max-width: 991px) {
    .site-footer__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 575px) {
    .site-footer__grid {
        grid-template-columns: 1fr;
    }
}

/* Bootstrap 4/5-style visibility utilities used by a few legacy templates
   (this site otherwise runs on Bootstrap 3, which lacks these classes). Without
   them, elements meant to be hidden on mobile render full-width and overflow. */
.d-none {
    display: none !important;
}

@media (min-width: 768px) {
    .d-md-block {
        display: block !important;
    }
}
