/* ==========================================================================
   National Library Service — public site
   Palette taken from nls.nls.mw: gold #fba700, cyan #00b3e6,
   heading navy #4b567d, post-title navy #273f5b and body grey #666.
   ========================================================================== */

:root {
    --navy: #4b567d;
    --navy-deep: #273f5b;
    --navy-soft: #5d6a8f;
    --blue: #273f5b;
    --blue-dark: #4b567d;
    --sky: #62a3f7;
    --gold: #fba700;
    --gold-dark: #d98f00;
    --cream: #f7f8fb;
    --cream-deep: #e9edf5;
    --paper: #ffffff;
    --ink: #666666;
    --ink-soft: #4b567d;
    --muted: #666666;
    --muted-light: #c9d2e3;
    --line: #e2e7ec;
    --line-dark: rgba(255, 255, 255, 0.14);
    --success: #00753a;
    --danger: #b42318;
    --radius: 16px;
    --radius-lg: 22px;
    --shadow-sm: 0 2px 10px rgba(39, 63, 91, 0.06);
    --shadow-md: 0 14px 40px rgba(39, 63, 91, 0.1);
    --shadow-lg: 0 28px 70px rgba(39, 63, 91, 0.18);
    --font-sans: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
    --font-serif: Georgia, "Times New Roman", "Palatino Linotype", serif;
    --container: 1200px;
}

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

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

body {
    margin: 0;
    font-family: var(--font-sans);
    font-size: 16.5px;
    line-height: 1.65;
    color: var(--ink);
    background: var(--paper);
    overflow-x: hidden;
}

body.site {
    display: flex;
    min-height: 100vh;
    flex-direction: column;
}

body.site > main {
    flex: 1 0 auto;
}

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

a {
    color: var(--blue);
    text-decoration-thickness: 1px;
    text-underline-offset: 0.18em;
}

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

h1, h2, h3, h4 {
    font-family: var(--font-serif);
    font-weight: 700;
    line-height: 1.16;
    color: var(--navy);
    margin: 0 0 0.5em;
    letter-spacing: -0.01em;
}

p {
    margin: 0 0 1.1em;
}

ul, ol {
    margin: 0 0 1.1em;
    padding-left: 1.25em;
}

button {
    font: inherit;
}

:focus-visible {
    outline: 3px solid var(--gold);
    outline-offset: 3px;
    box-shadow: 0 0 0 1px var(--navy-deep);
}

::selection {
    background: var(--gold);
    color: var(--navy-deep);
}

.container {
    width: min(100% - 48px, var(--container));
    margin-inline: auto;
}

.container.narrow {
    width: min(100% - 48px, 860px);
}

.sr-only {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    top: -100px;
    left: 16px;
    z-index: 200;
    padding: 12px 20px;
    background: var(--navy);
    color: #fff;
    border-radius: 0 0 10px 10px;
    font-weight: 600;
    text-decoration: none;
}

.skip-link:focus {
    top: 0;
    color: #fff;
}

.icon {
    width: 22px;
    height: 22px;
    flex: none;
}

.icon-xs { width: 15px; height: 15px; }
.icon-sm { width: 18px; height: 18px; }

/* --------------------------------------------------------------- buttons */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 13px 22px;
    border: 1.5px solid transparent;
    border-radius: 999px;
    font-family: var(--font-sans);
    font-size: 0.94rem;
    font-weight: 650;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.16s ease, background 0.16s ease, color 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
    white-space: nowrap;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-sm {
    padding: 9px 16px;
    font-size: 0.84rem;
}

.btn-lg {
    padding: 16px 28px;
    font-size: 1rem;
}

.btn-primary {
    background: var(--gold);
    border-color: var(--gold);
    color: var(--navy-deep);
}

.btn-primary:hover {
    background: var(--gold-dark);
    border-color: var(--gold-dark);
    color: var(--navy-deep);
    box-shadow: 0 10px 24px rgba(251, 167, 0, 0.32);
}

.btn-accent {
    background: #00b3e6;
    border-color: #00b3e6;
    color: #12263d;
}

.btn-accent:hover {
    background: #009bc7;
    border-color: #009bc7;
    color: #061a2e;
    box-shadow: 0 10px 26px rgba(0, 179, 230, 0.3);
}

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

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

.btn-ghost {
    background: transparent;
    border-color: var(--line);
    color: var(--ink);
}

.btn-ghost:hover {
    border-color: var(--navy);
    color: var(--navy);
}

.btn-ghost-light {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.35);
    color: #fff;
}

.btn-ghost-light:hover {
    background: rgba(255, 255, 255, 0.14);
    border-color: #fff;
    color: #fff;
}

.btn-block {
    width: 100%;
}

.text-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--blue);
    font-weight: 650;
    font-size: 0.93rem;
    text-decoration: none;
}

.text-link:hover {
    color: var(--navy);
    gap: 11px;
}

.text-link:hover .icon {
    transform: translateX(2px);
}

.text-link .icon {
    transition: transform 0.16s ease;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 14px;
    font-family: var(--font-sans);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--blue);
}

.eyebrow::before {
    content: "";
    width: 26px;
    height: 2px;
    background: var(--gold);
}

.eyebrow-light {
    color: #e7d3a8;
}

/* --------------------------------------------------------- utility bar */

.utility-bar {
    background: var(--navy-deep);
    color: #e3e8f1;
    font-size: 0.8rem;
}

.utility-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: 40px;
}

.utility-links,
.utility-actions {
    display: flex;
    align-items: center;
    gap: 22px;
}

.utility-links a,
.utility-hours {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #d5dceb;
    text-decoration: none;
}

.utility-links a:hover {
    color: #fff;
}

.utility-links .icon {
    color: var(--sky);
}

.utility-staff {
    color: #d5dceb;
    text-decoration: none;
}

.utility-staff:hover {
    color: #fff;
}

.utility-join {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 999px;
    background: var(--gold);
    color: var(--navy-deep) !important;
    font-weight: 700;
    text-decoration: none;
}

.utility-join:hover {
    background: var(--gold-dark);
}

/* ------------------------------------------------------------- masthead */

.masthead {
    position: sticky;
    top: 0;
    z-index: 60;
    background: rgba(255, 255, 255, 0.98);
    border-bottom: 1px solid var(--line);
    transition: box-shadow 0.2s ease;
}

.masthead.is-scrolled {
    box-shadow: 0 10px 30px rgba(8, 30, 52, 0.1);
}

.masthead-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    min-height: 86px;
}

