/* Regional section pages (template-parts/regions). Built on the brand block styles (humanistsuk-gutenberg-blocks/css/brand-blocks.css), which load first. */

.region-page {
    color: var(--rp-text);
    font-size: 1.0625rem;
    line-height: 1.6;
}

.region-page a {
    color: inherit;
}

.region-page h1,
.region-page h2,
.region-page h3 {
    text-decoration: none;
}

.region-page :focus-visible {
    outline: 3px solid var(--rp-yellow);
    outline-offset: 3px;
}

/* Shared pieces */

/* Small outlined link button */

.rp-empty {
    padding: 1.25rem;
    background: var(--rp-paper);
    border-left: 4px solid var(--rp-teal);
}

/* Shorter button wording on phones */

/* Hero: the photo fills the band, and a frosted panel on the left carries the text */

/* We're campaigning on */

/* The non-religious voice in public life */

/* News and events */

.rp-now {
    display: flex;
    flex-wrap: wrap;
    gap: 3rem 4rem;
}

.rp-news {
    flex: 7 1 420px;
    min-width: 0;
}

.rp-events {
    flex: 5 1 320px;
    min-width: 0;
}

.region-page .rp-news__lead {
    display: block;
    text-decoration: none;
    margin-bottom: 1.5rem;
}

.rp-news__lead img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    margin-bottom: 1rem;
}

.rp-news__date {
    display: block;
    font-size: .85rem;
    color: var(--rp-muted);
}

.rp-news__title {
    display: block;
    font-weight: 600;
    color: var(--rp-indigo);
    line-height: 1.3;
}

.rp-news__title--lead {
    font-size: clamp(1.35rem, 2.4vw, 1.75rem);
    font-weight: 700;
    letter-spacing: -.01em;
}

.region-page a:hover .rp-news__title {
    text-decoration: underline;
}

.rp-news__list {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem;
}

.rp-news__list li {
    border-top: 1px solid var(--rp-line);
}

.region-page .rp-news__list a {
    display: block;
    padding: .9rem 0;
    text-decoration: none;
}

/* Event list (front page and events page) */

.rp-eventlist {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem;
}

.rp-eventlist__item + .rp-eventlist__item {
    border-top: 1px solid var(--rp-line);
}

.region-page .rp-eventlist__item a {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 1rem 0;
    text-decoration: none;
}

.rp-eventlist__date {
    flex: 0 0 4rem;
    height: 4rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--rp-yellow);
    color: var(--rp-text);
    line-height: 1;
}

.rp-eventlist__day {
    font-size: 1.6rem;
    font-weight: 800;
}

.rp-eventlist__month {
    font-size: .8rem;
    font-weight: 500;
}

.rp-eventlist__title {
    display: block;
    font-weight: 600;
    color: var(--rp-indigo);
    line-height: 1.3;
}

.region-page a:hover .rp-eventlist__title {
    text-decoration: underline;
}

.rp-eventlist__meta,
.rp-eventlist__group {
    display: block;
    font-size: .9rem;
    color: var(--rp-muted);
}

.rp-eventlist__group {
    color: var(--rp-purple);
    font-weight: 500;
}

/* Ceremonies: the Humanist Ceremonies palette, one colour per ceremony type as on the ceremonies site */

.rp-ceremonies {
    background: var(--rp-cer-soft);
}

.rp-ceremonies__inner {
    display: flex;
    flex-wrap: wrap;
    gap: 2.5rem 4rem;
    align-items: center;
    padding: clamp(2.5rem, 6vw, 4.5rem) var(--rp-gutter);
}

.rp-ceremonies__photos {
    flex: 5 1 360px;
    position: relative;
    padding-bottom: 16%;
    min-width: 0;
}

.rp-ceremonies__photo {
    display: block;
    height: auto;
    object-fit: cover;
}

.rp-ceremonies__photo--main {
    width: 78%;
    aspect-ratio: 4 / 5;
    object-position: 50% 25%;
}

.rp-ceremonies__photo--second {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 46%;
    aspect-ratio: 3 / 4;
    border: 8px solid var(--rp-cer-soft);
}

.rp-ceremonies__body {
    flex: 7 1 420px;
    min-width: 0;
}

.rp-ceremonies__logo {
    display: block;
    width: 240px;
    max-width: 70%;
    height: auto;
    margin: 0 0 2rem;
}

.rp-ceremonies__title {
    font-family: "Hanken Grotesk", Rubik, sans-serif;
    font-size: clamp(2.1rem, 4vw, 3.1rem);
    font-weight: 300;
    letter-spacing: -.015em;
    line-height: 1.1;
    color: var(--rp-cer-indigo);
    margin: 0 0 1.5rem;
}

.rp-ceremonies__lead {
    font-size: 1.2rem;
    margin: 0 0 1rem;
}

.rp-ceremonies__types {
    list-style: none;
    padding: 0;
    margin: 1.75rem 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .5rem;
}

.region-page .rp-ceremonies__type a {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: .75rem;
    background: #fff;
    border-top: 6px solid var(--type-colour);
    text-decoration: none;
    line-height: 1.25;
}

