/* =========================================================================
   CSBA brand layer — new-style (Astra child)
   Royal blue #00529C  |  Gold #F2A81C  |  Deep blue #003E78

   NOTE: Homepage section backgrounds / colors / spacing are baked into the
   blocks themselves (see the CSBA palette in theme.json), so they're editable
   in the block toolbar. This file only carries global chrome (header, nav,
   footer, type) and small cosmetic flourishes (uppercase eyebrows, card hover)
   that aren't worth a block attribute. It's loaded in the editor too.
   ========================================================================= */
:root{
  --csba-blue:#00529C;
  --csba-blue-dark:#003E78;
  --csba-gold:#F2A81C;
  --csba-gold-dark:#d8950c;
  --csba-ink:#1d2733;
  --csba-gray:#5a6b7b;
  --csba-light:#f3f6fa;
  --csba-border:#e2e8f0;
}

/* ---- Content spacing ----
   Astra's plain (full-width) container gives regular pages no vertical breathing room,
   so titles sit flush against the header. Add it — but NOT on the full-bleed home page
   (body.ast-page-builder-template), whose hero must reach the header. */
.ast-plain-container:not(.ast-page-builder-template) #primary{
  padding-top:3rem;
  padding-bottom:3.75rem;
}
@media (max-width:768px){
  .ast-plain-container:not(.ast-page-builder-template) #primary{padding-top:2rem;padding-bottom:2.5rem;}
}

/* ---- Global type ---- */
body{color:var(--csba-ink);}
a{color:var(--csba-blue);}
a:hover{color:var(--csba-blue-dark);}
h1,h2,h3,h4,h5,h6{color:var(--csba-blue-dark);letter-spacing:-.01em;}

/* ---- Header ---- */
.site-header,.ast-primary-header-bar{border-bottom:3px solid var(--csba-gold);}
.main-header-bar{padding:6px 0;}
.site-logo-img img,.custom-logo{max-height:64px;width:auto;}
.ast-site-identity{padding:.4em 0;}
.main-header-menu .menu-link{color:var(--csba-blue-dark) !important;font-weight:600;text-transform:uppercase;font-size:.84rem;letter-spacing:.02em;}
.main-header-menu .menu-link:hover,.main-header-menu .current-menu-item > .menu-link{color:var(--csba-blue) !important;}
.main-header-menu .sub-menu{border-top:3px solid var(--csba-gold);}
.main-header-menu .sub-menu .menu-link{text-transform:none;font-weight:500;}

/* ---- Buttons (weight only; colors come from block palette) ---- */
.wp-block-button__link{font-weight:600;}

/* Mirror the theme.json gradients here so they also paint inside the editor iframe
   (Astra, a classic theme, doesn't pipe theme.json gradient CSS into the editor canvas). */
