/*
 * PROPOSAL: a more modern public layout for Berkshire Fine Arts.
 *
 * An override layer, loaded after screen.css, and only when a page is opened with ?layout=modern
 * (see app/Views/template/main_view.php). Nothing else about the site changes: same markup, same colours,
 * same serif character. What changes is the proportions and the type:
 *
 *   - one wider page frame (1280px) with a real two-column grid instead of floated Bootstrap columns
 *   - article text set for reading: ~18px, 1.7 line height, lines of about 70 characters
 *   - three typefaces with clear jobs: Playfair Display (headings), Source Serif 4 (text), Inter (menu, bylines, buttons)
 *   - the heavy "double rule" and boxed panels are softened into cards with space between them
 *
 * Bootstrap 3 and the billboard / ad sliders are left alone; they size themselves to the column they are in.
 */
:root {
  --bfa-page: #231d1d;
  --bfa-paper: #f4f2ed;
  --bfa-card: #fffdf8;
  --bfa-ink: #2a2522;
  --bfa-muted: #6f6761;
  --bfa-rule: #dcd7ce;
  --bfa-slate: #2d3b46;
  --bfa-slate-2: #3b4b58;
  --bfa-maroon: #7a2a2c;
  --bfa-green: #248627;
  --bfa-blue: #3f7399;
  --bfa-frame: 1280px;
  --bfa-side: 360px;
  --bfa-head: "Playfair Display", Georgia, "Times New Roman", serif;
  --bfa-text: "Source Serif 4", Georgia, "Palatino Linotype", serif;
  --bfa-ui: Inter, "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
}

/* ---------- base ---------- */
body {
  background: var(--bfa-page);
  font: 400 17px/1.65 var(--bfa-text);
  color: var(--bfa-ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4, h5, h6, .custom-font-nav {
  font-family: var(--bfa-head);
  font-weight: 600;
  letter-spacing: -0.005em;
}
a { transition: color .15s ease, background-color .15s ease; }

/* the same frame for the menu, the billboard, the page and the footer */
.container {
  width: 100%;
  max-width: var(--bfa-frame);
  padding-left: 24px;
  padding-right: 24px;
}

/* ---------- menu ---------- */
#section_menu {
  background: var(--bfa-slate);
  padding: 10px 0;
  border-bottom: 3px solid #1f2a33;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .35);
}
#section_menu .container {
  display: flex;
  align-items: center;
  gap: 18px;
}
#section_menu .container > a { flex: 0 0 auto; }
#menuLogo {
  float: none;
  margin: 0;
  height: 84px;
  width: auto;
  border-radius: 3px;
  box-shadow: none;
}
UL#section_menu, #section_menu ul {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 5px;
  padding: 0;
  margin: 0;
  list-style: none;
  flex: 1 1 auto;
}
#section_menu LI {
  display: block;
  margin: 0;
  background: none !important;
  font: bold 18px/1.2 "Palatino Linotype", "Times New Roman", serif; /* the menu keeps the site's original font */
  letter-spacing: normal;
}
#section_menu LI A {
  display: block;
  padding: 6px 12px;
  border-radius: 4px;
  background: var(--bfa-slate-2);
  color: #dadada;
  font-weight: bold;
  box-shadow: none;
}
#section_menu LI A:hover, #section_menu LI A:focus {
  background: var(--bfa-maroon);
  color: #fff;
}
#section_menu LI A .icon { height: 12px; width: auto; vertical-align: -1px; margin-left: 3px; }
#social-media { position: static; width: auto; height: auto; flex: 0 0 auto; }

/* ---------- billboard: untouched, apart from the space around it ---------- */
#slideshow-container { margin-top: 18px; padding-bottom: 0; }
/* the billboard and the ad sliders are designed for the original type: same font, size and line height as before */
#slideshow-container, #side-ads { font: 14px "Palatino Linotype", "Times New Roman", serif; line-height: normal; letter-spacing: normal; color: #333; }
#slideshow-container *, #side-ads * { font-family: "Palatino Linotype", "Times New Roman", serif; letter-spacing: normal; }
#slideshow-container h1, #slideshow-container h2, #slideshow-container h3, #slideshow-container h4, #slideshow-container h5, #slideshow-container h6,
#slideshow-container .custom-font-nav { font-weight: 500; text-transform: none; font-style: normal; }
#slideshow-container .btn, #slideshow-container a.btn { text-transform: none; letter-spacing: normal; }

