/* General Styles */
body {
    font-family: "Titillium Web", Helvetica, Arial, sans-serif;
    line-height: 1.35;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
    color: #333;
    margin-top: 156px; /* Fixed header height plus a small gap before page content */
}

p {
    font-weight: 300;
}

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

/* Header Styles */
header {
    background:
        linear-gradient(180deg, #536776 0%, #394854 100%);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
    color: #fff;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.14),
        inset 0 -1px 0 rgba(0, 0, 0, 0.22),
        0 12px 28px rgba(20, 27, 32, 0.24);
    transition: background-color 0.25s ease, box-shadow 0.25s ease;
}

header .container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 144px;
    transition: height 0.25s ease;
}

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

header .logo img {
    display: block;
    height: 120px;
    width: auto;
    transition: height 0.25s ease;
}

/* Hamburger Menu */
.hamburger-menu {
    position: absolute;
    right: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 25px;
    height: 18px;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.hamburger-menu:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 6px;
}

.hamburger-menu .bar {
    background-color: #fff;
    height: 3px;
    width: 100%;
    border-radius: 2px;
    transform-origin: center;
    transition: opacity 0.22s ease, transform 0.22s ease;
}

.hamburger-menu[aria-expanded="true"] .bar:nth-child(1) {
    transform: translateY(7.5px) rotate(45deg);
}

.hamburger-menu[aria-expanded="true"] .bar:nth-child(2) {
    opacity: 0;
}

.hamburger-menu[aria-expanded="true"] .bar:nth-child(3) {
    transform: translateY(-7.5px) rotate(-45deg);
}

nav {
    position: absolute;
    top: calc(100% - 4px);
    right: 0;
    min-width: 235px;
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 8px;
    background-color: rgba(47, 58, 67, 0.96);
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.24);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
    transition: opacity 0.18s ease, transform 0.18s ease;
}

nav.show {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

nav ul li {
    display: block;
}

nav ul li a {
    position: relative;
    display: block;
    padding: 11px 14px 11px 16px;
    border-radius: 5px;
    text-decoration: none;
    color: #dce4e8;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
    transition: background-color 0.18s ease, color 0.18s ease, padding-left 0.18s ease;
}

nav ul li a::before {
    content: "";
    position: absolute;
    left: 7px;
    top: 9px;
    bottom: 9px;
    width: 2px;
    border-radius: 999px;
    background-color: transparent;
    transition: background-color 0.18s ease;
}

nav ul li a:hover,
nav ul li a:focus-visible {
    background-color: rgba(255, 255, 255, 0.08);
    color: #fff;
    padding-left: 20px;
    outline: 0;
}

nav ul li a:hover::before,
nav ul li a:focus-visible::before {
    background-color: #8fc7e8;
}

header.scrolled .container {
    height: 78px;
}

header.scrolled {
    background:
        linear-gradient(180deg, rgba(83, 103, 118, 0.82) 0%, rgba(57, 72, 84, 0.86) 100%);
}

header.scrolled .logo img {
    height: 58px;
}

@media (max-width: 768px) {
    body {
        margin-top: 106px;
    }

    header .container {
        height: 96px;
    }

    header .logo img {
        height: 76px;
    }

    nav {
        width: 100%;
        min-width: 0;
    }

    nav ul {
        text-align: center;
    }
}

/* Home Page */
.home-page {
    width: 100%;
    overflow-x: hidden;
}

/* Physical Collection Page */
.collection-page {
    overflow: hidden;
    color: #20272c;
}

.collection-hero,
.collection-section {
    padding: clamp(48px, 7vw, 92px) 0;
}

.collection-hero {
    background: #ffffff;
}

.collection-hero > .collection-hero-copy {
    max-width: 820px;
    padding-right: clamp(0px, 16vw, 190px);
}

.collection-feature-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.9fr);
    gap: clamp(28px, 6vw, 84px);
    align-items: center;
}

.collection-kicker {
    margin: 0 0 12px;
    color: #69757e;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.collection-hero h1,
.collection-feature-copy h2 {
    margin: 0;
    color: #005c8e;
    line-height: 1.04;
}

.collection-hero h1 {
    max-width: 620px;
    font-size: clamp(2.45rem, 5vw, 4.5rem);
}

.collection-feature-copy h2 {
    font-size: clamp(2rem, 3.4vw, 3.2rem);
}

.collection-hero-copy > p:not(.collection-kicker),
.collection-feature-copy > p:not(.collection-kicker) {
    max-width: 650px;
    margin: 20px 0 0;
    font-size: 1.06rem;
    font-weight: 400;
    line-height: 1.55;
}

.collection-image-slot {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 310px;
    margin: 0;
    overflow: hidden;
    border: 1px solid #b7c3ca;
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.7), rgba(214, 224, 229, 0.82)),
        repeating-linear-gradient(90deg, transparent 0, transparent 36px, rgba(72, 93, 105, 0.08) 37px, transparent 38px);
    box-shadow: 0 16px 35px rgba(32, 39, 44, 0.12);
}

.collection-image-slot-mark {
    padding: 10px 14px;
    border: 1px solid rgba(65, 80, 92, 0.38);
    border-radius: 4px;
    color: #41505c;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.56);
}

.collection-image-slot figcaption {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    padding: 13px 16px;
    color: #ffffff;
    font-size: 0.84rem;
    font-weight: 700;
    background: rgba(32, 39, 44, 0.76);
}

.collection-section-muted {
    background: #e8eef1;
}

.collection-feature-layout-reverse {
    grid-template-columns: minmax(320px, 0.9fr) minmax(0, 1fr);
}

.collection-feature-copy .btn {
    margin-top: 28px;
}

@media (max-width: 768px) {
    .collection-hero,
    .collection-section {
        padding: 42px 0;
    }

    .collection-feature-layout,
    .collection-feature-layout-reverse {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .collection-feature-layout-reverse .collection-feature-copy {
        order: 2;
    }

    .collection-feature-layout-reverse .collection-image-slot {
        order: 1;
    }

    .collection-image-slot {
        min-height: 280px;
    }

    .collection-hero > .collection-hero-copy {
        padding-right: 20px;
    }
}

.home-page .section-content {
    width: 90%;
    margin: 0 auto;
    box-sizing: border-box;
}

.home-section,
.featured-collections {
    width: 100%;
}

/* Welcome Section */
.hero {
    background-color: #fff;
    padding: 56px 0;
    color: #000;
}

.welcome-layout {
    display: grid;
    grid-template-columns: minmax(280px, 42%) minmax(0, 1fr);
    align-items: center;
    gap: clamp(20px, 3vw, 40px);
}

.welcome-image {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 8px;
}

.hero .hero-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}

