/* =========================================================
   Hubbards on the Hitch — shared site styles (Trailhead design)
   Colors come from the logo. Change a color here and it
   updates on every page.
   ========================================================= */

/* Fonts are stored in the fonts/ folder (Barlow, SIL Open Font License). */
@font-face {
    font-family: 'Barlow';
    src: url('fonts/barlow-latin-400-normal.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Barlow';
    src: url('fonts/barlow-latin-400-italic.woff2') format('woff2');
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}
@font-face {
    font-family: 'Barlow';
    src: url('fonts/barlow-latin-500-normal.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Barlow';
    src: url('fonts/barlow-latin-600-normal.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Barlow';
    src: url('fonts/barlow-latin-700-normal.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Barlow Condensed';
    src: url('fonts/barlow-condensed-latin-600-normal.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Barlow Condensed';
    src: url('fonts/barlow-condensed-latin-700-normal.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Barlow Condensed';
    src: url('fonts/barlow-condensed-latin-800-normal.woff2') format('woff2');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

:root {
    --navy: #003860;          /* logo wordmark + trailer */
    --navy-dark: #002848;
    --sky: #2878B8;           /* logo mountains */
    --sky-light: #7DB8E8;     /* light blue for navy backgrounds */
    --sky-pale: #A8D2F2;      /* light blue for text over photos */
    --pine: #2E6B1F;          /* logo trees */
    --pine-dark: #0E2A0A;     /* footer */
    --bg: #F4F6F8;
    --card: #FFFFFF;
    --line: #DCE3EA;
    --text: #1C2733;
    --muted: #4A5868;
    --radius: 10px;
    --max: 1220px;
    --font-head: 'Barlow Condensed', 'Arial Narrow', Arial, sans-serif;
    --font-body: 'Barlow', Helvetica, Arial, sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 18px;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
}

img { max-width: 100%; }

a { color: var(--navy); }
a:hover { color: var(--sky); }

h1, h2, h3, h4 {
    font-family: var(--font-head);
    font-weight: 800;
    text-transform: uppercase;
    line-height: 1.05;
    color: var(--navy);
    letter-spacing: 0.01em;
}

.wrap {
    max-width: var(--max);
    margin: 0 auto;
    padding: 0 24px;
}

main { display: block; min-height: 55vh; }

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--navy);
    color: #fff;
    padding: 10px 16px;
    z-index: 1000;
}
.skip-link:focus { left: 8px; top: 8px; }

/* ---------- Header ---------- */

.site-header {
    background: var(--navy);
    color: #fff;
    position: relative;
    z-index: 50;
}

.site-header.over-hero {
    background: transparent;
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
}

.site-header .header-inner {
    max-width: 1440px;
    margin: 0 auto;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: #fff;
    font-family: var(--font-head);
    font-weight: 800;
    font-size: 26px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    flex: none;
}
.brand:hover { color: #fff; }
.brand img {
    width: 76px;
    height: 76px;
    display: block;
    filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.35));
}
.brand .brand-accent { color: var(--sky-pale); }
.over-hero .brand { text-shadow: 0 1px 10px rgba(0, 20, 40, 0.6); }

.site-nav > ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 2px;
}

.site-nav a,
.site-nav button {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 16px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #fff;
    text-decoration: none;
    background: none;
    border: 0;
    cursor: pointer;
    padding: 12px 8px;
    display: flex;
    align-items: center;
    gap: 4px;
    border-radius: 6px;
    min-height: 44px;
    line-height: 1.2;
    white-space: nowrap;
}
.over-hero .site-nav a,
.over-hero .site-nav button { text-shadow: 0 1px 8px rgba(0, 20, 40, 0.6); }

.site-nav a:hover,
.site-nav button:hover,
.site-nav .is-current > a,
.site-nav .is-current > button { color: var(--sky-pale); }

.site-nav .caret {
    width: 10px;
    height: 10px;
    transition: transform 0.15s ease;
}

.site-nav .has-sub { position: relative; }

.site-nav .sub {
    list-style: none;
    margin: 0;
    padding: 8px;
    position: absolute;
    left: 0;
    top: 100%;
    min-width: 220px;
    background: #fff;
    border-radius: var(--radius);
    box-shadow: 0 12px 30px rgba(0, 30, 60, 0.22);
    display: none;
}
.site-nav .sub a {
    color: var(--navy);
    text-shadow: none;
    padding: 10px 12px;
}
.site-nav .sub a:hover,
.site-nav .sub .is-current a { background: #E8F1FA; color: var(--navy); }

.site-nav .has-sub.open > .sub { display: block; }
.site-nav .has-sub.open .caret { transform: rotate(180deg); }

@media (hover: hover) and (min-width: 1101px) {
    .site-nav .has-sub:hover > .sub { display: block; }
}

.nav-toggle {
    display: none;
    background: none;
    border: 2px solid rgba(255, 255, 255, 0.7);
    color: #fff;
    border-radius: 8px;
    width: 48px;
    height: 48px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

@media (max-width: 1360px) {
    .brand .brand-text { display: none; }
}

@media (max-width: 1100px) {
    .nav-toggle { display: flex; }
    .site-nav {
        display: none;
        position: absolute;
        left: 12px;
        right: 12px;
        top: 100%;
        background: var(--navy);
        border-radius: var(--radius);
        padding: 8px;
        box-shadow: 0 14px 34px rgba(0, 20, 40, 0.35);
    }
    .site-nav.open { display: block; }
    .site-nav > ul { flex-direction: column; align-items: stretch; }
    .site-nav a, .site-nav button { width: 100%; justify-content: space-between; text-shadow: none !important; }
    .site-nav .sub {
        position: static;
        box-shadow: none;
        background: rgba(255, 255, 255, 0.08);
        margin: 0 0 6px;
    }
    .site-nav .sub a { color: #fff; }
    .site-nav .sub a:hover, .site-nav .sub .is-current a { background: rgba(255, 255, 255, 0.12); color: #fff; }
    .brand img { width: 64px; height: 64px; }
}

/* ---------- Page hero band (inner pages) ---------- */

.page-hero {
    background: var(--navy);
    color: #fff;
    border-bottom: 5px solid var(--sky);
}
.page-hero .wrap { padding-top: 40px; padding-bottom: 44px; }
.page-hero.center { text-align: center; }
.page-hero h1 {
    color: #fff;
    margin: 0 0 12px;
    font-size: clamp(40px, 6vw, 68px);
    line-height: 0.95;
}
.page-hero .lede {
    margin: 0;
    font-size: 19px;
    color: #DCE6F0;
    max-width: 760px;
}
.page-hero.center .lede { margin-left: auto; margin-right: auto; }

.kicker {
    margin: 0 0 10px;
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 17px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--pine);
}
.page-hero .kicker { color: var(--sky-light); }

/* ---------- Sections, cards, buttons ---------- */

.section { padding: 56px 0; }
.section-tight { padding: 36px 0; }

.section-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-end;
    gap: 12px;
    margin-bottom: 24px;
}
.section-head h2 { margin: 0; font-size: clamp(34px, 4.5vw, 52px); }

.more-link {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 19px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-decoration: none;
    padding: 10px 0;
}

.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 28px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 12px 24px;
    border-radius: 6px;
    font-family: var(--font-head);
    font-weight: 800;
    font-size: 19px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
    border: 2px solid transparent;
    cursor: pointer;
}
.btn-primary { background: var(--sky); color: #fff; }
.btn-primary:hover { background: #1F6AA6; color: #fff; }
.btn-light { background: var(--sky-light); color: var(--navy); }
.btn-light:hover { background: #A8D2F2; color: var(--navy); }
.btn-outline { border-color: #fff; color: #fff; }
.btn-outline:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }
.btn-outline-dark { border-color: var(--navy); color: var(--navy); }
.btn-outline-dark:hover { background: var(--navy); color: #fff; }

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* Sub-navigation used inside sections (back links, etc.) */
.subnav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 28px;
}
.subnav a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 8px 16px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--line);
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 16px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--navy);
}
.subnav a:hover { border-color: var(--sky); color: var(--sky); }

/* Rating badge (used on cards) */
.rating-badge {
    display: inline-block;
    background: var(--sky);
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    line-height: 1.3;
    padding: 4px 10px;
    border-radius: 4px;
}

/* Photo cards with text over the bottom */
.photo-card {
    position: relative;
    display: block;
    border-radius: var(--radius);
    overflow: hidden;
    height: 360px;
    color: #fff;
    text-decoration: none;
    background: var(--navy);
}
.photo-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}
.photo-card:hover img { transform: scale(1.03); }
.photo-card .photo-card-body {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 22px;
    background: linear-gradient(180deg, rgba(0, 28, 50, 0) 0%, rgba(0, 28, 50, 0.9) 60%);
}
.photo-card h3 { color: #fff; margin: 10px 0 0; font-size: 30px; line-height: 1; }
.photo-card p { margin: 6px 0 0; font-size: 16px; color: #DCE6F0; }
.photo-card:hover { color: #fff; }

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.status-msg { color: var(--muted); font-style: italic; }

/* ---------- Footer ---------- */

.site-footer {
    background: var(--pine-dark);
    color: #D3E2CC;
    margin-top: 0;
}
.site-footer .footer-inner {
    max-width: var(--max);
    margin: 0 auto;
    padding: 44px 24px 28px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 32px;
}
.site-footer .footer-brand { flex: 1 1 340px; min-width: 0; }
.site-footer .footer-brand img { width: 84px; height: 84px; display: block; margin-bottom: 12px; }
.site-footer p { margin: 0 0 10px; font-size: 15px; line-height: 1.6; max-width: 480px; }
.site-footer h2 {
    color: #fff;
    font-size: 20px;
    letter-spacing: 0.1em;
    margin: 0 0 10px;
}
.site-footer a { color: #fff; }
.site-footer a:hover { color: var(--sky-pale); }
.site-footer .footer-col { flex: 0 1 260px; }
.site-footer .footer-links { list-style: none; margin: 0; padding: 0; }
.site-footer .footer-links a {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 40px;
    text-decoration: none;
    font-weight: 600;
}
.site-footer .footer-links svg { width: 20px; height: 20px; flex: none; }
.site-footer .footer-bottom {
    max-width: var(--max);
    margin: 0 auto;
    padding: 16px 24px 28px;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    font-size: 14px;
    color: #B9CDB0;
}

/* ---------- Photo popups (Lightbox) ----------
   Pin the popup and its dark background to the screen, so scrolling
   on a phone can't leave the photo behind. */
.lightboxOverlay {
    opacity: 0.92 !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
}
.lightbox {
    position: fixed !important;
    top: 50% !important;
    left: 0 !important;
    transform: translateY(-50%);
    max-height: 100vh;
}
html.lb-disable-scrolling,
body.lb-disable-scrolling {
    overflow: hidden;
    overscroll-behavior: none;
}
.lb-data .lb-close {
    width: 44px;
    height: 44px;
    background-size: 30px;
    background-position: center;
    opacity: 0.9;
}
/* The old arrows sat invisibly on top of the photo; we use buttons by the X instead */
.lightbox .lb-nav { display: none !important; }
/* Caption on the left, Previous / Next / X on the right, all on screen */
.lightbox .lb-data {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 4px;
}
.lightbox .lb-data .lb-details {
    float: none;
    width: auto;
    flex: 1 1 auto;
    min-width: 0;
}
.lb-data .lb-closeContainer {
    float: none;
    flex: none;
    display: flex;
    align-items: center;
    gap: 8px;
}
.lb-data .lb-closeContainer .lb-close { float: none; }
.lb-step {
    display: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 2px solid rgba(255, 255, 255, 0.85);
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.35);
    color: #fff;
    cursor: pointer;
}
.lb-step:hover,
.lb-step:focus-visible { background: var(--sky); border-color: var(--sky); }
.lb-closeContainer.has-steps .lb-step { display: inline-flex; }

/* When a page is shown inside another site's frame (old TeamTopia site),
   hide our header and footer so they don't double up. */
html.in-frame .site-header,
html.in-frame .site-footer { display: none; }

@media (max-width: 640px) {
    body { font-size: 17px; }
    .section { padding: 40px 0; }
    .card { padding: 20px; }
    .photo-card { height: 300px; }
}

/* Back to top button (every page; appears after scrolling down) */
.back-to-top {
    position: fixed;
    right: 24px;
    bottom: max(110px, 28vh);
    z-index: 900;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
    width: 52px;
    height: 52px;
    border: 0;
    border-radius: 50%;
    background: var(--navy);
    color: #fff;
    box-shadow: 0 6px 18px rgba(0, 30, 60, 0.28);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s, background 0.15s ease;
}
.back-to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.back-to-top:hover, .back-to-top:focus-visible { background: var(--sky); }
.back-to-top svg { width: 22px; height: 22px; margin-top: -2px; }
.back-to-top span {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    line-height: 1;
    margin-top: -3px;
}
@media (max-width: 700px) {
    .back-to-top { right: 14px; bottom: 96px; width: 46px; height: 46px; }
}
