/* ==========================================================
   WHTF theme — shared design tokens and components
   Loaded after style.css by layouts/app.blade.php.

   Brand: navy #15395A · gold #ceaa4d
   Page-specific styles (.ab-*, .ct-*, …) build on these tokens;
   the generic .wh-* components below are for pages that don't
   need a bespoke layout (articles, statements, legacy pages…).
   ========================================================== */

:root {
    /* Colours */
    --wh-navy: #15395A;
    --wh-navy-dark: #0e2740;
    --wh-navy-mid: #1d4d78;
    --wh-navy-soft: #2d4964;
    --wh-gold: #ceaa4d;
    --wh-gold-dark: #b8922f;
    --wh-gold-light: #e0c071;
    --wh-gold-tint: rgba(206, 170, 77, .16);
    --wh-navy-tint: rgba(21, 57, 90, .07);

    --wh-bg: #f5f7fa;
    --wh-surface: #fff;
    --wh-surface-alt: #f7f9fb;
    --wh-border: #e8edf2;
    --wh-border-strong: #d5dde6;

    --wh-heading: #15395A;
    --wh-text: #4f6070;
    --wh-muted: #7b8a9a;

    --wh-success: #065f46;
    --wh-success-bg: #f0fdf4;
    --wh-danger: #991b1b;
    --wh-danger-bg: #fef2f2;

    /* Shape */
    --wh-radius: 14px;
    --wh-radius-sm: 10px;
    --wh-radius-pill: 999px;
    --wh-shadow: 0 6px 22px rgba(21, 57, 90, .05);
    --wh-shadow-hover: 0 12px 26px rgba(21, 57, 90, .12);

    /* Layout: one gutter and one content width for every page */
    --wh-gutter: 16px;
    --wh-content-max: 1080px;
    --wh-section-gap: 24px;

    /* Type */
    --wh-font-body: "Open Sans", sans-serif;
    --wh-font-heading: "Raleway", sans-serif;
}

@media (min-width: 576px) {
    :root {
        --wh-gutter: 24px;
    }
}

@media (min-width: 768px) {
    :root {
        --wh-gutter: 32px;
        --wh-section-gap: 28px;
    }
}

@media (min-width: 1200px) {
    :root {
        --wh-gutter: 40px;
    }
}

/* ---------- Base ---------- */
html,
body {
    overflow-x: clip;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--wh-bg);
    color: var(--wh-text);
    -webkit-text-size-adjust: 100%;
}

/* Keep the footer at the bottom of short pages */
body>.jett_space_header1 {
    flex: 1 0 auto;
}

a:hover {
    color: var(--wh-gold-dark);
}

img,
video,
iframe {
    max-width: 100%;
}

img:not([class]) {
    height: auto;
}

/* Every page uses the same side gutter and content width, so the header,
   page content and footer line up on all screen sizes. */
.container {
    padding-left: var(--wh-gutter);
    padding-right: var(--wh-gutter);
    max-width: calc(var(--wh-content-max) + 2 * var(--wh-gutter));
}

/* Justified text leaves big gaps on narrow screens */
@media (max-width: 767.98px) {

    [style*="text-align: justify"],
    [style*="text-align:justify"],
    .text-justify {
        text-align: left !important;
    }
}

/* Comfortable touch targets */
@media (pointer: coarse) {

    .btn:not(.btn-sm):not(.btn-close),
    .wh-btn {
        min-height: 44px;
    }
}

/* ---------- Session alerts (layout) ---------- */
.jett_alert90 {
    max-width: calc(var(--wh-content-max) + 2 * var(--wh-gutter));
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--wh-gutter) !important;
    padding-right: var(--wh-gutter) !important;
}

.jett_alert90:empty {
    display: none;
}

/* ---------- Page shell ---------- */
.wh-page {
    background: var(--wh-bg);
    padding-bottom: 56px;
}

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

.wh-head {
    background: linear-gradient(135deg, var(--wh-navy) 0%, var(--wh-navy-dark) 100%);
    color: #fff;
    padding: 34px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.wh-head::after {
    content: "";
    position: absolute;
    right: -70px;
    top: -70px;
    width: 240px;
    height: 240px;
    border-radius: 50%;
    background: rgba(206, 170, 77, .1);
    pointer-events: none;
}

.wh-head .container {
    position: relative;
    z-index: 1;
}

.wh-head h1 {
    margin: 0;
    font-size: 1.9rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #fff;
    overflow-wrap: anywhere;
}

.wh-head p {
    margin: 8px auto 0;
    max-width: 640px;
    font-size: 14px;
    color: rgba(255, 255, 255, .72);
}

.wh-head .wh-eyebrow {
    display: inline-block;
    margin-bottom: 8px;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--wh-gold);
}

