/* Legacy profiles: archive (Lives That Leave a Legacy) and single profile. */

.legacy-archive,
.legacy-profile {
    --legacy-red: #7B183A;
    --legacy-sand: #F4F0E9;
}

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

.legacy-heading {
    color: var(--legacy-red);
    font-size: 55px;
    margin: 0 0 40px;
}

/*
 * style.css gives the first section on a page a 20px top margin
 * (header ~ #page-wrap section:first-child), which opens a white gap under the
 * announcement bar. The hero and title block sit flush against it.
 */
#page-wrap .legacy-archive > .legacy-hero,
#page-wrap .legacy-profile > .legacy-title-block {
    margin-top: 0;
}

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

.legacy-hero {
    height: calc(100vh - 175px);
    min-height: 620px;
    max-height: 1080px;
    background: #000;
    overflow: hidden;
}

.legacy-hero__image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100% !important;
    object-fit: cover;
    z-index: 0;
}

.legacy-hero__shade {
    background: rgba(0, 0, 0, 0.35);
    z-index: 10;
}

.legacy-hero__text {
    max-width: 900px;
    padding-bottom: 160px;
}

.legacy-hero__text h1 {
    margin: 0 0 20px;
}

.legacy-hero__subtitle {
    font-family: "Editors Note", serif;
    font-weight: 600;
    font-size: 28px;
    line-height: 1.3;
    margin: 0;
}

/* ---------- Archive toolbar ---------- */

.legacy-listing {
    padding: 80px 0 60px;
}

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

.legacy-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px;
}

.legacy-filters__label {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--legacy-red);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.legacy-filters__label svg {
    flex: none;
}

a.legacy-filter {
    display: inline-flex;
    align-items: center;
    min-height: 54px;
    padding: 0 20px;
    border: 2px solid var(--legacy-red);
    background: #fff;
    color: var(--legacy-red);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    text-decoration: none;
    transition: background-color 0.2s, color 0.2s;
    cursor: pointer;
}

a.legacy-filter:hover,
a.legacy-filter:focus-visible,
a.legacy-filter[aria-pressed="true"] {
    background: var(--legacy-red);
    color: #fff;
    text-decoration: none;
}

a.legacy-filter:focus-visible {
    outline: 3px solid #13234A;
    outline-offset: 2px;
}

.legacy-search {
    position: relative;
    width: 435px;
    max-width: 100%;
    margin: 0;
}

.legacy-search input[type="search"] {
    width: 100%;
    height: 54px;
    margin: 0;
    padding: 0 56px 0 20px;
    border: 0;
    border-radius: 0;
    background: var(--legacy-sand);
    color: var(--legacy-red);
    font-size: 14px;
    font-weight: 700;
    -webkit-appearance: none;
    appearance: none;
}

.legacy-search input[type="search"]::placeholder {
    color: var(--legacy-red);
    opacity: 1;
    text-transform: uppercase;
}

.legacy-search input[type="search"]:focus {
    outline: 2px solid var(--legacy-red);
    outline-offset: 0;
}

.legacy-search input[type="search"]::-webkit-search-cancel-button {
    cursor: pointer;
}

.legacy-search button {
    position: absolute;
    top: 0;
    right: 0;
    width: 54px;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
}

.legacy-search button img {
    width: 22px;
    height: 22px;
}

.legacy-no-results {
    color: var(--legacy-red);
    font-size: 20px;
    font-weight: 700;
    padding: 20px 0 60px;
}

/* ---------- Cards ---------- */

.legacy-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    column-gap: 20px;
    row-gap: 60px;
}

.legacy-card[hidden] {
    display: none !important;
}

.legacy-card__image {
    display: block;
    aspect-ratio: 1 / 1;
    border-radius: 1.25rem;
    overflow: hidden;
    background: #000;
    margin-bottom: 25px;
}