.brand {
    flex: none;
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.brand-logo {
    height: 64px;
    width: auto;
    max-width: 240px;
    object-fit: contain;
}

.primary-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
}

.nav-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 0.87rem;
    font-weight: 650;
    color: var(--ink-soft);
    text-decoration: none;
    white-space: nowrap;
}

.nav-link:hover {
    color: var(--navy-deep);
    background: #f7f8fb;
}

.nav-link.is-active {
    color: var(--navy-deep);
}

.nav-link.is-active::after {
    content: "";
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 2px;
    height: 3px;
    border-radius: 3px;
    background: var(--gold);
}

/* Dropdown menus (E-Resources, Public Relations) */
.nav-item {
    position: relative;
    display: flex;
    align-items: center;
}

.nav-item.has-submenu > .nav-link {
    padding-right: 6px;
}

.nav-sub-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 32px;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--ink-soft);
    cursor: pointer;
}

.nav-sub-toggle:hover {
    background: #f7f8fb;
    color: var(--navy-deep);
}

.nav-sub-toggle .icon {
    transition: transform 0.16s ease;
}

.nav-item.is-open > .nav-sub-toggle .icon,
.nav-item:focus-within > .nav-sub-toggle .icon,
.nav-item:hover > .nav-sub-toggle .icon {
    transform: rotate(180deg);
}

.nav-submenu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    z-index: 90;
    display: none;
    min-width: 240px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    box-shadow: var(--shadow-md);
}

.nav-item:hover > .nav-submenu,
.nav-item:focus-within > .nav-submenu,
.nav-item.is-open > .nav-submenu {
    display: block;
}

.nav-submenu a {
    display: block;
    padding: 10px 14px;
    border-radius: 8px;
    color: var(--navy-deep);
    font-size: 0.86rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.nav-submenu a:hover {
    background: #f7f8fb;
    color: var(--navy-deep);
}

.nav-submenu a[aria-current="page"] {
    background: #fff4dd;
    color: var(--navy-deep);
}

.nav-search-link {
    color: var(--muted);
}

.nav-cta {
    margin-left: 8px;
}

.masthead-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: #fff;
    color: var(--navy);
    cursor: pointer;
    transition: background 0.16s ease, border-color 0.16s ease;
}

.icon-btn:hover {
    background: #f7f8fb;
    border-color: #c9d2e3;
}

.nav-toggle,
.search-toggle {
    display: none;
}

.search-panel {
    border-top: 1px solid var(--line);
    background: #fff;
    padding: 18px 0 22px;
}

.search-form {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 8px 8px 18px;
    border: 1.5px solid var(--line);
    border-radius: 999px;
    background: #f7f8fb;
}

.search-form > .icon {
    color: var(--muted);
}

.search-form input[type="search"] {
    flex: 1;
    min-width: 0;
    border: 0;
    background: transparent;
    font: inherit;
    font-size: 1rem;
    color: var(--ink);
    padding: 10px 0;
}

.search-form input:focus {
    outline: none;
}

.search-form:focus-within {
    border-color: var(--blue);
    box-shadow: 0 0 0 4px rgba(0, 179, 230, 0.16);
}

/* ------------------------------------------------------------ flash */

.flash-stack {
    margin-top: 20px;
}

.flash {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    margin-bottom: 10px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: #fff;
    box-shadow: var(--shadow-sm);
    font-size: 0.94rem;
}

.flash-success {
    border-color: #b9e0ca;
    background: #f1faf5;
    color: #145c38;
}

.flash-error {
    border-color: #f0c1bc;
    background: #fdf3f2;
    color: #8a1d14;
}

.flash-info {
    border-color: #c3d9f0;
    background: #f3f8fd;
    color: #174d7a;
}

.flash-close {
    margin-left: auto;
    display: inline-flex;
    padding: 4px;
    border: 0;
    background: transparent;
    color: inherit;
    opacity: 0.65;
    cursor: pointer;
}

.flash-close:hover {
    opacity: 1;
}

/* --------------------------------------------------------------- hero */

.hero {
    position: relative;
    overflow: hidden;
    padding: 78px 0 110px;
    background:
        radial-gradient(circle at 82% 18%, rgba(98, 163, 247, 0.26), transparent 42%),
        radial-gradient(circle at 8% 90%, rgba(251, 167, 0, 0.16), transparent 38%),
        linear-gradient(135deg, var(--navy-deep), var(--navy) 58%, var(--navy-soft));
    color: #fff;
}

.hero-pattern {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: linear-gradient(to bottom, #000, transparent 88%);
    pointer-events: none;
}

.hero-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1.02fr 0.98fr;
    gap: 62px;
    align-items: center;
}

.hero-copy {
    animation: rise 0.7s ease both;
}

.hero-copy .eyebrow {
    color: var(--gold);
}

.hero h1 {
    margin: 0 0 22px;
    font-size: clamp(2.5rem, 5vw, 4.2rem);
    line-height: 1.04;
    color: #fff;
    max-width: 15ch;
}

.hero-lead {
    max-width: 56ch;
    margin-bottom: 30px;
    font-size: 1.08rem;
    line-height: 1.7;
    color: #dfe6f1;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 42px;
}

.hero-stats {
    display: flex;
    align-items: stretch;
    gap: 0;
    margin: 0;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.16);
    max-width: 460px;
}

.hero-stats > div {
    padding: 0 26px;
}

.hero-stats > div:first-child {
    padding-left: 0;
}

.hero-stats > div + div {
    border-left: 1px solid rgba(255, 255, 255, 0.16);
}

.hero-stats dt {
    margin-bottom: 2px;
    font-size: 0.69rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--gold);
    font-weight: 700;
}

.hero-stats dd {
    margin: 0;
    font-family: var(--font-serif);
    font-size: 1.3rem;
    color: #fff;
}

.hero-visual {
    position: relative;
    animation: rise 0.8s 0.1s ease both;
}

.hero-photo {
    position: relative;
    margin: 0;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255, 255, 255, 0.16);
    aspect-ratio: 4 / 3;
    background: var(--navy-soft);
}

.hero-photo::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(39, 63, 91, 0.78), transparent 52%);
}

.hero-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 80% center;
}

.hero-photo figcaption {
    position: absolute;
    z-index: 2;
    left: 22px;
    right: 22px;
    bottom: 18px;
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #e7eef5;
}

.hero-note {
    position: absolute;
    z-index: 3;
    left: -34px;
    bottom: 42px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    width: min(310px, 82%);
    padding: 16px 18px;
    border-radius: 14px;
    background: #fff;
    color: var(--ink);
    box-shadow: var(--shadow-md);
}

