:root {
    --rsr-navy: #062541;
    --rsr-navy-2: #0a3157;
    --rsr-blue: #086ac9;
    --rsr-blue-dark: #0053a5;
    --rsr-sky: #eaf4fc;
    --rsr-text: #17324d;
    --rsr-muted: #536a80;
    --rsr-line: #cfe4f5;
    --rsr-card: #ffffff;
    --rsr-bg: #f3f8fc;
    --rsr-shadow: 0 10px 30px rgba(8, 44, 76, 0.08);
}

.rsr-page {
    margin: 0;
    background: var(--rsr-bg);
    color: var(--rsr-text);
}

.rsr-page * {
    box-sizing: border-box;
}

.rsr-shell {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
}

/* HERO
   The approved design is used as a single artwork so the Saltire, Highland
   landscape, Ross Shire Relics mark, sponsor marks and title retain the exact
   scale and spacing from the mock-up. */
.rsr-hero {
    position: relative;
    width: min(1180px, calc(100% - 40px));
    margin: 24px auto 0;
    overflow: hidden;
    background: #0b375c;
    box-shadow: 0 14px 34px rgba(9, 45, 76, .14);
}

.rsr-hero-artwork {
    display: block;
    width: 100%;
    height: auto;
    margin: 0;
}

/* The hero uses the same desktop width as .rsr-shell so its left and right
   edges line up exactly with the content cards below. */
@media (max-width: 700px) {
    .rsr-hero {
        width: min(100% - 26px, 1180px);
        margin-top: 14px;
    }
}

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

/* BREADCRUMB */
.rsr-breadcrumb {
    background: #fff;
    border-bottom: 1px solid #dfeaf3;
    box-shadow: 0 4px 18px rgba(20, 57, 87, .04);
}

.rsr-breadcrumb .rsr-shell {
    min-height: 54px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: .85rem;
}

.rsr-breadcrumb a {
    color: var(--rsr-blue-dark);
    text-decoration: none;
    font-weight: 700;
}

.rsr-breadcrumb span {
    color: #8aa0b3;
    font-size: 1.25rem;
}

.rsr-breadcrumb strong {
    font-weight: 700;
    color: var(--rsr-text);
}

/* MAIN CARDS */
.rsr-main {
    padding: 26px 0 38px;
    display: grid;
    gap: 22px;
}

.rsr-card {
    background: rgba(255,255,255,.97);
    border: 1px solid #e3edf5;
    border-radius: 21px;
    box-shadow: var(--rsr-shadow);
}

.rsr-section-title-row {
    display: grid;
    grid-template-columns: auto auto 1fr;
    gap: 12px;
    align-items: center;
}

.rsr-section-title-row h2 {
    margin: 0;
    color: #0a3157;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: clamp(1.55rem, 2.5vw, 2.15rem);
    line-height: 1;
    text-transform: uppercase;
    white-space: nowrap;
}

.rsr-section-icon {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    color: var(--rsr-blue-dark);
    font-size: 1.4rem;
    font-weight: 800;
}

.rsr-section-line {
    height: 2px;
    margin-left: 4px;
    background: linear-gradient(90deg, var(--rsr-blue), rgba(8,106,201,0));
}

/* ABOUT */
.rsr-about {
    display: grid;
    grid-template-columns: 1.08fr .92fr;
    gap: 22px;
    padding: 24px;
}

.rsr-about-copy {
    padding: 6px 8px 4px 2px;
}

.rsr-about-copy > p {
    margin: 20px 0 0;
    max-width: 650px;
    color: #263f56;
    font-size: 1rem;
    line-height: 1.55;
}

.rsr-features {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-top: 22px;
}

.rsr-feature {
    text-align: center;
    color: #074f96;
}

.rsr-feature-icon {
    width: 68px;
    height: 68px;
    margin: 0 auto 9px;
    border: 2px solid #68b4fa;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #fff;
}

.rsr-feature-icon svg {
    width: 34px;
    height: 34px;
    fill: #075ba9;
}

.rsr-feature strong {
    display: block;
    font-size: .76rem;
    line-height: 1.25;
    text-transform: uppercase;
}

.rsr-about-actions {
    margin-top: 22px;
}

.rsr-about-media {
    position: relative;
    min-height: 356px;
    overflow: hidden;
    border-radius: 13px;
    background: #dfeaf3;
}

.rsr-about-media > img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rsr-quote {
    position: absolute;
    right: 0;
    bottom: 0;
    min-width: 67%;
    padding: 20px 28px 19px 70px;
    background: rgba(3, 35, 68, .93);
    color: #fff;
}

.rsr-quote-mark {
    position: absolute;
    left: 25px;
    top: 13px;
    color: #b9ddff;
    font-family: Georgia, serif;
    font-size: 4.1rem;
    line-height: 1;
}

.rsr-quote p {
    margin: 0;
    font-family: Georgia, 'Times New Roman', serif;
    font-style: italic;
    font-size: 1.25rem;
    line-height: 1.45;
}

.rsr-quote-line {
    display: block;
    width: 80px;
    height: 2px;
    margin-top: 11px;
    background: rgba(255,255,255,.7);
}