.region-page .rp-ceremonies__type a:hover {
    background: #fafaff;
    text-decoration: underline;
}

.rp-ceremonies__type--weddings {
 --type-colour: var(--rp-cer-weddings); 
}

.rp-ceremonies__type--funerals {
 --type-colour: var(--rp-cer-funerals); 
}

.rp-ceremonies__type--namings {
 --type-colour: var(--rp-cer-namings); 
}

.rp-ceremonies__count {
    font-size: clamp(1.8rem, 3.5vw, 2.4rem);
    font-weight: 800;
    letter-spacing: -.02em;
    color: var(--rp-cer-indigo);
}

.rp-ceremonies__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.25rem;
}

.region-page .rp-link--ceremonies {
    color: var(--rp-cer-indigo);
}

.region-page .rp-ceremonies__story {
    display: block;
    margin-top: 2rem;
    padding-top: 1.25rem;
    border-top: 1px solid #c9cbea;
    text-decoration: none;
    color: var(--rp-cer-indigo);
}

.region-page .rp-ceremonies__story:hover .rp-ceremonies__story-title {
    text-decoration: underline;
}

.rp-ceremonies__story-label {
    display: block;
    font-size: .9rem;
}

.rp-ceremonies__story-title {
    display: block;
    font-family: "Hanken Grotesk", Rubik, sans-serif;
    font-size: 1.25rem;
    font-weight: 500;
    line-height: 1.3;
}

.rp-ceremonies__dna {
    height: clamp(28px, 3.2vw, 46px);
    background-position: left center;
    background-size: auto 100%;
    background-repeat: repeat-x;
}

@media (min-width: 576px) {
    .rp-ceremonies__types {
            gap: .75rem;
    
    }

    .region-page .rp-ceremonies__type a {
            padding: 1rem;
    
    }
}

/* Local groups */

.rp-groups__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
}

.rp-group {
    display: flex;
    flex-direction: column;
    background: var(--rp-paper);
}

.rp-group__banner {
    display: block;
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.rp-group__body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: .35rem;
    padding: 1.25rem;
}

.rp-group__body .rp-chip {
    margin-top: auto;
}

.rp-group__name {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--rp-indigo);
}

.rp-group__next {
    color: var(--rp-purple);
    font-weight: 500;
}

.rp-group--start {
    background: var(--rp-indigo);
    color: #fff;
}

.rp-group--start .rp-group__name {
    color: #fff;
}

/* What we've changed: a real sequence, so it's an ordered list on a line */

.rp-record {
    background: var(--rp-purple);
    color: #fff;
}

.rp-record__head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1rem;
    margin-bottom: 2.5rem;
}

.rp-record__heading {
    font-size: clamp(1.9rem, 3.6vw, 2.8rem);
    font-weight: 800;
    letter-spacing: -.02em;
    line-height: 1.05;
    text-transform: uppercase;
    max-width: 18ch;
    margin: 0;
    color: #fff;
}

.rp-record__list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    border-top: 4px solid var(--rp-teal);
}

.rp-record__list li {
    position: relative;
    padding: 1.75rem 1.25rem 1rem 0;
}

.rp-record__list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: -12px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--rp-purple);
    border: 4px solid var(--rp-teal);
}

.rp-record__year {
    display: block;
    font-weight: 800;
    font-size: 1.6rem;
    line-height: 1.2;
    margin-bottom: .25rem;
}

.region-page .rp-record__list a {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
}

.region-page .rp-record__list a:hover {
    text-decoration: underline;
}

.rp-record__span {
    display: none;
}

.rp-heritage {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem 4rem;
    align-items: center;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, .3);
}

.rp-heritage__text {
    flex: 6 1 380px;
}

.rp-heritage__text h3 {
    font-size: clamp(1.3rem, 2.4vw, 1.7rem);
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 .6rem;
    color: #fff;
}

.rp-heritage__text p {
    margin: 0;
    max-width: 44rem;
    text-wrap: pretty;
}

.rp-heritage__links {
    flex: 5 1 340px;
    display: flex;
    gap: 1.25rem;
    align-items: center;
}

.rp-heritage__img {
    flex: 0 0 auto;
    width: 112px;
    height: 112px;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid var(--rp-teal);
}

.rp-heritage__more {
    display: flex;
    flex-wrap: wrap;
    gap: .25rem 1rem;
    margin-top: .6rem;
}

.region-page .rp-heritage__more a {
    color: #fff;
    font-weight: 500;
    font-size: .95rem;
    text-decoration: underline;
    text-underline-offset: .2em;
}

.region-page .rp-heritage__more a:hover {
    color: var(--rp-teal);
}

/* Coordinator */

/* Services strip */

.rp-services {
    padding: 0 var(--rp-gutter) clamp(2.5rem, 5vw, 3.5rem);
}

.rp-services__row {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1.25rem 2rem;
    border-top: 1px solid var(--rp-line);
    border-bottom: 1px solid var(--rp-line);
    padding: 1.75rem 0;
}

.region-page .rp-services__item {
    display: flex;
    align-items: center;
    gap: .85rem;
    text-decoration: none;
    color: var(--rp-indigo);
    white-space: nowrap;
}