.hero-note-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    flex: none;
    border-radius: 50%;
    background: #fff4dd;
    color: var(--navy-deep);
}

.hero-note strong {
    display: block;
    font-size: 0.9rem;
    color: var(--navy);
}

.hero-note span:not(.hero-note-icon) {
    display: block;
    font-size: 0.79rem;
    line-height: 1.45;
    color: var(--muted);
}

.hero-badge {
    position: absolute;
    top: -18px;
    right: -14px;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 150px;
    height: 150px;
    padding: 12px;
    border-radius: 50%;
    background: var(--gold);
    color: var(--navy-deep);
    text-align: center;
    line-height: 1.15;
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.26);
    transform: rotate(6deg);
}

.hero-badge span {
    font-size: 0.55rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-badge strong {
    font-family: var(--font-serif);
    font-size: 0.9rem;
    margin: 3px 0;
}

@keyframes rise {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --------------------------------------------------------- quick access */

.quick-access {
    position: relative;
    z-index: 5;
    margin-top: -52px;
}

.quick-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.quick-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 22px 22px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
    color: var(--ink);
    text-decoration: none;
    box-shadow: var(--shadow-md);
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.quick-card:hover {
    transform: translateY(-4px);
    border-color: #c9d2e3;
    color: var(--ink);
    box-shadow: var(--shadow-lg);
}

.quick-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    flex: none;
    border-radius: 12px;
    background: #fff4dd;
    color: var(--navy-deep);
}

.quick-text {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.quick-text strong {
    font-family: var(--font-serif);
    font-size: 1.06rem;
    color: var(--navy);
    line-height: 1.25;
}

.quick-text span {
    font-size: 0.83rem;
    line-height: 1.45;
    color: var(--muted);
}

.quick-arrow {
    margin-left: auto;
    align-self: center;
    width: 18px;
    height: 18px;
    color: var(--muted);
    flex: none;
}

.quick-card:hover .quick-arrow {
    color: var(--blue);
}

/* ------------------------------------------------------------- sections */

.section {
    padding: 88px 0;
}

.section-tinted {
    background: var(--cream);
}

.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 32px;
    margin-bottom: 40px;
}

.section-head h2 {
    margin: 0;
    font-size: clamp(1.9rem, 3.2vw, 2.65rem);
}

.section-intro {
    max-width: 460px;
    margin: 0 0 4px;
    font-size: 0.96rem;
    line-height: 1.65;
    color: var(--muted);
}

.section-link {
    flex: none;
    margin-bottom: 6px;
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

.service-card {
    position: relative;
    padding: 30px 26px 26px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
    overflow: hidden;
}

.service-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 26px;
    right: 26px;
    height: 3px;
    border-radius: 0 0 4px 4px;
    background: var(--gold);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.25s ease;
}

.service-card:hover {
    transform: translateY(-4px);
    border-color: #d5e0e9;
    box-shadow: var(--shadow-md);
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    margin-bottom: 20px;
    border-radius: 14px;
    background: #fff4dd;
    color: var(--navy-deep);
}

.service-card h3 {
    margin: 0 0 10px;
    font-size: 1.22rem;
}

.service-card p {
    margin-bottom: 18px;
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--muted);
}

.service-card .text-link {
    font-size: 0.84rem;
}

/* --------------------------------------------------------- librarian */

.message-grid {
    display: grid;
    grid-template-columns: 0.82fr 1.18fr;
    gap: 60px;
    align-items: center;
}

.message-photo {
    position: relative;
}

.message-photo::before {
    content: "";
    position: absolute;
    inset: 18px -18px -18px 18px;
    border: 2px solid var(--gold);
    border-radius: var(--radius-lg);
    z-index: 0;
}

.message-photo img {
    position: relative;
    z-index: 1;
    width: 100%;
    aspect-ratio: 4 / 4.5;
    object-fit: cover;
    object-position: center 12%;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.message-photo-label {
    position: absolute;
    z-index: 2;
    left: 18px;
    bottom: 18px;
    padding: 12px 18px;
    border-radius: 10px;
    background: rgba(39, 63, 91, 0.9);
    color: #fff;
    backdrop-filter: blur(6px);
}

.message-photo-label strong {
    display: block;
    font-size: 0.9rem;
}

.message-photo-label span {
    display: block;
    font-size: 0.74rem;
    color: #d5dceb;
}

.message-copy h2 {
    font-size: clamp(1.8rem, 3.1vw, 2.55rem);
    margin-bottom: 24px;
    max-width: 22ch;
}

.message-copy blockquote {
    margin: 0 0 24px;
    padding: 0 0 0 22px;
    border-left: 3px solid var(--gold);
}

.message-copy blockquote p {
    font-size: 1.02rem;
    line-height: 1.72;
    color: var(--ink-soft);
}

.message-copy blockquote p:last-child {
    margin-bottom: 0;
}

.message-signature {
    margin: 0;
    padding-top: 20px;
    border-top: 1px solid var(--cream-deep);
}

.message-signature strong {
    display: block;
    font-family: var(--font-serif);
    font-size: 1.12rem;
    color: var(--navy);
}

.message-signature span {
    font-size: 0.83rem;
    color: var(--muted);
}

/* --------------------------------------------------------- post cards */

.post-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.post-card {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    overflow: hidden;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.post-card:hover {
    transform: translateY(-4px);
    border-color: #d5e0e9;
    box-shadow: var(--shadow-md);
}

.post-card-media {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #e9edf5;
}

.post-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.post-card:hover .post-card-media img {
    transform: scale(1.04);
}

.post-card-media.is-placeholder {
    background:
        radial-gradient(circle at 72% 20%, rgba(251, 167, 0, 0.26), transparent 42%),
        linear-gradient(135deg, var(--navy), var(--navy-soft));
}

.post-card-mark {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: rgba(255, 255, 255, 0.55);
}

.post-card-mark .icon {
    width: 50px;
    height: 50px;
}

.post-card-cat {
    position: absolute;
    left: 14px;
    bottom: 12px;
    padding: 5px 11px;
    border-radius: 999px;
    background: rgba(39, 63, 91, 0.9);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    backdrop-filter: blur(4px);
}

.post-card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 22px 22px 24px;
}

.post-card-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
    margin-bottom: 10px;
    font-size: 0.73rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--muted);
}

.post-card-title {
    margin: 0 0 10px;
    font-size: 1.27rem;
    line-height: 1.28;
}

