/*
Theme Name: Ability Behavioral Health
Theme URI: https://abilitybehavioralhealth.com/
Author: Ability Behavioral Health
Description: Custom block theme for Ability Behavioral Health — home, services, conditions, about, contact, careers and blog. Fonts bundled locally (Lexend, Montserrat; SIL Open Font License).
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 7.4
Version: 1.1.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: abh
*/

/* Small refinements theme.json can't express. */
.abh-card { transition: box-shadow .2s ease, transform .2s ease; }
.abh-card:hover { box-shadow: 0 14px 34px rgba(3, 36, 107, .10); transform: translateY(-2px); }
.abh-card a { text-decoration: none; }
.abh-card .wp-block-post-title a, .abh-card h3 a { color: inherit; }
.abh-eyebrow { letter-spacing: .08em; text-transform: uppercase; }
.abh-footer a { color: #DCE7FF; text-decoration: none; }
.abh-footer a:hover { color: #fff; text-decoration: underline; }
.abh-hero-img img, .abh-rounded img { border-radius: 24px; object-fit: cover; width: 100%; }
.abh-post-grid .wp-block-post-featured-image img { aspect-ratio: 16/10; object-fit: cover; }
.abh-crisis { background: rgba(255,255,255,.08); border-radius: 14px; }

/* Careers form */
.abh-form { display: grid; gap: 18px; }
.abh-form fieldset { border: 1px solid #DBE6EE; border-radius: 16px; padding: 22px 24px; margin: 0; display: grid; gap: 16px; }
.abh-form legend { font-family: var(--wp--preset--font-family--lexend); font-weight: 500; color: #03246B; padding: 0 6px; }
.abh-form .row { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.abh-form label { display: grid; gap: 6px; font-size: 15px; font-weight: 500; }
.abh-form input, .abh-form select, .abh-form textarea {
  font: inherit; font-size: 16px; padding: 12px 14px; border: 1px solid #B8CBEA; border-radius: 10px; background: #fff; color: #1B2948; width: 100%; box-sizing: border-box;
}
.abh-form input:focus, .abh-form select:focus, .abh-form textarea:focus { outline: 2px solid #0853F4; outline-offset: 1px; }
.abh-form button { font-family: var(--wp--preset--font-family--lexend); font-size: 17px; font-weight: 500; background: #0853F4; color: #fff; border: 0; border-radius: 10px; padding: 16px 28px; cursor: pointer; justify-self: start; }
.abh-form button:hover { background: #03246B; }
.abh-form .abh-hp { position: absolute; left: -9999px; }
.abh-notice { padding: 16px 20px; border-radius: 12px; margin-bottom: 20px; }
.abh-notice.ok { background: #E6F6EC; color: #14532D; }
.abh-notice.err { background: #FDECEC; color: #7F1D1D; }
.screen-reader-text { position: absolute; left: -9999px; }

@media (max-width: 781px) {
  .abh-hide-mobile { display: none !important; }
}

/* Blog category pills (core/categories block) */
.abh-cat-pills ul, ul.abh-cat-pills { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.abh-cat-pills li { margin: 0; }
.abh-cat-pills a { display: inline-block; padding: 10px 18px; border-radius: 999px; border: 1px solid #B8CBEA; background: #fff; color: #03246B; text-decoration: none; font-size: 15px; font-weight: 500; }
.abh-cat-pills a:hover, .abh-cat-pills .current-cat a { background: #03246B; color: #fff; border-color: #03246B; }
.wp-block-search__input { border-radius: 10px; border-color: #B8CBEA; padding: 12px 14px; }
.wp-block-query-pagination a, .wp-block-query-pagination .page-numbers { padding: 8px 14px; border-radius: 10px; border: 1px solid #B8CBEA; text-decoration: none; }
.wp-block-query-pagination .page-numbers.current { background: #03246B; color: #fff; border-color: #03246B; }
.abh-post-body h2 { margin-top: 2.2em; }
.abh-post-body p, .abh-post-body li { font-size: 1.125rem; line-height: 1.8; }

/* Borders set via block supports need an explicit style */
.wp-block-group.has-border-color { border-style: solid; }

/* =========================================================
   HEADER
   ========================================================= */
.abh-icon { flex-shrink: 0; }

/* Top bar */
.abh-topbar { font-size: 13.5px; }
.abh-topbar__inner { display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; max-width: var(--wp--style--global--wide-size); margin: 0 auto; }
.abh-topbar__meta { display: flex; flex-wrap: wrap; gap: 6px 26px; list-style: none; margin: 0; padding: 0; }
.abh-topbar__meta li, .abh-topbar__phone { display: inline-flex; align-items: center; gap: 8px; }
.abh-topbar .abh-icon { width: 15px; height: 15px; opacity: .85; }
.abh-topbar__phone { color: #fff; font-weight: 600; text-decoration: none; letter-spacing: .01em; }
.abh-topbar__phone:hover { color: #fff; text-decoration: underline; }

/* Main bar */
.abh-mainbar { box-shadow: 0 1px 0 #DBE6EE; position: relative; z-index: 20; }
.abh-mainbar__row { gap: 20px; }
.abh-brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: #03246B; flex-shrink: 0; }
.abh-brand__logo { width: 50px; height: 50px; object-fit: contain; display: block; }
.abh-brand__text { display: flex; flex-direction: column; line-height: 1.1; font-family: var(--wp--preset--font-family--lexend); color: #03246B; }
.abh-brand__name { font-size: 20px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; }
.abh-brand__sub { font-size: 12.5px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: #4A5875; margin-top: 3px; }

/* Desktop nav links */
.abh-nav .wp-block-navigation-item__content { padding: 10px 12px; border-radius: 8px; color: #1B2948; font-weight: 500; font-size: 15.5px; transition: background-color .15s, color .15s; }
.abh-nav .wp-block-navigation__container > .wp-block-navigation-item > .wp-block-navigation-item__content:hover { background: #EEF8FF; color: #03246B; }
.abh-nav .wp-block-navigation__container > .is-current > .wp-block-navigation-item__content,
.abh-nav .wp-block-navigation__container > .is-current-parent > .wp-block-navigation-item__content { color: #0853F4; background: #EEF8FF; }
.abh-nav .wp-block-navigation__submenu-icon { margin-left: 2px; }
.abh-nav .abh-nav-cta, .abh-nav .abh-nav-call { display: none; }

/* Services dropdown */
.abh-nav .wp-block-navigation__submenu-container {
  border: 1px solid #DBE6EE !important; border-radius: 14px; padding: 8px !important; min-width: 230px !important;
  box-shadow: 0 18px 40px rgba(3, 36, 107, .14); background: #fff !important; margin-top: 6px;
}
.abh-nav .wp-block-navigation__submenu-container .wp-block-navigation-item__content { display: block; padding: 10px 14px; border-radius: 8px; font-size: 15px; }
.abh-nav .wp-block-navigation__submenu-container .wp-block-navigation-item__content:hover { background: #EEF8FF; color: #03246B; }
.abh-nav .wp-block-navigation__submenu-container .is-current > .wp-block-navigation-item__content { color: #0853F4; font-weight: 600; }
.abh-nav .abh-sub-all { border-bottom: 1px solid #DBE6EE; margin-bottom: 6px; padding-bottom: 6px; }
.abh-nav .abh-sub-all .wp-block-navigation-item__content { font-weight: 600; color: #03246B; }

/* Right-side actions */
.abh-actions { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.abh-actions__call { display: inline-flex; align-items: center; gap: 8px; color: #03246B; font-weight: 600; text-decoration: none; font-size: 15px; white-space: nowrap; }
.abh-actions__call .abh-icon { color: #0853F4; }
.abh-actions__call:hover { color: #0853F4; }
.abh-actions__book {
  display: inline-flex; align-items: center; background: #0853F4; color: #fff; text-decoration: none; white-space: nowrap;
  font-family: var(--wp--preset--font-family--lexend); font-weight: 500; font-size: 15px; padding: 12px 20px; border-radius: 10px;
  transition: background-color .15s;
}
.abh-actions__book:hover { background: #03246B; color: #fff; }

@media (max-width: 1280px) {
  .abh-actions__call-text { display: none; }
  .abh-actions__call { width: 44px; height: 44px; justify-content: center; border: 1px solid #B8CBEA; border-radius: 10px; }
  .abh-nav .wp-block-navigation-item__content { padding: 10px 9px; font-size: 15px; }
}

/* ---------- Tablet & phone: hamburger below 1100px ---------- */
@media (max-width: 1099px) {
  .abh-topbar__meta li:not(:first-child) { display: none; }
  .wp-block-navigation.abh-nav .wp-block-navigation__responsive-container-open:not(.always-shown) { display: flex !important; }
  .wp-block-navigation.abh-nav .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) { display: none !important; }
  .abh-nav { order: 3; }
  .abh-actions { order: 2; margin-left: auto; gap: 10px; }
  header.wp-block-template-part { position: sticky; top: 0; z-index: 100; }
  body.admin-bar header.wp-block-template-part { top: var(--wp-admin--admin-bar--height, 32px); }
}
@media (max-width: 781px) {
  .abh-topbar { display: none; }
  .abh-mainbar { padding-top: 10px !important; padding-bottom: 10px !important; }
  .abh-brand__logo { width: 42px; height: 42px; }
  .abh-brand__name { font-size: 17px; }
  .abh-brand__sub { font-size: 10.5px; letter-spacing: .12em; }
  .abh-actions__book { display: none; }
}
@media (max-width: 360px) {
  .abh-brand__sub { display: none; }
}

/* Menu button */
.abh-nav .wp-block-navigation__responsive-container-open {
  width: 44px; height: 44px; align-items: center; justify-content: center; border: 1px solid #B8CBEA !important; border-radius: 10px; color: #03246B;
}
.abh-nav .wp-block-navigation__responsive-container-open svg { width: 26px; height: 26px; }

/* Full-screen mobile menu */
.abh-nav .wp-block-navigation__responsive-container.is-menu-open { padding: 20px 24px 32px !important; }
.abh-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-close { top: 22px; right: 22px; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border: 1px solid #B8CBEA; border-radius: 10px; }
.abh-nav .is-menu-open .wp-block-navigation__responsive-container-content { padding-top: 72px !important; align-items: stretch !important; }
.abh-nav .is-menu-open .wp-block-navigation__container { width: 100%; gap: 0 !important; align-items: stretch !important; }
.abh-nav .is-menu-open .wp-block-navigation__container > .wp-block-navigation-item { width: 100%; border-bottom: 1px solid #DBE6EE; flex-direction: column; align-items: stretch !important; }
.abh-nav .is-menu-open .wp-block-navigation__container > .wp-block-navigation-item > .wp-block-navigation-item__content {
  font-family: var(--wp--preset--font-family--lexend); font-size: 20px; font-weight: 500; padding: 16px 4px !important; color: #03246B; background: none !important; border-radius: 0;
}
.abh-nav .is-menu-open .is-current > .wp-block-navigation-item__content,
.abh-nav .is-menu-open .is-current-parent > .wp-block-navigation-item__content { color: #0853F4 !important; }
.abh-nav .is-menu-open .wp-block-navigation__submenu-container {
  border: 0 !important; box-shadow: none; padding: 0 0 12px 12px !important; margin: 0; min-width: 0 !important; gap: 0 !important; background: transparent !important;
}
.abh-nav .is-menu-open .wp-block-navigation__submenu-container { align-items: stretch !important; }
.abh-nav .is-menu-open .wp-block-navigation__submenu-container .wp-block-navigation-item { width: 100%; justify-content: flex-start !important; }
.abh-nav .is-menu-open .wp-block-navigation__submenu-container .wp-block-navigation-item__content { font-size: 17px; padding: 10px 4px !important; color: #4A5875; text-align: left; width: 100%; }
.abh-nav .is-menu-open .abh-sub-all { border: 0; margin: 0; padding: 0; }
.abh-nav .is-menu-open .abh-sub-all .wp-block-navigation-item__content { color: #4A5875; font-weight: 500; }
.abh-nav .is-menu-open .wp-block-navigation__submenu-icon { display: none; }
.abh-nav .is-menu-open .abh-nav-cta, .abh-nav .is-menu-open .abh-nav-call { display: block; border-bottom: 0 !important; }
.abh-nav .is-menu-open .abh-nav-cta { margin-top: 28px; }
.abh-nav .is-menu-open .abh-nav-cta, .abh-nav .is-menu-open .abh-nav-call { width: 100%; }
.abh-nav .is-menu-open .wp-block-navigation__container > .abh-nav-cta > .wp-block-navigation-item__content {
  display: block; text-align: center; background: #0853F4 !important; color: #fff !important; border-radius: 12px !important; padding: 16px !important; font-size: 18px !important;
}
.abh-nav .is-menu-open .wp-block-navigation__container > .abh-nav-call > .wp-block-navigation-item__content {
  display: block; text-align: center; border: 1px solid #B8CBEA; border-radius: 12px !important; padding: 15px !important; font-size: 18px !important; margin-top: 12px;
}

/* =========================================================
   SERVICES PAGE
   ========================================================= */
.abh-trust { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 22px; font-size: 14.5px; color: #2E436A; font-weight: 500; }
.abh-trust li { display: inline-flex; align-items: center; gap: 8px; }
.abh-trust .abh-icon { color: #0853F4; }

.abh-svc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 22px; }
.abh-svc-card { background: #fff; border: 1px solid #DBE6EE; border-radius: 20px; padding: 30px 28px; display: flex; flex-direction: column; gap: 12px; transition: box-shadow .2s, transform .2s, border-color .2s; }
.abh-svc-card:hover { box-shadow: 0 16px 36px rgba(3,36,107,.10); transform: translateY(-2px); border-color: #B8CBEA; }
.abh-svc-card__icon { width: 52px; height: 52px; border-radius: 14px; background: #EEF8FF; color: #0853F4; display: inline-flex; align-items: center; justify-content: center; margin-bottom: 6px; }
.abh-svc-card h3 { margin: 0; font-size: 1.25rem; line-height: 1.3; }
.abh-svc-card p { margin: 0; font-size: 15.5px; line-height: 1.65; color: #2E436A; }
.abh-checks { list-style: none; margin: 6px 0 0; padding: 14px 0 0; border-top: 1px solid #DBE6EE; display: grid; gap: 9px; }
.abh-checks li { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; line-height: 1.45; }
.abh-checks .abh-icon { color: #0853F4; margin-top: 2px; }

.abh-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 12px; }
.abh-chips li { background: rgba(255,255,255,.10); border: 1px solid rgba(255,255,255,.22); color: #fff; border-radius: 999px; padding: 11px 18px; font-size: 15px; font-weight: 500; }

.abh-cond-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 16px; }
.abh-cond { display: flex; flex-direction: column; gap: 8px; background: #fff; border: 1px solid #DBE6EE; border-radius: 16px; padding: 22px 24px; text-decoration: none; color: #1B2948; }
.abh-cond__title { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-family: var(--wp--preset--font-family--lexend); font-weight: 500; font-size: 18px; color: #03246B; }
.abh-cond__text { font-size: 14.5px; line-height: 1.55; color: #4A5875; }
.abh-cond.is-link { transition: border-color .15s, box-shadow .15s; }
.abh-cond.is-link .abh-icon { color: #0853F4; transition: transform .15s; }
.abh-cond.is-link:hover { border-color: #0853F4; box-shadow: 0 10px 26px rgba(3,36,107,.08); }
.abh-cond.is-link:hover .abh-icon { transform: translateX(3px); }

.abh-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 22px; counter-reset: none; }
.abh-step { background: #F6F9FC; border-radius: 20px; padding: 30px 28px; display: flex; flex-direction: column; gap: 10px; }
.abh-step__num { width: 44px; height: 44px; border-radius: 50%; background: #0853F4; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-family: var(--wp--preset--font-family--lexend); font-weight: 600; font-size: 18px; }
.abh-step h3 { margin: 6px 0 0; font-size: 1.2rem; }
.abh-step p { margin: 0; font-size: 15.5px; color: #2E436A; }

.abh-insure { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 18px 40px; }
.abh-insure__label { font-family: var(--wp--preset--font-family--lexend); font-weight: 500; color: #03246B; }
.abh-insure img { height: 36px !important; width: auto !important; max-width: 180px; object-fit: contain; }

.abh-faq { border: 1px solid #DBE6EE; border-radius: 14px; padding: 0 22px; margin-top: 0 !important; margin-bottom: 12px !important; background: #fff; }
.abh-faq summary { cursor: pointer; list-style: none; padding: 18px 32px 18px 0; position: relative; font-family: var(--wp--preset--font-family--lexend); font-weight: 500; color: #03246B; font-size: 17px; }
.abh-faq summary::-webkit-details-marker { display: none; }
.abh-faq summary::after { content: "+"; position: absolute; right: 0; top: 50%; transform: translateY(-50%); font-size: 24px; font-weight: 400; color: #0853F4; line-height: 1; }
.abh-faq[open] summary::after { content: "–"; }
.abh-faq[open] { border-color: #B8CBEA; }
.abh-faq > p { margin: 0 0 18px; color: #2E436A; }

@media (max-width: 781px) {
  .abh-svc-card, .abh-step { padding: 24px 22px; }
  .abh-chips li { font-size: 14px; padding: 9px 14px; }
  .abh-insure { gap: 14px 28px; }
  .abh-insure__label { width: 100%; text-align: center; }
  .abh-insure img { height: 26px !important; max-width: calc(33% - 20px); }
  .abh-svc-hero .wp-block-buttons { flex-direction: column; align-items: stretch; }
  .abh-svc-hero .wp-block-button { width: 100%; }
  .abh-svc-hero .wp-block-button__link { width: 100%; text-align: center; box-sizing: border-box; }
}

/* Global mobile polish */
@media (max-width: 781px) {
  .wp-block-buttons > .wp-block-button { flex-grow: 0; }
  h1.wp-block-heading { word-break: normal; overflow-wrap: break-word; }
}
