/* ============================================================================
   Torrington article + calculator pages (node--type-article / -calculator)
   — ported from the D7
   torrington_advice theme (css/global.css ~lines 1429–1515). Scoped under
   these node types. Shared chrome (container, title align, body type) is
   listed for both; the 60/30 split + sidebar are article-only (calc = full width).

   D7 → D11 class map:
     .region-sidebar-second      -> .sidebar_second   (Barrio sidebar region)
     .field-name-body            -> .field--name-body
     h1#page-title               -> h1 (already caecilia green from global-styling)
   Collisions handled: regions render full-width (.container-fluid) on D11 with
   no gutter; constrain to the 1600px site container (matches #site-header).
   ============================================================================ */

/* --- 1. Align content into the 1600px site container (kills edge bleed) ---- */
.node--type-article .highlighted > .container-fluid,
.node--type-article .layout-main-wrapper > .container-fluid,
.node--type-calculator .highlighted > .container-fluid,
.node--type-calculator .layout-main-wrapper > .container-fluid,
.node--type-video .highlighted > .container-fluid,
.node--type-video .layout-main-wrapper > .container-fluid,
.node--type-quiz .highlighted > .container-fluid,
.node--type-quiz .layout-main-wrapper > .container-fluid {
    margin-top: 85px;
    max-width: 1600px;
    margin-left: auto;
    margin-right: auto;
    /* gutter so the row's -12px margin never overflows the left edge when the
       viewport is narrower than 1320 and the container goes full-width */
    padding-left: 15px !important;
    padding-right: 15px !important;
}
/* content ~795 / sidebar ~400 split — DESKTOP ONLY. Below 768px the Barrio
   grid stacks the sidebar under the content (the D7 grid used min-width:740). */
@media (min-width: 992px) {
    .node--type-article .layout-main-wrapper .main-content.col,
    .node--type-quiz .layout-main-wrapper .main-content.col { flex: 0 0 67%; max-width: 67%; }
    .node--type-article .sidebar_second,
    .node--type-quiz .sidebar_second { flex: 0 0 30%; max-width: 30%; margin-left: auto; }
}
/* Below 992 the sidebar stacks UNDER the content. Barrio's .col + .col-md-3
   stay side-by-side as flex items on their own, so force both to full width
   to make the sidebar wrap to its own row. */
@media (max-width: 991px) {
    .node--type-article .layout-main-wrapper .main-content.col,
    .node--type-quiz .layout-main-wrapper .main-content.col,
    .node--type-article .sidebar_second,
    .node--type-quiz .sidebar_second { flex: 0 0 100%; max-width: 100%; margin-left: 0; }
}
/* Line the title band AND the category blurb up with the body column. Content
   sits at container-padding(+15) then the row's offcanvas margin(-12); the title
   and blurb need -12 to match it, at every width (prevents left-edge clipping). */
.node--type-article .highlighted .block-page-title-block,
.node--type-video .highlighted .block-page-title-block,
.node--type-calculator .highlighted .block-page-title-block,
.node--type-quiz .highlighted .block-page-title-block,
.node--type-article .highlighted .field--name-field-blurb,
.node--type-video .highlighted .field--name-field-blurb,
.node--type-calculator .highlighted .field--name-field-blurb,
.node--type-quiz .highlighted .field--name-field-blurb { margin-left: -12px; }

/* --- 2. Hero image: full content-column width, not floated beside copy ----- */
.node--type-article .field--name-field-image,
.node--type-quiz .field--name-field-image,
.node--type-calculator .field--name-field-image,
.node--type-video .field--name-field-image { float: none; width: 100%; margin: 0 0 20px 0; }
.node--type-article .field--name-field-image img,
.node--type-quiz .field--name-field-image img,
.node--type-calculator .field--name-field-image img,
.node--type-video .field--name-field-image img { width: 100%; height: auto; display: block; }

/* --- 3. Body typography --------------------------------------------------- */
.node--type-article .field--name-body,
.node--type-calculator .field--name-body,
.node--type-quiz .field--name-body {
    font-family: 'Open Sans', sans-serif;
    font-size: 1.0625rem;
    color: #212529;
    line-height: 1.7;
    font-weight: 400;
}
.node--type-article .field--name-body h2,
.node--type-calculator .field--name-body h2,
.node--type-quiz .field--name-body h2 {
    font-family: caecilia, sans-serif;
    font-weight: 700;
    font-size: 1.375rem;
    color: #007D68;
    line-height: 1.3;
}
.node--type-article .field--name-body h3,
.node--type-calculator .field--name-body h3,
.node--type-quiz .field--name-body h3 {
    font-family: 'Open Sans', sans-serif;
    font-size: 1.0625rem;
    color: #007D68;
    line-height: 1.7;
    font-weight: 700;
}
.node--type-article .field--name-body strong,
.node--type-article .field--name-body b,
.node--type-calculator .field--name-body strong,
.node--type-calculator .field--name-body b,
.node--type-quiz .field--name-body strong,
.node--type-quiz .field--name-body b {
    font-weight: 700;
    color: #212529;
}
.node--type-article .field--name-body ul li,
.node--type-calculator .field--name-body ul li,
.node--type-quiz .field--name-body ul li { padding-bottom: 20px; }
.navLinks ul li { padding-bottom: 0px !important; }
/* --- 4. Related-content accordions — shared by the article sidebar AND the
   featured-bottom region (identical views + jQuery-UI accordion markup; the
   D7 theme styled .region-sidebar-second and .region-postscript-first the
   same way). One rule set, listed for every region, so nothing is duplicated.
   -------------------------------------------------------------------------- */

/* featured-bottom runs full-bleed on D11 (the zone background); pull the inner
   accordions into the 1320 content column so they line up with the body. */