.post-card-title a {
    color: var(--navy-deep);
    text-decoration: none;
}

.post-card-title a:hover {
    color: var(--blue);
}

.post-card-excerpt {
    margin-bottom: 18px;
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--muted);
}

.post-card-body .text-link {
    margin-top: auto;
    font-size: 0.85rem;
}

/* ------------------------------------------------------ hours & faq */

.visit-grid {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 64px;
    align-items: start;
}

.hours-card {
    position: relative;
    padding: 44px 40px;
    border-radius: var(--radius-lg);
    background:
        radial-gradient(circle at 90% 10%, rgba(98, 163, 247, 0.22), transparent 50%),
        linear-gradient(135deg, var(--navy-deep), var(--navy));
    color: #fff;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.hours-card::after {
    content: "";
    position: absolute;
    right: -44px;
    bottom: -44px;
    width: 180px;
    height: 180px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 50%;
}

.hours-card h2 {
    margin: 0 0 24px;
    color: #fff;
    font-size: 2rem;
}

.hours-line {
    margin: 0 0 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 0.98rem;
    color: #e2ecf5;
}

.hours-line:last-of-type {
    border-bottom: 0;
    margin-bottom: 26px;
}

.faq-block h2 {
    margin-bottom: 24px;
    font-size: 2rem;
}

.faq-item {
    border-bottom: 1px solid var(--line);
}

.faq-item summary {
    position: relative;
    padding: 17px 44px 17px 0;
    font-family: var(--font-serif);
    font-size: 1.08rem;
    font-weight: 700;
    color: var(--navy);
    cursor: pointer;
    list-style: none;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: "+";
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    font-family: var(--font-sans);
    font-size: 1.4rem;
    font-weight: 400;
    color: var(--blue);
    line-height: 1;
}

.faq-item[open] summary::after {
    content: "–";
}

.faq-item p {
    margin: 0 0 18px;
    font-size: 0.92rem;
    color: var(--muted);
}

/* ------------------------------------------------------------ cta band */

.cta-band {
    position: relative;
    overflow: hidden;
    padding: 64px 0;
    background:
        radial-gradient(circle at 88% 30%, rgba(251, 167, 0, 0.2), transparent 34%),
        linear-gradient(120deg, var(--navy-soft), var(--navy-deep));
    color: #fff;
}

.cta-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

.cta-inner h2 {
    margin: 0 0 8px;
    color: #fff;
    font-size: clamp(1.8rem, 3vw, 2.5rem);
}

.cta-inner p {
    margin: 0;
    max-width: 56ch;
    color: #dfe6f1;
    font-size: 0.96rem;
}

.cta-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    flex: none;
}

/* --------------------------------------------------------------- footer */

.site-footer {
    background: var(--navy-deep);
    color: #d5dceb;
    font-size: 0.9rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.45fr 0.75fr 0.9fr 1.05fr 1.25fr;
    gap: 34px;
    padding: 68px 0 52px;
}

.footer-logo-card {
    display: inline-block;
    padding: 12px 16px;
    margin-bottom: 20px;
    border-radius: 10px;
    background: #fff;
}

.footer-logo-card img {
    height: 66px;
    width: auto;
}

.footer-brand p {
    max-width: 34ch;
    font-size: 0.86rem;
    line-height: 1.65;
    color: #c9d2e3;
}

.footer-socials {
    display: flex;
    gap: 8px;
    margin-top: 18px;
}

.footer-socials a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 50%;
    color: #e3e8f1;
    transition: background 0.16s ease, color 0.16s ease;
}

.footer-socials a:hover {
    background: var(--gold);
    border-color: var(--gold);
    color: var(--navy-deep);
}

.footer-socials .icon {
    width: 18px;
    height: 18px;
}

.footer-col h3,
.footer-newsletter h3 {
    margin: 4px 0 18px;
    font-family: var(--font-sans);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--gold);
}

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

.footer-col li {
    margin-bottom: 9px;
}

.footer-col a {
    color: #d5dceb;
    text-decoration: none;
}

.footer-col a:hover {
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.footer-contact li {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    line-height: 1.5;
}

.footer-contact .icon {
    margin-top: 3px;
    color: var(--sky);
}

.footer-newsletter p {
    color: #c9d2e3;
    font-size: 0.86rem;
    line-height: 1.6;
    margin-bottom: 16px;
}

.newsletter-row {
    display: flex;
    gap: 8px;
    padding: 6px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
}

.newsletter-row:focus-within {
    border-color: var(--sky);
}

.newsletter-row input {
    flex: 1;
    min-width: 0;
    padding: 8px 12px;
    border: 0;
    background: transparent;
    color: #fff;
    font: inherit;
    font-size: 0.86rem;
}

.newsletter-row input::placeholder {
    color: #aeb9cc;
}

.newsletter-row input:focus {
    outline: none;
}

.newsletter-row .btn {
    width: 40px;
    height: 40px;
    padding: 0;
    flex: none;
}

.form-hint {
    margin: 10px 0 0;
    font-size: 0.75rem;
    color: #aeb9cc;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding: 20px 0;
    font-size: 0.79rem;
    color: #aeb9cc;
}

.footer-bottom-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
}

.footer-bottom p {
    margin: 0;
}

.footer-tagline {
    color: var(--gold);
    letter-spacing: 0.04em;
}

.footer-meta {
    display: flex;
    gap: 16px;
}

.footer-meta a {
    color: #d5dceb;
    text-decoration: none;
}

.footer-meta a:hover {
    color: #fff;
}

.back-to-top {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 70;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 50%;
    background: var(--navy);
    color: #fff;
    box-shadow: var(--shadow-md);
    cursor: pointer;
    transform: rotate(90deg);
}

.back-to-top:hover {
    background: var(--gold);
    color: var(--navy-deep);
}

/* ----------------------------------------------------------- page hero */

.page-hero {
    position: relative;
    overflow: hidden;
    padding: 64px 0 56px;
    background:
        radial-gradient(circle at 85% 20%, rgba(98, 163, 247, 0.22), transparent 42%),
        linear-gradient(120deg, var(--navy-deep), var(--navy) 70%, var(--navy-soft));
    color: #fff;
}

.page-hero::after {
    content: "";
    position: absolute;
    right: -80px;
    top: -80px;
    width: 320px;
    height: 320px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 50%;
}

.page-hero .breadcrumb {
    position: relative;
    z-index: 1;
}