/* BUTTONS */
.rsr-btn,
.rsr-outline-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 13px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 800;
    transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease;
}

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

.rsr-btn-primary {
    padding: 13px 22px;
    background: linear-gradient(135deg, #096bc9, #0052a3);
    color: #fff;
    box-shadow: 0 8px 20px rgba(0, 87, 170, .18);
}

.rsr-outline-btn {
    padding: 9px 17px;
    border: 2px solid #0b6ccb;
    color: #0758a7;
    background: #fff;
    white-space: nowrap;
}

/* GALLERY */
.rsr-gallery {
    padding: 18px 18px 20px;
}

.rsr-section-heading {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 18px;
    padding: 0 2px 15px;
}

.rsr-gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.rsr-gallery-item {
    display: block;
    height: 250px;
    overflow: hidden;
    border-radius: 10px;
    background: #dfeaf3;
}

.rsr-gallery-item img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .28s ease;
}

.rsr-gallery-item:hover img {
    transform: scale(1.03);
}

.rsr-gallery-empty {
    min-height: 205px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    border: 2px dashed #bdd9ee;
    background: linear-gradient(135deg, #f8fcff, #eef7fe);
    text-align: center;
    color: var(--rsr-muted);
}

.rsr-gallery-empty strong {
    display: block;
    margin-bottom: 8px;
    color: var(--rsr-navy-2);
    font-size: 1.1rem;
}


/* ROSS SHIRE-ONLY GALLERY MANAGEMENT */
.rsr-gallery-tools {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.rsr-gallery-upload {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 14px;
    margin: 2px 2px 16px;
    border: 1px solid #cfe4f5;
    border-radius: 12px;
    background: #f7fbff;
}

.rsr-gallery-upload label {
    font-weight: 800;
    color: var(--rsr-navy-2);
    white-space: nowrap;
}

.rsr-gallery-upload input[type="file"] {
    min-width: 0;
    flex: 1;
    color: var(--rsr-text);
}

.rsr-gallery-upload button {
    border: 0;
    cursor: pointer;
}

.rsr-gallery-flash {
    margin: 0 2px 16px;
    padding: 11px 14px;
    border-radius: 10px;
    font-weight: 700;
    font-size: .9rem;
}

.rsr-gallery-flash-success {
    background: #e9f8ef;
    color: #146b37;
    border: 1px solid #bfe8ce;
}

.rsr-gallery-flash-error {
    background: #fff1f1;
    color: #9d2525;
    border: 1px solid #f0c7c7;
}

.rsr-gallery-item.rsr-gallery-extra {
    display: none;
}

.rsr-gallery-grid.rsr-gallery-expanded .rsr-gallery-extra {
    display: block;
}

.rsr-gallery-note {
    margin: 14px 2px 0;
    color: var(--rsr-muted);
    font-size: .82rem;
}

/* EVENTS */
.rsr-events {
    display: grid;
    grid-template-columns: 1.08fr .92fr;
    overflow: hidden;
    min-height: 235px;
}

.rsr-events-copy {
    position: relative;
    z-index: 2;
    padding: 24px 24px 26px;
}

.rsr-event-message {
    display: flex;
    align-items: center;
    gap: 18px;
    margin: 25px 0 20px 14px;
}

.rsr-event-message p {
    margin: 0;
    color: #30475d;
    line-height: 1.55;
}

.rsr-event-calendar {
    flex: 0 0 58px;
    width: 58px;
    height: 58px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    color: #075eb2;
    background: #e9f4fd;
}

.rsr-event-calendar svg {
    width: 34px;
    height: 34px;
    fill: currentColor;
}

.rsr-events-btn {
    margin-left: 2px;
    min-width: 335px;
}

.rsr-events-image {
    position: relative;
    min-height: 235px;
    overflow: hidden;
}

.rsr-events-image img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.rsr-events-fade {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, #fff 0%, rgba(255,255,255,.88) 12%, rgba(255,255,255,.16) 53%, rgba(255,255,255,0) 100%);
}

/* FALLBACK FOOTER - only used if the live site has no shared footer include */
.rsr-fallback-footer {
    background: #04233f;
    color: #fff;
    padding: 22px 0;
}

.rsr-footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
}

.rsr-footer-inner > div {
    display: grid;
    gap: 4px;
}

.rsr-footer-inner span {
    color: #b5cbe0;
    font-size: .82rem;
}

.rsr-footer-inner nav {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
}

.rsr-footer-inner a {
    color: #fff;
    text-decoration: none;
    font-size: .88rem;
}

@media (max-width: 980px) {
    .rsr-about {
        grid-template-columns: 1fr;
    }

    .rsr-about-media {
        min-height: 400px;
    }

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

    .rsr-gallery-item {
        height: 260px;
    }

    .rsr-events {
        grid-template-columns: 1fr;
    }

    .rsr-events-image {
        min-height: 250px;
    }

    .rsr-events-fade {
        background: linear-gradient(180deg, #fff 0%, rgba(255,255,255,.2) 35%, rgba(255,255,255,0) 100%);
    }
}

@media (max-width: 700px) {
    .rsr-shell {
        width: min(100% - 26px, 1180px);
    }

    .rsr-breadcrumb .rsr-shell {
        overflow-x: auto;
        white-space: nowrap;
    }

    .rsr-main {
        padding-top: 15px;
        gap: 14px;
    }

    .rsr-card {
        border-radius: 15px;
    }

    .rsr-about,
    .rsr-gallery,
    .rsr-events-copy {
        padding: 16px;
    }

    .rsr-section-title-row {
        grid-template-columns: auto auto 1fr;
        gap: 7px;
    }

    .rsr-section-title-row h2 {
        font-size: 1.38rem;
        white-space: normal;
    }

    .rsr-section-icon {
        width: 28px;
        height: 28px;
    }

    .rsr-features {
        grid-template-columns: repeat(2, 1fr);
        gap: 18px 10px;
    }

    .rsr-about-media {
        min-height: 330px;
    }

    .rsr-quote {
        min-width: 87%;
        padding: 16px 20px 16px 54px;
    }

    .rsr-quote-mark {
        left: 18px;
        font-size: 3.4rem;
    }

    .rsr-quote p {
        font-size: 1.05rem;
    }

    .rsr-section-heading {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .rsr-gallery-tools {
        justify-content: flex-start;
    }

    .rsr-gallery-upload {
        align-items: stretch;
        flex-direction: column;
    }

    .rsr-gallery-upload .rsr-btn {
        width: 100%;
    }

    .rsr-outline-btn {
        justify-self: start;
    }

    .rsr-gallery-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .rsr-gallery-item {
        height: 190px;
    }

    .rsr-event-message {
        margin-left: 0;
    }

    .rsr-events-btn {
        width: 100%;
        min-width: 0;
    }

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

@media (max-width: 430px) {
    .rsr-gallery-item {
        height: 155px;
    }

    .rsr-about-media {
        min-height: 285px;
    }

    .rsr-btn,
    .rsr-outline-btn {
        width: 100%;
    }
}

/* ---------------------------------------------------------
   ROSS SHIRE RELICS GALLERY LIGHTBOX
   Kept at body level so it always overlays the entire page.
--------------------------------------------------------- */
body.rsr-lightbox-open {
    overflow: hidden !important;
}

.rsr-gallery-item {
    cursor: zoom-in;
}

.rsr-lightbox[hidden] {
    display: none !important;
}

.rsr-lightbox {
    position: fixed !important;
    inset: 0 !important;
    z-index: 2147483000 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100vw !important;
    height: 100vh !important;
    margin: 0 !important;
    padding: 24px !important;
    background: rgba(0, 10, 22, 0.95) !important;
    box-sizing: border-box !important;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.rsr-lightbox-dialog {
    position: relative;
    width: min(1500px, 96vw);
    height: min(920px, 94vh);
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr) 64px;
    align-items: center;
    gap: 16px;
}

.rsr-lightbox-figure {
    min-width: 0;
    min-height: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.rsr-lightbox-image {
    display: block;
    max-width: 100%;
    max-height: calc(94vh - 72px);
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 24px 65px rgba(0, 0, 0, 0.52);
}

.rsr-lightbox-caption {
    min-height: 22px;
    color: #e7f2fb;
    font-size: .9rem;
    font-weight: 700;
    text-align: center;
}

.rsr-lightbox-close,
.rsr-lightbox-nav {
    appearance: none;
    -webkit-appearance: none;
    border: 1px solid rgba(255,255,255,.32);
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: rgba(4, 36, 64, .88);
    color: #fff;
    cursor: pointer;
    box-shadow: 0 7px 24px rgba(0,0,0,.28);
    transition: background .18s ease, transform .18s ease;
}

.rsr-lightbox-close:hover,
.rsr-lightbox-nav:hover,
.rsr-lightbox-close:focus-visible,
.rsr-lightbox-nav:focus-visible {
    background: #0871d3;
    transform: scale(1.05);
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.rsr-lightbox-nav {
    width: 58px;
    height: 58px;
    padding: 0;
    font: 400 3.1rem/1 Arial, sans-serif;
}

.rsr-lightbox-close {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 2;
    width: 48px;
    height: 48px;
    padding: 0 0 4px;
    font: 400 2rem/1 Arial, sans-serif;
}

@media (max-width: 700px) {
    .rsr-lightbox {
        padding: 10px !important;
    }

    .rsr-lightbox-dialog {
        width: 100%;
        height: 96vh;
        grid-template-columns: 42px minmax(0, 1fr) 42px;
        gap: 6px;
    }

    .rsr-lightbox-nav {
        width: 42px;
        height: 42px;
        font-size: 2.25rem;
    }

    .rsr-lightbox-close {
        top: 7px;
        right: 7px;
        width: 42px;
        height: 42px;
        font-size: 1.7rem;
    }

    .rsr-lightbox-image {
        max-height: calc(96vh - 65px);
        border-radius: 7px;
    }

    .rsr-lightbox-caption {
        font-size: .82rem;
    }
}