.hero .hero-content h1 {
    font-size: clamp(2.1rem, 2.7vw, 2.6rem);
    font-weight: 700;
    line-height: 1.08;
    margin: 0 0 20px;
    color: #005c8e;
}

.hero .hero-content p {
    max-width: 760px;
    font-size: clamp(1rem, 1.2vw, 1.0625rem);
    font-weight: 400;
    line-height: 1.3;
    margin: 0 0 14px;
}

.hero .hero-content p:last-of-type {
    margin-bottom: 28px;
}

.hero .hero-content .welcome-links {
    margin-bottom: 0;
}

.welcome-links strong {
    display: block;
}

.welcome-links strong + strong {
    margin-top: 8px;
}

.welcome-links a {
    color: #005c8e;
    text-decoration: none;
}

.welcome-links .material-symbols-outlined {
    display: inline-block;
    margin-left: 2px;
    font-size: 1em;
    line-height: 0;
    vertical-align: -0.1em;
    transition: transform 0.18s ease;
}

.welcome-links a:hover,
.welcome-links a:focus-visible {
    color: #0078d4;
}

.welcome-links a:hover .material-symbols-outlined,
.welcome-links a:focus-visible .material-symbols-outlined {
    transform: translateX(3px);
}

.welcome-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(14px, 2.2vw, 28px);
    width: 100%;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid rgba(65, 80, 92, 0.22);
}

.welcome-stats .counter-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.welcome-stats .counter-item h3 {
    margin: 0 0 8px;
    color: #41505c;
    font-size: clamp(0.72rem, 0.9vw, 0.86rem);
    line-height: 1.2;
    text-transform: uppercase;
}

.welcome-stats .counter-value {
    display: inline-flex;
    color: #005c8e;
    font-size: clamp(1.8rem, 2.6vw, 2.5rem);
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

.counter-digit {
    display: inline-block;
    width: 0.62em;
    height: 1em;
    overflow: hidden;
}

.counter-digit.is-leading-zero {
    opacity: 0;
}

.counter-digit-track {
    display: flex;
    flex-direction: column;
    transform: translateY(calc(var(--digit-offset, 0) * -1em));
    transition: transform var(--counter-duration, 2000ms) cubic-bezier(0.16, 1, 0.3, 1);
}

.counter-digit-track span {
    display: block;
    height: 1em;
    text-align: center;
}

@media (max-width: 768px) {
    .home-page .section-content {
        width: 88%;
    }

    main.home-page {
        margin-top: 14px;
    }

    .hero {
        padding: 16px 0 30px;
    }

    .welcome-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .welcome-image {
        height: clamp(130px, 34vw, 190px);
        aspect-ratio: auto;
        object-position: center;
    }

    .hero .hero-content h1 {
        width: 100%;
        font-size: clamp(1.55rem, 7.1vw, 2.35rem);
        line-height: 1;
        white-space: nowrap;
    }

    .welcome-stats {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: clamp(8px, 2vw, 14px);
        margin-top: 16px;
        padding-top: 16px;
    }

    .welcome-stats .counter-item {
        align-items: center;
        text-align: center;
    }

    .welcome-stats .counter-item h3 {
        font-size: clamp(0.66rem, 2.45vw, 0.78rem);
    }

    .welcome-stats .counter-value {
        font-size: clamp(1.35rem, 7vw, 1.75rem);
    }
}

/* About Panel (for both About and Contribute sections) */
body.about-page .about-panel:first-of-type {
    margin-top: 100px; /* Adds space between the header and the first panel */
}

/* Ensure consistent spacing for all about-panels */
.about-panel {
    padding: 20px;
    background-color: #f9f9f9; /* Light background to differentiate from other sections */
    border-radius: 8px; /* Soft rounding for a more inviting look */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); /* Light shadow for some depth */
    margin-bottom: 20px; /* Space between panels */
}

/* Remove extra top margin from the heading inside the panels */
.about-panel h2 {
    font-size: 2.5rem;
    margin-top: 0; /* Remove top margin to prevent extra space above the heading */
    color: #41505c; /* Slightly darker tone for headers */
}

.about-panel p {
    font-size: 1rem;
    line-height: 1.35;
    margin-bottom: 20px;
    color: #333;
}

.submit-pen-page main .container {
    max-width: 1120px;
}

.submit-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(240px, 0.38fr);
    gap: 28px;
    align-items: end;
    margin-top: 100px;
    margin-bottom: 20px;
    padding: 34px;
    border: 1px solid #d5dade;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(32, 39, 44, 0.08);
}

.submit-kicker {
    margin: 0 0 8px;
    color: #69757e;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    line-height: 1.2;
    text-transform: uppercase;
}

.submit-hero h1 {
    max-width: 760px;
    margin: 0 0 18px;
    color: #20272c;
    font-size: clamp(2.35rem, 5vw, 4.3rem);
    line-height: 0.98;
}

.submit-hero p,
.submit-section p,
.submit-option p,
.submit-address p {
    color: #333;
    font-size: 1.02rem;
    line-height: 1.5;
}

.submit-hero-copy p:last-child,
.submit-section-copy p:last-child,
.submit-option p:last-child,
.submit-address p:last-child {
    margin-bottom: 0;
}

.submit-hero-aside {
    padding: 18px;
    border-left: 4px solid #8fa0ad;
    background: #eef2f4;
}

.submit-hero-aside strong,
.submit-hero-aside span {
    display: block;
}

.submit-hero-aside strong {
    margin-bottom: 6px;
    color: #20272c;
    font-size: 0.92rem;
    text-transform: uppercase;
}

.submit-hero-aside span {
    color: #41505c;
    font-size: 0.96rem;
    line-height: 1.4;
}

.submit-section,
.submit-address {
    display: grid;
    grid-template-columns: minmax(220px, 0.42fr) minmax(0, 1fr);
    gap: 32px;
    margin-bottom: 20px;
    padding: 28px;
    border: 1px solid #d5dade;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(32, 39, 44, 0.08);
}

.submit-section h2,
.submit-address h2,
.submit-option h2 {
    margin: 0;
    color: #41505c;
    font-weight: 600;
    letter-spacing: -0.012em;
    line-height: 1.16;
}

.submit-section h2 {
    margin-bottom: 18px;
    font-size: clamp(1.7rem, 3vw, 2.45rem);
}

.submit-options {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) repeat(2, minmax(0, 0.9fr));
    gap: 18px;
    margin-bottom: 20px;
}

.submit-option {
    padding: 24px;
    border: 1px solid #d5dade;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(32, 39, 44, 0.08);
}

.submit-option-featured {
    border-color: #b9c5cc;
    background: #f7f9fa;
}

.submit-option .btn {
    margin-top: 4px;
}

.submit-address {
    align-items: center;
}