.region-page .rp-services__item:hover {
    color: var(--rp-purple);
    text-decoration: underline;
}

.rp-services__icon {
    flex: 0 0 76px;
    width: 76px;
    height: 52px;
    border-radius: 999px;
    background: var(--rp-cer-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

.rp-services__label {
    font-weight: 700;
    font-size: 1.1rem;
    line-height: 1.2;
}

/* Sign-up */

.rp-signup {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem 3rem;
    align-items: flex-start;
    padding: clamp(2.5rem, 6vw, 4.5rem) var(--rp-gutter);
    background: var(--rp-teal);
    color: var(--rp-text);
}

.rp-signup__text {
    flex: 5 1 300px;
}

.rp-signup__text .rp-h2 {
    color: var(--rp-text);
    margin-bottom: .75rem;
}

.rp-signup__text p {
    font-size: 1.1rem;
    max-width: 30rem;
    margin: 0;
}

.rp-signup__form {
    flex: 7 1 420px;
    min-width: 0;
    background: #fff;
    padding: 1.5rem;
}

/* Where the sign-up form isn't available (the region's own site), a button to it on humanists.uk. */
.rp-signup__link {
    flex: 7 1 420px;
    align-self: center;
}

/* The full news list: one column, so the lead story is kept to a readable size. */
.rp-now--news .rp-news {
    max-width: 52rem;
}

/* Page header (events, about, campaigns, contact) */

/* About page */

.rp-photostrip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.rp-photostrip img {
    display: block;
    width: 100%;
    height: 260px;
    object-fit: cover;
}

/* Campaigns page */

/* Contact page */

.rp-contact {
    display: flex;
    flex-wrap: wrap;
    gap: 2.5rem 4rem;
    padding-top: 0;
}

.rp-contact__details {
    flex: 4 1 280px;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.rp-contact__details .rp-h3 {
    font-size: 1.4rem;
    margin-bottom: .5rem;
}

.rp-contact__details p {
    margin: 0;
}

.rp-contact__photo {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.rp-contact__form {
    flex: 7 1 420px;
    min-width: 0;
    background: var(--rp-paper);
    padding: clamp(1.25rem, 3vw, 2rem);
}

.rp-contact__form .rp-h2 {
    font-size: 1.6rem;
    margin-bottom: 1rem;
}

.rp-contact__form .gform_wrapper label.gfield_label {
    font-weight: 500;
    color: var(--rp-indigo);
}

.rp-contact__form .gform_wrapper input[type="text"],
.rp-contact__form .gform_wrapper input[type="email"],
.rp-contact__form .gform_wrapper select,
.rp-contact__form .gform_wrapper textarea {
    font-size: 1rem;
    padding: .7rem .8rem;
    border: 2px solid #c9c8dc;
    border-radius: 4px;
    background: #fff;
}

/* Gravity Forms fixes selects at 38px tall with a matching line-height, which hides the text once padded */

.rp-contact__form .gform_wrapper select {
    height: auto;
    line-height: 1.4;
}

/* Gravity Forms sets its theme colours in the page body under #gform_wrapper_<id>, so the override has
   to name the form (64, the one rendered by northern-ireland/contact.php) to win. */

.region-page .rp-contact__form #gform_wrapper_64.gform-theme {
    --gf-color-primary: #702f8a;
    --gf-color-primary-rgb: 112, 47, 138;
    --gf-color-primary-darker: #4c4184;
    --gf-color-primary-lighter: #8e4bab;
    --gf-ctrl-btn-radius: 2rem;
}

/* Phones: centred, type sized to the screen, timeline reduced to its span */

@media (max-width: 639.98px) {
    .rp-group__body {
            align-items: center;
            text-align: center;
    
    }

    .region-page .rp-group__body .rp-chip {
            align-self: center;
    
    }

    .rp-groups .rp-h2 {
            text-align: center;
    
    }

    .rp-record__head .rp-chip,
        .rp-record__list:not(.rp-record__list--always) {
            display: none;
    
    }

    .rp-record__head {
            margin-bottom: 1.5rem;
    
    }

    .rp-record__span {
            display: flex;
            flex-direction: column;
            gap: 1rem;
    
    }

    .rp-record__years {
            display: flex;
            align-items: center;
            gap: .75rem;
            font-weight: 800;
            font-size: 2.4rem;
            line-height: 1;
            letter-spacing: -.02em;
            color: var(--rp-teal);
    
    }

    .rp-record__line {
            flex: 1;
            height: 4px;
            background: var(--rp-teal);
            position: relative;
    
    }

    .rp-record__line::before,
        .rp-record__line::after {
            content: "";
            position: absolute;
            top: -5px;
            width: 14px;
            height: 14px;
            border-radius: 50%;
            background: var(--rp-teal);
    
    }

    .rp-record__line::before {
            left: 0;
    
    }

    .rp-record__line::after {
            right: 0;
    
    }

    .region-page .rp-record__span a {
            color: #fff;
            font-weight: 500;
            text-decoration: underline;
            text-underline-offset: .2em;
    
    }

    .region-page .rp-record__span a:hover {
            color: var(--rp-teal);
    
    }
}
