/* Nauticapedia - MMBC Design Language
   Colors, fonts, spacing matched to mmbc.bc.ca */

/* Fonts loaded via <link> in header.php for performance */

:root {
    /* Exact MMBC colors */
    --primary: #2E3862;
    --secondary: #5072A3;
    --tertiary: #809CCC;
    --yellow: #E7B421;
    --med-yellow: #937110;
    --red: #8D3D3D;
    --dark-grey: #35363C;
    --med-grey: #4A5353;
    --grey: #6C757D;
    --light-grey: #F4F5F5;
    --grey-green: #B7CDCC;
    --dark-grey-green: #3A4B4A;
    --white: #ffffff;
    --radius: 0.375rem;
    --shadow: 6px 6px 9px rgba(0, 0, 0, 0.2);
    --gap: 2rem;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans', sans-serif;
    background: radial-gradient(circle at top, #e9f3ff 0, #f4f5f7 45%, #f4f5f7 100%);
    color: var(--dark-grey);
    margin: 0;
    padding: 0;
    min-height: 100vh;
    font-size: clamp(14px, 1.5vw, 16px);
    line-height: 1.65;
    overflow-x: hidden;
}

.container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 var(--gap);
}

a {
    color: var(--secondary);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--primary);
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'EB Garamond', Georgia, serif;
    color: var(--primary);
    line-height: 1.25;
}

/* ============================================
   HEADER - MMBC style navy bar
   ============================================ */
.site-header {
    background: var(--primary);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 3000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.main-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
}

.logo {
    color: var(--white);
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo:hover {
    color: var(--white);
}

.logo-anchor {
    font-size: 1.4rem;
    line-height: 1;
}

.logo h1 {
    margin: 0;
    font-family: 'EB Garamond', Georgia, serif;
    font-size: clamp(1.3rem, 2.5vw, 1.7rem);
    font-weight: 700;
    color: var(--white);
    letter-spacing: 0.5px;
}

.nav-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 6px;
    align-items: center;
}

.nav-links a {
    color: rgba(255, 255, 255, 0.85);
    font-family: 'Noto Sans', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: var(--radius);
    transition: all 0.2s;
}

.nav-links a:hover {
    color: var(--white);
    background: rgba(255, 255, 255, 0.1);
}

/* Hover-expand sub-menu (Explore -> Map / Articles / Galleries) */
.nav-has-sub {
    position: relative;
}
.nav-has-sub > .nav-parent {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}
.nav-caret {
    font-size: 0.7em;
    opacity: 0.7;
    transition: transform 0.15s;
}
.nav-has-sub:hover .nav-caret,
.nav-has-sub:focus-within .nav-caret {
    transform: rotate(180deg);
}
.nav-sub {
    position: absolute;
    top: 100%;
    left: 0;
    list-style: none;
    margin: 0;
    padding: 6px 0;
    min-width: 180px;
    background: var(--primary);
    border-radius: var(--radius);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    opacity: 0;
    visibility: hidden;
    transform: translateY(4px);
    transition: opacity 0.15s, transform 0.15s, visibility 0.15s;
    z-index: 200;
}
.nav-has-sub:hover .nav-sub,
.nav-has-sub:focus-within .nav-sub {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.nav-sub li {
    list-style: none;
}
.nav-sub a {
    display: block;
    padding: 8px 18px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.9rem;
    border-radius: 0;
    white-space: nowrap;
}
.nav-sub a:hover {
    background: rgba(255, 255, 255, 0.12);
    color: var(--white);
}

.btn-random {
    background: var(--yellow) !important;
    color: var(--primary) !important;
    padding: 8px 18px !important;
    border-radius: var(--radius) !important;
    font-family: 'Andika', sans-serif !important;
    font-weight: 700 !important;
    font-size: 0.8rem !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-random:hover {
    background: #d4a31d !important;
    color: var(--primary) !important;
}

.btn-donate-nav {
    background: rgba(231, 180, 33, 0.15) !important;
    color: var(--yellow) !important;
    padding: 8px 18px !important;
    border-radius: var(--radius) !important;
    font-family: 'Andika', sans-serif !important;
    font-weight: 700 !important;
    font-size: 0.8rem !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid var(--yellow) !important;
}

.btn-donate-nav:hover {
    background: var(--yellow) !important;
    color: var(--primary) !important;
}

.btn-lang {
    background: rgba(255, 255, 255, 0.15) !important;
    color: var(--white) !important;
    padding: 7px 14px !important;
    border-radius: var(--radius) !important;
    border: 1.5px solid rgba(255, 255, 255, 0.4) !important;
    font-family: 'Andika', sans-serif !important;
    font-weight: 700 !important;
    font-size: 0.78rem !important;
    letter-spacing: 0.5px !important;
    transition: background 0.2s, border-color 0.2s !important;
}

.btn-lang::before {
    content: '\1F310';
    margin-right: 5px;
    font-size: 0.85rem;
}

.btn-lang:hover {
    background: rgba(255, 255, 255, 0.3) !important;
    border-color: rgba(255, 255, 255, 0.7) !important;
}

/* Language dropdown */
.lang-dropdown-wrap {
    position: relative;
}

.lang-dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 6px;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: 0 8px 24px rgba(0,0,0,0.18);
    min-width: 150px;
    padding: 6px 0;
    list-style: none;
    z-index: 1000;
}

.lang-dropdown.open {
    display: block;
}

.lang-dropdown li {
    margin: 0;
    padding: 0;
}

.lang-dropdown a {
    display: block;
    padding: 8px 16px;
    color: var(--dark-grey);
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.15s;
}

.lang-dropdown a:hover {
    background: var(--light-grey);
}

.lang-dropdown a.active {
    background: var(--primary);
    color: var(--white);
}

/* ============================================
   MAIN CONTENT
   ============================================ */
main {
    padding: var(--gap) 0;
    min-height: calc(100vh - 200px);
}


/* ============================================
   HERO SECTION - MMBC landing style
   ============================================ */
.hero {
    text-align: center;
    padding: 0 2rem 5rem;
    background: var(--primary);
    color: var(--white);
    position: relative;
    width: 100%;
}

/* Layered wave banner at top of hero */
.hero-waves-top {
    width: 100%;
    line-height: 0;
    margin-bottom: 2rem;
}

.hero-waves-top svg {
    width: 100%;
    height: auto;
    display: block;
}

.hero-content {
    max-width: 1320px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

/* MMBC-style dark wave overlay at bottom of hero */
.hero::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 200px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 200' preserveAspectRatio='none'%3E%3Cpath fill='%231a2040' d='M0,80 C200,40 400,120 700,160 C900,180 1100,100 1300,60 C1380,45 1420,50 1440,55 L1440,200 L0,200 Z'/%3E%3C/svg%3E") no-repeat bottom center;
    background-size: 100% 100%;
    pointer-events: none;
    z-index: 0;
}

/* White wave that sits below the dark wave for transition to content */
.hero::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 60px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 60' preserveAspectRatio='none'%3E%3Cpath fill='%23ffffff' d='M0,20 Q400,60 720,30 Q1100,0 1440,25 L1440,60 L0,60 Z'/%3E%3C/svg%3E") no-repeat bottom center;
    background-size: 100% 100%;
    pointer-events: none;
    z-index: 1;
}

.hero h2 {
    font-family: 'EB Garamond', Georgia, serif;
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 600;
    margin: 0 0 8px;
    color: var(--white);
}

.hero .hero-tagline {
    font-family: 'EB Garamond', Georgia, serif;
    font-size: clamp(1rem, 2vw, 1.2rem);
    font-style: italic;
    color: var(--grey-green);
    margin: 0 0 6px;
}

.hero p {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.75);
    margin: 0 0 1.5rem;
}

.hero .search-container {
    max-width: 700px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.hero .search-container .btn-random-inline {
    margin-top: 0;
}

.hero .search-box {
    background: var(--white);
    border: none;
    box-shadow: var(--shadow);
    flex: 1;
}

.hero .search-box input {
    color: var(--dark-grey);
}

.hero .search-box input::placeholder {
    color: var(--grey);
}

.hero .search-hint {
    color: rgba(255, 255, 255, 0.5);
}

/* Stats bar inside hero */
.stats-bar {
    display: flex;
    justify-content: center;
    gap: 3rem;
    padding: 1.5rem 0 0;
    margin-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.stat-item {
    text-align: center;
}

.stat-item--link {
    color: inherit;
    text-decoration: none;
    transition: opacity 0.15s ease;
}

.stat-item--link:hover,
.stat-item--link:focus {
    opacity: 0.85;
}

.stat-item--link:hover .stat-label,
.stat-item--link:focus .stat-label {
    color: rgba(255, 255, 255, 0.9);
}

.stat-number {
    font-family: 'EB Garamond', Georgia, serif;
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    font-weight: 700;
    color: var(--yellow);
    display: block;
    line-height: 1.2;
}

.stat-label {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
}

/* ============================================
   SEARCH BOX (non-hero context)
   ============================================ */
.search-container {
    max-width: 600px;
    margin: 0 auto;
}

.search-box {
    display: flex;
    background: var(--white);
    border: 2px solid var(--grey-green);
    border-radius: var(--radius);
    overflow: hidden;
    transition: border-color 0.2s;
}

.search-box:focus-within {
    border-color: var(--secondary);
}

.search-box input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 14px 18px;
    font-size: 0.95rem;
    font-family: 'Noto Sans', sans-serif;
    color: var(--dark-grey);
    outline: none;
}

.search-box input::placeholder {
    color: var(--grey);
}

.search-box button {
    background: var(--yellow);
    color: var(--primary);
    border: none;
    padding: 14px 24px;
    font-family: 'Andika', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: background 0.2s;
}

.search-box button:hover {
    background: #d4a31d;
}

.search-hint {
    margin-top: 12px;
    color: var(--grey);
    font-size: 0.82rem;
}

/* ============================================
   SECTION HEADERS - MMBC separator style
   ============================================ */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin: 2.5rem 0 1.25rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid var(--grey-green);
}

.section-header h3 {
    font-family: 'EB Garamond', Georgia, serif;
    font-size: clamp(1.2rem, 2.5vw, 1.5rem);
    font-weight: 600;
    margin: 0;
    color: var(--primary);
    letter-spacing: 0.02em;
}

.section-header a {
    font-size: 0.82rem;
    color: var(--secondary);
    font-weight: 500;
    font-family: 'Noto Sans', sans-serif;
    letter-spacing: 0.02em;
}

.section-header a:hover {
    color: var(--primary);
}

/* ============================================
   VESSEL GRID - CARDS with MMBC shadow style
   ============================================ */
.vessel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: var(--gap);
}

.vessel-card {
    background: var(--white);
    border-radius: 14px;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.vessel-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.14);
}

.vessel-card a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.vessel-card-image {
    aspect-ratio: 4/3;
    background: var(--light-grey);
    overflow: hidden;
    position: relative;
}

.vessel-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.vessel-card:hover .vessel-card-image img {
    transform: scale(1.05);
}

.vessel-card-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--light-grey) 0%, var(--grey-green) 100%);
    color: var(--secondary);
    font-size: 2.5rem;
}

.vessel-card-info {
    padding: 12px 14px;
}

.vessel-card-info h4 {
    margin: 0 0 4px;
    font-family: 'EB Garamond', Georgia, serif;
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vessel-card-meta {
    display: flex;
    gap: 8px;
    font-size: 0.78rem;
    color: var(--grey);
    flex-wrap: wrap;
    align-items: center;
}

.vessel-card-meta span {
    white-space: nowrap;
}

.vessel-type-badge {
    background: var(--primary);
    color: var(--white);
    padding: 2px 8px;
    border-radius: var(--radius);
    font-size: 0.68rem;
    font-weight: 700;
    font-family: 'Andika', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* ============================================
   VESSEL CARD — OVERLAY STYLE (browse page)
   ============================================ */
.vessel-grid-overlay .vessel-card-image {
    aspect-ratio: 4/3;
    position: relative;
}

.vessel-grid-overlay .vessel-card-image::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 55%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.75) 0%, transparent 100%);
    pointer-events: none;
}

.vessel-grid-overlay .vessel-card a {
    position: relative;
    display: block;
    height: 100%;
}

.vessel-grid-overlay .vessel-card-image {
    height: 100%;
}

.vessel-grid-overlay .vessel-card-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 12px 14px;
    z-index: 2;
}

.vessel-grid-overlay .vessel-card-info h4 {
    color: var(--white);
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
    margin-bottom: 4px;
    white-space: normal;
}

.vessel-grid-overlay .vessel-card-meta {
    color: rgba(255, 255, 255, 0.85);
    flex-wrap: wrap;
}

.vessel-grid-overlay .vessel-card-meta span {
    color: rgba(255, 255, 255, 0.85);
    white-space: normal;
}

.vessel-grid-overlay .vessel-type-badge {
    background: rgba(255, 255, 255, 0.2) !important;
    color: var(--white) !important;
    backdrop-filter: blur(4px);
    white-space: normal !important;
}

.vessel-grid-overlay .vessel-card-placeholder {
    font-size: 2rem;
    color: rgba(255, 255, 255, 0.5);
    background: linear-gradient(135deg, #2e3862 0%, #3d4a7a 100%);
}

/* ============================================
   BIOGRAPHY CARD OVERRIDES
   ============================================ */
.bio-grid .vessel-card-image {
    aspect-ratio: 3/4;
}

.bio-grid .vessel-card-meta span {
    white-space: normal;
}

.bio-grid .vessel-card-image {
    position: relative;
}

.bio-grid .vessel-card-image img {
    object-position: center 20%;
    filter: contrast(1.12) brightness(0.9) grayscale(1) saturate(0);
    image-rendering: -webkit-optimize-contrast;
    -webkit-backface-visibility: hidden;
}

.bio-grid .vessel-card:hover .vessel-card-image img {
    filter: contrast(1.05) brightness(0.95) grayscale(0);
}

.bio-grid .vessel-card-image::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, transparent 100%);
    pointer-events: none;
}

.bio-grid .vessel-card a {
    position: relative;
    display: block;
    height: 100%;
}

.bio-grid .vessel-card-image {
    height: 100%;
}

.bio-grid .vessel-card-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 14px 14px 12px;
    z-index: 2;
    color: var(--white);
}

.bio-grid .vessel-card-info h4 {
    color: var(--white);
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
    margin-bottom: 4px;
}

.bio-grid .vessel-card-meta {
    color: rgba(255, 255, 255, 0.85);
}