/* ---------- the page: a real two-column grid ---------- */
#midSection {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--bfa-side);
  gap: 28px;
  align-items: start;
  margin-top: 8px;
}
#midSection::before, #midSection::after { display: none; }
#mainCont, #rightColumn {
  float: none;
  width: auto;
  min-width: 0;
}
#mainCont {
  background: var(--bfa-paper);
  margin: 14px 0 28px;
  padding: 44px clamp(22px, 4vw, 56px) 48px;
  border-radius: 6px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .06), 0 8px 28px rgba(0, 0, 0, .35);
}
#rightColumn { padding: 14px 0 0; }
#rightColumn #sideMenu h2 {
  font: 600 19px/1.35 var(--bfa-head);
  color: #cfc7e4;
  margin: 0 0 12px;
}
#rightColumn #sideMenu h2 a { color: #8fb8dc; }
#side-ads { display: flex; gap: 14px; margin-top: 16px; }
#side-ads > #bfa-side-ads, #side-ads > .googleLeft { float: none; width: auto; flex: 1 1 0; min-width: 0; padding: 0; }

/* ---------- articles ---------- */
.bookMark { top: 14px; right: 18px; opacity: .7; }
#mainCont SECTION ARTICLE { font-size: 18px; line-height: 1.72; }
ARTICLE H1, #mainCont SECTION ARTICLE H1 {
  font: 700 38px/1.15 var(--bfa-head);
  color: var(--bfa-ink);
  margin: 0 0 10px;
  text-wrap: balance;
}
ARTICLE H2, ARTICLE .articleSubTitle, #mainCont .articleSubTitle {
  font: 400 italic 21px/1.35 var(--bfa-head);
  color: var(--bfa-blue);
  padding: 0;
  margin: 0 0 14px;
}
ARTICLE H3.articleByline {
  font: 500 13px/1.4 var(--bfa-ui);
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--bfa-muted);
  text-align: left;
  margin: 0 0 26px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--bfa-rule);
}
ARTICLE H3.articleByline span[itemprop="author"] { color: var(--bfa-ink); font-weight: 600; }
/* the text itself: a comfortable line length, pictures and slideshows use the full width */
#mainCont SECTION ARTICLE P,
#mainCont SECTION ARTICLE UL,
#mainCont SECTION ARTICLE OL,
#mainCont SECTION ARTICLE BLOCKQUOTE { max-width: 34em; }
#mainCont SECTION ARTICLE P { margin: 0 0 1.15em; }
ARTICLE a { color: var(--bfa-blue); text-underline-offset: 2px; }
ARTICLE a:hover { color: var(--bfa-maroon); }
ARTICLE blockquote { border-left: 3px solid var(--bfa-rule); padding: 2px 0 2px 20px; color: #4a433e; font-style: italic; font-size: 1em; }
ARTICLE img { max-width: 100%; height: auto; }
ARTICLE #article_images_container { margin-top: 6px; margin-bottom: 26px; border-radius: 4px; overflow: hidden; }
/* the slideshow sits directly under its small arrows tab (.galleria-image-nav), so no space above it */
ARTICLE #article-slide-show { margin-top: 0; margin-bottom: 26px; }
ARTICLE .slider-outer { margin-bottom: 34px; }
ARTICLE FORM { font: 400 15px/1.5 var(--bfa-ui); }
.comments { font: 400 16px/1.6 var(--bfa-text); }

/* ---------- section / article lists: cards ---------- */
.sectionTitle {
  font: 700 13px/1 var(--bfa-ui);
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--bfa-muted);
  border: 0;
  border-bottom: 2px solid var(--bfa-ink);
  padding: 0 0 14px;
  margin: 0 0 26px;
  text-align: left;
}
UL.articles-list { display: grid; gap: 18px; }
UL#articleList LI.panel, .articles-list .panel {
  position: relative;
  margin: 0;
  border: 1px solid var(--bfa-rule);
  border-radius: 6px;
  background: var(--bfa-card);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
  overflow: hidden;
  transition: box-shadow .2s ease, transform .2s ease;
}
UL#articleList LI.panel:hover { box-shadow: 0 6px 18px rgba(0, 0, 0, .12); transform: translateY(-1px); }
.articles-list .articleTitle, .articles-list .articleTitle.panel-heading {
  font: 700 24px/1.25 var(--bfa-head);
  background: none;
  border: 0;
  padding: 18px 22px 0;
  margin: 0;
  color: var(--bfa-ink);
}
UL#articleList LI H2.articleTitle A { color: var(--bfa-ink); }
UL#articleList LI H2.articleTitle A:hover { color: var(--bfa-maroon); }
.articles-list .panel-body, #articleList .panel-body.bg-warning {
  background: none;
  padding: 4px 22px 18px;
  display: grid;
  grid-template-columns: 1fr 140px;
  grid-template-areas: "sub img" "desc img" "link img";
  column-gap: 20px;
}
#articleList .articleSubTitle { grid-area: sub; font: italic 400 17px/1.35 var(--bfa-head); color: var(--bfa-blue); padding: 0; margin: 2px 0 8px; }
#articleList .articleLeadImage { grid-area: img; float: none; margin: 4px 0 0; }
#articleList .articleLeadImage IMG, #articleList LI DIV.articleLeadImage IMG {
  width: 140px;
  height: 140px;
  object-fit: cover;
  border-radius: 4px;
  padding: 0;
  border: 0;
}
#articleList .articleDesc { grid-area: desc; padding: 0; font-size: 16px; line-height: 1.6; }
#articleList .articleByLine {
  padding: 0;
  margin: 0 0 6px;
  font: 500 12px/1.4 var(--bfa-ui);
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--bfa-muted);
}
#articleList .articleByLine .author { color: var(--bfa-ink); font-weight: 600; }
#articleList .articleDesc p { margin: 0; color: #3b3430; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
#articleList .articleLink { grid-area: link; text-align: left; margin-top: 10px; }
#articleList .articleLink .btn {
  font: 600 12px/1 var(--bfa-ui);
  letter-spacing: .06em;
  text-transform: uppercase;
  background: none;
  border: 1px solid var(--bfa-green);
  color: var(--bfa-green);
  border-radius: 4px;
  padding: 8px 14px;
}
#articleList .articleLink .btn:hover { background: var(--bfa-green); color: #fff; }
#articleList SPAN.articleSection { right: 12px; top: 10px; font: 600 11px/1 var(--bfa-ui); letter-spacing: .08em; text-transform: uppercase; color: var(--bfa-muted); }
.paginator { font: 500 14px/1 var(--bfa-ui); padding: 22px 0 0; }

