/* Roland Park blog styles. Loads after the site's styles.css and only adds rp- classes. */

:root {
    --rp-dark: #37214A;
    --rp-purple: #6F5D9B;
    --rp-lilac: #A68DD6;
    --rp-light: #F0EEF4;
    --rp-gold: #B99544;
    --rp-gold-dark: #8C6F2E;
    --rp-ink: #3B2A50;
    --rp-line: #DED7EA;
}

/* Hero: the site's diagonal slab, as on the homepage */
.rp-hero {
    position: relative;
    background-color: var(--rp-light);
    background-image: url("../images/Darkpurple.png");
    background-size: cover;
    background-position: left center;
    background-repeat: no-repeat;
    padding: 150px 0 90px;
    text-align: left;
}

.rp-hero h1 {
    font-size: 4rem;
    line-height: 4.4rem;
    font-weight: 700;
}

.rp-hero .rp-hero-intro {
    font-size: 1.2rem;
    line-height: 1.9rem;
    max-width: 30ch;
}

.rp-featured {
    background: #FFF;
    border-bottom: 4px solid var(--rp-gold);
    padding: 2.25rem;
    text-align: left;
    color: var(--rp-ink);
}

.rp-featured h2 {
    font-size: 2rem;
    line-height: 2.5rem;
    font-weight: 700;
    color: var(--rp-dark);
    margin: .5rem 0 1rem;
}

/* Article hero */
.rp-post-hero {
    position: relative;
    padding: 150px 0 80px;
    text-align: left;
    overflow: hidden;
}

.rp-post-hero::after {
    content: '';
    position: absolute;
    right: -60px;
    bottom: -40px;
    width: 420px;
    height: 370px;
    background-image: url("../images/favicon.png");
    background-size: contain;
    background-repeat: no-repeat;
    filter: brightness(0) invert(1);
    opacity: .07;
    pointer-events: none;
}

.rp-post-hero .rp-wrap {
    position: relative;
    z-index: 2;
}

.rp-post-hero h1 {
    font-size: 3.4rem;
    line-height: 3.9rem;
    font-weight: 700;
    max-width: 24ch;
    margin: .75rem 0 1.25rem;
}

.rp-wrap {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Small text pieces */
.rp-category {
    display: inline-block;
    color: var(--rp-gold);
    font-weight: 700;
    font-size: .95rem;
    letter-spacing: .02em;
}

.rp-category-light {
    color: #E2C77F;
}

.rp-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem 1.5rem;
    font-size: .95rem;
    line-height: 1.4rem;
}

.rp-breadcrumb {
    font-size: .95rem;
}

.rp-breadcrumb a {
    color: #FFF;
    text-decoration: underline;
}

.rp-breadcrumb a:hover,
.rp-breadcrumb a:focus {
    color: #E2C77F;
}

/* Topic filter */
.rp-filters {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
    justify-content: center;
}

.rp-filter {
    background: transparent;
    border: 1px solid var(--rp-purple);
    color: var(--rp-purple);
    padding: .5rem 1.1rem;
    font-size: 1rem;
    cursor: pointer;
    font-family: inherit;
}

.rp-filter:hover {
    border-color: var(--rp-dark);
    color: var(--rp-dark);
}

.rp-filter[aria-pressed="true"] {
    background: var(--rp-dark);
    border-color: var(--rp-dark);
    color: #FFF;
}

/* Post tiles */
.rp-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2rem;
    text-align: left;
}

.rp-card {
    display: flex;
    flex-direction: column;
    background: #FFF;
    border: 1px solid var(--rp-line);
    border-bottom: 4px solid var(--rp-gold);
    position: relative;
}

.rp-card[hidden] {
    display: none;
}

.rp-card:hover {
    border-color: var(--rp-purple);
    border-bottom-color: var(--rp-gold);
}

.rp-card-media {
    aspect-ratio: 16 / 9;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--rp-purple);
    overflow: hidden;
}

.rp-card-media img.rp-mark {
    width: 64px;
    height: auto;
}