.page-hero h1 {
    position: relative;
    z-index: 1;
    margin: 16px 0 14px;
    color: #fff;
    font-size: clamp(2.2rem, 4.2vw, 3.4rem);
    max-width: 22ch;
}

.page-hero-lead {
    position: relative;
    z-index: 1;
    max-width: 62ch;
    margin: 0;
    color: #cfdfed;
    font-size: 1.02rem;
}

.page-hero-compact {
    padding: 48px 0 44px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
    font-size: 0.78rem;
    letter-spacing: 0.03em;
    color: #c9d2e3;
}

.breadcrumb a {
    color: #e3e8f1;
    text-decoration: none;
}

.breadcrumb a:hover {
    color: #fff;
    text-decoration: underline;
}

.breadcrumb span[aria-hidden] {
    color: #aeb9cc;
}

/* --------------------------------------------------------- archive */

.archive-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 46px;
    align-items: start;
}

.archive-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}

.filter-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 15px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    color: var(--ink-soft);
    font-size: 0.84rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.pill:hover {
    border-color: #c9d2e3;
    color: var(--navy-deep);
    background: #f7f8fb;
}

.pill.is-active {
    background: var(--navy);
    border-color: var(--navy);
    color: #fff;
}

.pill-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 999px;
    background: rgba(39, 63, 91, 0.08);
    font-size: 0.68rem;
    font-weight: 700;
}

.pill.is-active .pill-count {
    background: rgba(255, 255, 255, 0.2);
}

.active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 8px;
    background: #eef2f8;
    color: var(--navy-deep);
    font-size: 0.8rem;
}

.filter-tag a {
    color: var(--muted);
    text-decoration: none;
    font-size: 1rem;
    line-height: 1;
}

.filter-tag a:hover {
    color: var(--danger);
}

.post-grid-archive {
    grid-template-columns: repeat(2, 1fr);
    gap: 22px;
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 38px;
}

.page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: #fff;
    color: var(--ink-soft);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
}

.page-link:hover {
    border-color: var(--navy);
    color: var(--navy);
}

.page-link.is-current {
    background: var(--navy);
    border-color: var(--navy);
    color: #fff;
}

.page-link.is-disabled {
    opacity: 0.4;
    cursor: default;
}

.page-arrow {
    font-size: 1rem;
}

.page-gap {
    padding: 0 4px;
    color: var(--muted);
}

.empty-state {
    padding: 60px 30px;
    border: 1px dashed #c9d2e3;
    border-radius: var(--radius);
    background: #f7f8fb;
    text-align: center;
}

.empty-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 62px;
    height: 62px;
    margin-bottom: 18px;
    border-radius: 50%;
    background: #fff4dd;
    color: var(--navy-deep);
}

.empty-state h2 {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.empty-state p {
    color: var(--muted);
    margin-bottom: 20px;
}

/* ---------------------------------------------------------- sidebar */

.archive-sidebar,
.article-sidebar,
.page-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sidebar-card {
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
}

.sidebar-title {
    margin: 0 0 16px;
    font-size: 1.12rem;
}

.sidebar-search {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sidebar-search input {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid var(--line);
    border-radius: 9px;
    background: #f7f8fb;
    font: inherit;
    font-size: 0.9rem;
}

.sidebar-search input:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(0, 179, 230, 0.16);
}

.sidebar-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sidebar-list li + li {
    border-top: 1px solid #eef2f8;
}

.sidebar-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    color: var(--ink-soft);
    font-size: 0.9rem;
    text-decoration: none;
}

.sidebar-list a:hover,
.sidebar-list a.is-active {
    color: var(--blue);
}

.sidebar-list a.is-active span:first-child {
    font-weight: 700;
}

.sidebar-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 22px;
    padding: 0 6px;
    border-radius: 999px;
    background: #eef2f8;
    color: var(--muted);
    font-size: 0.7rem;
    font-weight: 700;
}

.sidebar-hours {
    background: var(--navy);
    border-color: var(--navy);
    color: #e3e8f1;
}

.sidebar-hours .sidebar-title {
    color: #fff;
}

.sidebar-hours p {
    margin: 0 0 6px;
    font-size: 0.86rem;
    color: #d5dceb;
}

.sidebar-hours p:last-child {
    margin-bottom: 0;
}

.sidebar-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin-bottom: 14px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--gold);
}

.sidebar-cta {
    background: #f7f8fb;
    border-color: #e2e7ec;
}

.sidebar-cta .sidebar-icon {
    background: #fff;
    color: var(--blue);
}

.sidebar-cta p {
    font-size: 0.87rem;
    color: var(--muted);
    margin-bottom: 16px;
}

/* ---------------------------------------------------------- article */

.article-header {
    padding: 46px 0 34px;
    background:
        radial-gradient(circle at 90% 0%, rgba(0, 179, 230, 0.07), transparent 48%),
        #f7f8fb;
    border-bottom: 1px solid var(--line);
}

.article-header-inner {
    max-width: 1000px;
}

.category-chip {
    display: inline-flex;
    padding: 6px 13px;
    margin-bottom: 18px;
    border-radius: 999px;
    background: #fff4dd;
    color: var(--navy-deep);
    font-size: 0.71rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    text-decoration: none;
}

.category-chip:hover {
    background: var(--navy);
    color: #fff;
}

.article-header h1 {
    margin: 0 0 20px;
    font-size: clamp(2.1rem, 4vw, 3.45rem);
    line-height: 1.1;
    max-width: 24ch;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 24px;
    font-size: 0.82rem;
    color: var(--muted);
    margin-bottom: 22px;
}

.article-meta > span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.meta-author {
    color: var(--ink-soft);
    font-weight: 600;
}

.avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--navy);
    color: #fff;
    font-family: var(--font-serif);
    font-size: 0.9rem;
    font-weight: 700;
}

.avatar-sm {
    width: 28px;
    height: 28px;
    font-size: 0.66rem;
    background: #e9edf5;
    color: var(--navy-deep);
}

.article-standfirst {
    max-width: 70ch;
    margin: 0;
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--ink-soft);
}

.draft-note {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 13px;
    margin-bottom: 16px;
    border-radius: 8px;
    background: #fff4d6;
    border: 1px solid #f0d79a;
    color: #7a560c;
    font-size: 0.82rem;
}

.article-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 50px;
    align-items: start;
    padding-top: 44px;
    padding-bottom: 80px;
}

.article-image {
    margin: 0 0 36px;
    border-radius: var(--radius);
    overflow: hidden;
}

.article-image img {
    width: 100%;
    max-height: 580px;
    object-fit: cover;
}