.bio-grid .vessel-card-meta span {
    color: rgba(255, 255, 255, 0.85);
}

.bio-grid .vessel-type-badge {
    background: rgba(255, 255, 255, 0.2) !important;
    color: var(--white) !important;
    backdrop-filter: blur(4px);
}

.bio-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #2e3862 0%, #3d4a7a 100%);
    /* Lowered opacity so the biographical snippet behind the initials
       reads more clearly. The serif initials are still visible as a
       decorative archival marker, but no longer compete with the text. */
    color: rgba(255, 255, 255, 0.35);
    font-family: 'EB Garamond', Georgia, serif;
    font-size: 2.2rem;
    font-weight: 600;
    letter-spacing: 2px;
}

/* ============================================
   BROWSE PAGE
   ============================================ */
.browse-header {
    margin-bottom: 16px;
}

.browse-description {
    font-family: 'Noto Sans', sans-serif;
    font-size: 0.9rem;
    color: #555;
    margin: 14px 0 20px;
    max-width: 100%;
    line-height: 1.6;
}

.browse-header h2 {
    font-family: 'EB Garamond', Georgia, serif;
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    margin: 0;
    color: var(--primary);
}

.results-count {
    color: var(--grey);
    font-size: 0.82rem;
    font-weight: 400;
    font-family: 'Noto Sans', sans-serif;
    margin-left: 12px;
}

.browse-search {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.browse-search .btn-random-inline {
    margin-top: 0;
    padding: 10px 20px;
    white-space: nowrap;
}

.browse-search .search-box {
    max-width: 480px;
    flex: 1;
}

.browse-search .search-box input {
    padding: 10px 14px;
    font-size: 0.85rem;
}

.browse-search .search-box button {
    padding: 10px 20px;
    font-size: 0.8rem;
}

/* ============================================
   FILTERS
   ============================================ */
.filters {
    background: var(--light-grey);
    border-radius: var(--radius);
    padding: 10px 14px;
    margin-bottom: 16px;
    border: 1px solid var(--grey-green);
}

.filters-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px 12px;
    align-items: end;
}

.filter-group {
    min-width: 0;
}

.filter-group label {
    display: block;
    font-size: 0.62rem;
    color: var(--grey);
    margin-bottom: 2px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.filter-group select,
.filter-group input {
    width: 100%;
    background: var(--white);
    border: 1px solid var(--grey-green);
    border-radius: var(--radius);
    padding: 5px 8px;
    color: var(--dark-grey);
    font-size: 0.78rem;
    font-family: 'Noto Sans', sans-serif;
}

.filter-group select:focus,
.filter-group input:focus {
    outline: none;
    border-color: var(--secondary);
}

.more-filters-toggle {
    color: var(--secondary);
    font-size: 0.72rem;
    cursor: pointer;
    align-self: end;
    padding-bottom: 5px;
    white-space: nowrap;
    font-weight: 500;
}

.more-filters-toggle:hover {
    color: var(--primary);
}

.filters-advanced {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--grey-green);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--dark-grey);
    font-size: 0.78rem;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 14px;
    height: 14px;
    cursor: pointer;
    accent-color: var(--primary);
}

.clear-filters-link {
    color: var(--grey);
    font-size: 0.72rem;
    text-decoration: none;
}

.clear-filters-link:hover {
    color: var(--primary);
    text-decoration: underline;
}

/* Active filter chips */
.active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    margin-bottom: 12px;
}

.active-filter-chip {
    display: inline-flex;
    align-items: center;
    background: var(--white);
    border: 1px solid var(--grey-green);
    border-radius: 20px;
    padding: 3px 12px;
    font-size: 0.72rem;
    color: var(--dark-grey);
    text-decoration: none;
    transition: all 0.15s;
}

.active-filter-chip:hover {
    border-color: var(--red);
    color: var(--red);
    background: rgba(141, 61, 61, 0.05);
}

/* ============================================
   BUTTONS - MMBC style
   ============================================ */
.btn {
    padding: 0.625rem 1.25rem;
    border: 0.125rem solid transparent;
    border-radius: var(--radius);
    font-family: 'Andika', sans-serif;
    font-weight: 700;
    cursor: pointer;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.2s;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

.btn-primary:hover {
    background: #232d50;
    border-color: #232d50;
    color: var(--white);
}

.btn-secondary {
    background: var(--white);
    color: var(--primary);
    border-color: var(--primary);
}

.btn-secondary:hover {
    background: var(--primary);
    color: var(--white);
}

/* ============================================
   ALPHABET FILTER
   ============================================ */
.alphabet-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 1.5rem;
}

.alphabet-filter a {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--white);
    color: var(--primary);
    border: 1px solid var(--grey-green);
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.82rem;
    transition: all 0.2s;
}

.alphabet-filter a:hover,
.alphabet-filter a.active {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

/* ============================================
   VESSEL LIST (browse page list view)
   ============================================ */
.vessel-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.vessel-list-item {
    display: block;
    background: var(--white);
    padding: 16px 20px;
    border-radius: var(--radius);
    color: var(--dark-grey);
    transition: all 0.2s;
    border: 1px solid var(--grey-green);
}

.vessel-list-item:hover {
    box-shadow: var(--shadow);
    border-color: var(--secondary);
}

.vessel-list-item h4 {
    margin: 0 0 6px;
    font-family: 'EB Garamond', Georgia, serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary);
}

.vessel-list-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 0.85rem;
    color: var(--grey);
}

/* ============================================
   SINGLE VESSEL PAGE
   ============================================ */

/* Blairmore-style Hero Card */
.vessel-hero-card {
    background: linear-gradient(135deg, #ffffff, #f0f4ff);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    gap: 0;
    margin-bottom: var(--gap);
    border: 1px solid rgba(255, 255, 255, 0.9);
}

.vessel-hero-text {
    padding: 26px 26px 22px 26px;
}

.vessel-hero-kicker {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--secondary);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 6px;
    font-family: 'Andika', sans-serif;
}

.vessel-hero-title {
    font-family: 'EB Garamond', Georgia, serif;
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    margin: 0 0 6px;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: 0.03em;
}

.vessel-hero-subtitle {
    margin: 0 0 16px;
    font-size: 0.92rem;
    color: var(--med-grey);
    font-family: 'EB Garamond', Georgia, serif;
    font-style: italic;
}

.vessel-hero-metadata {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.vessel-hero-metadata span {
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(46, 56, 98, 0.07);
    color: var(--primary);
    font-weight: 500;
    font-size: 0.8rem;
}

.vessel-hero-metadata .wreck-badge {
    background: rgba(141, 61, 61, 0.1);
    color: var(--red);
}

.vessel-hero-summary {
    font-size: 0.92rem;
    color: var(--dark-grey);
    margin: 0;
    line-height: 1.6;
}

.vessel-hero-image-wrap {
    position: relative;
    min-height: 180px;
    max-height: 400px;
    background: var(--light-grey);
    overflow: hidden;
}

.vessel-hero-image-wrap a {
    display: block;
    width: 100%;
    height: 100%;
}

.vessel-hero-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s;
}

.vessel-hero-image-wrap a:hover img {
    transform: scale(1.03);
}

.vessel-hero-placeholder {
    width: 100%;
    height: 100%;
    min-height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--secondary);
    font-size: 4rem;
    background: linear-gradient(135deg, var(--light-grey) 0%, var(--grey-green) 100%);
}

.vessel-photo-credit {
    position: absolute;
    bottom: 10px;
    right: 10px;
    font-size: 0.68rem;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.55);
    color: #f6f6f6;
    backdrop-filter: blur(6px);
}

@media (max-width: 860px) {
    .vessel-hero-card {
        grid-template-columns: 1fr;
    }
    .vessel-hero-image-wrap {
        order: -1;
        max-height: 260px;
    }
    .vessel-hero-text {
        padding: 18px 18px 16px;
    }
}

/* ============================================
   BLAIRMORE-STYLE LAYOUT
   ============================================ */
.vessel-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1.3fr);
    gap: 20px;
    margin-bottom: 26px;
    align-items: start;
}

@media (max-width: 900px) {
    .vessel-layout {
        grid-template-columns: 1fr;
    }
}

/* Story Card */
.vessel-story-card {
    background: var(--white);
    border-radius: 14px;
    padding: 18px 18px 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.02);
    border-left: 6px solid rgba(46, 56, 98, 0.25);
    padding-left: 22px;
    background: linear-gradient(135deg, #ffffff 0%, #f7fbff 100%);
}

.vessel-story-card h2 {
    font-family: 'EB Garamond', Georgia, serif;
    font-size: 1.2rem;
    margin-top: 0;
    margin-bottom: 8px;
    color: var(--primary);
}

.vessel-story-card h3 {
    font-family: 'EB Garamond', Georgia, serif;
    font-size: 1rem;
    margin-top: 18px;
    margin-bottom: 6px;
    color: var(--primary);
}

.vessel-story-card h4 {
    font-family: 'Noto Sans', sans-serif;
    font-size: 0.78rem;
    color: var(--grey);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 14px 0 6px;
    font-weight: 600;
}

.story-block {
    position: relative;
    padding-left: 18px;
    border-left: 2px solid rgba(46, 56, 98, 0.15);
}

.story-paragraph {
    position: relative;
    padding: 8px 0;
    margin: 0 0 10px;
    font-size: 0.92rem;
    line-height: 1.7;
    color: var(--dark-grey);
}

.story-paragraph::before {
    content: "";
    position: absolute;
    left: -22px;
    top: 14px;
    width: 8px;
    height: 8px;
    background: rgba(46, 56, 98, 0.22);
    border-radius: 50%;
}

.story-lead {
    font-weight: 500;
}

.story-narrative p {
    position: relative;
    padding: 8px 0;
    margin: 0 0 10px;
    font-size: 0.92rem;
    line-height: 1.7;
    color: var(--dark-grey);
}

.story-narrative p::before {
    content: "";
    position: absolute;
    left: -22px;
    top: 14px;
    width: 8px;
    height: 8px;
    background: rgba(46, 56, 98, 0.22);
    border-radius: 50%;
}

/* Drop cap */
.dropcap {
    float: left;
    font-size: 2.8rem;
    line-height: 2.2rem;
    padding-right: 5px;
    padding-top: 2px;
    font-weight: 600;
    color: var(--primary);
    font-family: 'EB Garamond', Georgia, serif;
}

/* Sidebar Card */
.vessel-sidebar-card {
    background: var(--white);
    border-radius: 14px;
    padding: 18px 18px 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.02);
    position: sticky;
    top: 80px;
}

.vessel-sidebar-card h2 {
    font-family: 'EB Garamond', Georgia, serif;
    font-size: 1.2rem;
    margin-top: 0;
    margin-bottom: 8px;
    color: var(--primary);
}

.vessel-sidebar-card h3 {
    font-family: 'EB Garamond', Georgia, serif;
    font-size: 1rem;
    margin-top: 18px;
    margin-bottom: 6px;
    color: var(--primary);
}

/* Top-of-page progress bar while a search is submitting — keeps users from
   wondering whether their click did anything on a slow query. */