.submit-address-block {
    padding: 18px;
    border: 1px solid #c5cdd2;
    background: #f7f9fa;
    color: #20272c;
    font-size: 1.18rem;
    font-weight: 600;
    text-align: center;
}

.submit-thanks-inline {
    margin: 0;
    align-self: start;
}

.submit-thanks-inline img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 6px;
}

@media (max-width: 768px) {
    .submit-hero,
    .submit-section,
    .submit-address,
    .submit-options {
        grid-template-columns: 1fr;
    }

    .submit-hero {
        margin-top: 60px;
        padding: 24px;
    }

    .submit-section,
    .submit-address,
    .submit-option {
        padding: 22px;
    }
}

/* Add a gap between the header and the first panel */
main {
    margin-top: 40px; /* Adjust the top margin of the main section */
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.contact-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.contact-form label {
    font-weight: bold;
    font-size: 1rem;
}

.contact-form input,
.contact-form textarea {
    padding: 10px;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 5px;
    width: 100%;
    box-sizing: border-box;
}

.contact-form textarea {
    resize: vertical;
    min-height: 100px;
}

.contact-form .btn {
    align-self: flex-start;
    padding: 10px 20px;
    background-color: #005c8e;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.contact-form .btn:hover {
    background-color: #003f6c;
}

.contribution-form {
    margin-top: 24px;
}

.contribution-form-section {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.contribution-form-section h3 {
    margin: 0;
    color: #20272c;
    font-size: 1.12rem;
    line-height: 1.2;
}

.contribution-form-section + .contribution-form-section {
    margin-top: 6px;
}

.contribution-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(220px, 1fr));
    gap: 15px;
}

.contribution-form-grid-compact {
    grid-template-columns: repeat(3, minmax(180px, 1fr));
}

.contribution-section-note {
    margin: -6px 0 0;
    color: #59656e;
    font-size: 0.94rem;
}

.contribution-shipping-fields {
    padding: 18px;
    border: 1px solid #d5dade;
    border-radius: 8px;
    background: #f7f9fa;
}

.form-response-message {
    margin-top: 20px;
    font-size: 1rem;
}

@media (max-width: 768px) {
    .contribution-form-grid,
    .contribution-form-grid-compact {
        grid-template-columns: 1fr;
    }
}

/* Archive Entry Form */
.entry-form-header {
    margin: 0 0 22px;
}

.entry-form-header h1 {
    margin: 0;
    color: #20272c;
    font-size: clamp(2rem, 4vw, 3.5rem);
    line-height: 1;
}

.entry-form {
    max-width: 980px;
    margin-bottom: 64px;
}

.entry-form-section {
    padding: 24px;
    border: 1px solid #d5dade;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(32, 39, 44, 0.08);
}

.entry-form-section + .entry-form-section {
    margin-top: 18px;
}

.entry-archive-number {
    margin: 0 0 20px;
    color: #20272c;
    font-size: 1.2rem;
    font-weight: 800;
    line-height: 1.2;
    text-align: center;
}

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

.entry-field {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.entry-field-wide,
.entry-description-field {
    grid-column: 1 / -1;
}

.entry-description-field {
    margin-top: 14px;
}

.entry-field label {
    color: #41505c;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    line-height: 1.2;
    text-transform: uppercase;
}

.entry-field input,
.entry-field textarea {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #b8c0c6;
    border-radius: 6px;
    background: #fbfcfc;
    color: #20272c;
    -webkit-text-fill-color: #20272c;
    color-scheme: light;
    font: inherit;
    font-size: 1.02rem;
    line-height: 1.35;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.entry-field input {
    min-height: 46px;
    padding: 10px 12px;
}

.entry-field textarea {
    min-height: 240px;
    padding: 13px 14px;
    resize: vertical;
}

.entry-field input:focus,
.entry-field textarea:focus {
    border-color: #0078d4;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(0, 120, 212, 0.15);
    outline: 0;
}

.entry-field input:-webkit-autofill,
.entry-field input:-webkit-autofill:hover,
.entry-field input:-webkit-autofill:focus {
    border-color: #b8c0c6 !important;
    -webkit-box-shadow: 0 0 0 1000px #fbfcfc inset !important;
    -webkit-text-fill-color: #20272c !important;
    caret-color: #20272c !important;
    transition: background-color 9999s ease-out, color 9999s ease-out;
}

.entry-field input[readonly] {
    background: #eef2f4;
    color: #59656e;
    -webkit-text-fill-color: #59656e;
}

.entry-autocomplete-list {
    position: absolute;
    z-index: 20;
    top: calc(100% + 4px);
    right: 0;
    left: 0;
    display: none;
    max-height: 220px;
    overflow-y: auto;
    border: 1px solid #9aa7b0;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 14px 28px rgba(32, 39, 44, 0.18);
}

.entry-autocomplete-list.is-visible {
    display: block;
}

.entry-autocomplete-option {
    display: block;
    width: 100%;
    padding: 9px 12px;
    border: 0;
    background: #ffffff;
    color: #20272c;
    font: inherit;
    font-size: 0.96rem;
    line-height: 1.2;
    text-align: left;
    cursor: pointer;
}

.entry-autocomplete-option:hover,
.entry-autocomplete-option:focus {
    background: #eef7fd;
    color: #20272c;
    outline: 0;
}

.entry-upload-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(260px, 1fr));
    gap: 16px;
}

.entry-upload-box {
    position: relative;
    display: flex;
    min-height: 150px;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    box-sizing: border-box;
    padding: 24px;
    overflow: hidden;
    border: 2px dashed #8fa0ad;
    border-radius: 8px;
    background: #f7f9fa;
    color: #20272c;
    cursor: pointer;
    transition: border-color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
}

.entry-upload-box-featured {
    grid-column: 1 / -1;
    min-height: 190px;
}

.entry-upload-box:hover,
.entry-upload-box:focus-within {
    border-color: #0078d4;
    background: #eef7fd;
    box-shadow: 0 0 0 3px rgba(0, 120, 212, 0.12);
}

.entry-upload-title {
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.2;
}

.entry-upload-preview {
    width: 100%;
    max-height: 150px;
    object-fit: contain;
    border-radius: 5px;
    background: #ffffff;
}

.entry-upload-box-featured .entry-upload-preview {
    max-height: 220px;
}

.entry-upload-action {
    color: #41505c;
    font-size: 0.96rem;
}