.legacy-card__image img {
    width: 100%;
    height: 100% !important;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.legacy-card:hover .legacy-card__image img {
    transform: scale(1.03);
}

h3.legacy-card__title {
    font-size: 40px;
    margin: 0 0 15px;
}

.legacy-card__title a {
    color: var(--legacy-red);
    text-decoration: none;
    font-weight: inherit;
}

.legacy-card__title a:hover {
    text-decoration: underline;
}

.legacy-card__summary {
    color: #000;
    font-size: 17px;
    line-height: 1.45;
    margin: 0 0 12px;
}

a.legacy-card__more {
    color: var(--legacy-red);
    font-size: 15px;
    font-weight: 700;
    text-transform: uppercase;
    text-decoration: underline;
}

a.legacy-card__more:hover {
    text-decoration: none;
}

/* ---------- Profile title block ---------- */

.legacy-title-block {
    padding: 290px 0 50px;
}

.legacy-title-block__name {
    color: var(--legacy-red);
    margin: 0 0 25px;
}

.legacy-title-block__dates {
    font-family: "Editors Note", serif;
    font-weight: 600;
    color: var(--legacy-red);
    font-size: 28px;
    margin: 0 0 30px;
}

.legacy-title-block__intro {
    max-width: 1050px;
    color: #000;
    font-size: 26px;
    line-height: 1.3;
    margin: 0;
}

/* ---------- Profile rows ---------- */

/*
 * Chequerboard (Image and Text row) text lines up with the logo and title.
 * Those sit inside a Tailwind .container (max-width per breakpoint, centred)
 * with 20px padding; --legacy-gutter is that left edge as a percentage of the
 * full-width row, so it matches whether or not the browser shows a scrollbar.
 * The row's own fixed 40-100px paddings in style.css/responsive.css are
 * overridden here for profile pages only.
 */
.legacy-profile {
    --legacy-gutter: 20px;
}

@media (min-width: 40rem) {
    .legacy-profile { --legacy-gutter: calc(50% - 20rem + 20px); }
}

@media (min-width: 60rem) {
    .legacy-profile { --legacy-gutter: calc(50% - 30rem + 20px); }
}

@media (min-width: 75rem) {
    .legacy-profile { --legacy-gutter: calc(50% - 37.5rem + 20px); }
}

@media (min-width: 90rem) {
    .legacy-profile { --legacy-gutter: calc(50% - 45rem + 20px); }
}

@media (min-width: 96rem) {
    .legacy-profile { --legacy-gutter: calc(50% - 48rem + 20px); }
}

/* Side by side: text on the left sits 40px in from the container edge. */
@media (min-width: 851px) {
    .legacy-profile .RightImgText .col-6.textbox {
        padding-left: calc(var(--legacy-gutter) + 40px);
    }
}

/* Stacked (the row goes single column at 850px): text fills the container. */
@media (max-width: 850px) {
    .legacy-profile .RightImgText .col-6.textbox,
    .legacy-profile .LeftImgText .col-6.textbox {
        padding-left: var(--legacy-gutter);
        padding-right: var(--legacy-gutter);
    }
}

.quote-row-left {
    max-width: 1650px;
    text-align: left;
}

.quote-row-mark {
    display: block;
}

.legacy-others {
    padding: 110px 0 80px;
}

/* ---------- Header on a light background (profile pages) ---------- */

.nh-light-header #header .main-logo {
    display: none;
}

.nh-light-header #header .red-logo {
    display: block !important;
}

.nh-light-header #header .deskMenu ul.mainMenu > li > a {
    color: #7B183A;
}

.nh-light-header #header #search-btn img {
    content: url("../images/searchicon.svg");
}

.nh-light-header #header #menu-icon span {
    background: #7B183A;
}

/* ---------- Responsive ---------- */

@media (max-width: 1199px) {
    .legacy-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .legacy-title-block {
        padding-top: 220px;
    }
}

@media (max-width: 959px) {
    .legacy-toolbar {
        margin-bottom: 60px;
    }

    .legacy-search {
        width: 100%;
    }

    .legacy-heading {
        font-size: 36px;
    }

    .legacy-hero__text {
        padding-bottom: 80px;
    }

    .legacy-hero__subtitle {
        font-size: 21px;
    }

    .legacy-title-block {
        padding: 170px 0 40px;
    }

    .legacy-title-block__dates {
        font-size: 22px;
    }

    .legacy-title-block__intro {
        font-size: 20px;
    }

    .legacy-others {
        padding: 70px 0 50px;
    }
}

@media (max-width: 599px) {
    .legacy-grid {
        grid-template-columns: minmax(0, 1fr);
        row-gap: 45px;
    }

    .legacy-filters {
        gap: 12px;
    }

    .legacy-filters__label {
        width: 100%;
    }

    a.legacy-filter {
        min-height: 46px;
        padding: 0 16px;
        font-size: 13px;
    }

    h3.legacy-card__title {
        font-size: 32px;
    }
}