body.is-searching::before {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--yellow) 50%, var(--primary) 100%);
    background-size: 200% 100%;
    animation: is-searching-slide 1.1s linear infinite;
    z-index: 9999;
}
@keyframes is-searching-slide {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
.search-submit:disabled {
    opacity: 0.7;
    cursor: progress;
}

/* All-Articles pool section on articles.php landing */
.mag-all-articles {
    margin: 48px 0 32px;
}
.mag-all-header {
    border-top: 1px solid rgba(0,0,0,0.08);
    padding-top: 24px;
    margin-bottom: 20px;
}
.mag-all-header h2 {
    font-family: 'EB Garamond', Georgia, serif;
    font-size: 1.75rem;
    margin: 0 0 6px;
    color: var(--primary);
}
.mag-all-count {
    font-size: 0.85rem;
    color: var(--grey);
    margin: 0;
    letter-spacing: 0.02em;
}
.mag-all-pager {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 32px;
    padding-top: 20px;
    border-top: 1px solid rgba(0,0,0,0.06);
}
.mag-pager-link {
    color: var(--primary);
    text-decoration: none;
    font-family: 'Noto Sans', sans-serif;
    font-size: 0.88rem;
    padding: 8px 14px;
    border: 1px solid rgba(0,0,0,0.12);
    border-radius: 4px;
    transition: background 0.15s, color 0.15s;
}
.mag-pager-link:hover {
    background: var(--primary);
    color: #fff;
}
.mag-pager-disabled {
    color: rgba(0,0,0,0.25);
    border-color: rgba(0,0,0,0.06);
    pointer-events: none;
}
.mag-pager-status {
    font-family: 'EB Garamond', Georgia, serif;
    font-size: 0.95rem;
    color: var(--grey);
}

@media (max-width: 500px) {
    .mag-all-pager {
        flex-wrap: wrap;
        gap: 10px;
    }
    .mag-pager-link {
        flex: 1 1 40%;
        text-align: center;
    }
    .mag-all-header h2 { font-size: 1.4rem; }
}

/* "Related on Nauticapedia" — quiet cross-content recommendations on
   the Vessel page, linking out to People / Galleries / Other Vessels /
   Map without dragging the explore-y vibe back into the research view. */
.vessel-connections {
    margin: 36px 0 24px;
    padding: 28px 24px;
    background: #fafafa;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 10px;
}
.vessel-connections-header {
    text-align: center;
    margin-bottom: 22px;
}
.vessel-connections-label {
    display: block;
    font-family: 'Noto Sans', sans-serif;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.22em;
    color: var(--grey);
    margin-bottom: 6px;
}
.vessel-connections-header h3 {
    font-family: 'EB Garamond', Georgia, serif;
    font-size: 1.6rem;
    color: var(--primary);
    margin: 0;
    font-weight: 600;
}
.vessel-connections-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
}
.conn-block {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 8px;
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
}
.conn-block-head {
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    padding-bottom: 10px;
    margin-bottom: 10px;
}
.conn-icon {
    color: var(--yellow);
    font-size: 1rem;
}
.conn-block h4 {
    font-family: 'EB Garamond', Georgia, serif;
    font-size: 1.05rem;
    color: var(--primary);
    margin: 0;
    font-weight: 600;
}
.conn-list {
    list-style: none;
    margin: 0;
    padding: 0;
    flex-grow: 1;
}
.conn-list li { margin-bottom: 8px; }
.conn-list li:last-child { margin-bottom: 0; }
.conn-list a {
    display: flex;
    gap: 10px;
    align-items: center;
    text-decoration: none;
    color: inherit;
    padding: 4px 2px;
    border-radius: 4px;
    transition: background 0.12s;
}
.conn-list a:hover { background: rgba(0, 0, 0, 0.03); }
.conn-thumb {
    width: 38px;
    height: 38px;
    object-fit: cover;
    border-radius: 4px;
    background: #eee;
    flex-shrink: 0;
}
.conn-text {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
    min-width: 0;
}
.conn-text strong {
    font-family: 'EB Garamond', Georgia, serif;
    font-size: 0.92rem;
    color: var(--primary);
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.conn-text em {
    font-style: normal;
    font-size: 0.74rem;
    color: var(--grey);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.conn-more {
    margin-top: 12px;
    padding-top: 8px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    font-family: 'Noto Sans', sans-serif;
    font-size: 0.78rem;
    color: var(--secondary);
    text-decoration: none;
    align-self: flex-start;
}
.conn-more:hover { color: var(--primary); text-decoration: underline; }

/* Map block has no list — it's a single CTA */
.conn-block--map .conn-icon { color: var(--secondary); }
.conn-map-blurb {
    font-family: 'EB Garamond', Georgia, serif;
    font-size: 0.92rem;
    line-height: 1.45;
    color: #444;
    margin: 0 0 12px;
}
.conn-map-cta {
    display: inline-block;
    padding: 8px 16px;
    background: var(--primary);
    color: #fff;
    font-family: 'Noto Sans', sans-serif;
    font-size: 0.82rem;
    font-weight: 500;
    text-decoration: none;
    border-radius: 20px;
    align-self: flex-start;
    margin-top: auto;
}
.conn-map-cta:hover { background: var(--secondary); }

/* Crosslink from the Vessel research page to Explore. Was previously
   a muted underlined link — visitors missed it. Now rendered as a real
   pill button so the discovery path is actually obvious. */
.vessel-explore-link {
    margin: 36px 0 28px;
    text-align: center;
}
.vessel-explore-link a {
    display: inline-block;
    padding: 10px 22px;
    background: var(--primary);
    color: #fff;
    font-family: 'Noto Sans', sans-serif;
    font-size: 0.92rem;
    font-weight: 500;
    text-decoration: none;
    border-radius: 24px;
    transition: background 0.15s, transform 0.1s;
}
.vessel-explore-link a:hover {
    background: var(--secondary);
    transform: translateY(-1px);
}

/* ============================================
   ABOUT US — editorial museum layout
   ============================================ */
.about-shell {
    color: #1a1a1a;
    padding-top: 0;
}

/* Hero banner — full-bleed navy with anchor mark */
.about-hero-banner {
    background: linear-gradient(135deg, var(--primary) 0%, #1f2746 100%);
    color: #fff;
    padding: 80px 24px 96px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.about-hero-banner::before,
.about-hero-banner::after {
    content: '';
    position: absolute;
    width: 360px;
    height: 360px;
    border: 1px solid rgba(231, 180, 33, 0.08);
    border-radius: 50%;
    pointer-events: none;
}
.about-hero-banner::before { top: -180px; left: -180px; }
.about-hero-banner::after  { bottom: -180px; right: -180px; }
.about-hero-inner {
    max-width: 760px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}
.about-hero-mark {
    font-size: 2.4rem;
    color: var(--yellow);
    margin-bottom: 18px;
    line-height: 1;
}
.about-hero-kicker {
    display: inline-block;
    font-family: 'Noto Sans', sans-serif;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.32em;
    color: var(--yellow);
    margin-bottom: 18px;
}
.about-hero-banner h1 {
    font-family: 'EB Garamond', Georgia, serif;
    font-size: clamp(2.6rem, 6vw, 4rem);
    font-weight: 600;
    line-height: 1.05;
    margin: 0 0 20px;
    color: #fff;
}
.about-hero-lede {
    font-family: 'EB Garamond', Georgia, serif;
    font-style: italic;
    font-size: clamp(1.15rem, 2vw, 1.4rem);
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.85);
    max-width: 620px;
    margin: 0 auto 28px;
}
.about-hero-meta {
    font-family: 'Noto Sans', sans-serif;
    font-size: 0.84rem;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.55);
    margin: 0;
}
.about-hero-dot { margin: 0 10px; }

/* Stats strip */
.about-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    max-width: 1080px;
    margin: -48px auto 60px;
    padding: 0 24px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.10);
    position: relative;
    z-index: 2;
}
.about-stat {
    text-align: center;
    padding: 28px 12px;
    border-right: 1px solid rgba(0, 0, 0, 0.06);
}
.about-stat:last-child { border-right: none; }
.about-stat-num {
    display: block;
    font-family: 'EB Garamond', Georgia, serif;
    font-size: clamp(1.8rem, 3vw, 2.6rem);
    line-height: 1;
    color: var(--primary);
    font-weight: 600;
}
.about-stat-label {
    display: block;
    font-family: 'Noto Sans', sans-serif;
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--grey);
    margin-top: 8px;
}

/* Editorial blocks */
.about-block {
    max-width: 1080px;
    margin: 0 auto;
    padding: 32px 24px;
}
.about-block--narrow {
    max-width: 720px;
}
.about-block p {
    font-family: 'EB Garamond', Georgia, serif;
    font-size: 1.12rem;
    line-height: 1.7;
    color: #2a2a2a;
    margin: 0 0 18px;
}
.about-section-label {
    display: block;
    font-family: 'Noto Sans', sans-serif;
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.22em;
    color: var(--grey);
    margin-bottom: 12px;
}
.about-block-heading {
    font-family: 'EB Garamond', Georgia, serif;
    font-size: clamp(1.7rem, 3vw, 2.2rem);
    line-height: 1.15;
    color: var(--primary);
    margin: 0 0 18px;
    font-weight: 600;
}

/* Pull quote */
.about-pullquote {
    font-family: 'EB Garamond', Georgia, serif;
    font-style: italic;
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    line-height: 1.25;
    color: var(--primary);
    border-left: 3px solid var(--yellow);
    padding: 6px 0 6px 22px;
    margin: 0 0 26px;
    quotes: '"' '"';
}
.about-pullquote::before { content: open-quote; margin-right: 4px; opacity: 0.4; }
.about-pullquote::after  { content: close-quote; margin-left: 4px; opacity: 0.4; }

/* Section dividers */
.about-rule {
    max-width: 720px;
    margin: 12px auto;
    border: 0;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    position: relative;
}
.about-rule::after {
    content: '⚓';
    display: block;
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    color: var(--primary);
    padding: 0 14px;
    font-size: 0.95rem;
    opacity: 0.45;
}

/* Curator */
.about-curator-block { padding-top: 40px; padding-bottom: 40px; }
.about-curator-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 40px;
    align-items: start;
    max-width: 880px;
    margin: 0 auto;
}
.about-curator-photo {
    margin: 0;
    text-align: center;
    position: relative;
}
.about-curator-photo > img:first-of-type {
    width: 100%;
    border-radius: 6px;
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.18);
    display: block;
    filter: contrast(1.05);
}
.about-curator-photo figcaption {
    font-family: 'Noto Sans', sans-serif;
    font-size: 0.8rem;
    color: var(--grey);
    margin-top: 12px;
    font-style: italic;
    line-height: 1.45;
}
/* Small contemporary headshot anchored to the bottom-right of the
   historical photo — establishes "then and now" without dominating. */
.about-curator-photo-inset {
    position: absolute;
    width: 86px;
    height: 86px;
    object-fit: cover;
    bottom: 38px;
    right: -18px;
    border-radius: 50%;
    border: 4px solid #fff;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.22);
    background: #fff;
}
@media (max-width: 900px) {
    .about-curator-photo-inset {
        width: 74px; height: 74px;
        bottom: 50px; right: 8px;
    }
}
.about-curator-bio h2 {
    font-family: 'EB Garamond', Georgia, serif;
    font-size: 2rem;
    color: var(--primary);
    margin: 0 0 4px;
    font-weight: 600;
}
.about-curator-role {
    font-family: 'Noto Sans', sans-serif !important;
    font-size: 0.85rem !important;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--grey);
    margin: 0 0 18px !important;
}

/* Volunteer cards */
.about-people-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    max-width: 880px;
    margin: 8px auto 22px;
}
.about-person {
    background: #fafafa;
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    padding: 22px 24px;
}
.about-person h3 {
    font-family: 'EB Garamond', Georgia, serif;
    font-size: 1.25rem;
    color: var(--primary);
    margin: 0 0 2px;
    font-weight: 600;
}
.about-person-role {
    font-family: 'Noto Sans', sans-serif !important;
    font-size: 0.74rem !important;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--grey) !important;
    margin: 0 0 12px !important;
}
.about-person p:not(.about-person-role) {
    font-family: 'EB Garamond', Georgia, serif;
    font-size: 1rem !important;
    line-height: 1.55 !important;
    margin: 0 !important;
    color: #2a2a2a;
}
.about-people-also {
    max-width: 720px;
    margin: 22px auto 0 !important;
    text-align: center;
    color: var(--dark-grey) !important;
    font-size: 1rem !important;
    line-height: 1.6 !important;
}

/* Collection cards */
.about-collection-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    max-width: 1080px;
    margin: 0 auto;
}
.about-coll-card {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 8px;
    padding: 24px 22px;
    text-decoration: none;
    color: inherit;
    transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
    display: block;
}
.about-coll-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.10);
    border-color: var(--yellow);
}
.about-coll-card h3 {
    font-family: 'EB Garamond', Georgia, serif;
    font-size: 1.2rem;
    color: var(--primary);
    margin: 0 0 10px;
    font-weight: 600;
}
.about-coll-card p {
    font-family: 'EB Garamond', Georgia, serif;
    font-size: 0.95rem !important;
    line-height: 1.55 !important;
    color: #444 !important;
    margin: 0 !important;
}

/* Partners */
.about-partners {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    align-items: center;
    margin-top: 32px;
}
.about-partner {
    text-align: center;
    padding: 30px 18px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 8px;
    background: #fafafa;
    text-decoration: none;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
a.about-partner:hover {
    border-color: rgba(0, 0, 0, 0.14);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}
.about-partner img {
    max-height: 140px;
    max-width: 100%;
    margin: 0 auto 18px;
    display: block;
    object-fit: contain;
}
.about-partner span {
    display: block;
    font-family: 'Noto Sans', sans-serif;
    font-size: 0.85rem;
    color: var(--primary);
    line-height: 1.4;
}
.about-partner small {
    color: var(--grey);
    font-size: 0.75rem;
    display: inline-block;
    margin-top: 2px;
}

/* Fineprint + contact */
.about-fineprint h2 {
    font-family: 'EB Garamond', Georgia, serif;
    font-size: 1.5rem;
    color: var(--primary);
    margin: 0 0 14px;
    font-weight: 600;
}
.about-fineprint p {
    font-size: 1rem !important;
    color: #444;
    line-height: 1.65 !important;
}
.about-contact-box {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-top: 28px;
    padding: 24px;
    background: #fafafa;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 8px;
}
.about-contact-label {
    display: block;
    font-family: 'Noto Sans', sans-serif;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--grey);
    margin-bottom: 6px;
}
.about-contact-box a {
    font-family: 'EB Garamond', Georgia, serif;
    font-size: 1.1rem;
    color: var(--secondary);
    text-decoration: none;
}
.about-contact-box a:hover {
    color: var(--primary);
    text-decoration: underline;
}

.about-volunteer-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 10px 88px;
}
.about-volunteer-list li {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 10px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    font-size: 1.02rem;
    line-height: 1.4;
}
.about-volunteer-list li strong {
    color: var(--primary);
    font-weight: 600;
    font-family: 'EB Garamond', Georgia, serif;
    font-size: 1.15rem;
}
.about-volunteer-list li span {
    color: #777;
    font-size: 0.9rem;
    font-style: italic;
    margin-left: 12px;
}

.about-donate-callout {
    margin-top: 32px;
    padding: 22px 26px;
    background: linear-gradient(135deg, #f7f4ec 0%, #f0ead9 100%);
    border-left: 4px solid var(--yellow);
    border-radius: 6px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}
.about-donate-callout p {
    margin: 0;
    font-size: 1rem !important;
    color: #444;
    flex: 1 1 280px;
    line-height: 1.55 !important;
}
.about-donate-btn {
    display: inline-block;
    background: var(--primary);
    color: #fff;
    padding: 10px 20px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: background 0.2s;
}
.about-donate-btn:hover {
    background: var(--secondary);
}

.about-coremind-credit {
    max-width: 720px;
    margin: 48px auto 56px;
    padding: 0 24px;
    text-align: center;
    font-size: 0.85rem;
    color: #888;
}
.about-coremind-credit a {
    color: #555;
    text-decoration: none;
    font-weight: 600;
}
.about-coremind-credit a:hover {
    color: var(--primary);
    text-decoration: underline;
}

.about-placeholder-note {
    max-width: 720px;
    margin: 24px auto 56px;
    padding: 20px 24px;
    border-top: 1px dashed rgba(0, 0, 0, 0.18);
    font-size: 0.82rem;
    color: var(--grey);
    text-align: center;
    font-family: 'EB Garamond', Georgia, serif;
}

@media (max-width: 900px) {
    .about-stats { grid-template-columns: repeat(2, 1fr); }
    .about-stat:nth-child(2) { border-right: none; }
    .about-stat:nth-child(1), .about-stat:nth-child(2) {
        border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    }
    .about-curator-grid { grid-template-columns: 1fr; gap: 24px; }
    .about-curator-photo { max-width: 240px; margin: 0 auto; }
    .about-collection-grid { grid-template-columns: repeat(2, 1fr); }
    .about-partners { grid-template-columns: 1fr; }
    .about-people-grid { grid-template-columns: 1fr; }
    .about-contact-box { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
    .about-hero-banner { padding: 60px 20px 80px; }
    .about-stats { grid-template-columns: 1fr; margin-top: -32px; }
    .about-stat { border-right: none; border-bottom: 1px solid rgba(0, 0, 0, 0.06); }
    .about-stat:last-child { border-bottom: none; }
    .about-block { padding: 28px 20px; }
    .about-collection-grid { grid-template-columns: 1fr; }
}

/* Vessel Data — research-grade table.
   Plain labels, tight rows, gaps explicit. The "vital core" the Research
   Associates asked for: every field shown, em-dash where data is missing.
   Compact .key-facts-grid styles kept below for the person.php infobox. */
.vd-section {
    font-family: 'Noto Sans', sans-serif;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--grey);
    margin: 18px 0 4px;
    padding: 6px 0 4px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.12);
    font-weight: 600;
}
.vd-section:first-of-type { margin-top: 4px; }