@media (max-width: 575.98px) {
    .wh-head {
        padding: 28px 0;
    }

    .wh-head h1 {
        font-size: 1.45rem;
        letter-spacing: 1.2px;
    }
}

.wh-section {
    margin-top: var(--wh-section-gap);
}

.wh-section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.wh-section-title>i {
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--wh-gold-tint);
    color: var(--wh-gold-dark);
    font-size: 18px;
}

.wh-section-title h2 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .8px;
    color: var(--wh-heading);
}

.wh-section-title p {
    margin: 2px 0 0;
    font-size: 13.5px;
    color: var(--wh-muted);
}

/* ---------- Card ---------- */
.wh-card {
    background: var(--wh-surface);
    border: 1px solid var(--wh-border);
    border-radius: var(--wh-radius);
    box-shadow: var(--wh-shadow);
    overflow: hidden;
}

.wh-card-body {
    padding: 26px;
}

@media (max-width: 575.98px) {
    .wh-card-body {
        padding: 20px 18px;
    }
}

.wh-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
}

/* ---------- Prose (long-form text) ---------- */
.wh-prose {
    font-size: 15px;
    line-height: 1.85;
    color: var(--wh-text);
    overflow-wrap: break-word;
}

.wh-prose>*:first-child {
    margin-top: 0;
}

.wh-prose>*:last-child {
    margin-bottom: 0;
}

.wh-prose h2,
.wh-prose h3,
.wh-prose h4 {
    font-family: var(--wh-font-heading);
    font-weight: 700;
    color: var(--wh-heading);
    line-height: 1.35;
    margin: 1.6em 0 .6em;
    text-transform: none;
}

.wh-prose h2 {
    font-size: 1.35rem;
}

.wh-prose h3 {
    font-size: 1.15rem;
}

.wh-prose h4 {
    font-size: 1.02rem;
}

.wh-prose p,
.wh-prose ul,
.wh-prose ol {
    margin: 0 0 1em;
}

.wh-prose ul,
.wh-prose ol {
    padding-left: 1.3em;
}

.wh-prose li {
    margin-bottom: .35em;
}

.wh-prose a {
    color: var(--wh-navy);
    text-decoration: underline;
    text-decoration-color: var(--wh-gold);
    text-underline-offset: 3px;
}

.wh-prose a:hover {
    color: var(--wh-gold-dark);
}

.wh-prose img {
    display: block;
    height: auto;
    margin: 0 auto;
    border-radius: var(--wh-radius-sm);
}

.wh-prose figure {
    margin: 1.4em 0;
}

.wh-prose figcaption {
    margin-top: 8px;
    font-size: 13px;
    font-style: italic;
    text-align: center;
    color: var(--wh-muted);
}

.wh-prose blockquote {
    margin: 1.4em 0;
    padding: 14px 18px;
    background: var(--wh-surface-alt);
    border-radius: var(--wh-radius-sm);
    color: var(--wh-heading);
}

.wh-prose .wh-lead {
    font-size: 16.5px;
    line-height: 1.75;
    font-weight: 500;
    color: var(--wh-heading);
}

.wh-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
    margin: 0 0 18px;
    font-size: 13px;
    color: var(--wh-muted);
}

.wh-meta i {
    color: var(--wh-gold-dark);
    margin-right: 4px;
}

.wh-divider {
    border: 0;
    border-top: 1px solid var(--wh-border);
    margin: 28px 0;
    opacity: 1;
}

/* ---------- Buttons ---------- */
.wh-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 24px;
    border-radius: var(--wh-radius-pill);
    border: 1px solid transparent;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    transition: background .18s ease, color .18s ease, border-color .18s ease;
}

.wh-btn-navy {
    background: var(--wh-navy);
    color: #fff;
}

.wh-btn-navy:hover,
.wh-btn-navy:focus {
    background: var(--wh-navy-mid);
    color: #fff;
}

.wh-btn-gold {
    background: var(--wh-gold);
    color: var(--wh-navy);
}

.wh-btn-gold:hover,
.wh-btn-gold:focus {
    background: var(--wh-gold-light);
    color: var(--wh-navy);
}

.wh-btn-outline {
    background: transparent;
    border-color: var(--wh-border-strong);
    color: var(--wh-navy);
}

.wh-btn-outline:hover,
.wh-btn-outline:focus {
    border-color: var(--wh-navy);
    color: var(--wh-navy);
}

.wh-btn-block {
    display: flex;
    width: 100%;
}

/* Bootstrap buttons follow the brand too */
.btn-primary {
    --bs-btn-bg: var(--wh-navy);
    --bs-btn-border-color: var(--wh-navy);
    --bs-btn-hover-bg: var(--wh-navy-mid);
    --bs-btn-hover-border-color: var(--wh-navy-mid);
    --bs-btn-active-bg: var(--wh-navy-dark);
    --bs-btn-active-border-color: var(--wh-navy-dark);
    --bs-btn-disabled-bg: var(--wh-navy);
    --bs-btn-disabled-border-color: var(--wh-navy);
    --bs-btn-focus-shadow-rgb: 21, 57, 90;
}