.rp-card-media img.rp-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rp-card-media.rp-tone-rehabilitation { background-color: var(--rp-purple); }
.rp-tone-rehabilitation img.rp-mark,
.rp-tone-skilled-nursing img.rp-mark { filter: brightness(0) invert(1); }
.rp-card-media.rp-tone-skilled-nursing { background-color: var(--rp-dark); }
.rp-card-media.rp-tone-long-term-care { background-color: var(--rp-light); }
.rp-card-media.rp-tone-for-families { background-color: #E9E1CD; }

.rp-card-body {
    padding: 1.5rem 1.5rem 1.75rem;
    display: flex;
    flex-direction: column;
    flex: 1;
    color: var(--rp-ink);
}

.rp-card h3 {
    font-size: 1.35rem;
    line-height: 1.8rem;
    font-weight: 700;
    margin: .4rem 0 .75rem;
}

.rp-card h3 a {
    color: var(--rp-dark);
}

/* whole tile clickable */
.rp-card h3 a::after {
    content: '';
    position: absolute;
    inset: 0;
}

.rp-card h3 a:hover,
.rp-card h3 a:focus {
    border-bottom: none;
    text-decoration: underline;
    text-decoration-color: var(--rp-gold);
    text-underline-offset: 4px;
}

.rp-card p {
    font-size: 1rem;
    line-height: 1.6rem;
}

.rp-card .rp-meta {
    margin-top: auto;
    padding-top: 1rem;
    color: var(--rp-purple);
    font-size: .9rem;
}

.rp-empty {
    color: var(--rp-purple);
}

/* Article body */
.rp-article {
    max-width: 720px;
    margin: 0 auto;
    text-align: left;
    color: var(--rp-ink);
    font-size: 1.15rem;
    line-height: 1.95rem;
}

.rp-article .rp-lead {
    font-size: 1.35rem;
    line-height: 2.1rem;
    color: var(--rp-dark);
}

.rp-article p,
.rp-article ul,
.rp-article ol {
    margin-bottom: 1.4rem;
}

.rp-article h2 {
    font-family: 'GalanoGrotesque', Arial, sans-serif;
    font-weight: 700;
    color: var(--rp-dark);
    font-size: 2rem;
    line-height: 2.5rem;
    margin: 3rem 0 1rem;
}

.rp-article h3 {
    font-family: 'GalanoGrotesque', Arial, sans-serif;
    font-weight: 700;
    color: var(--rp-dark);
    font-size: 1.4rem;
    line-height: 1.9rem;
    margin: 2rem 0 .75rem;
}

.rp-article a {
    color: var(--rp-gold-dark);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.rp-article a:hover,
.rp-article a:focus {
    color: var(--rp-dark);
    border-bottom: none;
}

/* bullets use the Roland Park mark, like the site's icon lists */
.rp-article ul li {
    position: relative;
    padding-left: 2.1rem;
    margin-bottom: .6rem;
}

.rp-article ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: .35rem;
    width: 1.2rem;
    height: 1.2rem;
    background-image: url('../images/favicon.png');
    background-size: contain;
    background-repeat: no-repeat;
}

.rp-article ol {
    counter-reset: rp-step;
}

.rp-article ol li {
    counter-increment: rp-step;
    position: relative;
    padding-left: 2.6rem;
    margin-bottom: .9rem;
}

.rp-article ol li::before {
    content: counter(rp-step);
    position: absolute;
    left: 0;
    top: .15rem;
    width: 1.8rem;
    height: 1.8rem;
    line-height: 1.8rem;
    text-align: center;
    background: var(--rp-dark);
    color: #FFF;
    font-family: 'GalanoGrotesque', Arial, sans-serif;
    font-size: .95rem;
    font-weight: 700;
}

.rp-article blockquote {
    border-left: 4px solid var(--rp-gold);
    padding: .25rem 0 .25rem 1.5rem;
    margin: 2rem 0;
    font-family: 'GalanoGrotesque', Arial, sans-serif;
    font-size: 1.45rem;
    line-height: 2.1rem;
    color: var(--rp-purple);
}

.rp-article strong {
    color: var(--rp-dark);
}

.rp-article figure {
    margin: 2rem 0;
}

.rp-article figure img {
    width: 100%;
    height: auto;
}

.rp-article figcaption {
    font-size: .9rem;
    color: var(--rp-purple);
    margin-top: .5rem;
}

.rp-takeaways {
    background: var(--rp-light);
    border-bottom: 4px solid var(--rp-gold);
    padding: 1.75rem 2rem .5rem;
    margin: 0 0 2.5rem;
}

.rp-takeaways h2 {
    font-size: 1.4rem;
    line-height: 1.9rem;
    margin: 0 0 1rem;
}

.rp-callout {
    background: var(--rp-dark);
    color: #FFF;
    padding: 2rem;
    margin: 3rem 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
}

.rp-callout p {
    margin: 0;
    max-width: 36ch;
    font-size: 1.2rem;
    line-height: 1.8rem;
}

.rp-callout a.rp-phone {
    color: #E2C77F;
    text-decoration: underline;
}

.rp-article .rp-callout a.btn {
    color: #FFF;
    text-decoration: none;
}

.rp-disclaimer {
    border-top: 1px solid var(--rp-line);
    padding-top: 1.25rem;
    margin-top: 3rem;
    font-size: .95rem;
    line-height: 1.6rem;
    color: var(--rp-purple);
}

/* Keyboard focus */
.rp-filter:focus-visible,
.rp-card a:focus-visible,
.rp-article a:focus-visible,
.rp-breadcrumb a:focus-visible {
    outline: 3px solid var(--rp-gold);
    outline-offset: 3px;
}

@media (max-width: 1200px) {
    .rp-hero h1 { font-size: 3.4rem; line-height: 3.9rem; }
}

@media (max-width: 992px) {
    .rp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .rp-hero { background-image: none; }
    .rp-hero.rp-hero, .rp-post-hero { padding-top: 120px; }
    .rp-hero { background-color: #37214A; background-image: linear-gradient(320deg, #37214A 30%, #6F5D9B 100%); }
    .rp-hero .rp-hero-intro { max-width: none; }
    .rp-post-hero h1 { font-size: 2.6rem; line-height: 3.1rem; }
}

/* The site swaps to the dark logo on small screens because its homepage banner turns white there.
   Blog heroes stay dark, so keep the white logo until the header turns white on scroll. */
@media (max-width: 768px) {
    body.rp-dark-top header.dark-bg:not(.fixed) .logo { display: none; }
    body.rp-dark-top header.dark-bg:not(.fixed) .logo-white { display: block; }
    body.rp-dark-top header.dark-bg:not(.fixed) .fa-bars { color: #FFF; }
}

@media (max-width: 640px) {
    .rp-grid { grid-template-columns: 1fr; }
    .rp-hero h1 { font-size: 2.4rem; line-height: 2.9rem; }
    .rp-post-hero h1 { font-size: 2rem; line-height: 2.5rem; }
    .rp-post-hero::after { width: 220px; height: 190px; }
    .rp-featured { padding: 1.5rem; }
    .rp-featured h2 { font-size: 1.6rem; line-height: 2.1rem; }
    .rp-article { font-size: 1.08rem; line-height: 1.85rem; }
    .rp-article .rp-lead { font-size: 1.2rem; line-height: 1.95rem; }
    .rp-article h2 { font-size: 1.6rem; line-height: 2.1rem; }
    .rp-callout { padding: 1.5rem; }
}

@media (prefers-reduced-motion: reduce) {
    * { scroll-behavior: auto !important; }
}

/* Article layout with side panel */
.rp-post-layout {
    display: grid;
    grid-template-columns: minmax(0, 720px) 320px;
    gap: 4.5rem;
    justify-content: center;
    align-items: start;
    padding: 0 1.5rem;
}

.rp-post-layout .rp-article {
    margin: 0;
}

.rp-post-hero .rp-wrap {
    max-width: calc(720px + 4.5rem + 320px + 3rem);
}

.rp-sidebar {
    position: sticky;
    top: 110px;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.rp-side-cta {
    background: var(--rp-dark);
    color: #FFF;
    padding: 1.75rem;
    border-bottom: 4px solid var(--rp-gold);
}

.rp-side-cta h2 {
    font-size: 1.6rem;
    line-height: 2rem;
    font-weight: 700;
    margin-bottom: .75rem;
}

.rp-side-cta p {
    font-size: 1rem;
    line-height: 1.6rem;
    margin-bottom: 1rem;
}

.rp-side-phone {
    color: #E2C77F;
    font-family: 'GalanoGrotesque', Arial, sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
}

.rp-side-phone:hover,
.rp-side-phone:focus {
    color: #FFF;
}

.rp-side-related h2 {
    font-size: 1.35rem;
    line-height: 1.8rem;
    font-weight: 700;
    color: var(--rp-dark);
    padding-bottom: .75rem;
    border-bottom: 1px solid var(--rp-line);
}

.rp-side-related li {
    padding: 1rem 0;
    border-bottom: 1px solid var(--rp-line);
}

.rp-side-related li .rp-category {
    display: block;
    font-size: .85rem;
    margin-bottom: .2rem;
}

.rp-side-related li a {
    color: var(--rp-dark);
    font-weight: 700;
    font-size: 1.02rem;
    line-height: 1.5rem;
}

.rp-side-related li a:hover,
.rp-side-related li a:focus {
    text-decoration: underline;
    text-decoration-color: var(--rp-gold);
    border-bottom: none;
}

.rp-side-all {
    display: inline-block;
    margin-top: 1rem;
    color: var(--rp-gold-dark);
    text-decoration: underline;
}

.rp-side-cta a:focus-visible,
.rp-side-related a:focus-visible {
    outline: 3px solid var(--rp-gold);
    outline-offset: 3px;
}

@media (max-width: 1100px) {
    .rp-post-layout {
        grid-template-columns: minmax(0, 720px);
        gap: 3rem;
    }
    .rp-post-hero .rp-wrap { max-width: calc(720px + 3rem); }
    .rp-sidebar { position: static; }
}

/* Feature photo: rounded, with a purple offset block behind it */
.rp-article .rp-feature-img {
    position: relative;
    margin: 0 16px 2.75rem 0;
}

.rp-article .rp-feature-img::before {
    content: '';
    position: absolute;
    top: 16px;
    left: 16px;
    right: -16px;
    bottom: -16px;
    background: var(--rp-purple);
    border-radius: 16px;
}

.rp-feature-img img {
    position: relative;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
    border-radius: 16px;
    background: var(--rp-light);
}

@media (max-width: 640px) {
    .rp-article .rp-feature-img { margin: 0 10px 2.25rem 0; }
    .rp-article .rp-feature-img::before { top: 10px; left: 10px; right: -10px; bottom: -10px; border-radius: 12px; }
    .rp-feature-img img { border-radius: 12px; }
}

/* FAQ */
.rp-faq {
    margin: 3rem 0 0;
}

.rp-faq h2 {
    margin-top: 0;
}

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

.rp-faq-item:last-of-type {
    border-bottom: 1px solid var(--rp-line);
}

.rp-faq-item summary {
    list-style: none;
    cursor: pointer;
    padding: 1.1rem 2.5rem 1.1rem 0;
    position: relative;
    font-family: 'GalanoGrotesque', Arial, sans-serif;
    font-weight: 700;
    font-size: 1.15rem;
    line-height: 1.6rem;
    color: var(--rp-dark);
}

.rp-faq-item summary::-webkit-details-marker {
    display: none;
}

.rp-faq-item summary::after {
    content: '+';
    position: absolute;
    right: .25rem;
    top: .9rem;
    font-size: 1.6rem;
    color: var(--rp-gold);
}

.rp-faq-item[open] summary::after {
    content: '\2212';
}

.rp-faq-item summary:focus-visible {
    outline: 3px solid var(--rp-gold);
    outline-offset: 3px;
}

.rp-faq-item p {
    margin: 0 0 1.25rem;
}

/* Reviewer */
.rp-reviewed {
    margin: .9rem 0 0;
    font-size: .95rem;
    line-height: 1.4rem;
    color: #E2C77F;
}

.rp-reviewer-note {
    margin: 2.5rem 0 0;
    font-size: 1rem;
    line-height: 1.6rem;
    color: var(--rp-ink);
}

.rp-reviewer-note + .rp-disclaimer {
    margin-top: 1rem;
}