.vd-table {
    width: 100%;
    border-collapse: collapse;
    font-family: 'Noto Sans', sans-serif;
    font-size: 0.82rem;
    margin: 0;
    table-layout: fixed;
}
.vd-table tr { border-bottom: 1px solid rgba(0, 0, 0, 0.05); }
.vd-table tr:last-child { border-bottom: none; }
.vd-table th,
.vd-table td {
    padding: 5px 6px;
    text-align: left;
    vertical-align: top;
    line-height: 1.35;
    word-break: break-word;
}
.vd-table th {
    width: 46%;
    font-weight: 500;
    color: var(--grey);
    font-size: 0.78rem;
    letter-spacing: 0;
    text-transform: none;
    white-space: normal;
    padding-right: 8px;
}
.vd-table td {
    color: #1a1a1a;
    font-weight: 400;
}
.vd-table tr.vd-empty td { color: rgba(0, 0, 0, 0.35); }
.vd-no-data {
    color: rgba(0, 0, 0, 0.3);
    font-weight: 400;
}
.vd-table a {
    color: var(--secondary);
    text-decoration: underline;
    text-decoration-color: rgba(0, 0, 0, 0.15);
}
.vd-table a:hover {
    color: var(--primary);
    text-decoration-color: currentColor;
}
@media (max-width: 640px) {
    .vd-table { font-size: 0.78rem; }
    .vd-table th, .vd-table td { padding: 5px 4px; }
}

/* person.php still uses .key-facts-grid — kept for that page */
.key-facts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 10px 14px;
    margin-top: 6px;
}
.fact { font-size: 0.82rem; }
.fact-label {
    display: block;
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--grey);
    margin-bottom: 2px;
    font-weight: 600;
}
.fact-value { font-weight: 500; color: var(--dark-grey); }
.fact-value a { color: var(--secondary); }
.fact-value a:hover { color: var(--primary); text-decoration: underline; }

/* Names / Registry list */
.names-list {
    list-style: none;
    padding-left: 0;
    margin: 4px 0;
    font-size: 0.82rem;
}

.names-list li {
    padding-left: 16px;
    position: relative;
    margin-bottom: 4px;
    color: var(--dark-grey);
}

.names-list li::before {
    content: "\2022";
    position: absolute;
    left: 0;
    color: var(--secondary);
    font-size: 0.78rem;
    top: 1px;
}

/* Sidebar text */
.sidebar-text {
    font-size: 0.82rem;
    color: var(--dark-grey);
    margin: 4px 0;
}

.sidebar-references {
    font-size: 0.78rem;
    color: var(--grey);
    line-height: 1.5;
    margin: 4px 0;
}

/* Pills */
.pill-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 14px;
}

.pill {
    font-size: 0.68rem;
    padding: 4px 9px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.03);
    color: var(--grey);
}

/* View mode toggle pills */
.pill-toggle {
    cursor: pointer;
    border: 1.5px solid var(--tertiary);
    background: var(--white);
    color: var(--secondary);
    font-size: 0.78rem;
    padding: 6px 16px;
    font-family: 'Noto Sans', sans-serif;
    font-weight: 500;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.pill-toggle:hover {
    background: var(--light-grey);
    border-color: var(--secondary);
}

.pill-toggle.pill-active {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

.pill-row-hero {
    margin-top: 18px;
    margin-bottom: 4px;
}

/* Cite button */
.pill-cite {
    cursor: pointer;
    border: 1.5px solid var(--yellow);
    background: var(--white);
    color: var(--med-yellow);
    font-size: 0.78rem;
    padding: 6px 16px;
    border-radius: 999px;
    font-family: 'Noto Sans', sans-serif;
    font-weight: 600;
    transition: background 0.2s, color 0.2s;
}

.pill-cite:hover {
    background: var(--yellow);
    color: var(--white);
}

/* Citation modal */
.cite-modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.cite-modal-inner {
    background: var(--white);
    border-radius: 12px;
    padding: 2rem;
    max-width: 640px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.cite-modal-inner h3 {
    font-family: 'EB Garamond', Georgia, serif;
    font-size: 1.4rem;
    color: var(--primary);
    margin: 0 0 1.2rem;
}

.cite-close {
    position: absolute;
    top: 12px; right: 16px;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--grey);
    line-height: 1;
}

.cite-close:hover { color: var(--dark-grey); }

.cite-format {
    margin-bottom: 1.2rem;
    position: relative;
}

.cite-format label {
    display: block;
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--secondary);
    margin-bottom: 4px;
}

.cite-text {
    background: var(--light-grey);
    padding: 12px 14px;
    border-radius: var(--radius);
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--dark-grey);
    border: 1px solid rgba(0,0,0,0.06);
}

.cite-text em {
    font-style: italic;
}

.cite-mono {
    font-family: 'Courier New', monospace;
    font-size: 0.78rem;
    white-space: pre-wrap;
}

.cite-copy {
    position: absolute;
    top: 0; right: 0;
    background: var(--secondary);
    color: var(--white);
    border: none;
    padding: 4px 12px;
    border-radius: var(--radius);
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.cite-copy:hover {
    background: var(--primary);
}

/* Detailed mode: force all <details> open and hide the toggle summary */
.view-detailed .anecdotes-details,
.view-detailed .ownership-details {
    display: block;
}

.view-detailed .anecdotes-details > summary,
.view-detailed .ownership-details > summary {
    display: none;
}

.view-detailed .anecdotes-details > .anecdotes-raw,
.view-detailed .ownership-details > .ownership-raw {
    display: block;
}

/* ============================================
   RELATED VESSELS
   ============================================ */
.related-vessels {
    margin-top: 3.38rem;
    padding-top: var(--gap);
    border-top: 2px solid var(--grey-green);
}

.related-vessels h3 {
    font-family: 'EB Garamond', Georgia, serif;
    font-size: 1.4rem;
    margin: 0 0 1.5rem;
    color: var(--primary);
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
}

@media (max-width: 900px) {
    .related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 500px) {
    .related-grid {
        grid-template-columns: 1fr;
    }
}

.related-card {
    display: block;
    position: relative;
    background: var(--white);
    border-radius: 14px;
    overflow: hidden;
    transition: all 0.25s ease;
    color: var(--dark-grey);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.related-card:hover {
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.14);
    transform: translateY(-6px);
    color: var(--dark-grey);
}

.related-image {
    aspect-ratio: 4/3;
    overflow: hidden;
    background: var(--light-grey);
    position: relative;
}

.related-image::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 55%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.75) 0%, transparent 100%);
    pointer-events: none;
}

.related-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.related-placeholder {
    aspect-ratio: 4/3;
    background: linear-gradient(135deg, #2e3862 0%, #3d4a7a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.5);
    font-family: 'EB Garamond', Georgia, serif;
    font-size: 1.8rem;
    font-weight: 600;
    letter-spacing: 2px;
}

.related-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 12px 14px;
    z-index: 2;
}

.related-info h4 {
    font-family: 'EB Garamond', Georgia, serif;
    margin: 0 0 4px;
    font-size: 0.95rem;
    color: var(--white);
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
    color: var(--primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.related-info p {
    margin: 0;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.82rem;
}

/* ============================================
   LIGHTBOX
   ============================================ */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    cursor: pointer;
}

.lightbox-img-container {
    max-width: 95vw;
    max-height: 88vh;
    overflow: auto;
    border-radius: var(--radius);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    cursor: default;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.3) transparent;
}

.lightbox-img-container img {
    width: auto;
    height: auto;
    min-width: 70vw;
    min-height: 60vh;
    max-width: 95vw;
    max-height: 90vh;
    object-fit: contain;
    display: block;
    transform-origin: center center;
    transition: transform 0.15s ease;
    user-select: none;
}

.lightbox-zoom-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    background: rgba(0, 0, 0, 0.5);
    padding: 6px 14px;
    border-radius: 999px;
    backdrop-filter: blur(8px);
}

.lightbox-zoom-btn {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    line-height: 1;
}

.lightbox-zoom-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.lightbox-zoom-level {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.82rem;
    min-width: 40px;
    text-align: center;
    font-weight: 500;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 28px;
    background: none;
    border: none;
    color: #fff;
    font-size: 2.5rem;
    cursor: pointer;
    line-height: 1;
    padding: 4px 12px;
    border-radius: var(--radius);
    transition: background 0.2s;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.15);
}

.lightbox-caption {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    margin-top: 12px;
    text-align: center;
}

/* ============================================
   REFERENCES SECTION
   ============================================ */
.vessel-references {
    margin-top: 2.5rem;
    padding: 1.25rem 1.5rem;
    background: var(--light-grey);
    border-radius: var(--radius);
    border-left: 4px solid var(--grey-green);
}

.vessel-references h3 {
    font-family: 'EB Garamond', Georgia, serif;
    font-size: 1.1rem;
    color: var(--primary);
    margin: 0 0 8px;
}

.references-text {
    font-size: 0.82rem;
    color: var(--med-grey);
    line-height: 1.6;
    margin: 0;
}

/* ============================================
   SPONSOR SECTION
   ============================================ */
.vessel-sponsor {
    margin-top: 2.5rem;
    text-align: center;
    padding: 2rem 1.5rem;
    border: 1px dashed var(--grey-green);
    border-radius: var(--radius);
    background: var(--light-grey);
}

.sponsor-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--grey);
    margin: 0 0 12px;
    font-weight: 600;
}

.sponsor-logos {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 2.5rem;
    margin-bottom: 16px;
}

.sponsor-logo {
    max-width: 180px;
}

.sponsor-logo img {
    max-width: 100%;
    max-height: 70px;
    object-fit: contain;
    filter: grayscale(20%);
    opacity: 0.85;
    transition: all 0.2s;
}

.sponsor-logo img:hover {
    filter: grayscale(0%);
    opacity: 1;
}

.sponsor-cta {
    font-size: 0.78rem;
    color: var(--grey);
    margin: 0;
}

.sponsor-cta a {
    color: var(--secondary);
    font-weight: 500;
}

/* ============================================
   DONATE BAR
   ============================================ */
.vessel-donate-bar {
    margin-top: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    padding: 1.25rem 2rem;
    background: var(--primary);
    border-radius: var(--radius);
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.92rem;
}

.vessel-donate-bar p {
    margin: 0;
}

.btn-donate {
    background: var(--yellow) !important;
    color: var(--primary) !important;
    border-color: var(--yellow) !important;
    padding: 8px 24px !important;
    font-size: 0.85rem !important;
}

.btn-donate:hover {
    background: #d4a31d !important;
}

/* ============================================
   BACK LINK
   ============================================ */
.back-link {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--grey-green);
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.back-link a {
    color: var(--secondary);
    font-weight: 500;
}

.back-link a:hover {
    color: var(--primary);
}

/* Keep Exploring engagement bar */
.keep-exploring {
    margin-top: 2rem;
    padding: 2rem;
    background: linear-gradient(135deg, #f7fbff 0%, #eef3fa 100%);
    border-radius: 16px;
    border: 1px solid rgba(46, 56, 98, 0.08);
}

.keep-exploring h3 {
    font-family: 'EB Garamond', Georgia, serif;
    font-size: 1.2rem;
    color: var(--primary);
    margin: 0 0 1rem;
    text-align: center;
}

.keep-exploring-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.keep-exploring-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 12px;
    background: var(--white);
    border-radius: var(--radius);
    border: 1px solid var(--grey-green);
    text-decoration: none;
    color: var(--primary);
    font-family: 'Noto Sans', sans-serif;
    font-size: 0.78rem;
    font-weight: 600;
    text-align: center;
    transition: all 0.2s;
}