.btn-outline-primary {
    --bs-btn-color: var(--wh-navy);
    --bs-btn-border-color: var(--wh-navy);
    --bs-btn-hover-bg: var(--wh-navy);
    --bs-btn-hover-border-color: var(--wh-navy);
    --bs-btn-active-bg: var(--wh-navy-dark);
    --bs-btn-active-border-color: var(--wh-navy-dark);
}

/* ---------- Forms ---------- */
.form-control,
.form-select {
    border-color: var(--wh-border-strong);
    border-radius: var(--wh-radius-sm);
    color: var(--wh-heading);
}

.form-control:focus,
.form-select:focus,
.form-check-input:focus {
    border-color: var(--wh-gold);
    box-shadow: 0 0 0 .2rem rgba(206, 170, 77, .25);
}

.form-check-input:checked {
    background-color: var(--wh-navy);
    border-color: var(--wh-navy);
}

.form-label {
    font-weight: 600;
    color: var(--wh-heading);
}

/* 16px inputs stop iOS from zooming in on focus */
@media (max-width: 767.98px) {

    .form-control,
    .form-select,
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="tel"],
    input[type="number"],
    select,
    textarea {
        font-size: 16px;
    }
}

/* ---------- Bootstrap cards ---------- */
.card {
    --bs-card-border-color: var(--wh-border);
    --bs-card-border-radius: var(--wh-radius);
    --bs-card-inner-border-radius: calc(var(--wh-radius) - 1px);
    --bs-card-cap-bg: var(--wh-surface-alt);
    box-shadow: var(--wh-shadow);
}

.card-header {
    font-weight: 700;
    color: var(--wh-heading);
}

/* ---------- Tables ---------- */
.table {
    --bs-table-color: var(--wh-text);
    --bs-table-border-color: var(--wh-border);
}

.table thead th {
    color: var(--wh-heading);
    font-weight: 700;
    white-space: nowrap;
}

.wh-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* ---------- Modals ---------- */
.modal-content {
    border: 0;
    border-radius: var(--wh-radius);
    box-shadow: 0 24px 60px rgba(21, 57, 90, .25);
}

@media (max-width: 575.98px) {
    .modal-dialog {
        margin: var(--wh-gutter);
    }
}

/* ---------- Footer ---------- */
#footer.wh-footer {
    background: var(--wh-navy-dark);
    color: rgba(255, 255, 255, .72);
    font-size: 14px;
    padding: 0;
}

#footer.wh-footer .wh-footer-top {
    padding: 40px 0 28px;
    display: grid;
    gap: 28px;
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    #footer.wh-footer .wh-footer-top {
        grid-template-columns: 1.4fr 1fr 1fr;
        gap: 40px;
    }
}

#footer.wh-footer .wh-footer-brand .wh-brand {
    margin-bottom: 16px;
}

#footer.wh-footer .wh-footer-tagline {
    margin: 0;
    font-family: var(--wh-font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--wh-gold);
}

#footer.wh-footer h4 {
    margin: 0 0 12px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.6px;
    text-transform: uppercase;
    color: #fff;
}

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

#footer.wh-footer li {
    margin: 0 0 8px;
}

#footer.wh-footer a {
    color: rgba(255, 255, 255, .72);
    text-decoration: none;
    transition: color .16s ease;
}

#footer.wh-footer a:hover {
    color: var(--wh-gold);
}

#footer.wh-footer .wh-footer-contact a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    overflow-wrap: anywhere;
}

#footer.wh-footer .wh-footer-contact i {
    color: var(--wh-gold);
}

#footer.wh-footer .wh-footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, .1);
    padding: 18px 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    font-size: 13px;
}

#footer.wh-footer .wh-footer-social {
    display: flex;
    gap: 10px;
}

#footer.wh-footer .wh-footer-social a {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, .08);
    color: #fff;
    transition: background .18s ease, transform .18s ease;
}

#footer.wh-footer .wh-footer-social a:hover {
    background: var(--brand, var(--wh-gold));
    transform: translateY(-2px);
}

#footer.wh-footer .wh-footer-social svg {
    width: 15px;
    height: 15px;
    fill: currentColor;
}

@media (max-width: 575.98px) {
    #footer.wh-footer .wh-footer-bottom {
        flex-direction: column-reverse;
        text-align: center;
    }
}

/* ---------- Back to top ---------- */
.back-to-top {
    background: var(--wh-navy) !important;
    border-radius: 50% !important;
}

.back-to-top:hover {
    background: var(--wh-gold) !important;
}

/* Form pages wrap their content in <section class="wh-page"> —
   drop the template's generic 60px section padding at the top. */