.entry-upload-filename {
    color: #69757e;
    font-size: 0.86rem;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.entry-upload-box input[type="file"] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.entry-form-actions {
    margin-top: 18px;
}

.entry-form-message {
    max-width: 980px;
    margin: 0 0 18px;
    padding: 12px 14px;
    border-left: 4px solid #41505c;
    background: #eef2f4;
    color: #20272c;
}

.entry-image-regeneration-action {
    margin-top: 0;
    margin-bottom: 18px;
}

.entry-form-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.entry-form-top-links {
    margin-bottom: 22px;
    margin-top: 0;
}

.entry-form-top-actions {
    max-width: 980px;
    margin-bottom: 18px;
    margin-top: 0;
}

.entry-form-actions .btn {
    display: block;
    width: 100%;
    box-sizing: border-box;
    margin-top: 0;
    border: 0;
    cursor: pointer;
    text-align: center;
}

.entry-form-links .btn {
    margin-top: 0;
}

.contribution-admin-links {
    margin-bottom: 18px;
}

.contribution-status-tabs {
    position: static;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-width: 0;
    margin: 0 0 18px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    opacity: 1;
    pointer-events: auto;
    transform: none;
}

.contribution-status-tabs a {
    display: inline-flex;
    padding: 8px 11px;
    border: 1px solid #c5cdd2;
    border-radius: 999px;
    background: #ffffff;
    color: #41505c;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-decoration: none;
    text-transform: uppercase;
}

.contribution-status-tabs a.is-active,
.contribution-status-tabs a:hover,
.contribution-status-tabs a:focus-visible {
    border-color: #41505c;
    background: #41505c;
    color: #ffffff;
}

.contribution-admin-empty {
    padding: 24px;
    border: 1px solid #d5dade;
    border-radius: 8px;
    background: #ffffff;
}

.contribution-admin-list {
    display: grid;
    gap: 18px;
    margin-bottom: 64px;
}

.contribution-admin-card {
    display: grid;
    grid-template-columns: minmax(180px, 260px) minmax(0, 1fr);
    gap: 22px;
    padding: 22px;
    border: 1px solid #d5dade;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(32, 39, 44, 0.08);
}

.contribution-admin-photo {
    display: flex;
    min-height: 180px;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 6px;
    background: #eef2f4;
    color: #69757e;
}

.contribution-admin-photo img {
    display: block;
    width: 100%;
    max-height: 260px;
    object-fit: contain;
}

.contribution-admin-content {
    min-width: 0;
}

.contribution-admin-heading {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 16px;
}

.contribution-admin-kicker {
    margin: 0 0 5px;
    color: #69757e;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.contribution-admin-heading h2 {
    margin: 0;
    color: #20272c;
    font-size: 1.45rem;
    line-height: 1.1;
}

.contribution-admin-heading > p {
    margin: 0;
    color: #69757e;
    font-size: 0.82rem;
    white-space: nowrap;
}

.contribution-admin-details {
    display: grid;
    grid-template-columns: minmax(180px, 0.8fr) minmax(260px, 1.2fr);
    gap: 16px 24px;
    margin: 0;
}

.contribution-admin-details div {
    min-width: 0;
}

.contribution-admin-details dt {
    margin-bottom: 4px;
    color: #69757e;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.contribution-admin-details dd {
    margin: 0;
    color: #252c31;
}

.contribution-admin-details a {
    color: #005c8e;
}

.contribution-admin-notes {
    grid-column: 1 / -1;
    padding-top: 14px;
    border-top: 1px solid #d9dddf;
}

.contribution-admin-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.contribution-admin-actions form {
    margin: 0;
}

.contribution-admin-actions .btn {
    margin-top: 0;
    border: 0;
    cursor: pointer;
}

@media (max-width: 768px) {
    .entry-form-section {
        padding: 18px;
    }

    .entry-form-grid,
    .entry-upload-grid {
        grid-template-columns: 1fr;
    }

    .entry-upload-box-featured {
        grid-column: auto;
    }

    .contribution-admin-card {
        grid-template-columns: 1fr;
    }

    .contribution-admin-heading,
    .contribution-admin-details {
        grid-template-columns: 1fr;
    }

    .contribution-admin-heading {
        flex-direction: column;
    }
}

.button-container {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

/* Responsive Design for Mobile */
@media (max-width: 768px) {
    .about-panel {
        padding: 30px 15px; /* Adjust padding for mobile */
    }

    .about-panel h2 {
        font-size: 2rem; /* Adjust heading size for mobile */
    }

    .btn {
        font-size: 1.2rem;
        padding: 14px 25px;
    }
}

/* Featured Collections Section */
.featured-collections {
    background-color: #fff;
    padding: 56px 0;
    text-align: center;
}

.featured-collections:nth-of-type(3) {
    background-color: #f7f8f9;
}

.featured-collections h2 {
    font-size: 2rem;
    margin: 0 0 32px;
}

.featured-collections .category-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.featured-collections .category-item {
    position: relative;
    display: flex;
    align-items: flex-end;
    min-height: 260px;
    overflow: hidden;
    border-radius: 8px;
    box-sizing: border-box;
    text-decoration: none;
    color: #fff;
    background-color: #202a33;
    box-shadow: 0 16px 35px rgba(30, 40, 50, 0.18);
    transition: box-shadow 0.25s ease;
}

.featured-collections .category-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    object-fit: cover;
    transition: filter 0.25s ease;
}

.featured-collections .category-item::before {
    position: absolute;
    inset: 0 0 auto;
    z-index: 1;
    height: 20%;
    content: "";
    pointer-events: none;
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 1;
    transition: opacity 0.25s ease;
}

.featured-collections .category-item:hover,
.featured-collections .category-item:focus-visible {
    box-shadow: 0 16px 35px rgba(30, 40, 50, 0.18);
}

.featured-collections .category-item:hover::before,
.featured-collections .category-item:focus-visible::before {
    opacity: 0;
}

.featured-collections .category-item:hover .category-image,
.featured-collections .category-item:focus-visible .category-image {
    filter: saturate(1.08);
}

.featured-collections .category-item:focus-visible {
    outline: 3px solid #00b0ff;
    outline-offset: 4px;
}

.featured-collections .category-content {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: flex-end;
    flex-direction: column;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
    min-height: 100%;
    padding: 24px;
    box-sizing: border-box;
}

.featured-collections .category-label {
    color: #000;
    font-size: 1.24rem;
    font-weight: 700;
    line-height: 1.1;
    margin: 0;
    padding: 0;
    text-align: right;
    transition: opacity 0.25s ease;
}

.featured-collections .archive-card-label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: -10px;
}

.featured-collections .archive-card-number {
    display: block;
    color: #41505c;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    line-height: 1;
    text-transform: uppercase;
}

.featured-collections .archive-card-brand {
    display: block;
    color: #000;
    font-size: 1.24rem;
    font-weight: 700;
    line-height: 1.08;
}

.featured-collections .category-item:hover .category-label,
.featured-collections .category-item:focus-visible .category-label {
    opacity: 0.5;
}