.prose {
    font-size: 1.04rem;
    line-height: 1.78;
    color: var(--ink);
}

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

.prose h2 {
    margin: 2em 0 0.6em;
    font-size: 1.62rem;
    scroll-margin-top: 110px;
}

.prose h3 {
    margin: 1.7em 0 0.5em;
    font-size: 1.28rem;
}

.prose h4 {
    margin: 1.5em 0 0.4em;
    font-size: 1.1rem;
}

.prose p {
    margin-bottom: 1.25em;
}

.prose a {
    color: var(--blue);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

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

.prose .lead {
    font-family: var(--font-serif);
    font-size: 1.28rem;
    line-height: 1.62;
    color: var(--navy);
}

.prose ul,
.prose ol {
    margin: 0 0 1.35em;
    padding-left: 1.4em;
}

.prose li {
    margin-bottom: 0.45em;
}

.prose li::marker {
    color: var(--gold);
}

.prose blockquote {
    margin: 1.8em 0;
    padding: 22px 26px;
    border-left: 4px solid var(--gold);
    border-radius: 0 12px 12px 0;
    background: var(--cream);
    color: var(--navy);
    font-family: var(--font-serif);
    font-size: 1.08rem;
    line-height: 1.65;
}

.prose blockquote p:last-child {
    margin-bottom: 0;
}

.prose img {
    border-radius: 12px;
    margin: 1.5em 0;
}

.prose figure {
    margin: 1.8em 0;
}

.prose figcaption {
    margin-top: 8px;
    font-size: 0.8rem;
    color: var(--muted);
}

.prose table {
    width: 100%;
    margin: 1.6em 0;
    border-collapse: collapse;
    font-size: 0.92rem;
}

.prose th,
.prose td {
    padding: 12px 15px;
    border: 1px solid var(--line);
    text-align: left;
}

.prose thead th {
    background: var(--navy);
    color: #fff;
    font-family: var(--font-sans);
    font-size: 0.8rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.prose tbody tr:nth-child(even) {
    background: #f7f8fb;
}

.prose hr {
    margin: 2.4em 0;
    border: 0;
    border-top: 1px solid var(--line);
}

.prose code {
    padding: 2px 6px;
    border-radius: 5px;
    background: #eef2f8;
    font-size: 0.9em;
}

.prose pre {
    overflow-x: auto;
    padding: 18px;
    border-radius: 10px;
    background: var(--navy-deep);
    color: #e3e8f1;
}

.prose pre code {
    padding: 0;
    background: transparent;
}

/* Buttons embedded in CMS content */
.prose .btn {
    display: inline-flex;
    margin: 4px 6px 4px 0;
    text-decoration: none;
    color: var(--navy-deep);
}

.prose .btn-outline {
    color: var(--navy);
}

.prose .btn-accent {
    color: var(--navy-deep);
}

.article-share {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 44px;
    padding-top: 24px;
    border-top: 1px solid var(--line);
    font-size: 0.82rem;
    color: var(--muted);
}

.article-share > span {
    margin-right: 4px;
    font-weight: 600;
}

.article-share a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 1px solid var(--line);
    border-radius: 50%;
    color: var(--ink-soft);
    text-decoration: none;
}

.article-share a:hover {
    background: var(--navy);
    border-color: var(--navy);
    color: #fff;
}

.article-share .icon {
    width: 17px;
    height: 17px;
}

.share-copy {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 14px;
    margin-left: auto;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    color: var(--ink-soft);
    font-size: 0.8rem;
    cursor: pointer;
}

.share-copy:hover {
    border-color: var(--navy);
    color: var(--navy);
}

.post-nav {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-top: 44px;
}

.post-nav-link {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 12px;
    color: var(--ink);
    text-decoration: none;
    transition: border-color 0.16s ease, background 0.16s ease;
}

.post-nav-link:hover {
    border-color: #c9d2e3;
    background: #f7f8fb;
    color: var(--ink);
}

.post-nav-link > span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}

.post-nav-link strong {
    font-family: var(--font-serif);
    font-size: 1rem;
    line-height: 1.35;
    color: var(--navy);
}

.post-nav-next {
    text-align: right;
}

.post-nav-next > span {
    justify-content: flex-end;
}

.related-section {
    padding-top: 64px;
}

/* --------------------------------------------------- dynamic pages */

.page-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 50px;
    align-items: start;
}

.page-content {
    max-width: 75ch;
}

.page-sidebar {
    position: sticky;
    top: 108px;
}

.sidebar-list-pages a {
    padding: 11px 0;
}

.sidebar-list-pages .icon {
    color: var(--muted);
}

.sidebar-list-pages a:hover .icon {
    color: var(--blue);
}

/* -------------------------------------------------------- contact */

.contact-layout {
    display: grid;
    grid-template-columns: 0.85fr 1.15fr;
    gap: 26px;
    margin-top: 10px;
}

.contact-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    align-content: start;
}

.contact-card {
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #f7f8fb;
}

.contact-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin-bottom: 12px;
    border-radius: 10px;
    background: #fff4dd;
    color: var(--navy-deep);
}

.contact-card h2 {
    margin: 0 0 6px;
    font-family: var(--font-serif);
    font-size: 1rem;
}

.contact-card p {
    margin: 0 0 3px;
    font-size: 0.84rem;
    line-height: 1.5;
    color: var(--muted);
}

.contact-card a {
    color: var(--blue);
    text-decoration: none;
}

.contact-form-card {
    padding: 32px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--shadow-sm);
}

.contact-form-card h2 {
    margin: 0 0 6px;
    font-size: 1.7rem;
}

.form-intro {
    margin-bottom: 22px;
    font-size: 0.9rem;
    color: var(--muted);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

.form-field {
    margin-bottom: 16px;
}

.form-field label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.8rem;
    font-weight: 650;
    color: var(--ink-soft);
}

.req {
    color: var(--danger);
}

.form-field input,
.form-field textarea,
.form-field select {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid var(--line);
    border-radius: 9px;
    background: #f7f8fb;
    font: inherit;
    font-size: 0.93rem;
    color: var(--ink);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-field textarea {
    resize: vertical;
    min-height: 130px;
}

.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(0, 179, 230, 0.16);
    background: #fff;
}

.form-field.has-error input,
.form-field.has-error textarea {
    border-color: #e5a39c;
    background: #fffafa;
}

.field-error {
    margin: 6px 0 0;
    font-size: 0.78rem;
    color: var(--danger);
}