.keep-exploring-card:hover {
    border-color: var(--secondary);
    background: var(--light-grey);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.keep-exploring-icon {
    font-size: 1.5rem;
}

@media (max-width: 768px) {
    .keep-exploring-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Random vessel button (inline next to search) */
.btn-random-inline {
    display: inline-block;
    padding: 10px 22px;
    background: var(--primary);
    color: var(--white) !important;
    border-radius: 6px;
    font-family: 'Andika', sans-serif;
    font-weight: 600;
    font-size: 0.85rem;
    text-decoration: none !important;
    transition: background 0.2s;
    letter-spacing: 0.3px;
    margin-top: 8px;
}

.btn-random-inline:hover {
    background: #232d50;
}

.btn-view-map {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 8px 18px;
    background: var(--primary);
    color: #fff !important;
    border-radius: var(--radius);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s;
}

.btn-view-map:hover {
    background: var(--secondary);
    color: #fff !important;
}

.btn-view-map-inline {
    font-size: 0.45em;
    vertical-align: middle;
    padding: 5px 14px;
    margin-left: 8px;
    position: relative;
    top: -2px;
}

/* Ownership / Anecdotes details */
.ownership-summary,
.anecdotes-summary {
    line-height: 1.7;
}

.ownership-details,
.anecdotes-details {
    margin-top: 12px;
}

.ownership-details summary,
.anecdotes-details summary {
    cursor: pointer;
    color: var(--secondary);
    font-size: 0.88rem;
    padding: 8px 0;
    font-weight: 500;
}

.ownership-details summary:hover,
.anecdotes-details summary:hover {
    color: var(--primary);
}

.ownership-details[open] summary,
.anecdotes-details[open] summary {
    margin-bottom: 12px;
}

.ownership-raw,
.anecdotes-raw {
    font-size: 0.95rem;
    color: var(--dark-text, #2c3e50);
    line-height: 1.7;
    padding: 14px 18px;
    background: transparent;
    border-left: 3px solid var(--primary, #1a3a5c);
    border-radius: 0;
    margin: 8px 0 16px;
}

/* ============================================
   PAGINATION
   ============================================ */
.pagination {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin-top: 3rem;
    flex-wrap: wrap;
}

.pagination a,
.pagination span {
    padding: 8px 14px;
    background: var(--white);
    color: var(--primary);
    border: 1px solid var(--grey-green);
    border-radius: var(--radius);
    font-weight: 500;
    font-size: 0.88rem;
    transition: all 0.2s;
}

.pagination a:hover {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

.pagination .active {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

.pagination .ellipsis {
    background: transparent;
    border-color: transparent;
}

/* ============================================
   MESSAGES
   ============================================ */
.message {
    padding: 16px 20px;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    font-size: 0.92rem;
}

.message-info {
    background: rgba(80, 114, 163, 0.08);
    color: var(--primary);
    border: 1px solid rgba(80, 114, 163, 0.2);
}

.message-error {
    background: rgba(141, 61, 61, 0.08);
    color: var(--red);
    border: 1px solid rgba(141, 61, 61, 0.2);
}

/* ============================================
   LOADING
   ============================================ */
.loading {
    color: var(--grey);
    padding: 20px;
}

.loading::after {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid var(--grey-green);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-left: 8px;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============================================
   FOOTER - MMBC style navy
   ============================================ */
/* ============================================
   SUPPORT + SPONSORS BANNER
   ============================================ */
.site-banner {
    background: linear-gradient(135deg, var(--primary) 0%, #1a2040 100%);
    margin-top: 3rem;
}

.site-banner-inner {
    text-align: center;
    padding: 3rem 2rem 2.5rem;
    max-width: 900px;
    margin: 0 auto;
}

.site-banner-inner h3 {
    font-family: 'EB Garamond', Georgia, serif;
    font-size: clamp(1.4rem, 3vw, 2rem);
    color: var(--white);
    margin: 0 0 12px;
    font-weight: 600;
}

.site-banner-inner > p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.92rem;
    max-width: 600px;
    margin: 0 auto 1.5rem;
    line-height: 1.6;
}

.site-banner-inner .btn-donate {
    font-size: 0.92rem !important;
    padding: 12px 36px !important;
    margin-bottom: 2rem;
}

.banner-sponsors {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.5rem;
}

.banner-sponsors-label {
    text-transform: uppercase;
    letter-spacing: 2.5px;
    font-size: 0.68rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.35);
    margin: 0 0 1.2rem;
}

.banner-sponsors-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 3rem;
    flex-wrap: wrap;
}

.banner-sponsor-logo {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    padding: 16px 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.2s;
}

.banner-sponsor-logo:hover {
    background: var(--white);
    transform: translateY(-2px);
}

.banner-sponsor-logo img {
    max-height: 84px;
    max-width: 240px;
    width: auto;
    display: block;
    object-fit: contain;
}

/* ============================================
   ROTATING SPONSOR BANNER (homepage top)
   Sits between the header and the hero waves.
   ============================================ */
.sponsor-rotator {
    background: var(--primary);
    padding: 14px 1rem 16px;
}
.sponsor-rotator-inner {
    max-width: 1320px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}
.sponsor-rotator-label {
    text-transform: uppercase;
    letter-spacing: 2.5px;
    font-size: 0.62rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.4);
    font-family: 'Noto Sans', sans-serif;
}
/* White logo chip (matches the footer sponsor row); logos crossfade inside it */
.sponsor-rotator-stage {
    position: relative;
    width: 250px;
    height: 84px;
    background: rgba(255, 255, 255, 0.96);
    border-radius: 8px;
}
.sponsor-rotator-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 9px 18px;
    opacity: 0;
    transition: opacity 0.6s ease;
    pointer-events: none;
}
.sponsor-rotator-slide.is-active {
    opacity: 1;
    pointer-events: auto;
}
.sponsor-rotator-slide img {
    max-height: 66px;
    max-width: 210px;
    width: auto;
    object-fit: contain;
}
@media (max-width: 600px) {
    .sponsor-rotator-stage { width: 220px; height: 74px; }
    .sponsor-rotator-slide img { max-height: 58px; max-width: 185px; }
}

/* ============================================
   PROFESSIONAL FOOTER (MMBC-inspired)
   ============================================ */
.site-footer {
    background: var(--primary);
    padding: 0;
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.85rem;
    position: relative;
}

.footer-land {
    font-style: italic;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.4);
    max-width: 720px;
    line-height: 1.6;
    padding: 2rem 1rem;
    margin: 0 auto;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* Land acknowledgment echoed at the very bottom of the page, below the
   copyright, so it's the last thing visitors see. */
.footer-land-bottom {
    font-style: italic;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.55);
    max-width: 720px;
    line-height: 1.6;
    padding: 1.25rem 1rem 1.75rem;
    margin: 0 auto;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2.2fr 1fr 1fr 1fr;
    gap: 2.5rem;
    padding: 2.5rem 0 2rem;
}

.footer-brand h4 {
    font-family: 'EB Garamond', Georgia, serif;
    font-size: 1.5rem;
    color: var(--white);
    margin: 0 0 10px;
    font-weight: 600;
}

.footer-brand p {
    margin: 0 0 10px;
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.5);
}

.footer-contact {
    margin-top: 14px;
}

.footer-contact a {
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.82rem;
}

.footer-col h5 {
    color: var(--white);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 700;
    margin: 0 0 16px;
}

.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-col ul li {
    margin: 0 0 10px;
}

.site-footer a {
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    transition: color 0.2s;
    font-size: 0.84rem;
}

.site-footer a:hover {
    color: var(--yellow);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 1.4rem 0;
    text-align: center;
}

.footer-bottom p {
    margin: 0;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.3);
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
    }

    .footer-brand {
        grid-column: 1 / -1;
    }

    .banner-sponsors-logos {
        gap: 1.2rem;
    }

    .banner-sponsor-logo {
        padding: 12px 16px;
    }

    .banner-sponsor-logo img {
        max-height: 46px;
        max-width: 140px;
    }
}

/* ============================================
   MODERN HOMEPAGE
   ============================================ */
.home-content {
    padding-bottom: 2rem;
}

.home-section {
    margin-bottom: 1rem;
}

/* Museum Intro */
.museum-intro {
    margin: 2.5rem 0 1.5rem;
}

.museum-intro-inner {
    max-width: 780px;
    margin: 0 auto;
    text-align: center;
}

.museum-intro h3 {
    font-family: 'EB Garamond', Georgia, serif;
    font-size: clamp(1.2rem, 2.5vw, 1.6rem);
    color: var(--primary);
    margin: 0 0 12px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.museum-intro p {
    font-size: 0.92rem;
    color: var(--med-grey);
    line-height: 1.75;
    margin: 0;
    font-family: 'EB Garamond', Georgia, serif;
    font-style: italic;
}

/* What You Can Do */
.what-you-can-do {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.wycd-card {
    background: var(--white);
    border-radius: 14px;
    padding: 1.5rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.04);
    border-top: 3px solid var(--secondary);
}

.wycd-card h4 {
    font-family: 'EB Garamond', Georgia, serif;
    font-size: 1.1rem;
    color: var(--primary);
    margin: 0 0 8px;
    font-weight: 600;
}

.wycd-card p {
    font-size: 0.85rem;
    color: var(--med-grey);
    line-height: 1.6;
    margin: 0;
}

@media (max-width: 768px) {
    .what-you-can-do {
        grid-template-columns: 1fr;
    }
}

/* Curated Collections */
.collections-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 16px;
}

.collection-card {
    background: var(--white);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.04);
    transition: all 0.25s ease;
    color: var(--dark-grey);
    display: block;
}

.collection-card:hover {
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
    transform: translateY(-4px);
    color: var(--dark-grey);
}

.collection-card-accent {
    height: 6px;
    background: linear-gradient(90deg, var(--primary), var(--secondary), var(--tertiary));
}

.collection-card-body {
    padding: 1.25rem 1.5rem 1.5rem;
}

.collection-card-body h4 {
    font-family: 'EB Garamond', Georgia, serif;
    font-size: 1.15rem;
    color: var(--primary);
    margin: 0 0 8px;
    font-weight: 600;
}

.collection-card-body p {
    font-size: 0.85rem;
    color: var(--med-grey);
    line-height: 1.6;
    margin: 0 0 12px;
}

.collection-link {
    font-size: 0.82rem;
    color: var(--secondary);
    font-weight: 500;
}

.collection-card:hover .collection-link {
    color: var(--primary);
}

@media (max-width: 768px) {
    .collections-grid {
        grid-template-columns: 1fr;
    }
}

/* Featured Grid - first card large */
.featured-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: auto auto;
    gap: 16px;
}

.featured-card {
    display: block;
    border-radius: 14px;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.04);
    color: var(--dark-grey);
}

.featured-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.14);
    color: var(--dark-grey);
}

.featured-card-large {
    grid-column: 1 / 3;
    grid-row: 1 / 3;
}

.featured-card-image {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 200px;
    overflow: hidden;
    background: var(--light-grey);
}

.featured-card-large .featured-card-image {
    min-height: 100%;
}

.featured-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: contrast(1.05) brightness(0.95);
    display: block;
    transition: transform 0.4s ease;
}

.featured-card:hover .featured-card-image img {
    transform: scale(1.05);
}

.featured-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 40px 16px 14px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    color: white;
}

.featured-card-overlay h4 {
    margin: 0 0 4px;
    font-family: 'EB Garamond', Georgia, serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
}

.featured-card-large .featured-card-overlay h4 {
    font-size: 1.5rem;
}

.featured-card-meta {
    display: flex;
    gap: 8px;
    align-items: center;
    font-size: 0.78rem;
}

.featured-card-meta span {
    color: rgba(255, 255, 255, 0.8);
}

@media (max-width: 900px) {
    .featured-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .featured-card-large {
        grid-column: 1 / -1;
        grid-row: auto;
    }
}

@media (max-width: 500px) {
    .featured-grid {
        grid-template-columns: 1fr;
    }
    .featured-card-large {
        grid-column: auto;
    }
}

/* Modern Category Cards */
.category-grid-modern {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
    margin-top: 16px;
}

.category-card-modern {
    background: var(--white);
    padding: 1.5rem 1.25rem;
    border-radius: 14px;
    text-align: left;
    transition: all 0.25s ease;
    border: 1px solid rgba(0, 0, 0, 0.04);
    color: var(--dark-grey);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    position: relative;
    overflow: hidden;
    border-left: 4px solid var(--secondary);
}

.category-card-modern:hover {
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
    transform: translateY(-4px);
    color: var(--dark-grey);
    border-left-color: var(--primary);
}

.category-card-wreck {
    border-left-color: var(--red);
}

.category-card-wreck:hover {
    border-left-color: #6b2e2e;
}

.category-card-modern h4 {
    margin: 0 0 4px;
    font-family: 'EB Garamond', Georgia, serif;
    color: var(--primary);
    font-size: 1.1rem;
}

.category-card-modern p {
    margin: 0;
    color: var(--grey);
    font-size: 0.78rem;
}

@media (max-width: 900px) {
    .category-grid-modern {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 500px) {
    .category-grid-modern {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Homepage Donate CTA */
/* Explore the Fleet promo */
.explore-promo {
    margin: 2.5rem 0;
}

.explore-promo-inner {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 2.5rem;
    align-items: center;
    background: linear-gradient(135deg, #f7fbff 0%, #eef3fa 100%);
    border-radius: 16px;
    padding: 2.5rem;
    border: 1px solid rgba(46, 56, 98, 0.08);
    box-shadow: 0 8px 30px rgba(46, 56, 98, 0.08);
}

.explore-promo-text h3 {
    font-family: 'EB Garamond', Georgia, serif;
    font-size: clamp(1.4rem, 3vw, 1.8rem);
    color: var(--primary);
    margin: 0 0 12px;
    font-weight: 700;
}

.explore-promo-lead {
    font-size: 1rem;
    color: var(--dark-grey);
    line-height: 1.65;
    margin: 0 0 12px;
    font-family: 'EB Garamond', Georgia, serif;
    font-style: italic;
}

.explore-promo-text p {
    font-size: 0.88rem;
    color: var(--med-grey);
    line-height: 1.6;
    margin: 0 0 18px;
}

.explore-promo-features {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 22px;
}

.explore-promo-feat {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.85rem;
    color: var(--dark-grey);
}

.explore-promo-icon {
    width: 6px;
    height: 6px;
    background: var(--primary);
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 7px;
}

/* Promo photo grid */
.promo-photo-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    border-radius: 12px;
    overflow: hidden;
}

.promo-photo-item {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    background: var(--light-grey);
}

.promo-photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    transition: transform 0.3s, filter 0.3s;
    filter: grayscale(0.3) contrast(1.05);
}

.promo-photo-item:hover img {
    transform: scale(1.08);
    filter: grayscale(0) contrast(1.05);
}

.promo-photo-name {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 4px 6px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    font-size: 0.62rem;
    font-family: 'Noto Sans', sans-serif;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    opacity: 0;
    transition: opacity 0.2s;
}

.promo-photo-item:hover .promo-photo-name {
    opacity: 1;
}

.btn-explore-promo {
    display: inline-block;
    padding: 12px 28px;
    background: var(--primary);
    color: var(--white) !important;
    font-family: 'Andika', sans-serif;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: var(--radius);
    text-decoration: none;
    transition: background 0.2s, transform 0.15s;
    box-shadow: 0 4px 12px rgba(46, 56, 98, 0.2);
}

.btn-explore-promo:hover {
    background: #232d50;
    transform: translateY(-1px);
    color: var(--white) !important;
}

.explore-promo-visual {
    position: relative;
}

.explore-promo-map {
    border-radius: 14px;
    overflow: hidden;
    background: #e8eef5;
    box-shadow: 0 6px 20px rgba(46, 56, 98, 0.12);
    position: relative;
}

.explore-promo-map img {
    width: 100%;
    height: auto;
    display: block;
    min-height: 280px;
    object-fit: cover;
}

.explore-promo-map-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(6px);
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.explore-promo-map-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #2a9d8f;
    animation: liveDot 2s ease-in-out infinite;
}

@keyframes liveDot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

@media (max-width: 768px) {
    .explore-promo-inner {
        grid-template-columns: 1fr;
        padding: 1.5rem;
        gap: 1.5rem;
    }

    .explore-promo-visual {
        order: -1;
    }
}

.home-donate-section {
    margin: 3rem 0 2rem;
    border-radius: 14px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary) 0%, #1a2040 100%);
    box-shadow: 0 10px 30px rgba(46, 56, 98, 0.25);
}

.home-donate-inner {
    text-align: center;
    padding: 3rem 2rem;
}

.home-donate-inner h3 {
    font-family: 'EB Garamond', Georgia, serif;
    font-size: clamp(1.4rem, 3vw, 2rem);
    color: var(--white);
    margin: 0 0 12px;
    font-weight: 600;
}

.home-donate-inner p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.92rem;
    max-width: 600px;
    margin: 0 auto 1.5rem;
    line-height: 1.6;
}

.home-donate-inner .btn-donate {
    font-size: 0.92rem !important;
    padding: 12px 36px !important;
}