.featured-collections .category-action {
    flex: 0 0 auto;
    padding: 9px 14px;
    border: 2px solid #000;
    border-radius: 5px;
    color: #000;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    line-height: 1;
    text-transform: uppercase;
    background-color: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

.featured-collections .category-item:hover .category-action,
.featured-collections .category-item:focus-visible .category-action {
    background-color: #41505c;
    border-color: #41505c;
    color: #fff;
}

.featured-collections .category-action.btn {
    display: inline-flex;
    align-items: center;
    margin: 0;
    box-shadow: none;
}

/* Responsive Design for Mobile */
@media (max-width: 768px) {
    .featured-collections {
        padding: 36px 0;
    }

    .featured-collections .category-list {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .featured-collections .category-item {
        min-height: 210px;
    }

    .featured-collections .category-item::before {
        height: 72px;
    }

    .featured-collections h2 {
        font-size: 1.8rem; /* Adjust heading size for mobile */
        margin-bottom: 24px; /* Reduce margin for better spacing */
    }

    .featured-collections .category-content {
        position: absolute;
        inset: 0;
        align-items: stretch;
        flex-direction: column;
        justify-content: space-between;
        min-height: 0;
        padding: 20px;
    }

    .featured-collections .category-label {
        align-self: flex-start;
        max-width: 100%;
        font-size: 1.08rem;
        text-align: left;
    }

    .featured-collections .archive-card-label {
        margin-top: 0;
        padding-top: 1px;
    }

    .featured-collections .archive-card-number {
        font-size: 0.62rem;
    }

    .featured-collections .archive-card-brand {
        font-size: 1.08rem;
    }

    .featured-collections .category-action {
        align-self: flex-start;
    }
}

/* Filter Panel */
.catalog-controls {
    margin-bottom: 28px;
    padding: 24px;
    border: 1px solid #d9dfe3;
    background: #f7f8f9;
}

.catalog-controls-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 22px;
}

.catalog-controls-kicker {
    margin: 0 0 4px;
    color: #69757e;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.catalog-controls-heading h2 {
    margin: 0;
    color: #263139;
    font-size: 1.55rem;
    line-height: 1.1;
}

.catalog-result-count {
    margin: 0;
    color: #69757e;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.desktop-filter-panel {
    display: block;
    color: #263139;
    box-sizing: border-box;
}

.catalog-filter-panel {
    padding-bottom: 20px;
    border-bottom: 1px solid #d9dfe3;
}

.catalog-filter-panel .filter-form {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 14px;
}

.catalog-search-panel {
    padding-top: 20px;
}

.catalog-search-panel form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    align-items: end;
}

/* Filter Items */
.desktop-filter-panel .filter-item {
    display: flex;
    min-width: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 7px;
}