.region-featured-bottom-first,
.region-featured-bottom-second { max-width: 1600px; margin-left: auto; margin-right: auto; }

/* block title: caecilia green with the gold underline bar */
.sidebar_second .block h2,
.sidebar_second .block__title,
.region-featured-bottom-first .block h2,
.region-featured-bottom-first .block__title,
.region-featured-bottom-second .block h2,
.region-featured-bottom-second .block__title {
    background-color: transparent;
    font-family: caecilia, sans-serif;
    font-weight: bold;
    color: #007D68;
    font-size: 16px;
    line-height: 24px;
}
.sidebar_second .block h2:after,
.sidebar_second .block__title:after,
.region-featured-bottom-first .block h2:after,
.region-featured-bottom-first .block__title:after,
.region-featured-bottom-second .block h2:after,
.region-featured-bottom-second .block__title:after {
    content: '';
    display: block;
    height: 2px;
    width: auto;
    background-color: #CAB64B;
}
.region-featured-bottom-first  { margin-top: 40px;}
/* accordion group headers: strip the default jQuery-UI gradient/borders */
.sidebar_second .ui-accordion-header {
    background: none !important;
    border: 0 !important;
    font-family: 'Open Sans', sans-serif;
    text-transform: uppercase;
    font-weight: 400;
    font-size: 1rem;
    padding: 0;
    margin: 0 0 10px 0;
    color: #212529;
}
.region-featured-bottom-first .ui-accordion-header,
.region-featured-bottom-second .ui-accordion-header {
    background: none !important;
    border: 0 !important;
    font-family: 'Open Sans', sans-serif;
    text-transform: uppercase;
    font-weight: 400;
    font-size: 1rem;
    padding: 0;
    margin: 0 0 10px 0;
    margin-left: -24px;
    color: #212529;
}
/* sidebar-only nudge to line the group header up with the narrow sidebar (desktop) */
@media (min-width: 992px) {
    .sidebar_second .ui-accordion-header { margin-left: -24px; }
}
/* gold FA chevron in place of the +/- toggle icon */
.sidebar_second .ui-accordion-header:after,
.region-featured-bottom-first .ui-accordion-header:after,
.region-featured-bottom-second .ui-accordion-header:after {
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    content: "\f105";
    font-size: 1rem;
    color: #CAB64B;
    margin-left: 8px;
}
.sidebar_second .ui-accordion-header-active:after,
.region-featured-bottom-first .ui-accordion-header-active:after,
.region-featured-bottom-second .ui-accordion-header-active:after { content: "\f107"; }
.sidebar_second .ui-accordion-header a,
.region-featured-bottom-first .ui-accordion-header a,
.region-featured-bottom-second .ui-accordion-header a { background: transparent !important; color: #212529; padding: 0; font-weight: 400; }
.sidebar_second .ui-accordion-header .ui-icon,
.sidebar_second .ui-accordion-header-icon,
.region-featured-bottom-first .ui-accordion-header .ui-icon,
.region-featured-bottom-first .ui-accordion-header-icon,
.region-featured-bottom-second .ui-accordion-header .ui-icon,
.region-featured-bottom-second .ui-accordion-header-icon { display: none; }
.sidebar_second .ui-accordion-content,
.region-featured-bottom-first .ui-accordion-content,
.region-featured-bottom-second .ui-accordion-content {
    border: 0 !important;
    background: none !important;
    padding-left: 25px;
}
.sidebar_second .ui-state-default,
.sidebar_second .ui-widget-content,
.sidebar_second .ui-widget-header,
.sidebar_second .ui-state-active,
.region-featured-bottom-first .ui-state-default,
.region-featured-bottom-first .ui-widget-content,
.region-featured-bottom-first .ui-widget-header,
.region-featured-bottom-first .ui-state-active,
.region-featured-bottom-second .ui-state-default,
.region-featured-bottom-second .ui-widget-content,
.region-featured-bottom-second .ui-widget-header,
.region-featured-bottom-second .ui-state-active {
    background: none !important;
    border: 0 !important;
    color: #212529;
}
/* link list items */
.sidebar_second .views-row,
.region-featured-bottom-first .views-row,
.region-featured-bottom-second .views-row { padding: 0; margin: 0; }
.sidebar_second .views-field-title,
.region-featured-bottom-first .views-field-title,
.region-featured-bottom-second .views-field-title {
    font-family: 'Open Sans', sans-serif;
    font-size: 0.9rem;
    color: #212529;
    line-height: 1.2rem;
    font-weight: 400;
    margin: 0;
    padding: 0 0 12px 0;
}
.sidebar_second .views-row a,
.sidebar_second .views-field-title a,
.region-featured-bottom-first .views-row a,
.region-featured-bottom-first .views-field-title a,
.region-featured-bottom-second .views-row a,
.region-featured-bottom-second .views-field-title a { color: #212529; text-decoration: none; }
.sidebar_second .views-row a:hover,
.sidebar_second .views-field-title a:hover,
.region-featured-bottom-first .views-row a:hover,
.region-featured-bottom-first .views-field-title a:hover,
.region-featured-bottom-second .views-row a:hover,
.region-featured-bottom-second .views-field-title a:hover { color: #212529; text-decoration: none !important; }

/* ============================================================================
   Site-wide 1600px content cap. The per-node-type rule above constrains
   article/quiz/calculator/video pages; this generalises it to EVERY page type
   (landing/view pages, the front page) so the main content column lines up with
   #site-header and the footer, which already cap at 1600px. The full-bleed hero
   escapes this via its own 100vw, so only the content is constrained, not the
   banner background. */
.layout-main-wrapper > .container-fluid,
.highlighted > .container-fluid {
    max-width: 1600px;
    margin-left: auto;
    margin-right: auto;
}
