/* blog.css - Blog page (blog.php)
   Colors and fonts follow -desktop-style.css: Montserrat / Gilda Display, blue #00539f, orange #fe6a00.
   Mobile first, one media-query block in ascending order. Everything is scoped to .blog.
   Cards: 1 column on phones, 2 on tablets, 3 on desktop. Topic filter code is at the end of blog.php.
-----------------------------------------------------------------------------*/
.blog {
--blue: #00539f;
--navy: #003c86;
--orange: #fe6a00;
--orange-text: #bf4f00;  /* darker orange so text links pass WCAG AA (4.8:1 on white) */
--ink: #1a3a14;
--muted: #4d6168;
--mist: #e5f5f9;
--line: #cfe3ea;
--r: 10px;
--fs: .9rem;    /* card text */
--fsw: 1rem;    /* full-width text: intro, outro */
overflow-wrap: break-word;
}
.blog a,
.blog a:hover { text-decoration: none; }
.blog-sr {   /* text for screen readers only */
position: absolute;
width: 1px;
height: 1px;
overflow: hidden;
clip-path: inset(50%);
white-space: nowrap;
}


/* intro
-----------------------------------------------------------------------------*/
.blog-intro {
margin: 0 0 1.6rem;
font-size: calc(var(--fsw) * 1.04);
line-height: 1.7;
}


/* topic chooser (hidden until the script in blog.php turns it on)
-----------------------------------------------------------------------------*/
.blog-filter { margin: 0 0 2.2rem; }
.blog-filter[hidden] { display: none; }
.blog-topics {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: .6rem;
}
.blog-topics span {
margin-right: .3rem;
font-size: .78rem;
font-weight: 600;
letter-spacing: 1.5px;
text-transform: uppercase;
color: var(--muted);
}
.blog-topics button {
padding: .65rem 1.2rem;
font-family: inherit;
font-size: .8rem;
font-weight: 600;
line-height: 1.1;
letter-spacing: .8px;
color: var(--blue);
background: #fff;
border: 1px solid var(--blue);
border-radius: 25px;
cursor: pointer;
}
.blog-topics button[aria-pressed="true"] {
color: #fff;
background: var(--blue);
}
.blog-topics button:focus-visible {
outline: 2px solid var(--orange);
outline-offset: 2px;
}


/* cards
-----------------------------------------------------------------------------*/
.blog-grid {
display: grid;
grid-template-columns: minmax(0, 1fr);
gap: 1.6rem;
margin: 0 0 3.4rem;
}
.blog-card {
position: relative;
display: flex;
flex-direction: column;
overflow: hidden;
background: #fff;
border: 1px solid var(--line);
border-top: 4px solid var(--blue);
border-radius: var(--r);
box-shadow: 0 2px 12px rgba(0, 60, 134, .07);
}
.blog-card[hidden] { display: none; }
.blog-card:has(a:focus-visible) {
outline: 3px solid var(--orange);
outline-offset: 2px;
}
.blog-card img {
display: block;
width: 100%;
height: auto;
aspect-ratio: 16 / 10;
object-fit: cover;
background: var(--mist);
}
.blog-card-body {
flex: 1;
display: flex;
flex-direction: column;
padding: 1.1rem 1.3rem 1.2rem;
}
.blog-card h2 {
margin: 0 0 .55rem;
padding: 0;
font-size: 1.4rem;
line-height: 1.2;
color: var(--blue);
}
.blog-card p {   /* the script in blog.php sets --clamp so every card ends up the same height */
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: var(--clamp, 4);
line-clamp: var(--clamp, 4);
overflow: hidden;
margin: 0 0 1rem;
font-size: var(--fs);
line-height: 1.65;
}
.blog-more {
margin-top: auto;
padding-top: .8rem;
border-top: 1px dashed var(--line);
font-size: .82rem;
font-weight: 700;
letter-spacing: .8px;
color: var(--orange-text);
}
.blog-more::before {   /* whole card is clickable */
content: "";
position: absolute;
inset: 0;
}
.blog-more::after {
content: " \00bb";
content: " \00bb" / "";   /* hidden from screen readers where supported */
display: inline-block;
}


/* closing call to action: blurred slideshow photo (set by the script in blog.php)
-----------------------------------------------------------------------------*/
.blog-cta {
position: relative;
overflow: hidden;
isolation: isolate;
padding: 3.2rem 1.4rem;
border-radius: 14px;
background: var(--blue);
color: #fff;
text-align: center;
}
.blog-cta h2 {
margin: 0;
font-size: 2.3rem;
color: #fff;
}
.blog-cta p {
margin: 1rem 0 1.7rem;
font-size: calc(var(--fsw) * 1.04);
line-height: 1.7;
}
.blog-cta .a_button,
.blog-cta .a_button1 {
box-sizing: border-box;
max-width: 100%;
margin: 0 .35rem .6rem;
padding-right: 1.6rem;
padding-left: 1.6rem;
white-space: normal;
}
.blog-cta .a_button { background: #fff; color: var(--blue); }
.blog-cta-photo::before {   /* the photo, blurred */
content: "";
position: absolute;
z-index: -2;
inset: -24px;
background: var(--photo) center 78% / cover no-repeat;
filter: blur(6px);
}
.blog-cta-photo::after {   /* dark blue wash so the white text stays readable */
content: "";
position: absolute;
z-index: -1;
inset: 0;
background: linear-gradient(rgba(0, 40, 90, .45), rgba(0, 60, 134, .7));
}


/* breakpoints, ascending
-----------------------------------------------------------------------------*/
@media (min-width: 540px) {
.blog-cta .a_button,
.blog-cta .a_button1 { padding-right: 3rem; padding-left: 3rem; }
}
@media (min-width: 720px) {   /* 2 columns, every row the same height */
.blog-grid {
grid-template-columns: repeat(2, minmax(0, 1fr));
grid-auto-rows: 1fr;
}
.blog-card img { aspect-ratio: 4 / 3; }   /* the photos are 4:3, so nothing is cropped */
}
@media (min-width: 1200px) {   /* 3 columns */
.blog-grid {
grid-template-columns: repeat(3, minmax(0, 1fr));
gap: 1.8rem;
}
.blog-card h2 { font-size: 1.3rem; }
}
@media (min-width: 1600px) {
.blog-card h2 { font-size: 1.45rem; }
}


/* hover effects only on devices that can hover (no sticky hover on touch screens)
-----------------------------------------------------------------------------*/
@media (hover: hover) {
.blog-topics button:hover {
color: #fff;
background: var(--blue);
}
.blog-card:hover {
border-top-color: var(--orange);
box-shadow: 0 10px 24px rgba(0, 60, 134, .18);
}
.blog-card:hover .blog-more { color: var(--blue); }
.blog-card:hover .blog-more::after { transform: translateX(4px); }
.blog-cta .a_button:hover { color: #fff; background: var(--orange); }
}


/* motion only when the visitor allows it
-----------------------------------------------------------------------------*/
@media (prefers-reduced-motion: no-preference) {
.blog-topics button,
.blog-card,
.blog-more,
.blog-more::after { transition: transform .25s, box-shadow .25s, background-color .25s, color .25s, border-color .25s; }
.blog-card img { transition: transform .5s; }
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
.blog-card:hover { transform: translateY(-4px); }
.blog-card:hover img { transform: scale(1.04); }
}