section.wh-page {
    padding-top: 0;
    overflow: visible;
}

/* Rich-text content saved from the admin editor often carries inline fonts
   (Times, 11px…) — keep it in the site's typography. */
.wh-prose [style*="font-family"],
.wh-prose font {
    font-family: inherit !important;
}

.wh-prose [style*="font-size"],
.wh-prose font[size] {
    font-size: inherit !important;
}

.wh-prose [style*="width"]:not(img):not(iframe) {
    max-width: 100% !important;
}

.wh-prose table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
}

/* Article pages: long titles read better in sentence case */
.wh-head-article h1 {
    text-transform: none;
    letter-spacing: .2px;
    line-height: 1.3;
    max-width: 860px;
    margin-left: auto;
    margin-right: auto;
}

@media (min-width: 768px) {
    .wh-head-article h1 {
        font-size: 1.75rem;
    }
}

/* ---------- Logo lockup (layouts/brand.blade.php) ---------- */
.wh-brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    flex: 0 0 auto;
    min-width: 0;
    text-decoration: none;
    color: var(--wh-navy);
}

.wh-brand:hover {
    color: var(--wh-navy);
}

.wh-brand-mark {
    flex: 0 0 auto;
    display: block;
    height: 54px;
}

.wh-brand-mark img {
    display: block;
    height: 100%;
    width: auto;
}

.wh-brand-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding-left: 11px;
}

.wh-brand-name {
    font-family: var(--wh-font-heading);
    font-size: 21px;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -.2px;
    color: var(--wh-navy);
    white-space: nowrap;
}

.wh-brand-tag {
    margin-top: 3px;
    font-family: var(--wh-font-heading);
    font-size: 11.5px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 1.6px;
    text-transform: uppercase;
    color: var(--wh-gold-dark);
    white-space: nowrap;
}

/* On dark backgrounds the emblem sits on a white tile */
.wh-brand-light .wh-brand-mark {
    height: 58px;
    padding: 6px 8px;
    background: #fff;
    border-radius: 12px;
}

.wh-brand-light .wh-brand-name {
    color: #fff;
}

.wh-brand-light .wh-brand-tag {
    color: var(--wh-gold);
}

/* Desktop header: logo, links and Donate on one row. The header may run a
   little wider than page content so the full menu fits. */
@media (min-width: 992px) {
    #header>.container,
    #topbar>.container {
        max-width: calc(1240px + 2 * var(--wh-gutter));
    }

    #navbar>ul>li {
        padding-left: 15px;
    }

    #navbar>ul .jett_navbar {
        font-size: 16px !important;
        font-weight: 700;
    }

    #header .navbar {
        margin-left: 12px;
    }

    #header .wh-donate-form {
        margin-left: auto;
        padding-left: 20px;
    }
}

@media (min-width: 992px) and (max-width: 1199.98px) {
    #navbar>ul>li {
        padding-left: 9px;
    }

    #navbar>ul .jett_navbar {
        font-size: 14.5px !important;
    }

    #header .navbar {
        margin-left: 4px;
    }

    #navbar>ul .nav-more>a i {
        font-size: 21px !important;
    }

    #header .wh-donate-form {
        padding-left: 12px;
    }

    #header .donate_button {
        padding: 4px 20px;
        font-size: 15px;
    }
}

@media (min-width: 992px) and (max-width: 1199.98px) {
    #header .wh-brand {
        gap: 9px;
    }

    #header .wh-brand-mark {
        height: 44px;
    }

    #header .wh-brand-text {
        padding-left: 9px;
    }

    #header .wh-brand-name {
        font-size: 17px;
    }

    #header .wh-brand-tag {
        font-size: 9.5px;
        letter-spacing: 1px;
    }
}

@media (max-width: 767.98px) {
    .wh-brand {
        gap: 8px;
    }

    .wh-brand-mark {
        height: 42px;
    }

    .wh-brand-text {
        padding-left: 8px;
    }

    .wh-brand-name {
        font-size: 16px;
    }

    .wh-brand-tag {
        margin-top: 2px;
        font-size: 9px;
        letter-spacing: .9px;
    }
}

@media (max-width: 359.98px) {
    #header .container {
        gap: 8px !important;
    }

    .wh-brand {
        gap: 6px;
    }

    .wh-brand-mark {
        height: 34px;
    }

    .wh-brand-text {
        padding-left: 6px;
    }

    .wh-brand-name {
        font-size: 13px;
    }

    .wh-brand-tag {
        font-size: 7.5px;
        letter-spacing: .4px;
    }

    .wh-donate-mobile {
        padding: 7px 12px !important;
        font-size: 13px !important;
    }

    #header .mobile-nav-toggle {
        width: 36px !important;
        height: 36px !important;
        font-size: 24px !important;
    }
}