.hp-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.alert {
    display: flex;
    gap: 12px;
    padding: 16px 18px;
    margin: 24px 0;
    border-radius: 10px;
    font-size: 0.9rem;
}

.alert-error {
    border: 1px solid #f0c1bc;
    background: #fdf3f2;
    color: #8a1d14;
}

.alert ul {
    margin: 6px 0 0;
    padding-left: 18px;
}

/* --------------------------------------------------------- search */

.search-page {
    max-width: 960px;
}

.search-form-large {
    padding: 10px 10px 10px 22px;
    box-shadow: var(--shadow-sm);
}

.search-form-large input {
    font-size: 1.05rem;
}

.search-suggestions {
    margin-top: 40px;
}

.search-suggestions h2 {
    font-size: 1.3rem;
    margin-bottom: 16px;
}

.search-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-top: 28px;
}

.search-link-card {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    color: var(--ink);
    text-decoration: none;
    transition: border-color 0.16s ease, transform 0.16s ease;
}

.search-link-card:hover {
    border-color: #c9d2e3;
    transform: translateY(-2px);
    color: var(--ink);
}

.search-link-card > span {
    color: var(--blue);
    margin-bottom: 6px;
}

.search-link-card strong {
    font-family: var(--font-serif);
    color: var(--navy);
    font-size: 1.02rem;
}

.search-link-card small {
    font-size: 0.8rem;
    color: var(--muted);
}

.search-summary {
    margin: 30px 0 28px;
    font-size: 0.92rem;
    color: var(--muted);
}

.search-group {
    margin-bottom: 44px;
}

.search-group > h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
    font-size: 1.4rem;
}

.search-group > h2 span {
    padding: 2px 9px;
    border-radius: 999px;
    background: #eef2f8;
    font-family: var(--font-sans);
    font-size: 0.72rem;
    color: var(--muted);
}

.result-list {
    list-style: none;
    margin: 0;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
}

.result-list li + li {
    border-top: 1px solid var(--line);
}

.result-list a {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 18px 20px;
    color: var(--ink);
    text-decoration: none;
}

.result-list a:hover {
    background: #f7f8fb;
}

.result-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex: none;
    border-radius: 9px;
    background: #fff4dd;
    color: var(--navy-deep);
}

.result-list strong {
    display: block;
    font-family: var(--font-serif);
    font-size: 1.02rem;
    color: var(--navy);
    margin-bottom: 3px;
}

.result-list small {
    display: block;
    font-size: 0.82rem;
    line-height: 1.5;
    color: var(--muted);
}

.result-list > li > a > .icon:last-child {
    margin-left: auto;
    align-self: center;
    color: var(--muted);
}

/* ------------------------------------------------------------ 404 */

.error-section {
    padding: 90px 0 60px;
    background:
        radial-gradient(circle at 80% 20%, rgba(0, 179, 230, 0.08), transparent 40%),
        #f7f8fb;
}

.error-inner {
    max-width: 720px;
    text-align: center;
}

.error-code {
    margin: 0 0 6px;
    font-family: var(--font-serif);
    font-size: clamp(5rem, 13vw, 9rem);
    line-height: 0.9;
    font-weight: 700;
    color: #d5dceb;
    letter-spacing: -0.04em;
}

.error-inner h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 14px;
}

.error-lead {
    max-width: 52ch;
    margin: 0 auto 28px;
    color: var(--muted);
}

.error-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.error-page {
    display: grid;
    place-items: center;
    min-height: 100vh;
    padding: 30px;
    background:
        radial-gradient(circle at 80% 10%, rgba(251, 167, 0, 0.18), transparent 40%),
        linear-gradient(135deg, var(--navy-deep), var(--navy));
}

.error-card {
    width: min(100%, 620px);
    padding: 46px;
    border-radius: 20px;
    background: #fff;
    box-shadow: var(--shadow-lg);
}

.error-logo {
    height: 70px;
    width: auto;
    margin-bottom: 26px;
}

.error-card h1 {
    font-size: clamp(1.7rem, 3vw, 2.3rem);
    margin-bottom: 12px;
}

.error-card p {
    color: var(--muted);
}

.error-card code {
    padding: 2px 6px;
    border-radius: 5px;
    background: #eef2f8;
    font-size: 0.85rem;
}

.error-detail {
    margin-top: 18px;
    padding: 14px;
    border-radius: 8px;
    background: #f7f2f2;
    color: #8a1d14;
    font-size: 0.78rem;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.error-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}

/* --------------------------------------------------------- responsive */

@media (max-width: 1180px) {
    .nav-link {
        padding: 10px 9px;
        font-size: 0.83rem;
    }

    .footer-grid {
        grid-template-columns: 1.4fr 0.8fr 1fr 1.2fr;
    }

    .footer-newsletter {
        grid-column: 1 / -1;
        max-width: 520px;
    }
}

@media (max-width: 1024px) {
    .hero {
        padding: 64px 0 100px;
    }

    .hero-grid {
        gap: 40px;
    }

    .hero-note {
        left: -12px;
    }

    .hero-badge {
        width: 116px;
        height: 116px;
        top: -14px;
        right: -6px;
    }

    .service-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .message-grid,
    .visit-grid {
        gap: 44px;
    }

    .archive-layout,
    .article-layout,
    .page-layout {
        grid-template-columns: minmax(0, 1fr) 290px;
        gap: 32px;
    }

    .nav-cta {
        display: none;
    }
}