/* Homepage Sponsors */
.home-sponsors {
    text-align: center;
    padding: 2rem 0;
}

/* Legacy category cards (kept for browse page) */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.25rem;
    margin-top: 16px;
}

.category-card {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 14px;
    text-align: center;
    transition: all 0.25s ease;
    border: 1px solid rgba(0, 0, 0, 0.04);
    color: var(--dark-grey);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.category-card:hover {
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
    transform: translateY(-4px);
    color: var(--dark-grey);
}

.category-card h4 {
    margin: 0 0 4px;
    font-family: 'EB Garamond', Georgia, serif;
    color: var(--primary);
    font-size: 1.15rem;
}

.category-card p {
    margin: 0;
    color: var(--grey);
    font-size: 0.82rem;
}

/* ============================================
   EXPLORE PAGE - Interactive Card Wall
   ============================================ */
.explore-hero {
    text-align: center;
    margin-bottom: 1.5rem;
}

.explore-hero h2 {
    font-family: 'EB Garamond', Georgia, serif;
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    color: var(--primary);
    margin: 0 0 6px;
}

.explore-hero p {
    color: var(--med-grey);
    font-size: 0.92rem;
    margin: 0;
}

.explore-controls {
    margin-bottom: 1.5rem;
}

.explore-search {
    margin-bottom: 14px;
}

.explore-search input {
    width: 100%;
    max-width: 500px;
    padding: 12px 18px;
    border: 2px solid var(--grey-green);
    border-radius: 14px;
    font-size: 0.95rem;
    font-family: 'Noto Sans', sans-serif;
    color: var(--dark-grey);
    outline: none;
    background: var(--white);
    transition: border-color 0.2s;
}

.explore-search input:focus {
    border-color: var(--secondary);
}

.explore-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.explore-filter-btn {
    padding: 7px 16px;
    border: 1px solid var(--grey-green);
    border-radius: 999px;
    background: var(--white);
    color: var(--dark-grey);
    font-size: 0.8rem;
    font-family: 'Noto Sans', sans-serif;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.explore-filter-btn:hover {
    border-color: var(--secondary);
    color: var(--primary);
}

.explore-filter-btn.active {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

.filter-count {
    font-size: 0.68rem;
    opacity: 0.6;
    margin-left: 4px;
}

.explore-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.explore-action-btn {
    padding: 8px 20px;
    border: 1px solid var(--grey-green);
    border-radius: var(--radius);
    background: var(--white);
    color: var(--primary);
    font-size: 0.82rem;
    font-family: 'Andika', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.2s;
}

.explore-action-btn:hover {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

.explore-results-count {
    font-size: 0.82rem;
    color: var(--grey);
}

/* Card Grid */
.explore-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
    min-height: 200px;
}

.explore-loading {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
    color: var(--grey);
    font-size: 0.92rem;
}

.explore-card {
    display: block;
    background: var(--white);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.04);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    color: var(--dark-grey);
    text-decoration: none;
    animation: cardFadeIn 0.4s ease both;
}

@keyframes cardFadeIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.explore-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.14);
    color: var(--dark-grey);
}

.explore-card-img {
    aspect-ratio: 4/3;
    overflow: hidden;
    background: var(--light-grey);
}

.explore-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.explore-card:hover .explore-card-img img {
    transform: scale(1.06);
}

.explore-card-info {
    padding: 10px 12px 12px;
}

.explore-card-info h4 {
    margin: 0 0 4px;
    font-family: 'EB Garamond', Georgia, serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.explore-card-meta {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
}

.explore-card-meta span {
    font-size: 0.72rem;
    color: var(--grey);
}

.explore-card-type {
    background: var(--primary);
    color: var(--white) !important;
    padding: 1px 7px;
    border-radius: var(--radius);
    font-size: 0.65rem !important;
    font-weight: 700;
    font-family: 'Andika', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.explore-load-more {
    display: flex;
    justify-content: center;
    margin: 2rem 0;
}

@media (max-width: 600px) {
    .explore-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }

    .hero {
        margin-left: -1rem;
        margin-right: -1rem;
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .vessel-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .filters-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .filter-group {
        width: 100%;
    }

    .stats-bar {
        gap: 1.5rem;
        flex-wrap: wrap;
    }
}

@media (max-width: 600px) {
    .main-nav {
        flex-direction: column;
        gap: 12px;
    }

    .nav-links {
        gap: 4px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .vessel-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .category-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .hero {
        padding: 2rem 1rem 1.5rem;
    }
}

/* ============================================
   HAMBURGER MENU (mobile)
   ============================================ */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.6rem;
    cursor: pointer;
    padding: 4px 8px;
    line-height: 1;
}

@media (max-width: 768px) {
    .nav-toggle {
        display: block;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--primary);
        padding: 0 1rem 1rem;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease, padding 0.3s ease;
    }

    .nav-links.open {
        display: flex;
        max-height: 500px;
        padding: 0.5rem 1rem 1rem;
    }

    .nav-links li {
        width: 100%;
    }

    .nav-links a {
        display: block;
        padding: 10px 12px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    /* Mobile: Explore sub-menu collapses inline (no hover) */
    .nav-has-sub {
        position: static;
    }
    .nav-has-sub .nav-caret { display: none; }
    .nav-sub {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        background: rgba(255, 255, 255, 0.06);
        box-shadow: none;
        border-radius: var(--radius);
        margin: 4px 0 0;
        padding: 4px 0;
        min-width: 0;
    }
    .nav-sub a {
        padding: 8px 24px;
        font-size: 0.86rem;
    }

    .lang-dropdown-wrap {
        position: static;
    }

    .lang-dropdown {
        position: static;
        box-shadow: none;
        background: rgba(255, 255, 255, 0.08);
        border-radius: var(--radius);
        margin-top: 4px;
    }

    .lang-dropdown a {
        color: rgba(255, 255, 255, 0.85);
        border-bottom: none;
        padding: 8px 20px;
    }

    .lang-dropdown a:hover {
        background: rgba(255, 255, 255, 0.12);
    }

    .lang-dropdown a.active {
        background: rgba(255, 255, 255, 0.2);
        color: var(--white);
    }

    .main-nav {
        position: relative;
    }
}

/* ============================================
   Breadcrumbs
   ============================================ */
.breadcrumbs {
    font-size: 0.78rem;
    color: var(--grey);
    margin-bottom: 12px;
    font-family: 'Noto Sans', sans-serif;
}
.breadcrumbs a {
    color: var(--secondary);
    text-decoration: none;
}
.breadcrumbs a:hover {
    text-decoration: underline;
}
.breadcrumbs span {
    margin: 0 6px;
    color: var(--grey-green);
}

/* ============================================
   HOMEPAGE - STORIES & ARTICLES SECTION
   ============================================ */
.home-articles-intro {
    max-width: 680px;
    margin: 0 0 1.5rem;
}

.home-articles-intro p {
    color: var(--med-grey);
    font-family: 'EB Garamond', Georgia, serif;
    font-style: italic;
    font-size: 1.02rem;
    line-height: 1.55;
    margin: 0;
}

.home-articles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.home-article-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: var(--dark-grey);
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
    transition: transform 0.25s, box-shadow 0.25s;
    display: flex;
    flex-direction: column;
}

.home-article-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 36px rgba(46, 56, 98, 0.12);
}

.home-article-img {
    aspect-ratio: 16 / 9;
    background-size: cover;
    background-position: center top;
    background-color: var(--light-grey);
    transition: transform 0.6s;
}

.home-article-card:hover .home-article-img {
    transform: scale(1.04);
}

.home-article-body {
    padding: 1.4rem 1.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.home-article-cat {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.8px;
    color: var(--secondary);
    margin-bottom: 10px;
}

.home-article-card h4 {
    font-family: 'EB Garamond', Georgia, serif;
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--primary);
    margin: 0 0 10px;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.home-article-card p {
    font-size: 0.88rem;
    color: var(--grey);
    line-height: 1.55;
    margin: 0 0 auto;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.home-article-meta {
    font-size: 0.75rem;
    color: var(--grey);
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    font-style: italic;
}

@media (max-width: 900px) {
    .home-articles-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   ARTICLES - SEARCH, TOPICS, ACTIONS, DIRECTORY
   ============================================ */

/* Search bar section */
.mag-search-section {
    max-width: 1100px;
    margin: 0 auto 3rem;
    padding: 0 2rem;
}

.mag-search-form {
    display: flex;
    gap: 10px;
    margin-bottom: 1.2rem;
}

.mag-search-form input[type="text"] {
    flex: 1;
    padding: 14px 20px;
    border: 1.5px solid rgba(46, 56, 98, 0.15);
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: 'Noto Sans', sans-serif;
    background: var(--white);
    transition: border-color 0.2s;
}

.mag-search-form input[type="text"]:focus {
    outline: none;
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px rgba(80, 114, 163, 0.12);
}

.mag-search-form button {
    background: var(--primary);
    color: var(--white);
    border: none;
    padding: 14px 28px;
    border-radius: 8px;
    font-family: 'Andika', sans-serif;
    font-weight: 700;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: background 0.2s;
}

.mag-search-form button:hover {
    background: #1a2040;
}

.mag-search-wrap {
    max-width: 1100px;
    margin: 0 auto 2rem;
    padding: 0 2rem;
}

.mag-search-input {
    width: 100%;
    padding: 12px 18px;
    border: 1.5px solid rgba(46, 56, 98, 0.15);
    border-radius: 8px;
    font-size: 0.92rem;
    font-family: 'Noto Sans', sans-serif;
    background: var(--white);
}

.mag-search-input:focus {
    outline: none;
    border-color: var(--secondary);
}

/* Topic chips */
.mag-topics {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 1rem;
}

.mag-topics-label {
    font-size: 0.75rem;
    color: var(--grey);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 700;
    margin-right: 4px;
}

.mag-topic-chip {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 999px;
    background: var(--white);
    border: 1px solid rgba(46, 56, 98, 0.15);
    color: var(--primary);
    font-size: 0.78rem;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.mag-topic-chip:hover {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

.mag-quick-links {
    display: flex;
    gap: 16px;
    font-size: 0.85rem;
}

.mag-quick-links a {
    color: var(--secondary);
    text-decoration: none;
    font-weight: 600;
}

.mag-quick-links a:hover {
    color: var(--primary);
}

/* Article reader action buttons */
.mag-reader-actions {
    display: flex;
    gap: 8px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.mag-action-btn {
    background: var(--white);
    border: 1px solid rgba(46, 56, 98, 0.15);
    padding: 8px 16px;
    border-radius: 6px;
    font-family: 'Noto Sans', sans-serif;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--primary);
    cursor: pointer;
    transition: all 0.15s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.mag-action-btn:hover {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

.mag-action-btn.bookmarked {
    background: var(--yellow);
    color: var(--primary);
    border-color: var(--yellow);
}

.mag-action-icon {
    font-size: 0.9rem;
    line-height: 1;
}

/* Shipbuilders directory */
.mag-builders-list {
    max-width: 1100px;
    margin: 0 auto 3rem;
    padding: 0 2rem;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.mag-builder-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: var(--white);
    border-radius: 8px;
    text-decoration: none;
    color: var(--dark-grey);
    border: 1px solid rgba(0, 0, 0, 0.04);
    transition: all 0.15s;
}

.mag-builder-row:hover {
    background: var(--light-grey);
    border-color: var(--secondary);
    transform: translateX(4px);
}

.mag-builder-name {
    font-family: 'EB Garamond', Georgia, serif;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--primary);
}

.mag-builder-meta {
    display: flex;
    gap: 14px;
    align-items: center;
    font-size: 0.78rem;
    color: var(--grey);
}

.mag-builder-arrow {
    color: var(--secondary);
    font-size: 1rem;
}

/* Authors grid */
.mag-authors-grid {
    max-width: 1100px;
    margin: 0 auto 3rem;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.mag-author-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 20px;
    background: var(--white);
    border-radius: 10px;
    text-decoration: none;
    color: var(--dark-grey);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.2s;
}

.mag-author-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(46, 56, 98, 0.1);
    border-color: var(--secondary);
}

.mag-author-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'EB Garamond', Georgia, serif;
    font-size: 1.5rem;
    font-weight: 700;
    flex-shrink: 0;
}

.mag-author-info h3 {
    font-family: 'EB Garamond', Georgia, serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary);
    margin: 0 0 2px;
}

.mag-author-info span {
    font-size: 0.78rem;
    color: var(--grey);
}

/* Builders promo section */
.mag-builders-promo {
    max-width: 1100px;
    margin: 3rem auto;
    padding: 0 2rem;
}

.mag-builders-promo-inner {
    background: linear-gradient(135deg, var(--primary) 0%, #1a2040 100%);
    border-radius: 14px;
    padding: 3rem 2.5rem;
    color: var(--white);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.mag-builders-promo-inner::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at right, rgba(231, 180, 33, 0.06), transparent 60%);
    pointer-events: none;
}

.mag-builders-promo-text {
    position: relative;
    z-index: 2;
}

.mag-builders-promo-text h2 {
    font-family: 'EB Garamond', Georgia, serif;
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    color: var(--white);
    margin: 10px 0 12px;
    font-weight: 600;
}

.mag-builders-promo-text p {
    color: rgba(255, 255, 255, 0.75);
    font-size: 1rem;
    line-height: 1.6;
    max-width: 640px;
    margin: 0 auto 1.5rem;
    font-family: 'EB Garamond', Georgia, serif;
    font-style: italic;
}

.mag-builders-promo .mag-intro-label {
    color: var(--yellow);
}

.mag-builders-promo .mag-intro-label::before,
.mag-builders-promo .mag-intro-label::after {
    background: var(--yellow);
}

/* Byline name as link */
.mag-reader-byline-name {
    text-decoration: none;
    transition: color 0.15s;
}

.mag-reader-byline-name:hover {
    color: var(--secondary);
}

/* Empty state */
.mag-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--grey);
    font-style: italic;
    font-family: 'EB Garamond', Georgia, serif;
    font-size: 1.05rem;
}

/* Share menu dropdown */
.mag-share-group {
    position: relative;
    display: inline-block;
}

.mag-share-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 6px;
    background: var(--white);
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(0, 0, 0, 0.08);
    min-width: 160px;
    padding: 6px 0;
    z-index: 100;
}

.mag-share-menu.open { display: block; }

.mag-share-menu a {
    display: block;
    padding: 10px 16px;
    color: var(--dark-grey);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: background 0.15s;
}

