/* bartholomae.ro — the 2012 template (navy #2e3a48, orange #ea8206, grey #f1f1f1) rebuilt fluid and
   mobile-first. No framework, no webfonts, no third-party requests. Orange carries dark text (white on
   orange is 2.7:1); links in the content are a darker orange (#a35400, 4.9:1 on the grey panel). */
:root {
    --navy: #2e3a48;
    --navy-dark: #1f2833;
    --orange: #ea8206;
    --orange-text: #a35400;
    --grey: #f1f1f1;
    --blue: #426389;
    --ink: #222;
    --radius: 7px;
    --wrap: 1100px;
    --left: 220px;
    --right: 250px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font: 16px/1.55 Arial, "Helvetica Neue", Helvetica, sans-serif;
    color: var(--ink);
    background: #fff;
}
img { max-width: 100%; height: auto; border: 0; }
a { color: var(--orange-text); }
a:hover, a:focus { color: var(--navy); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
h1, h2, h3, h4 { color: var(--navy); line-height: 1.25; margin: 1.2em 0 .5em; text-wrap: balance; }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.1rem; }
p, ul, ol, table { margin: 0 0 1em; }
p, li { text-wrap: pretty; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 12px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skiplink { position: absolute; left: -9999px; top: 0; z-index: 100; background: var(--navy); color: #fff; padding: .5em 1em; }
.skiplink:focus { left: 0; }

/* ---- masthead ------------------------------------------------------------------------------ */
.masthead { margin-top: 4px; }
.masthead__bar {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .25rem 1rem;
    background: var(--navy); border-radius: var(--radius) var(--radius) 0 0;
    padding: .7rem 1rem; max-width: calc(var(--wrap) - 24px);
}
.brand { color: var(--orange); font-weight: bold; font-size: 1.25rem; text-decoration: none; line-height: 1.25; }
.brand:hover, .brand:focus { color: #fff; }
.langnav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: .2rem; }
.langnav li + li::before { content: "|"; color: #8a96a3; margin-right: .2rem; }
.langnav a { color: #fff; font-size: .85rem; text-decoration: none; padding: .2rem .25rem; }
.langnav a.is-active { color: var(--orange); font-weight: bold; }
.langnav a:hover, .langnav a:focus { text-decoration: underline; }

/* ---- main menu (orange bar) ------------------------------------------------------------------ */
.navbar { background: var(--orange); max-width: calc(var(--wrap) - 24px); margin: 0 auto; }
.navbar__inner { padding: 0; position: relative; }
.navtoggle {
    display: flex; align-items: center; gap: .5rem; width: 100%;
    background: none; border: 0; padding: .65rem 1rem; font: inherit; font-weight: bold; color: var(--navy-dark); cursor: pointer;
}
.navtoggle__icon, .navtoggle__icon::before, .navtoggle__icon::after,
.navtoggle__icon span { display: block; width: 22px; height: 2px; background: currentColor; position: relative; }
.navtoggle__icon::before, .navtoggle__icon::after { content: ""; position: absolute; left: 0; }
.navtoggle__icon::before { top: -7px; }
.navtoggle__icon::after { top: 7px; }
.navtoggle__icon span { display: none; }
.mainnav { list-style: none; margin: 0; padding: 0; display: none; }
.navbar.is-open .mainnav { display: block; }
.mainnav__item { position: relative; border-top: 1px solid rgba(0, 0, 0, .12); }
.mainnav__link { display: block; padding: .7rem 3rem .7rem 1rem; color: var(--navy-dark); font-weight: bold; text-decoration: none; }
.mainnav__link:hover, .mainnav__link:focus, .mainnav__item.is-active > .mainnav__link { background: var(--navy); color: #fff; }
.mainnav__expand {
    position: absolute; right: 0; top: 0; width: 3rem; height: 2.9rem; border: 0; background: none; cursor: pointer; color: var(--navy-dark);
}
.mainnav__expand span::before { content: "▾"; font-size: 1.1rem; }
.mainnav__expand[aria-expanded="true"] span::before { content: "▴"; }
.submenu { list-style: none; margin: 0; padding: 0 0 .4rem; display: none; background: #f6a53e; }
.mainnav__item.is-expanded > .submenu { display: block; }
.submenu a { display: block; padding: .5rem 1rem .5rem 2rem; color: var(--navy-dark); text-decoration: none; }
.submenu a:hover, .submenu a:focus, .submenu .is-active > a { background: var(--navy); color: #fff; }

@media (min-width: 760px) {
    .navtoggle { display: none; }
    .mainnav { display: flex !important; flex-wrap: wrap; }
    .mainnav__item { border: 0; }
    .mainnav__link { padding: .45rem 1.1rem; font-size: .95rem; }
    .mainnav__expand { display: none; }
    .submenu {
        position: absolute; left: 0; top: 100%; min-width: 14rem; z-index: 20; padding: .3rem 0;
        background: var(--navy); box-shadow: 0 6px 16px rgba(0, 0, 0, .25);
    }
    .submenu a { color: #fff; padding: .5rem 1rem; }
    .submenu a:hover, .submenu a:focus, .submenu .is-active > a { background: var(--blue); }
    /* the phone menu opens the current section (is-expanded); on desktop only hover/focus opens a dropdown */
    .mainnav__item.is-expanded > .submenu { display: none; }
    .mainnav__item.has-sub:hover > .submenu, .mainnav__item.has-sub:focus-within > .submenu { display: block; }
}

/* ---- three columns ------------------------------------------------------------------------------ */
/* phones: section tabs, content, news, office hours. Tablets: content full width, news | office hours below.
   Desktop: left column = church + section tabs (page__sub) over the office hours (page__left), news on the right.
   The news box is only as tall as the news (it used to stretch into an empty orange column). */
.page { display: grid; gap: 6px; margin-top: 6px; grid-template-columns: minmax(0, 1fr); grid-template-areas: "sub" "main" "right" "left"; }
.page__sub { grid-area: sub; background: var(--navy); border-radius: var(--radius); padding: 6px; }
.page:not(.has-sectionnav) .page__sub { display: none; }
.page__main { grid-area: main; background: var(--grey); border-radius: var(--radius) var(--radius) 0 0; padding: .5rem 1rem 1rem; min-width: 0; }
.page__right { grid-area: right; background: var(--orange); border-radius: var(--radius); padding: .75rem 1rem; color: #191a1b; }
.page__left { grid-area: left; background: var(--navy); border-radius: var(--radius) var(--radius) 0 0; padding: .75rem; color: #fff; }
.page__church { display: none; }
@media (min-width: 600px) and (max-width: 959px) {
    .page { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "sub sub" "main main" "right left"; }
    .page__right { align-self: start; }
}
@media (min-width: 960px) {
    .page { grid-template-columns: var(--left) minmax(0, 1fr) var(--right); grid-template-rows: auto 1fr; column-gap: 6px; row-gap: 0;
            grid-template-areas: "sub main right" "left main right"; }
    .page:not(.has-sectionnav) .page__sub { display: block; }
    .page__sub { border-radius: var(--radius) var(--radius) 0 0; padding: .75rem .75rem 0; }
    .page__left { border-radius: 0; padding-top: .75rem; }
    .page__right { align-self: start; }
    .page__church { display: block; width: 100%; max-width: 196px; margin: 0 auto .75rem; }
}
/* wide screens: more room, slightly larger type (the main column would otherwise run to ~95 characters a line) */
@media (min-width: 1280px) {
    :root { --wrap: 1260px; --left: 240px; --right: 290px; }
    body { font-size: 17px; }
}

/* left column: section tabs + office hours, white on navy */
/* phones/tablets: a row of tabs that wraps; desktop: the 2012 stack of tabs */
.sectionnav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.sectionnav li { flex: 1 1 auto; }
.sectionnav a {
    display: block; padding: .45rem .9rem; background: #191a1b; color: var(--orange);
    font-weight: bold; text-decoration: none; border-radius: var(--radius) 0 0 0;
}
@media (min-width: 960px) {
    .sectionnav ul { display: block; margin: 0 0 .25rem; }
    .sectionnav a { margin-top: 6px; padding: .45rem .75rem .45rem 1.5rem; }
}
.sectionnav a:hover, .sectionnav a:focus, .sectionnav a.is-active { background: var(--blue); color: #fff; }
.page__left h2, .page__left h3, .page__left h4 { color: #fff; font-size: 1rem; margin: .5rem 0; }
.page__left a { color: #ffc77a; }
.page__left table { width: 100%; font-size: .9rem; border-collapse: collapse; }
.page__left td { padding: .2rem .4rem .2rem 0; vertical-align: top; }
.page__left td:first-child { font-weight: bold; white-space: nowrap; width: 1%; padding-right: 1.25rem; }

/* right column: news on orange, dark text */
.page__right h2, .page__right h3 { color: #191a1b; }
.page__right a { color: #191a1b; }
.page__right > .frame > header h2, .page__right .frame-header { font-size: 1.15rem; margin: 0 0 .5rem; }
.news-teaser { padding: .5rem 0; border-bottom: 1px dashed rgba(0, 0, 0, .3); }
.news-teaser time { font-size: .85rem; }
.news-teaser__title { font-size: 1rem; margin: .1rem 0 0; }
.news-teaser__title a { color: #191a1b; text-decoration: underline; }
.news-teaser__title a:hover, .news-teaser__title a:focus { color: #fff; background: var(--navy); }
.news-list__all { margin: .75rem 0 0; font-size: .9rem; }

/* ---- content -------------------------------------------------------------------------------------- */
.page__main > .frame:first-child > header h1, .page__main > .frame:first-child > header h2 { margin-top: .5rem; }
.frame { margin-bottom: 1.25rem; }
.ce-bodytext > :last-child { margin-bottom: 0; }
.ce-gallery figcaption, .image-caption { font-size: .85rem; background: var(--orange); color: #191a1b; padding: .2rem .5rem; }
.ce-gallery a.lightbox { display: block; cursor: zoom-in; }
/* galleries: fluid_styled_content sizes its float columns for maxW, not for the column they sit in (562 px on
   desktop, full width on phones) — a grid with equal columns always fits; images scale down, never up beyond maxW/cols */
.ce-gallery[data-ce-columns] .ce-inner { display: grid; grid-template-columns: repeat(var(--cols, 1), minmax(0, 1fr)); gap: 10px; }
.ce-gallery[data-ce-columns] .ce-row { display: contents; }   /* one grid for all images: phones reflow 3 → 2 columns without gaps */
.ce-gallery[data-ce-columns="2"] { --cols: 2; }
.ce-gallery[data-ce-columns="3"] { --cols: 3; }
.ce-gallery[data-ce-columns="4"] { --cols: 4; }
.ce-gallery .ce-column, .ce-gallery .ce-row { float: none; width: auto !important; margin: 0 !important; }
.ce-gallery .ce-column img, .ce-gallery .ce-column video { width: 100%; height: auto; display: block; }
.ce-gallery figure { margin: 0; }
.ce-above .ce-center .ce-outer, .ce-above .ce-center .ce-inner, .ce-below .ce-center .ce-outer, .ce-below .ce-center .ce-inner {
    float: none; right: auto; position: static;
}
.ce-above .ce-gallery, .ce-below .ce-gallery { float: none; }
.ce-below .ce-gallery { margin-top: 1rem; }
@media (max-width: 599px) {
    .ce-gallery[data-ce-columns="3"], .ce-gallery[data-ce-columns="4"] { --cols: 2; }
    .ce-intext.ce-right .ce-gallery, .ce-intext.ce-left .ce-gallery { float: none; margin: 0 0 1rem; max-width: 100%; }
}
.page__main table { border-collapse: collapse; }
.page__main td, .page__main th { padding: .25rem .75rem .25rem 0; vertical-align: top; text-align: left; }
.hours td:first-child { font-weight: bold; }
.download {
    display: flex; gap: .75rem; align-items: center; background: #fff; border-left: 6px solid var(--orange);
    padding: .75rem 1rem; border-radius: 0 var(--radius) var(--radius) 0; margin: 0 0 1rem;
}
.download::before { content: "PDF"; font: bold .8rem/1 Arial, sans-serif; color: #fff; background: #b8341b; padding: .45rem .4rem; border-radius: 3px; }
.download a { font-weight: bold; }
.address { font-style: normal; }
.address strong { color: var(--navy); }
@media (max-width: 599px) {
    .page__main, .page__right { hyphens: auto; -webkit-hyphens: auto; }
    .page__main h1 { font-size: 1.45rem; }
    .ce-left .ce-gallery, .ce-right .ce-gallery { float: none; margin: 0 0 1rem; }
    .ce-gallery .ce-column { float: none; width: 100% !important; margin-right: 0 !important; }
    .ce-gallery img { width: 100% !important; }
}

/* news */
.news-item { display: flex; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid #d6d6d6; }
.news-item__image { flex: 0 0 auto; }
.news-item__title { margin: .1rem 0 .4rem; font-size: 1.15rem; }
.news-item time, .news-article__meta { font-size: .85rem; color: #555; }
.news-article__media { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; margin: 1rem 0; }
.news-article__media a { display: block; }
.news-article__lead { font-weight: bold; }
.news-article__back { margin-top: 1.5rem; }
.page-navigation ul { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .25rem; }
.page-navigation a, .page-navigation span { display: inline-block; padding: .2rem .6rem; background: #fff; border-radius: 3px; }
.page-navigation .current { background: var(--navy); color: #fff; }

/* ---- footer --------------------------------------------------------------------------------------- */
.site-footer { background: var(--navy); color: #fff; margin-top: 6px; padding: 1rem 0 .5rem; max-width: calc(var(--wrap) - 24px); margin-left: auto; margin-right: auto; }
.site-footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; }
.site-footer__address { margin: 0; font-size: .95rem; }
.site-footer__address strong { color: var(--orange); }
.site-footer a { color: #ffc77a; }
.site-footer__links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; align-self: flex-end; }
.site-footer__credit { font-size: .8rem; color: #c3cbd4; margin: 1rem auto 0; }
.site-footer__credit a { color: #c3cbd4; }

/* ---- lightbox ------------------------------------------------------------------------------------- */
.lightbox-dialog { border: 0; padding: 0; background: transparent; max-width: 96vw; max-height: 96vh; overflow: visible; }
.lightbox-dialog::backdrop { background: rgba(10, 14, 20, .88); }
.lightbox-dialog figure { margin: 0; }
.lightbox-dialog img { display: block; max-width: 92vw; max-height: 86vh; width: auto; height: auto; margin: 0 auto; background: #fff; }
.lightbox-dialog figcaption { color: #fff; text-align: center; padding: .5rem; font-size: .9rem; }
.lightbox-dialog button {
    position: fixed; border: 0; background: rgba(0, 0, 0, .55); color: #fff; font-size: 2rem; line-height: 1;
    width: 3rem; height: 3rem; border-radius: 50%; cursor: pointer;
}
.lightbox-dialog__close { top: 1rem; right: 1rem; }
.lightbox-dialog__prev { left: .75rem; top: 50%; transform: translateY(-50%); }
.lightbox-dialog__next { right: .75rem; top: 50%; transform: translateY(-50%); }
.lightbox-dialog.is-single .lightbox-dialog__prev, .lightbox-dialog.is-single .lightbox-dialog__next { display: none; }

@media print {
    .navbar, .langnav, .page__sub, .page__left, .page__right, .lightbox-dialog { display: none !important; }
    .page { display: block; }
}