/* Label Styling */
.desktop-filter-panel label {
    color: #596771;
    font-size: 0.67rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.desktop-filter-panel select,
.desktop-filter-panel input {
    width: 100%;
    min-height: 44px;
    padding: 10px 13px;
    border: 1px solid #c5cdd2;
    border-radius: 0;
    background-color: #fff;
    color: #263139;
    font: inherit;
    box-sizing: border-box;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.desktop-filter-panel select {
    padding-right: 36px;
    appearance: none;
    background-image:
        linear-gradient(45deg, transparent 50%, #596771 50%),
        linear-gradient(135deg, #596771 50%, transparent 50%);
    background-position:
        calc(100% - 16px) 18px,
        calc(100% - 11px) 18px;
    background-repeat: no-repeat;
    background-size: 5px 5px, 5px 5px;
}

.desktop-filter-panel select:hover,
.desktop-filter-panel input:hover {
    border-color: #8b989f;
}

.desktop-filter-panel select:focus,
.desktop-filter-panel input:focus {
    border-color: #0078d4;
    outline: 0;
    box-shadow: 0 0 0 3px rgba(0, 120, 212, 0.14);
}

.desktop-filter-panel input::placeholder,
.desktop-filter-panel input::placeholder {
    color: #89949b;
}

.desktop-filter-panel .btn {
    min-height: 44px;
    padding: 10px 20px;
    border: 1px solid #41505c;
    border-radius: 0;
    background-color: #41505c;
    color: #fff;
    cursor: pointer;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
    margin: 0;
    box-shadow: none;
}

#desktop-search-form .search-actions {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    width: auto;
    gap: 8px;
}

#desktop-search-form .search-actions .btn {
    width: auto;
    white-space: nowrap;
}

.desktop-filter-panel .btn:hover {
    border-color: #0078d4;
    background-color: #0078d4;
    color: #fff;
    box-shadow: none;
}

.desktop-filter-panel .btn-secondary {
    border-color: #aeb8be;
    background: transparent;
    color: #41505c;
}

.desktop-filter-panel .btn-secondary:hover {
    border-color: #41505c;
    background: #fff;
    color: #263139;
}

@media (max-width: 1100px) and (min-width: 769px) {
    .catalog-filter-panel .filter-form {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* Catalog Page */
.catalog-container {
    padding: 20px;
    background-color: #fff;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.catalog-container h1 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: #41505c;
}

.catalog-container td {
    padding: 2px;
    text-align: center;
    vertical-align: middle;
}

.catalog-container th,
.catalog-container td {
    border-right: 0;
    border-left: 0;
}

.catalog-container thead th {
    border-top: 1px solid #ddd;
}

.catalog-container tbody tr:last-child td {
    border-bottom: 0;
}

/* Default state for mobile features to be hidden */
.mobile-table {
    display: none; /* Hidden by default */
}

.mobile-catalog-controls {
    display: none;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 1rem;
    text-align: left;
}

th, td {
    padding: 10px 15px;
    border: 1px solid #ddd;
}

th {
    background-color: #41505c;
    color: #fff;
    text-transform: uppercase;
}

tr {
    background-color: #fff;
}

/* Default state for table rows */
table tbody tr {
    cursor: pointer; /* Make rows look clickable */
    transition: outline 0.1s ease; /* Smooth transition for hover in and out */
}

/* Hover state for table rows */
table tbody tr:hover {
    outline: 4px solid #0078D4; /* Add solid border on hover */
    outline-offset: -4px;
}

/* General Button Styling */
.btn {
    display: inline-block;
    margin-top: 20px;
    padding: 10px 15px;
    background-color: #41505c; /* Matches site theme */
    color: white;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: bold;
    text-transform: uppercase;
    border-radius: 5px;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    text-align: center;
}

.btn:hover {
    background-color: #00b0ff; /* Bright blue hover effect */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3); /* Enhanced shadow on hover */
}

.btn:active {
    transform: translateY(0); /* Returns to original position on click */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2); /* Reset shadow */
}

/* Record Detail */
.record-detail-page {
    max-width: 1600px;
    margin: 0 auto;
    padding: 64px 32px 80px;
}

.record-detail-layout {
    display: grid;
    grid-template-columns: minmax(280px, 0.72fr) minmax(0, 1.28fr);
    gap: clamp(40px, 6vw, 100px);
    align-items: start;
}

.record-information {
    max-width: 520px;
}

.record-back-link {
    display: inline-block;
    margin-bottom: 48px;
    color: #41505c;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-decoration: none;
    text-transform: uppercase;
}

.record-back-link:hover {
    color: #0078d4;
}

.record-number {
    margin: 0 0 16px;
    color: #69757e;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: none;
}

.record-information h1 {
    margin: 0;
    color: #20272c;
    font-size: clamp(2.5rem, 5vw, 5.25rem);
    line-height: 0.98;
    letter-spacing: -0.055em;
}

.record-circulation {
    margin: 24px 0 0;
    color: #41505c;
    font-size: 1.15rem;
    line-height: 1.35;
}

.record-contributor {
    margin: 7px 0 0;
    color: #69757e;
    font-size: 0.92rem;
}

.record-contributor-credit {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    white-space: nowrap;
}

.record-contributor-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    color: #41505c;
    text-decoration: none;
    transition: color 160ms ease, transform 160ms ease;
}

.record-contributor-link:hover,
.record-contributor-link:focus-visible {
    color: #005c8e;
}

.record-contributor-link:focus-visible {
    outline: 2px solid #005c8e;
    outline-offset: 3px;
}

.record-contributor-link .material-symbols-outlined {
    font-size: 1.05rem;
    line-height: 1;
}

.record-contributor-name {
    font-weight: 600;
}

.record-contributor-unknown {
    display: flex;
    align-items: center;
    gap: 7px;
}

.record-contributor-info {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #59656e;
    line-height: 1;
    cursor: help;
}

.record-contributor-info .material-symbols-outlined {
    font-size: 1.05rem;
    line-height: 1;
}

.record-contributor-info:focus {
    outline: 2px solid #20272c;
    outline-offset: 2px;
}

.record-contributor-tooltip {
    position: absolute;
    bottom: calc(100% + 9px);
    left: 50%;
    z-index: 5;
    width: min(260px, calc(100vw - 40px));
    padding: 10px 12px;
    border-radius: 6px;
    background: #20272c;
    color: #ffffff;
    font-size: 0.78rem;
    font-weight: 400;
    line-height: 1.45;
    text-align: left;
    transform: translateX(-50%) translateY(4px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 160ms ease, transform 160ms ease;
}

.record-contributor-tooltip::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    border: 6px solid transparent;
    border-top-color: #20272c;
    transform: translateX(-50%);
}

.record-contributor-info:hover .record-contributor-tooltip,
.record-contributor-info:focus .record-contributor-tooltip,
.record-contributor-link:hover .record-contributor-tooltip,
.record-contributor-link:focus-visible .record-contributor-tooltip {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.record-information hr {
    margin: 20px 0;
    border: 0;
    border-top: 1px solid #cbd0d4;
}

.record-description {
    color: #313a40;
    font-size: 1.04rem;
    line-height: 1.35;
}

.record-description p {
    margin: 0;
}

.record-details {
    margin-top: 52px;
}

.record-details h2 {
    margin: 0 0 18px;
    color: #20272c;
    font-size: 1.5rem;
    text-align: left;
}

.record-details dl {
    margin: 0;
    border-top: 1px solid #cbd0d4;
}

.record-details dl > div {
    display: grid;
    grid-template-columns: minmax(115px, 0.8fr) minmax(0, 1.2fr);
    align-items: center;
    gap: 24px;
    padding: 9px 0;
    border-bottom: 1px solid #d9dddf;
}

.record-details dt {
    color: #69757e;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.record-details dd {
    margin: 0;
    color: #252c31;
}

.record-brand-value,
.record-brand-link {
    display: inline-flex;
    align-items: baseline;
    max-width: 100%;
    min-width: 0;
    white-space: nowrap;
}

.record-brand-link {
    gap: 4px;
    color: inherit;
    font: inherit;
    font-weight: 400;
    line-height: inherit;
    text-decoration: none;
    transition: color 0.18s ease;
}

.record-brand-extension {
    font-size: 0.84em;
}

.record-brand-link .material-symbols-outlined {
    font-size: 1.08em;
    font-weight: 400;
    line-height: 1;
}

.record-brand-link:hover,
.record-brand-link:focus-visible {
    color: #005c8e;
}

.record-tag-list {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0;
}

.record-tag {
    display: inline-flex;
    align-items: baseline;
    gap: 3px;
    color: #252c31;
    font: inherit;
    line-height: inherit;
    text-decoration: none;
    transition: color 0.18s ease;
}

.record-tag:not(:last-child)::after {
    content: "";
}

.record-tag .material-symbols-outlined {
    font-size: 0.86em;
    line-height: 1;
}

.record-tag:hover,
.record-tag:focus-visible {
    color: #005c8e;
    text-decoration: none;
}

.record-tag:focus-visible {
    outline: 2px solid rgba(0, 120, 212, 0.25);
    outline-offset: 3px;
}

.record-gallery {
    position: sticky;
    top: 116px;
    min-width: 0;
}

.record-viewer {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 48px;
    overflow: visible;
    background: transparent;
}

.record-viewer-toolbar {
    grid-column: 2;
    grid-row: 1;
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-left: 6px;
    background: #f4f4f4;
}

.viewer-control {
    display: inline-grid;
    width: 42px;
    height: 42px;
    padding: 0;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 0;
    background: rgba(25, 30, 34, 0.82);
    color: #fff;
    font: 400 1.55rem/1 Arial, sans-serif;
    cursor: pointer;
    transition: background-color 0.18s ease, border-color 0.18s ease;
}

.viewer-control:hover,
.viewer-control:focus-visible {
    border-color: #fff;
    background: #fff;
    color: #20272c;
}

.viewer-control:focus-visible,
.record-thumbnail:focus-visible {
    outline: 3px solid #00b0ff;
    outline-offset: 3px;
}

.viewer-control-icon svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: square;
    stroke-width: 1.7;
}

.viewer-full-resolution {
    border-color: #c5cdd2;
    background: transparent;
    color: #20272c;
}

.viewer-full-resolution:hover,
.viewer-full-resolution:focus-visible {
    border-color: #8fa0ad;
    background: #eef2f4;
    color: #20272c;
}

@media (min-width: 561px) {
    .viewer-control:not(.viewer-full-resolution) {
        display: none;
    }
}

.record-viewer-stage {
    grid-column: 1;
    grid-row: 1;
    width: 100%;
    height: 100%;
    aspect-ratio: 3 / 2;
    overflow: hidden;
    background: #fff;
    box-sizing: border-box;
    cursor: zoom-in;
}

.record-magnifier {
    --magnifier-size: clamp(170px, 18vw, 250px);
    position: absolute;
    z-index: 2;
    width: var(--magnifier-size);
    height: var(--magnifier-size);
    border: 2px solid rgba(255, 255, 255, 0.94);
    border-radius: 50%;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.24), inset 0 0 0 1px rgba(0, 0, 0, 0.16);
    background-color: #fff;
    background-repeat: no-repeat;
    opacity: 0;
    pointer-events: none;
    transform: translate3d(var(--magnifier-x, 0px), var(--magnifier-y, 0px), 0) translate(-50%, -50%) scale(0.96);
    transition: opacity 0.12s ease;
    will-change: transform, background-position;
}

.record-magnifier-text {
    position: absolute;
    top: calc(100% - 4px);
    left: 0;
    width: 100%;
    height: 22px;
    overflow: visible;
    pointer-events: none;
}

.record-magnifier-text path {
    fill: none;
}

.record-magnifier-text text {
    fill: #000;
    font: 700 0.62rem/1 Arial, sans-serif;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.record-magnifier.is-visible {
    opacity: 1;
    transform: translate3d(var(--magnifier-x, 0px), var(--magnifier-y, 0px), 0) translate(-50%, -50%) scale(1);
}

.record-viewer-stage img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform-origin: center;
    transition: transform 0.2s ease;
    user-select: none;
}

.record-viewer.is-zoomed .record-viewer-stage {
    cursor: zoom-in;
}

.record-viewer.is-max-zoom .record-viewer-stage {
    cursor: default;
}

@media (hover: hover) and (pointer: fine) {
    .record-viewer-stage {
        position: relative;
        cursor: none;
    }

    .record-viewer[data-magnifier="unavailable"] .record-viewer-stage {
        cursor: default;
    }

}

@media (hover: none), (pointer: coarse) {
    .record-magnifier {
        display: none;
    }
}

.record-thumbnails {
    display: flex;
    gap: 10px;
    margin-top: 14px;
    padding-bottom: 6px;
    overflow-x: auto;
}

.record-thumbnail {
    flex: 0 0 88px;
    height: 68px;
    padding: 3px;
    border: 2px solid transparent;
    background: #fff;
    cursor: pointer;
}

.record-thumbnail.is-active {
    border-color: #41505c;
}

.record-thumbnail img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.record-gallery-empty {
    display: grid;
    min-height: 400px;
    place-items: center;
    background: #e3e6e8;
    color: #69757e;
}

@media (max-width: 980px) {
    .record-detail-page {
        padding: 48px 20px 64px;
    }

    .record-detail-layout {
        grid-template-columns: 1fr;
        gap: 42px;
    }

    .record-information {
        max-width: 680px;
    }

    .record-back-link {
        margin-bottom: 32px;
    }

    .record-gallery {
        position: static;
    }
}

@media (max-width: 560px) {
    .record-information h1 {
        font-size: clamp(2.4rem, 14vw, 4rem);
    }

    .record-viewer-toolbar {
        gap: 4px;
        padding-left: 4px;
    }

    .viewer-control {
        width: 38px;
        height: 38px;
    }

    .record-details dl > div {
        grid-template-columns: minmax(98px, 0.8fr) minmax(0, 1.2fr);
        gap: 12px;
        padding: 7px 0;
    }

    .record-thumbnails {
        flex-wrap: wrap;
        gap: 8px;
        overflow-x: visible;
        padding-bottom: 0;
    }
}

.pagination a {
    text-decoration: none;
    color: #41505c; /* Dark blue to match the site's color scheme */
    padding: 10px 15px;
    margin: 0 5px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.pagination a:visited {
    color: #fff; /* Keep visited links the same dark blue color */
}

.pagination a.active {
    background-color: #41505c; /* Match header color for active page */
    color: #fff;
    border-color: #41505c;
}

.pagination a:hover {
    background-color: #0078D4; /* Bright blue hover effect */
    color: #fff; /* White text on hover */
}

.pagination a.next {
    background-color: #41505c; /* Match header color for active page */
    color: #fff;
    border-color: #41505c;
}

/* Footer Styles */
footer {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    background-color: #2f3a43;
    color: #edf2f4;
    padding: 26px 0 22px;
}

footer .footer-layout {
    display: grid;
    grid-template-columns: minmax(260px, 1.5fr) repeat(2, minmax(150px, 0.75fr));
    gap: 16px 36px;
    align-items: start;
}

footer .footer-brand {
    max-width: 430px;
}

footer .footer-logo {
    display: inline-block;
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1.2;
    text-decoration: none;
    text-transform: uppercase;
}

footer .footer-brand p {
    margin: 8px 0 0;
    color: #d8e0e4;
    font-size: 0.96rem;
    font-weight: 400;
    line-height: 1.4;
}

footer .footer-nav h2 {
    margin: 0 0 7px;
    color: #ffffff;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    line-height: 1.2;
    text-transform: uppercase;
}

footer .footer-nav {
    display: block;
    position: static;
    min-width: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    opacity: 1;
    pointer-events: auto;
    transform: none;
    transition: none;
}

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

footer .footer-nav li + li {
    margin-top: 6px;
}

footer .footer-nav a {
    display: inline;
    padding: 0;
    border-radius: 0;
    color: #d8e0e4;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0;
    line-height: 1.35;
    text-decoration: none;
    text-transform: none;
    transition: color 0.18s ease;
}

footer .footer-logo:hover,
footer .footer-logo:focus-visible,
footer .footer-nav a:hover,
footer .footer-nav a:focus-visible {
    color: #ffffff;
}

footer .footer-copyright {
    grid-column: 1 / -1;
    margin: 2px 0 0;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    color: #c7d0d6;
    font-size: 0.9rem;
    font-weight: 400;
    line-height: 1.4;
}

/* Database Change Log */
.db-log-page {
    padding-bottom: 48px;
}

.db-log-page .entry-form-header p {
    margin: 8px 0 0;
    color: #596771;
    font-size: 1rem;
}

.db-log-list {
    display: grid;
    gap: 18px;
    margin-top: 28px;
}

.db-log-record {
    overflow: hidden;
    border: 1px solid #d5dade;
    border-radius: 8px;
    background: #fff;
}

.db-log-record-header {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    padding: 12px 16px;
    background: #edf2f4;
    color: #41505c;
}

.db-log-record-header p {
    margin: 0;
    font-size: 0.88rem;
    font-weight: 600;
}

.db-log-record-header p:nth-child(2) {
    text-transform: capitalize;
}

.db-log-record pre {
    max-height: 460px;
    margin: 0;
    padding: 18px;
    overflow: auto;
    color: #263139;
    font: 0.84rem/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.db-log-empty {
    margin-top: 28px;
    padding: 22px;
    border: 1px solid #d5dade;
    border-radius: 8px;
    background: #fff;
    color: #596771;
}

/* Responsive Design for Mobile */
@media (max-width: 768px) {
    footer .footer-layout {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    footer .footer-copyright {
        margin-top: 0;
    }

    /* Hide desktop filter on mobile */
    .desktop-filter-panel {
        display: none;
    }
    
    .mobile-catalog-controls {
        display: block;
    }

    .mobile-control-tabs {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1px;
        background: #c5cdd2;
    }

    .mobile-control-tab {
        min-height: 46px;
        padding: 10px 14px;
        border: 0;
        background: #fff;
        color: #41505c;
        cursor: pointer;
        font-size: 0.72rem;
        font-weight: 700;
        letter-spacing: 0.1em;
        text-transform: uppercase;
    }

    .mobile-control-tab:hover,
    .mobile-control-tab.is-active {
        background: #41505c;
        color: #fff;
    }

    .mobile-control-tab:focus-visible {
        position: relative;
        z-index: 1;
        outline: 3px solid rgba(0, 120, 212, 0.3);
        outline-offset: -3px;
    }

    .mobile-control-panel {
        padding: 18px 0 0;
    }

    .mobile-control-panel[hidden] {
        display: none;
    }

    .mobile-control-panel form {
        display: grid;
        gap: 14px;
    }

    #mobile-filter-form {
        grid-template-columns: 1fr 1fr;
    }

    #mobile-filter-form .search-actions {
        grid-column: 1 / -1;
    }

    .mobile-control-panel .filter-item {
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 7px;
    }

    .mobile-control-panel label {
        color: #596771;
        font-size: 0.67rem;
        font-weight: 700;
        letter-spacing: 0.1em;
        text-transform: uppercase;
    }

    .mobile-control-panel input,
    .mobile-control-panel select {
        width: 100%;
        min-height: 46px;
        padding: 10px 13px;
        border: 1px solid #c5cdd2;
        border-radius: 0;
        background: #fff;
        color: #263139;
        font-size: 1rem;
        box-sizing: border-box;
    }

    .mobile-control-panel select {
        padding-right: 34px;
        appearance: none;
        background-image:
            linear-gradient(45deg, transparent 50%, #596771 50%),
            linear-gradient(135deg, #596771 50%, transparent 50%);
        background-position:
            calc(100% - 15px) 19px,
            calc(100% - 10px) 19px;
        background-repeat: no-repeat;
        background-size: 5px 5px, 5px 5px;
    }

    .mobile-control-panel input:focus,
    .mobile-control-panel select:focus {
        border-color: #0078d4;
        outline: 0;
        box-shadow: 0 0 0 3px rgba(0, 120, 212, 0.14);
    }

    .mobile-control-panel .search-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .mobile-control-panel .btn {
        min-height: 44px;
        margin: 0;
        padding: 10px 14px;
        border: 1px solid #41505c;
        border-radius: 0;
        background-color: #41505c;
        color: #fff;
        text-transform: uppercase;
        font-size: 0.72rem;
        font-weight: 700;
        letter-spacing: 0.08em;
        cursor: pointer;
        box-shadow: none;
    }

    .mobile-control-panel .btn:hover {
        border-color: #0078d4;
        background-color: #0078d4;
        color: #fff;
    }

    .mobile-control-panel .btn-secondary {
        border-color: #aeb8be;
        background: transparent;
        color: #41505c;
    }

    .mobile-control-panel .btn-secondary:hover {
        border-color: #41505c;
        background: #fff;
        color: #263139;
    }

    .catalog-controls {
        margin-right: -10px;
        margin-left: -10px;
        padding: 20px;
    }

    .catalog-controls-heading {
        align-items: start;
        margin-bottom: 18px;
    }

    .catalog-controls-heading h2 {
        font-size: 1.35rem;
    }

    .catalog-result-count {
        padding-top: 3px;
        white-space: nowrap;
    }
    
    /* Hide the desktop catalog table */
    .desktop-table {
        display: none;
    }

    /* Show the mobile table */
    .mobile-table {
        display: block;
    }

    .mobile-record-list {
        display: grid;
        grid-template-columns: 1fr;
        gap: 14px;
        margin: 20px 0;
    }

    .mobile-record-card {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 244px);
        align-items: center;
        gap: 14px;
        padding: 12px;
        border: 1px solid #ddd;
        background: #fff;
        color: #263139;
        text-decoration: none;
        transition: border-color 0.18s ease, transform 0.18s ease;
    }

    .mobile-record-card:hover,
    .mobile-record-card:focus-visible {
        border-color: #0078d4;
        transform: translateY(-2px);
    }

    .mobile-record-card:focus-visible {
        outline: 3px solid rgba(0, 120, 212, 0.24);
        outline-offset: 2px;
    }

    .mobile-record-image {
        display: flex;
        width: 244px;
        max-width: 100%;
        height: 50px;
        align-items: center;
        justify-content: flex-end;
    }

    .mobile-record-image img {
        display: block;
        width: 244px;
        max-width: 100%;
        height: auto;
    }

    .mobile-record-card p {
        display: flex;
        min-width: 0;
        flex-direction: column;
        margin: 0;
        padding: 0;
        font-size: 0.98rem;
        line-height: 1.12;
    }

    .mobile-record-card strong {
        color: #41505c;
        font-weight: 700;
    }

    .mobile-record-card p span {
        overflow-wrap: anywhere;
    }

    .mobile-record-empty {
        margin: 20px 0;
        padding: 24px;
        border: 1px solid #ddd;
        color: #69757e;
        text-align: center;
    }

    @media (max-width: 520px) {
        .mobile-record-card {
            grid-template-columns: minmax(90px, 1fr) minmax(130px, 244px);
            gap: 8px;
        }
    }

    /* Pagination adjustments for mobile */
    .pagination {
        display: flex;
        justify-content: space-between;
        margin-top: 20px;
    }

    .pagination .page-number {
        display: none; /* Hide page numbers on mobile */
    }

    .pagination a {
        flex: 1;
        text-align: center;
        padding: 10px;
        margin: 0 5px;
        text-decoration: none;
        border: 1px solid #ddd;
        border-radius: 5px;
        background-color: #f4f4f4;
        color: #41505c;
        font-weight: bold;
        transition: background-color 0.3s ease, color 0.3s ease;
    }

    .pagination a:hover {
        background-color: #0078D4;
        color: #fff;
    }

    .pagination a.active {
        background-color: #41505c;
        color: #fff;
    }

}