.mag-share-menu a:hover {
    background: var(--light-grey);
    color: var(--primary);
}

/* Next/previous navigation */
.mag-nav-prev-next {
    max-width: 1100px;
    margin: 3rem auto 0;
    padding: 2.5rem 2rem 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    border-top: 2px solid var(--grey-green);
}

.mag-nav-prev,
.mag-nav-next {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 22px;
    background: var(--white);
    border-radius: 10px;
    text-decoration: none;
    color: var(--dark-grey);
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s, box-shadow 0.2s;
    min-height: 80px;
}

.mag-nav-next { justify-content: flex-end; text-align: right; }
.mag-nav-prev { justify-content: flex-start; }

.mag-nav-prev:hover,
.mag-nav-next:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(46, 56, 98, 0.1);
    border-color: var(--secondary);
}

.mag-nav-arrow {
    font-size: 1.6rem;
    color: var(--secondary);
    flex-shrink: 0;
}

.mag-nav-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.mag-nav-label {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 1.8px;
    color: var(--grey);
    font-weight: 700;
}

.mag-nav-title {
    font-family: 'EB Garamond', Georgia, serif;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--primary);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Mentioned in articles (on vessel/person pages) */
.mentioned-in {
    margin: 3.5rem 0 2rem;
    padding: 2.5rem 0 0;
    border-top: 2px solid var(--grey-green);
}

.mentioned-in-header {
    text-align: center;
    margin-bottom: 1.8rem;
}

.mentioned-in-label {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2.5px;
    color: var(--secondary);
    margin-bottom: 8px;
}

.mentioned-in-header h3 {
    font-family: 'EB Garamond', Georgia, serif;
    font-size: 1.6rem;
    color: var(--primary);
    margin: 0;
    font-weight: 600;
}

.mentioned-in-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
}

.mentioned-article-card {
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    text-decoration: none;
    color: var(--dark-grey);
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}

.mentioned-article-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(46, 56, 98, 0.12);
}

.mentioned-article-img {
    aspect-ratio: 16 / 9;
    background-size: cover;
    background-position: center;
    background-color: var(--light-grey);
}

.mentioned-article-img-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--tertiary);
    background: linear-gradient(135deg, #eef3fa, #dde6f3);
}

.mentioned-article-body {
    padding: 1.1rem 1.3rem 1.2rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.mentioned-article-cat {
    font-size: 0.64rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--secondary);
    margin-bottom: 6px;
}

.mentioned-article-card h4 {
    font-family: 'EB Garamond', Georgia, serif;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--primary);
    margin: 0 0 6px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.mentioned-article-meta {
    font-size: 0.72rem;
    color: var(--grey);
    font-style: italic;
    margin-top: auto;
    padding-top: 8px;
}

@media (max-width: 700px) {
    .mag-nav-prev-next {
        grid-template-columns: 1fr;
    }
}

/* Scroll progress bar */
.article-scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--yellow), #f5c93a);
    z-index: 9999;
    width: 0%;
    transition: width 0.1s;
}

/* Article hero image - wide, centered, breaks out of text column */
.mag-reader-hero {
    max-width: 1100px;
    margin: 1rem auto 3rem;
    padding: 0 2rem;
}

.mag-reader-hero img {
    width: 100%;
    max-height: 540px;
    height: auto;
    /* contain (not cover) so the full subject is visible. cover was
       cropping portrait photos vertically and tall subjects (fish,
       full-body portraits) lost their tops/bottoms. Letterboxing on
       wide containers is the right trade-off here for an archive. */
    object-fit: contain;
    border-radius: 4px;
    display: block;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
}

/* Print styles for articles */
@media print {
    .site-header,
    .site-banner,
    .site-footer,
    .breadcrumbs,
    .back-link,
    .mag-reader-actions,
    .mag-related,
    .mag-search-section,
    .cite-modal,
    .article-scroll-progress,
    .nav-links,
    .nav-toggle,
    .home-articles-grid {
        display: none !important;
    }

    body {
        background: white !important;
        color: black !important;
    }

    .mag-reader {
        max-width: 100% !important;
        padding: 0 !important;
    }

    .mag-reader-header,
    .mag-reader-body {
        max-width: 100% !important;
    }

    .mag-reader-title {
        font-size: 2rem !important;
        color: black !important;
    }

    .mag-reader-body {
        font-size: 11pt !important;
        line-height: 1.6 !important;
        color: black !important;
    }

    .mag-reader-body a {
        color: black !important;
        text-decoration: none !important;
    }

    .mag-reader-body img {
        max-width: 80% !important;
        page-break-inside: avoid;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .mag-search-section,
    .mag-search-wrap,
    .mag-builders-list,
    .mag-authors-grid,
    .mag-builders-promo {
        padding: 0 1.2rem;
    }

    .mag-reader-actions {
        flex-wrap: wrap;
    }
}

/* ============================================
   HOMEPAGE - STORIES & ARTICLES SECTION
   ============================================ */

/* --- Cinematic Hero --- */
.mag-hero {
    position: relative;
    margin: -2rem -2rem 4rem;
    min-height: 600px;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    background: var(--primary);
}

.mag-hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: grayscale(0.3) brightness(0.65);
    transform: scale(1.05);
    transition: transform 8s ease;
}

.mag-hero:hover .mag-hero-bg {
    transform: scale(1.08);
}

.mag-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(26, 32, 64, 0.35) 0%, rgba(26, 32, 64, 0.55) 35%, rgba(26, 32, 64, 0.96) 100%),
        linear-gradient(90deg, rgba(26, 32, 64, 0.4) 0%, transparent 50%);
    z-index: 1;
}

.mag-hero-content {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem 4.5rem;
    width: 100%;
}

.mag-hero-kicker {
    display: inline-block;
    color: var(--yellow);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 20px;
    padding: 6px 14px;
    border: 1px solid rgba(231, 180, 33, 0.5);
    border-radius: 4px;
    background: rgba(231, 180, 33, 0.08);
    backdrop-filter: blur(6px);
}

.mag-hero-title {
    font-family: 'EB Garamond', Georgia, serif;
    font-size: clamp(2.4rem, 6vw, 4.8rem);
    line-height: 1;
    color: var(--white);
    margin: 0 0 1.5rem;
    font-weight: 600;
    letter-spacing: -1.5px;
    max-width: 900px;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.4);
}

.mag-hero-lead {
    font-family: 'EB Garamond', Georgia, serif;
    font-size: clamp(1.05rem, 2vw, 1.3rem);
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.85);
    margin: 0 0 1.8rem;
    max-width: 650px;
    font-style: italic;
}

.mag-hero-meta {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 2rem;
    font-family: 'Noto Sans', sans-serif;
    letter-spacing: 0.5px;
}

.mag-hero-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--yellow);
    color: var(--primary);
    padding: 15px 34px;
    border-radius: 4px;
    font-family: 'Andika', sans-serif;
    font-weight: 700;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    text-decoration: none;
    transition: all 0.3s;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.mag-hero-btn:hover {
    transform: translateY(-3px);
    background: #f5c93a;
    color: var(--primary);
    box-shadow: 0 14px 36px rgba(231, 180, 33, 0.35);
}

.mag-hero-btn-arrow {
    transition: transform 0.3s;
}

.mag-hero-btn:hover .mag-hero-btn-arrow {
    transform: translateX(4px);
}

/* --- Magazine TOC intro --- */
.mag-intro {
    max-width: 860px;
    margin: 0 auto 3.5rem;
    text-align: center;
    padding: 0 1rem;
}

.mag-intro-label {
    display: inline-block;
    color: var(--secondary);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 16px;
    position: relative;
    padding: 0 30px;
}

.mag-intro-label::before,
.mag-intro-label::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 20px;
    height: 1px;
    background: var(--secondary);
}

.mag-intro-label::before { left: 0; }
.mag-intro-label::after { right: 0; }

.mag-intro h2 {
    font-family: 'EB Garamond', Georgia, serif;
    font-size: clamp(1.8rem, 3.5vw, 2.6rem);
    color: var(--primary);
    margin: 0 0 14px;
    font-weight: 600;
    line-height: 1.2;
}

.mag-intro p {
    color: var(--med-grey);
    font-size: 1.05rem;
    line-height: 1.7;
    margin: 0;
    font-family: 'EB Garamond', Georgia, serif;
    font-style: italic;
}

/* --- Editorial Spread (asymmetric) --- */
.mag-spread {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto 4rem;
    padding: 0 2rem;
}

.mag-spread-main {
    position: relative;
    aspect-ratio: 16 / 11;
    border-radius: 14px;
    overflow: hidden;
    text-decoration: none;
    box-shadow: 0 10px 40px rgba(46, 56, 98, 0.15);
    transition: transform 0.3s, box-shadow 0.3s;
}

.mag-spread-main:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 60px rgba(46, 56, 98, 0.25);
}

.mag-spread-main-img {
    position: absolute;
    inset: 0;
    background-size: cover;
    /* center top so portrait headshots keep faces visible (same bias
       we apply to gallery tiles and sidebar picks). */
    background-position: center top;
    background-color: var(--primary);
    transition: transform 0.6s;
}

.mag-spread-main:hover .mag-spread-main-img {
    transform: scale(1.05);
}

.mag-spread-main::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 30%, rgba(26, 32, 64, 0.9) 100%);
    z-index: 1;
}

.mag-spread-main-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2.5rem;
    z-index: 2;
    color: var(--white);
}

.mag-spread-cat {
    display: inline-block;
    background: var(--yellow);
    color: var(--primary);
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding: 4px 10px;
    border-radius: 3px;
    margin-bottom: 14px;
}

.mag-spread-main h3 {
    font-family: 'EB Garamond', Georgia, serif;
    font-size: clamp(1.6rem, 2.8vw, 2.2rem);
    font-weight: 600;
    margin: 0 0 10px;
    line-height: 1.15;
    color: var(--white);
}

.mag-spread-main p {
    font-size: 0.95rem;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.8);
    margin: 0 0 14px;
    max-width: 560px;
    font-style: italic;
    font-family: 'EB Garamond', Georgia, serif;
}

.mag-spread-main-meta {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 0.5px;
}

.mag-spread-side {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.mag-spread-secondary {
    flex: 1;
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    background: var(--white);
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 6px 24px rgba(46, 56, 98, 0.08);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    /* Row layout: image on the left, text on the right. The image area
       becomes portrait-shaped, which suits the headshots that dominate
       the editor's picks. Earlier column layout gave a wide-short image
       region that mangled portraits no matter the crop bias. */
    flex-direction: row;
    min-height: 0;
}

.mag-spread-secondary:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 36px rgba(46, 56, 98, 0.15);
}

.mag-spread-secondary-img {
    flex: 0 0 40%;
    background-size: cover;
    background-position: center;
    background-color: var(--light-grey);
    position: relative;
    overflow: hidden;
}

.mag-spread-secondary-img::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(46, 56, 98, 0.1), rgba(80, 114, 163, 0.05));
}

.mag-spread-secondary-body {
    padding: 1.4rem 1.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.mag-spread-secondary-cat {
    font-size: 0.66rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.8px;
    color: var(--secondary);
    margin-bottom: 8px;
}

.mag-spread-secondary h4 {
    font-family: 'EB Garamond', Georgia, serif;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary);
    margin: 0 0 8px;
    line-height: 1.25;
}

.mag-spread-secondary-meta {
    font-size: 0.72rem;
    color: var(--grey);
    margin-top: auto;
}

/* --- Department Sections --- */
.mag-department {
    max-width: 1200px;
    margin: 0 auto 4.5rem;
    padding: 0 2rem;
}

.mag-dept-header {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding-bottom: 1.2rem;
    border-bottom: 2px solid var(--grey-green);
}

.mag-dept-number {
    font-family: 'EB Garamond', Georgia, serif;
    font-size: 4rem;
    font-weight: 400;
    color: var(--yellow);
    line-height: 0.85;
    font-style: italic;
    flex-shrink: 0;
    letter-spacing: -2px;
    min-width: 80px;
    text-align: center;
    position: relative;
}

.mag-dept-number::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 2px;
    background: var(--yellow);
    opacity: 0.4;
}

.mag-dept-titles {
    flex: 1;
    padding-top: 6px;
}

.mag-dept-titles h2 {
    font-family: 'EB Garamond', Georgia, serif;
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    color: var(--primary);
    margin: 0 0 6px;
    font-weight: 600;
    line-height: 1.15;
}

.mag-dept-titles p {
    color: var(--grey);
    font-size: 0.92rem;
    margin: 0;
    line-height: 1.5;
    font-style: italic;
    font-family: 'EB Garamond', Georgia, serif;
}

.mag-dept-view-all {
    color: var(--secondary);
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    padding-top: 12px;
}

.mag-dept-view-all:hover {
    color: var(--primary);
}

.mag-dept-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 1.5rem;
}

/* --- Exhibit Card (dramatic gradient overlay) --- */
.mag-card {
    position: relative;
    aspect-ratio: 4 / 5;
    border-radius: 10px;
    overflow: hidden;
    text-decoration: none;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s, box-shadow 0.3s;
    background: var(--primary);
}

.mag-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 16px 40px rgba(46, 56, 98, 0.2);
}

.mag-card-img {
    position: absolute;
    inset: 0;
    background-size: cover;
    /* Bias the crop toward the top of each image so portrait photos
       keep faces visible. Default 'center' was clipping heads on tall
       photos because the cover-fill chopped equally top and bottom. */
    background-position: center top;
    transition: transform 0.6s;
}

.mag-card:hover .mag-card-img {
    transform: scale(1.08);
}

.mag-card-img-placeholder {
    background: linear-gradient(135deg, #2e3862 0%, #0b1020 100%);
    display: block;
    overflow: hidden;
    font-size: 0;
}
.mag-card-img-placeholder::before {
    content: attr(data-label);
    position: absolute;
    top: 1.5rem;
    left: 1.4rem;
    right: 1.4rem;
    font-family: 'EB Garamond', Georgia, serif;
    font-style: italic;
    font-size: 1.75rem;
    line-height: 1.1;
    letter-spacing: -0.01em;
    color: rgba(231, 180, 33, 0.55);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}
.mag-card-img-placeholder::after {
    content: '';
    position: absolute;
    top: 7.3rem;
    left: 1.4rem;
    width: 38px;
    height: 1px;
    background: rgba(231, 180, 33, 0.28);
    z-index: 0;
}
/* Per-category placeholder gradients removed — every category now uses
   the default navy (#2e3862 -> #0b1020) for visual calm. The category
   chip on the card still identifies the section. */

.mag-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(26, 32, 64, 0.2) 0%, transparent 40%, rgba(26, 32, 64, 0.95) 100%);
    z-index: 1;
    transition: background 0.3s;
}