/* ---------- footer ---------- */
FOOTER {
  background: #1b1717;
  border-top: 1px solid #3a3232;
  padding: 34px 24px 28px;
  font: 400 14px/1.6 var(--bfa-ui);
  color: #b9b2ac;
  margin-top: 24px;
}
FOOTER A { color: #cfe6b8; font-weight: 500; }
FOOTER .disclaimer { width: auto; max-width: 52em; font-size: 12.5px; color: #8f8883; }
FOOTER .copywright { font-weight: 500; color: #e8e2dc; }
UL#footerMenu { padding: 0; margin: 12px 0; }

/* ---------- tablets and phones ---------- */
@media (max-width: 1099px) {
  :root { --bfa-side: 320px; }
}
@media (max-width: 991px) {
  #midSection { grid-template-columns: minmax(0, 1fr); gap: 0; }
  #rightColumn { padding-top: 0; }
  #side-ads > #bfa-side-ads, #side-ads > .googleLeft { max-width: 240px; margin: 0 auto; }
  #mainCont { padding: 28px 22px 34px; }
  ARTICLE H1, #mainCont SECTION ARTICLE H1 { font-size: 32px; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .container { padding-left: 14px; padding-right: 14px; }
  #mainCont { padding: 22px 16px 28px; border-radius: 0; margin-left: -14px; margin-right: -14px; }
  ARTICLE H1, #mainCont SECTION ARTICLE H1 { font-size: 28px; }
  #mainCont SECTION ARTICLE { font-size: 17px; }
  .articles-list .articleTitle, .articles-list .articleTitle.panel-heading { font-size: 21px; padding: 16px 16px 0; }
  .articles-list .panel-body, #articleList .panel-body.bg-warning {
    padding: 4px 16px 16px;
    grid-template-columns: 1fr;
    grid-template-areas: "sub" "img" "desc" "link";
  }
  #articleList .articleLeadImage, #articleList .articleLeadImage a { display: block; margin-left: 0; margin-right: 0; }
  #articleList .articleLeadImage IMG, #articleList LI DIV.articleLeadImage IMG { width: 100%; height: 190px; }
  #side-ads { flex-direction: column; }
}