@media (max-width: 960px) {
    .utility-hours {
        display: none;
    }

    .nav-toggle,
    .search-toggle {
        display: inline-flex;
    }

    .primary-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        z-index: 80;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 2px;
        margin: 0;
        padding: 14px 24px 22px;
        background: #fff;
        border-top: 1px solid var(--line);
        border-bottom: 1px solid var(--line);
        box-shadow: 0 22px 44px rgba(8, 30, 52, 0.16);
        max-height: calc(100vh - 126px);
        overflow-y: auto;
    }

    .primary-nav.is-open {
        display: flex;
    }

    .nav-item {
        position: relative;
        display: block;
    }

    .nav-item.has-submenu > .nav-link {
        padding-right: 54px;
    }

    .nav-sub-toggle {
        position: absolute;
        top: 6px;
        right: 8px;
        width: 38px;
        height: 38px;
        border-radius: 8px;
    }

    .nav-submenu {
        position: static;
        display: none;
        min-width: 0;
        margin: 0 0 6px 12px;
        padding: 4px 0 4px 12px;
        border: 0;
        border-left: 2px solid var(--line);
        border-radius: 0;
        background: transparent;
        box-shadow: none;
    }

    .nav-item.is-open > .nav-submenu {
        display: block;
    }

    .nav-item:hover > .nav-submenu,
    .nav-item:focus-within > .nav-submenu {
        display: none;
    }

    .nav-item.is-open:hover > .nav-submenu,
    .nav-item.is-open:focus-within > .nav-submenu {
        display: block;
    }

    .nav-submenu a {
        padding: 10px 12px;
        font-size: 0.92rem;
        white-space: normal;
    }

    .nav-submenu a[aria-current="page"] {
        background: #fff4dd;
    }

    .nav-link {
        padding: 13px 12px;
        font-size: 0.95rem;
        border-bottom: 1px solid #f1f4f7;
    }

    .nav-link.is-active::after {
        display: none;
    }

    .nav-search-link {
        display: none;
    }

    .nav-cta {
        display: inline-flex;
        margin: 14px 0 0;
        justify-content: center;
    }

    .masthead-inner {
        min-height: 74px;
    }

    .brand-logo {
        height: 52px;
    }

    .hero-grid {
        grid-template-columns: 1fr;
        gap: 54px;
    }

    .hero-copy {
        max-width: 720px;
    }

    .hero h1 {
        max-width: 18ch;
    }

    .hero-visual {
        max-width: 640px;
    }

    .hero-note {
        left: 18px;
    }

    .quick-grid {
        grid-template-columns: 1fr;
    }

    .quick-access {
        margin-top: -40px;
    }

    .quick-card {
        padding: 18px 20px;
    }

    .message-grid,
    .visit-grid {
        grid-template-columns: 1fr;
    }

    .message-photo {
        max-width: 430px;
    }

    .message-photo img {
        aspect-ratio: 4 / 4;
    }

    .post-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .archive-layout,
    .article-layout,
    .page-layout {
        grid-template-columns: 1fr;
    }

    .archive-sidebar,
    .article-sidebar,
    .page-sidebar {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        position: static;
    }

    .archive-sidebar .sidebar-card:last-child,
    .article-sidebar .sidebar-card:last-child {
        grid-column: 1 / -1;
    }

    .article-header h1 {
        max-width: 30ch;
    }

    .contact-layout {
        grid-template-columns: 1fr;
    }

    .cta-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .footer-grid {
        grid-template-columns: 1.3fr 1fr 1fr;
    }

    .footer-newsletter {
        grid-column: 1 / -1;
    }

    .footer-brand {
        grid-column: 1 / -1;
    }

    .footer-brand p {
        max-width: 52ch;
    }
}

@media (max-width: 720px) {
    body {
        font-size: 16px;
    }

    .container {
        width: min(100% - 36px, var(--container));
    }

    .utility-inner {
        justify-content: center;
    }

    .utility-links {
        gap: 14px;
    }

    .utility-links a span {
        display: none;
    }

    .utility-actions {
        display: none;
    }

    .section {
        padding: 64px 0;
    }

    .section-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
        margin-bottom: 30px;
    }

    .section-intro {
        max-width: none;
    }

    .hero {
        padding: 52px 0 92px;
    }

    .hero h1 {
        font-size: clamp(2.15rem, 8.6vw, 3rem);
        max-width: none;
    }

    .hero-lead {
        font-size: 1rem;
    }

    .hero-actions .btn {
        width: 100%;
    }

    .hero-stats {
        max-width: none;
        justify-content: space-between;
    }

    .hero-stats > div {
        padding: 0 14px;
    }

    .hero-stats dd {
        font-size: 1.08rem;
    }

    .hero-note {
        position: relative;
        left: auto;
        bottom: auto;
        width: 100%;
        margin-top: 14px;
        margin-left: 0;
        max-width: 100%;
    }

    .hero-badge {
        width: 96px;
        height: 96px;
        top: -10px;
        right: 2px;
    }

    .hero-badge strong {
        font-size: 0.7rem;
    }

    .hero-badge span {
        font-size: 0.44rem;
        letter-spacing: 0.06em;
    }

    .message-photo::before {
        inset: 12px -10px -12px 10px;
    }

    .post-grid,
    .post-grid-archive {
        grid-template-columns: 1fr;
    }

    .service-grid {
        grid-template-columns: 1fr;
    }

    .message-copy h2 {
        max-width: none;
    }

    .hours-card {
        padding: 32px 26px;
    }

    .cta-band {
        padding: 48px 0;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 52px 0 40px;
    }

    .footer-brand,
    .footer-newsletter {
        grid-column: auto;
    }

    .footer-bottom-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .archive-sidebar,
    .article-sidebar {
        grid-template-columns: 1fr;
    }

    .article-header {
        padding: 32px 0 26px;
    }

    .article-header h1 {
        font-size: clamp(1.85rem, 7vw, 2.5rem);
    }

    .article-layout {
        padding-top: 32px;
        padding-bottom: 60px;
    }

    .post-nav {
        grid-template-columns: 1fr;
    }

    .post-nav-next {
        text-align: left;
    }

    .post-nav-next > span {
        justify-content: flex-start;
    }

    .contact-cards {
        grid-template-columns: 1fr;
    }

    .contact-form-card {
        padding: 24px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .search-links {
        grid-template-columns: 1fr;
    }

    .search-form {
        flex-wrap: wrap;
        border-radius: 16px;
        padding: 12px;
    }

    .search-form > .icon {
        display: none;
    }

    .search-form input {
        width: 100%;
        flex: 1 0 100%;
        padding: 8px 6px;
    }

    .search-form .btn {
        width: 100%;
    }

    .error-card {
        padding: 30px 24px;
    }

    .page-hero {
        padding: 44px 0 40px;
    }

    .page-hero h1 {
        font-size: clamp(1.9rem, 8vw, 2.7rem);
    }

    .article-share .share-copy {
        margin-left: 0;
    }
}

@media (max-width: 420px) {
    .brand-logo {
        height: 44px;
        max-width: 180px;
    }

    .masthead-inner {
        min-height: 66px;
        gap: 10px;
    }

    .icon-btn {
        width: 38px;
        height: 38px;
    }

    .hero-stats > div {
        padding: 0 10px;
    }

    .hero-stats dt {
        font-size: 0.6rem;
    }

    .hero-stats dd {
        font-size: 0.98rem;
    }

    .pill {
        padding: 7px 12px;
        font-size: 0.79rem;
    }

    .page-link {
        min-width: 38px;
        height: 38px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
}