.has-csba-hero-gradient-background{background:linear-gradient(135deg,#00529C 0%,#003E78 100%);}
.has-csba-gold-gradient-background{background:linear-gradient(135deg,#F2A81C 0%,#D8950C 100%);}

/* Center the hero seal (is-resized images can left-align in a constrained group) */
.csba-hero-seal{text-align:center;margin-left:auto;margin-right:auto;}
.csba-hero-seal img{display:block;margin-left:auto;margin-right:auto;}

/* =========================================================================
   Cosmetic flourishes for the (natively-styled) homepage blocks
   ========================================================================= */
/* Eyebrow label — color is set on the block; this only adds the treatment */
.csba-eyebrow{text-transform:uppercase;letter-spacing:.12em;margin-bottom:.4rem;}

/* News cards: 3-up grid, clip the featured image to the card radius + lift on hover.
   Override core's legacy .is-flex-container.columns-3 li width with equal specificity. */
.csba-news .wp-block-post-template{display:grid !important;grid-template-columns:repeat(3,1fr);gap:26px;}
.csba-news .wp-block-post-template.is-flex-container > li{display:flex !important;width:100% !important;max-width:none !important;margin:0 !important;}
.csba-news-card{width:100% !important;}
.csba-news-card{height:100%;width:100%;overflow:hidden;
  transition:transform .15s ease,box-shadow .15s ease;}
.csba-news-card:hover{transform:translateY(-4px);box-shadow:0 14px 30px rgba(13,42,75,.14);}
.csba-news-card .wp-block-post-featured-image{margin:0;}
.csba-news-card .wp-block-post-featured-image img{width:100%;aspect-ratio:16/9;object-fit:cover;display:block;}
.csba-news-card .wp-block-post-title a{color:var(--csba-blue-dark);text-decoration:none;}
.csba-news-card .wp-block-post-title a:hover{color:var(--csba-blue);}
.csba-news-date{text-transform:uppercase;letter-spacing:.04em;}

/* Quick-link cards lift on hover too */
.wp-block-column.has-white-background-color{transition:transform .15s ease,box-shadow .15s ease;}
.wp-block-column.has-white-background-color:hover{transform:translateY(-4px);box-shadow:0 14px 30px rgba(13,42,75,.12);}

/* =========================================================================
   FAQ accordion (core/details, .csba-faq)
   ========================================================================= */
details.csba-faq{border:1px solid var(--csba-border);border-radius:10px;background:#fff;
  margin:0 0 12px;overflow:hidden;}
details.csba-faq summary{cursor:pointer;list-style:none;position:relative;
  padding:16px 52px 16px 20px;font-weight:600;color:var(--csba-blue-dark);font-size:1.05rem;}
details.csba-faq summary::-webkit-details-marker{display:none;}
details.csba-faq summary::after{content:"+";position:absolute;right:20px;top:50%;
  transform:translateY(-50%);font-size:1.5rem;line-height:1;color:var(--csba-blue);font-weight:400;}
details.csba-faq[open] summary::after{content:"\2013";}
details.csba-faq[open] summary{background:var(--csba-light);border-bottom:1px solid var(--csba-border);}
details.csba-faq summary:hover{color:var(--csba-blue);}
details.csba-faq > :not(summary){margin:14px 20px;}
details.csba-faq > :not(summary):first-of-type{margin-top:16px;}
details.csba-faq ul{padding-left:1.2em;}

/* =========================================================================
   Document download cards (.csba-doc-grid / .csba-doc-card)
   ========================================================================= */
.csba-doc-grid{display:grid !important;grid-template-columns:repeat(2,1fr);gap:16px;margin:24px 0;}
.csba-doc-card{transition:transform .15s ease,box-shadow .15s ease;}
.csba-doc-card:hover{transform:translateY(-3px);box-shadow:0 12px 26px rgba(13,42,75,.12);}
.csba-doc-card .csba-doc-type{display:inline-block;font-size:.68rem;font-weight:700;letter-spacing:.06em;
  color:#fff;background:var(--csba-gold-dark);border-radius:4px;padding:2px 8px;margin:0 0 8px;}
.csba-doc-card h4{margin:0 0 14px;color:var(--csba-blue-dark);}
.csba-doc-card .wp-block-button__link{padding:8px 18px;font-size:.9rem;}
.csba-note{margin:18px 0;}
.csba-note p{margin:0;color:var(--csba-gray);font-size:.95rem;}
@media (max-width:600px){ .csba-doc-grid{grid-template-columns:1fr;} }

/* =========================================================================
   Tables (on-brand styling for the core Table block)
   ========================================================================= */
.wp-block-table table{border-collapse:collapse;width:100%;}
.wp-block-table th{background:var(--csba-blue);color:#fff;text-align:left;
  padding:11px 14px;font-size:.82rem;letter-spacing:.03em;text-transform:uppercase;}
.wp-block-table td{padding:11px 14px;border:1px solid var(--csba-border);vertical-align:top;}
.wp-block-table.is-style-stripes tbody tr:nth-child(odd){background:var(--csba-light);}
.wp-block-table td strong{color:var(--csba-blue-dark);}

/* =========================================================================
   FOOTER
   ========================================================================= */
.site-footer,.site-below-footer-wrap{background:var(--csba-blue-dark) !important;color:#cfe0f0;}
.site-below-footer-wrap{border-top:3px solid var(--csba-gold);}
.ast-footer-copyright{width:100%;}
.ast-footer-copyright .csba-footer{max-width:1100px;margin:0 auto;text-align:center;padding:34px 20px 10px;}
.csba-footer-brand{display:flex;align-items:center;justify-content:center;gap:14px;margin-bottom:14px;}
.csba-footer-brand .csba-footer-seal{width:52px;height:52px;background:#fff;border-radius:50%;padding:5px;}
.csba-footer-brand strong{color:#fff;font-size:1.05rem;}
.csba-footer-brand span{color:#aac6e2;font-size:.85rem;}
.csba-footer-links{margin:6px 0 12px;font-size:.9rem;line-height:2;}
.csba-footer-links a{color:#fff;font-weight:600;}
.csba-footer-links a:hover{color:var(--csba-gold);}
.csba-footer-links span{color:#5b7da0;}
.csba-footer-contact{color:#aac6e2;font-size:.88rem;margin:.3rem 0;}
.csba-footer-contact a{color:#fff;}
.csba-footer-credit{color:#7e9dc0;font-size:.8rem;margin:.6rem 0 0;border-top:1px solid rgba(255,255,255,.12);padding-top:14px;}
.csba-footer a:hover{color:var(--csba-gold);}

/* Responsive */
@media (max-width:900px){
  .csba-news .wp-block-post-template{grid-template-columns:repeat(2,1fr);}
}
@media (max-width:600px){
  .csba-news .wp-block-post-template{grid-template-columns:1fr;}
}

/* Mobile header: let the long org title shrink/wrap so the hamburger toggle
   always has room (otherwise the title overflows and pushes it off-screen). */
@media (max-width:921px){
  .site-branding,.ast-site-identity{min-width:0;}
  .site-title{font-size:1rem !important;line-height:1.18;white-space:normal;}
  .site-title a{white-space:normal;}
  .custom-logo,.site-logo-img img{max-height:46px;}
}
@media (max-width:400px){
  .site-title{font-size:.9rem !important;}
}