.mag-card:hover::after {
    background: linear-gradient(180deg, rgba(26, 32, 64, 0.3) 0%, rgba(26, 32, 64, 0.4) 40%, rgba(26, 32, 64, 0.98) 100%);
}

.mag-card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem 1.4rem 1.3rem;
    z-index: 2;
    color: var(--white);
}

.mag-card-cat {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--yellow);
    margin-bottom: 8px;
}

.mag-card h3 {
    font-family: 'EB Garamond', Georgia, serif;
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0 0 8px;
    line-height: 1.25;
    color: var(--white);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.mag-card p {
    font-size: 0.8rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.75);
    margin: 0 0 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-style: italic;
    font-family: 'EB Garamond', Georgia, serif;
}

.mag-card-meta {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 0.3px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.mag-card-meta .mag-card-badge {
    background: rgba(231, 180, 33, 0.2);
    color: var(--yellow);
    padding: 2px 7px;
    border-radius: 3px;
    font-weight: 700;
    font-size: 0.62rem;
    letter-spacing: 0.5px;
}

/* --- Category View Page --- */
.mag-cat-header {
    text-align: center;
    padding: 2.5rem 0 3rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.mag-cat-kicker {
    color: var(--secondary);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2.5px;
    margin-bottom: 14px;
}

.mag-cat-title {
    font-family: 'EB Garamond', Georgia, serif;
    font-size: clamp(2.2rem, 5vw, 3.4rem);
    color: var(--primary);
    margin: 0 0 10px;
    font-weight: 600;
    line-height: 1.1;
}

.mag-cat-count {
    color: var(--grey);
    font-size: 0.9rem;
    margin: 0;
    font-style: italic;
    font-family: 'EB Garamond', Georgia, serif;
}

/* --- Article Reader - Premium Magazine (v2) --- */
.article-scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--yellow), #f5c93a);
    z-index: 9999;
    width: 0%;
    transition: width 0.1s;
}

/* Article reader - wide layout */
.mag-reader {
    width: 100%;
    margin: 0;
    padding: 1.5rem 0 0;
}

.mag-reader-header {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem 2rem;
    text-align: left;
}

.mag-reader-kicker {
    display: block;
    color: var(--secondary);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2.5px;
    margin-bottom: 18px;
    font-family: 'Noto Sans', sans-serif;
}

.mag-reader-title {
    font-family: 'EB Garamond', Georgia, serif;
    font-size: clamp(2rem, 4.5vw, 2.8rem);
    line-height: 1.15;
    color: var(--primary);
    margin: 0 0 18px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.mag-reader-lead {
    font-family: 'EB Garamond', Georgia, serif;
    font-style: italic;
    font-size: 1.15rem;
    color: var(--med-grey);
    line-height: 1.55;
    margin: 0 0 24px;
}

.mag-reader-byline {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    font-family: 'Noto Sans', sans-serif;
}

.mag-reader-byline-by {
    font-size: 0.82rem;
    color: var(--grey);
    font-style: italic;
    font-family: 'EB Garamond', Georgia, serif;
}

.mag-reader-byline-name {
    font-size: 0.92rem;
    color: var(--primary);
    font-weight: 700;
    letter-spacing: 0.2px;
    text-transform: uppercase;
    font-family: 'Noto Sans', sans-serif;
}

.mag-reader-meta {
    font-family: 'Noto Sans', sans-serif;
    font-size: 0.78rem;
    color: var(--grey);
    letter-spacing: 0.3px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    display: flex;
    gap: 10px;
    align-items: center;
}

.mag-reader-meta-sep {
    color: var(--grey);
    opacity: 0.5;
}

/* Body - wide reading width */
.mag-reader-body {
    font-family: 'EB Garamond', Georgia, serif;
    font-size: 1.2rem;
    line-height: 1.75;
    color: #333;
    max-width: 1100px;
    margin: 2rem auto 0;
    padding: 0 2rem;
}

.mag-reader-body p {
    margin: 0 0 1.5rem;
}

/* Subtle NYT-style drop cap — bigger than body but not dramatic */
.mag-reader-body .has-dropcap::first-letter {
    font-family: 'EB Garamond', Georgia, serif;
    font-size: 3.5rem;
    font-weight: 700;
    float: left;
    line-height: 0.9;
    margin: 0.05em 0.08em 0 0;
    color: var(--primary);
    font-style: normal;
}

/* Images centered, full reading width */
.mag-reader-body img.imgcent,
.mag-reader-body > img,
.mag-reader-body p.center img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 2.5rem auto 0.6rem;
    border-radius: 2px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

/* Caption styling — small italic grey below images */
.mag-reader-body p.center {
    text-align: center;
    font-style: italic;
    font-size: 0.85rem;
    color: var(--grey);
    line-height: 1.5;
    max-width: 720px;
    margin: 0 auto 2.5rem;
    padding: 0 10px;
}

.mag-reader-body h2,
.mag-reader-body h3,
.mag-reader-body h4 {
    font-family: 'EB Garamond', Georgia, serif;
    color: var(--primary);
    margin: 2.5rem 0 1rem;
    font-weight: 700;
    line-height: 1.25;
}

.mag-reader-body h2 { font-size: 1.7rem; }
.mag-reader-body h3 { font-size: 1.35rem; }
.mag-reader-body h4 { font-size: 1.15rem; }

.mag-reader-body a {
    color: var(--primary);
    text-decoration: underline;
    text-decoration-color: rgba(46, 56, 98, 0.3);
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    transition: color 0.15s, text-decoration-color 0.15s;
}

.mag-reader-body a:hover {
    color: var(--secondary);
    text-decoration-color: var(--secondary);
}

.mag-reader-body img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 2.5rem auto 0.6rem;
}

.mag-reader-body img.heading {
    float: right;
    max-width: 200px;
    margin: 0.5rem 0 1.2rem 1.5rem;
    border-radius: 2px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}

.mag-reader-body ul,
.mag-reader-body ol {
    margin: 0 0 1.6rem 1.6rem;
    padding: 0;
}

.mag-reader-body li {
    margin-bottom: 0.7rem;
    line-height: 1.75;
}

.mag-reader-body em { font-style: italic; }

.mag-reader-body strong {
    font-weight: 700;
    color: #222;
}

.mag-reader-body blockquote {
    border-left: 3px solid var(--primary);
    margin: 2.5rem 0;
    padding: 0.4rem 0 0.4rem 1.8rem;
    font-style: italic;
    color: var(--med-grey);
    font-size: 1.3rem;
    line-height: 1.55;
    font-family: 'EB Garamond', Georgia, serif;
}

.mag-reader-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    font-size: 0.92rem;
    font-family: 'Noto Sans', sans-serif;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.mag-reader-body th,
.mag-reader-body td {
    padding: 11px 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    text-align: left;
    vertical-align: top;
}

.mag-reader-body th {
    background: var(--primary);
    color: var(--white);
    font-weight: 700;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.mag-reader-body tr:nth-child(even) td {
    background: rgba(128, 156, 204, 0.04);
}

/* PDF notice */
.mag-pdf-notice {
    text-align: center;
    padding: 3.5rem 2rem;
    background: linear-gradient(135deg, #faf7f0 0%, #f5efe4 100%);
    border-radius: 14px;
    border: 1px solid rgba(180, 140, 60, 0.2);
    max-width: 720px;
    margin: 0 auto;
}

.mag-pdf-icon {
    font-size: 3.5rem;
    margin-bottom: 16px;
}

.mag-pdf-notice h3 {
    font-family: 'EB Garamond', Georgia, serif;
    color: var(--primary);
    font-size: 1.6rem;
    margin: 0 0 12px;
    font-weight: 600;
}

.mag-pdf-notice p {
    color: var(--med-grey);
    font-size: 1rem;
    max-width: 520px;
    margin: 0 auto 1.8rem;
    line-height: 1.65;
    font-style: italic;
    font-family: 'EB Garamond', Georgia, serif;
}

/* --- Keep Reading (related) --- */
.mag-related {
    max-width: 1200px;
    margin: 4rem auto 2rem;
    padding: 3rem 2rem 0;
    border-top: 2px solid var(--grey-green);
}

.mag-related-header {
    text-align: center;
    margin-bottom: 2rem;
}

.mag-related-header .mag-intro-label {
    margin-bottom: 12px;
}

.mag-related-header h3 {
    font-family: 'EB Garamond', Georgia, serif;
    color: var(--primary);
    font-size: 1.8rem;
    font-weight: 600;
    margin: 0;
}

.mag-related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

/* --- Responsive --- */
@media (max-width: 900px) {
    .mag-hero { min-height: 460px; }
    .mag-hero-content { padding: 3rem 1.5rem 3rem; }

    .mag-spread {
        grid-template-columns: 1fr;
        padding: 0 1.5rem;
    }

    .mag-spread-main {
        aspect-ratio: 16 / 10;
    }

    .mag-spread-secondary {
        flex-direction: row;
        min-height: 140px;
    }

    .mag-spread-secondary-img {
        flex: 0 0 140px;
    }

    .mag-department {
        padding: 0 1.5rem;
    }

    .mag-dept-number {
        font-size: 2.8rem;
    }

    .mag-related-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .mag-hero {
        margin: -2rem -1rem 3rem;
        min-height: 420px;
    }

    .mag-hero-content { padding: 2.5rem 1.2rem 2.5rem; }

    .mag-hero-title { letter-spacing: -0.8px; }

    .mag-spread-main-content { padding: 1.5rem; }

    .mag-spread-secondary {
        flex-direction: column;
    }

    .mag-spread-secondary-img {
        flex: 0 0 160px;
    }

    .mag-dept-header {
        gap: 1rem;
    }

    .mag-dept-number {
        font-size: 2.2rem;
    }

    .mag-reader {
        padding: 2rem 1.2rem 0;
    }

    .mag-reader-body {
        font-size: 1.1rem;
    }

    .mag-reader-body .has-dropcap::first-letter {
        font-size: 2.8rem;
    }

    .mag-reader-body img.imgcent,
    .mag-reader-body > img,
    .mag-reader-body p.center img {
        width: 100%;
        margin-left: auto;
    }

    .mag-reader-body img.heading {
        float: none;
        max-width: 100%;
        margin: 1.5rem auto;
    }
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
    .site-header,
    .site-footer,
    .nav-links,
    .nav-toggle,
    .btn-donate,
    .btn-random,
    .btn-lang,
    .vessel-donate-bar,
    .vessel-sponsor,
    .pagination,
    .lightbox,
    .back-link,
    .breadcrumbs,
    .keep-exploring,
    .explore-wrapper,
    .explore-panel,
    .flyover-controls {
        display: none !important;
    }

    body {
        background: white;
        color: black;
    }

    .vessel-hero-card {
        grid-template-columns: 1fr;
        box-shadow: none;
        border: none;
    }

    .vessel-hero-image-wrap img {
        max-height: 300px;
        object-fit: contain;
    }

    .vessel-layout {
        grid-template-columns: 1fr;
    }

    .vessel-sidebar-card,
    .vessel-story-card {
        box-shadow: none;
        border-radius: 0;
        border: 1px solid #ddd;
    }

    .story-paragraph a[href]:after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
        color: #666;
    }
}

/* Curator notes (Anecdotes / Owners / Masters) — paragraph spacing inside
   the gray container. Bolded years and vessel names use <strong>. */
.curator-paragraph {
    margin: 0 0 0.7em;
}
.curator-paragraph:last-child {
    margin-bottom: 0;
}
.curator-paragraph strong {
    font-weight: 600;
    color: var(--dark-blue, #0a2640);
}

/* References block: split into a list, linkify URLs, wrap long ones cleanly. */
.reference-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.reference-item {
    margin: 0 0 0.5em;
    padding: 0;
    overflow-wrap: anywhere;
    line-height: 1.5;
    font-size: 0.9rem;
}
.reference-item:last-child {
    margin-bottom: 0;
}
.reference-single {
    overflow-wrap: anywhere;
    line-height: 1.5;
    font-size: 0.9rem;
    margin: 0;
}
.ref-link {
    color: var(--accent-blue, #1a5490);
    text-decoration: none;
    word-break: break-all;
}
.ref-link:hover {
    text-decoration: underline;
}

/* Hero chips: clickable metadata pills under the vessel title that link
   to browse.php with the corresponding filter pre-applied. */
.hero-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 14px 0 18px;
}
.hero-chip {
    display: inline-flex;
    align-items: center;
    padding: 5px 12px;
    background: rgba(26, 58, 92, 0.07);
    color: var(--primary, #1a3a5c);
    border-radius: 14px;
    font-size: 0.85rem;
    font-weight: 500;
    line-height: 1.3;
    text-decoration: none;
    transition: background 0.15s;
}
.hero-chip:hover {
    background: rgba(26, 58, 92, 0.16);
    text-decoration: none;
}
.hero-chip-flag {
    background: rgba(170, 50, 50, 0.08);
    color: #a13c3c;
}
.hero-chip-flag:hover {
    background: rgba(170, 50, 50, 0.18);
}

/* Nav grouping: subtle vertical divider between top-level nav groups
   (Home | Vessels Biographies | Articles Galleries Map | About Us).
   .nav-primary makes the database entries (Vessels, Biographies)
   slightly heavier than the editorial group. */
.nav-group-divider {
    width: 1px;
    align-self: stretch;
    margin: 0 6px;
    background: rgba(255, 255, 255, 0.18);
    pointer-events: none;
    list-style: none;
}
.nav-primary > a {
    font-weight: 600;
}
@media (max-width: 768px) {
    /* When the nav collapses to the hamburger panel, the vertical
       dividers don't make sense as columns — render them as faint
       horizontal rules between sections instead. */
    .nav-group-divider {
        width: auto;
        height: 1px;
        margin: 6px 0;
        background: rgba(255, 255, 255, 0.12);
    }
}

/* Birth Year filter: two inputs side-by-side under a single label so the
   "from / to" pair behaves as one logical cell in the filter grid. */
.year-range-inputs {
    display: flex;
    align-items: center;
    gap: 6px;
}
.year-range-inputs input {
    flex: 1 1 0;
    min-width: 0;
}
.year-range-sep {
    color: var(--med-grey, #6b7280);
    font-size: 0.85rem;
    flex: 0 0 auto;
}
