/* ==========================================================================
   COMPONENTS — reusable UI + site header/footer
   Markelz Law Group, PC  ·  loads on every page
   ========================================================================== */

/* ---------------------------------- Buttons --------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  line-height: 1;
  padding: 14px 28px;
  border-radius: 4px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}
.btn-primary:hover,
.btn-primary:focus {
  background: var(--accent-light);
  border-color: var(--accent-light);
  color: var(--bg);
}
.btn-secondary {
  background: transparent;
  color: var(--accent);
  border-color: var(--border-accent);
}
.btn-secondary:hover,
.btn-secondary:focus {
  background: var(--accent-dim);
  color: var(--accent-light);
}
.btn-block {
  width: 100%;
}

/* ---------------------------------- Cards ----------------------------------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 28px;
  transition:
    border-color 0.2s ease,
    transform 0.2s ease;
}
.card:hover {
  border-color: var(--border-accent);
  transform: translateY(-3px);
}
.card--accent {
  border-color: var(--border-accent);
  background: linear-gradient(160deg, var(--surface-mid), var(--surface));
}
.card__title {
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--text-head);
  margin-bottom: 10px;
}

/* Link card — a full-card anchor for hub pages (Criminal, Civil, Small Business).
   Use as <a class="card link-card" href="…"> with a .link-card__link inside. */
.link-card {
  display: flex;
  flex-direction: column;
}
.link-card p {
  color: var(--text-muted);
  margin: 0 0 18px;
}
.link-card__link {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--accent);
}
.link-card__link i {
  transition: transform 0.2s ease;
}
.link-card:hover .link-card__link i {
  transform: translateX(4px);
}

/* ---------------------------------- Forms ----------------------------------- */
.mlg-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.mlg-form label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--accent);
  display: block;
  margin-bottom: 6px;
}
.mlg-form input,
.mlg-form textarea,
.mlg-form select {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 12px 14px;
  color: var(--text-head);
  font-family: var(--font-body);
  font-size: 15px;
  transition: border-color 0.2s ease;
}
.mlg-form input:focus,
.mlg-form textarea:focus,
.mlg-form select:focus {
  outline: none;
  border-color: var(--accent);
}
.mlg-form textarea {
  resize: vertical;
  min-height: 110px;
}
.mlg-form__disclaimer {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.mlg-form__disclaimer input {
  width: auto;
  margin-top: 4px;
  accent-color: var(--accent);
}
.mlg-form__disclaimer label {
  font-family: var(--font-body);
  font-size: 12px;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
}

/* ----------------------------- Form placeholder ----------------------------- */
/* Reserves the form area until a GHL form is embedded. */
.form-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 12px;
  min-height: 340px;
  height: 100%;
  background: var(--surface);
  border: 2px dashed var(--border-accent);
  border-radius: 12px;
  padding: 40px 28px;
}
.form-placeholder i {
  font-size: 36px;
  color: var(--accent);
}
.form-placeholder__title {
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--text-head);
  margin: 0;
}
.form-placeholder__note {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0;
}

/* ---------------------------------- Badges ---------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 4px;
}
.badge--verdict {
  background: rgba(39, 174, 96, 0.12);
  color: var(--verdict);
}
.badge--alert {
  background: rgba(231, 76, 60, 0.12);
  color: var(--alert);
}

/* -------------------------------- Testimonials ------------------------------ */
.testimonials__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  /* Each card keeps its own height so expanding one doesn't stretch the others. */
  align-items: start;
}
.testimonial {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 0 10px 10px 0;
  padding: 26px;
  margin: 0;
}
.testimonial__quote {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-body);
  font-style: italic;
  margin-bottom: 16px;
}
.testimonial__cite {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-muted);
  font-style: normal;
}
.testimonial__stars {
  display: flex;
  gap: 3px;
  color: var(--accent);
  font-size: 13px;
  margin-bottom: 12px;
}
.testimonial__title {
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--text-head);
  margin-bottom: 12px;
}
/* Collapsible review body — JS wraps the quote(s) and clamps to ~7 lines with a
   "See more" toggle. (Not applied on the Testimonials & Results page.) */
.testimonial__body {
  font-size: 15px;
  line-height: 1.7;
}
.testimonial__body.is-clamped {
  max-height: calc(1.7em * 7);
  overflow: hidden;
}
/* In the multi-card grids, reserve the full 7-line height on collapsed cards so
   every card shares one height; an expanded card still grows on its own because
   the grid uses align-items: start. */
.testimonials__grid .testimonial__body.is-clamped {
  min-height: calc(1.7em * 7);
}
.testimonial__more {
  margin-top: 12px;
  padding: 0;
  background: none;
  border: 0;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--accent);
}
.testimonial__more:hover,
.testimonial__more:focus {
  color: var(--accent-light);
  background: none;
}
/* Reserves the button's height on short grid cards so collapsed cards match. */
.testimonial__more--spacer {
  display: block;
  visibility: hidden;
  pointer-events: none;
}

/* ---------------------------------- CTA band -------------------------------- */
.cta-band {
  background: linear-gradient(120deg, var(--accent), var(--accent-light));
  text-align: center;
}
.cta-band__inner {
  padding-block: clamp(48px, 7vw, 80px);
}
.cta-band h2 {
  color: var(--bg);
  margin-bottom: 24px;
}
.cta-band__actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}
.cta-band .btn-primary {
  background: var(--bg);
  color: var(--accent);
  border-color: var(--bg);
}
.cta-band .btn-primary:hover {
  background: var(--surface);
  color: var(--accent-light);
  border-color: var(--surface);
}
.cta-band .btn-secondary {
  border-color: rgba(15, 25, 35, 0.45);
  color: var(--bg);
}
.cta-band .btn-secondary:hover {
  background: rgba(15, 25, 35, 0.1);
  color: var(--bg);
}

/* -------------------------------- Icon list --------------------------------- */
.icon-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.icon-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--text-body);
}
.icon-list i {
  margin-top: 4px;
  flex-shrink: 0;
}
.icon-list--danger i {
  color: var(--alert);
}
.icon-list--success i {
  color: var(--verdict);
}

/* -------- Centered single-column text block (heading + paragraphs) ---------- */
/* Shared by the "heading + paragraph" text sections that must be centered. */
.prose-center {
  max-width: 750px;
  margin-inline: auto;
  text-align: center;
}
.prose-center p {
  font-size: 16px;
  line-height: 1.8;
}

/* -------- Image + text split ------------------------------------------------ */
/* Image beside a text column. Add --reverse to place the image on the right. */
.media-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
.media-split--reverse .media-split__media {
  order: 1;
}
.media-split__media img {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--border-accent);
  object-fit: cover;
}
.media-split__body h2 {
  margin-bottom: 18px;
}
.media-split__body p {
  font-size: 16px;
  line-height: 1.8;
}
@media (max-width: 860px) {
  .media-split {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .media-split--reverse .media-split__media {
    order: 0;
  }
}

/* -------------------------------- FAQ accordion ----------------------------- */
/* Native <details>/<summary> accordion. Used on the FAQ page and FAQ previews. */
.faq-list {
  max-width: 820px;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.faq-item__q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  cursor: pointer;
  list-style: none;
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--text-head);
}
.faq-item__q::-webkit-details-marker {
  display: none;
}
.faq-item__q:hover {
  color: var(--accent);
}
.faq-item__icon {
  flex-shrink: 0;
  color: var(--accent);
  transition: transform 0.25s ease;
}
.faq-item[open] .faq-item__icon {
  transform: rotate(180deg);
}
.faq-item__a {
  padding: 0 24px 22px;
  color: var(--text-body);
  line-height: 1.7;
}
.faq-item__a p {
  margin: 0 0 1rem;
}
.faq-item__a p:last-child {
  margin-bottom: 0;
}

/* ============================== SITE HEADER =============================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface);
  border-bottom: 1px solid var(--border-accent);
}
.site-header__inner {
  display: flex;
  align-items: center;
  gap: 24px;
  padding-block: 14px;
  transition: padding 0.3s ease;
}
.site-header__logo {
  flex-shrink: 0;
  line-height: 0;
}
.site-header__logo img {
  height: 65px;
  width: auto;
  transition: height 0.3s ease;
}
/* Dynamic logo — large at the top, shrinks once the page is scrolled
   (the .is-scrolled class is toggled by main.js). */
.site-header.is-scrolled {
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.3);
}
.site-header.is-scrolled .site-header__inner {
  padding-block: 10px;
}
.site-header.is-scrolled .site-header__logo img {
  height: 52px;
}

.primary-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 28px;
}
.primary-nav__menu {
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 18px;
  list-style: none;
}
.primary-nav__menu a {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 14px;
  color: var(--text-body);
}
.primary-nav__menu a:hover,
.primary-nav__menu .current-menu-item > a {
  color: var(--accent);
}

/* Dropdown submenus (wp_nav_menu children) */
.primary-nav__menu .menu-item-has-children {
  position: relative;
}
.primary-nav__menu .menu-item-has-children > a::after {
  content: "\f078"; /* Font Awesome chevron-down */
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  font-size: 9px;
  margin-left: 7px;
  color: var(--accent);
  vertical-align: middle;
  transition: transform 0.2s ease;
}
.primary-nav__menu .menu-item-has-children:hover > a::after,
.primary-nav__menu .menu-item-has-children:focus-within > a::after {
  transform: rotate(180deg);
}
.primary-nav__menu .sub-menu {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 200;
  min-width: 230px;
  margin: 0;
  padding: 8px;
  list-style: none;
  background: var(--surface-mid);
  border: 1px solid var(--border-accent);
  border-radius: 8px;
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.4);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition:
    opacity 0.2s ease,
    transform 0.2s ease,
    visibility 0.2s ease;
}
.primary-nav__menu .menu-item-has-children:hover > .sub-menu,
.primary-nav__menu .menu-item-has-children:focus-within > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.primary-nav__menu .sub-menu a {
  display: block;
  padding: 9px 14px;
  border-radius: 5px;
  font-size: 13px;
  white-space: nowrap;
  color: var(--text-body);
}
.primary-nav__menu .sub-menu a:hover {
  background: var(--accent-dim);
  color: var(--accent);
}

/* Mobile-only submenu toggle button (added by JS); hover handles desktop. */
.submenu-toggle {
  display: none;
}

.primary-nav__cta {
  display: flex;
  align-items: center;
  gap: 18px;
}
.header-phone {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--accent);
  white-space: nowrap;
}

/* Standalone header CTA — shown only in the 900–1260px band (see media query). */
.site-header__cta {
  display: none;
}
.nav-toggle {
  display: none;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 8px;
  margin-left: auto;
  color: var(--accent);
  font-size: 24px;
  line-height: 1;
}
.nav-close {
  display: none;
  position: absolute;
  top: 22px;
  right: 24px;
  background: none;
  border: 0;
  cursor: pointer;
  color: var(--accent);
  font-size: 26px;
  line-height: 1;
  padding: 4px;
}

/* ============================== SITE FOOTER =============================== */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border-accent);
}
.site-footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  padding-block: 56px;
}
.site-footer__logo {
  height: 65px;
  width: auto;
  margin-bottom: 18px;
}

.footer-col__title {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}
.footer-col__menu {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.footer-col a {
  font-size: 14px;
  color: var(--text-muted);
}
.footer-col a:hover {
  color: var(--accent);
}
.footer-col--brand address {
  font-style: normal;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 2;
}
.footer-col--brand address a {
  color: var(--text-muted);
}
.footer-col--brand address a:hover {
  color: var(--accent);
}
.footer-social {
  display: flex;
  gap: 16px;
  margin-top: 18px;
}
.footer-social a {
  color: var(--text-muted);
  font-size: 26px;
  line-height: 1;
  transition: color 0.2s ease;
}
.footer-social a:hover {
  color: var(--accent);
}
.footer-badges {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 20px;
}
.footer-badge {
  display: block;
  height: auto;
}
.footer-badge--ocba {
  width: 60px;
  border-radius: 4px;
}
.footer-badge--lacba {
  width: 100px;
}

.site-footer__bottom {
  border-top: 1px solid var(--border);
  padding-block: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.site-footer__bottom p {
  font-size: 12px;
  color: var(--text-sub);
  margin: 0;
}
.footer-legal__menu {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}
.footer-legal__menu a {
  font-size: 12px;
  color: var(--text-muted);
}
.footer-legal__menu a:hover {
  color: var(--accent);
}

/* ------------------------------- Responsive ------------------------------- */
@media (max-width: 900px) {
  .site-footer__grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
}
@media (max-width: 860px) {
  .testimonials__grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 1260px) {
  .nav-toggle {
    display: inline-flex;
  }
  .nav-close {
    display: block;
  }
  .primary-nav {
    position: fixed;
    inset: 0 0 0 auto;
    width: min(320px, 80vw);
    margin-left: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: var(--surface-mid);
    padding: 88px 28px 28px;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    box-shadow: -20px 0 40px rgba(0, 0, 0, 0.4);
    overflow-y: auto;
  }
  .primary-nav.is-open {
    transform: translateX(0);
  }
  .primary-nav__menu {
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
    width: 100%;
  }
  /* Submenus are collapsed by default in the off-canvas menu; tap the caret to expand. */
  .primary-nav__menu .menu-item-has-children {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
  }
  .primary-nav__menu .menu-item-has-children > a {
    flex: 1;
  }
  .primary-nav__menu .menu-item-has-children > a::after {
    display: none;
  }
  .submenu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    background: none;
    border: 0;
    color: var(--accent);
    font-size: 14px;
    cursor: pointer;
  }

.submenu-toggle:hover,
.submenu-toggle:focus {
  background: none;
}

  .submenu-toggle i {
    transition: transform 0.2s ease;
  }
  .primary-nav__menu .menu-item-has-children.is-expanded > .submenu-toggle i {
    transform: rotate(180deg);
  }
  .primary-nav__menu .sub-menu {
    display: none;
    flex-basis: 100%;
    width: 100%;
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    min-width: 0;
    margin: 8px 0 0;
    padding: 0 0 0 16px;
    background: transparent;
    border: 0;
    border-left: 1px solid var(--border-accent);
    border-radius: 0;
    box-shadow: none;
    flex-direction: column;
    gap: 4px;
  }
  .primary-nav__menu .menu-item-has-children.is-expanded > .sub-menu {
    display: flex;
  }
  .primary-nav__menu .sub-menu a {
    white-space: normal;
    font-size: 14px;
    padding: 8px 0;
  }
  .primary-nav__cta {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    margin-top: 24px;
    width: 100%;
  }
  .primary-nav__cta .btn {
    width: 100%;
  }
}
/* From 900px up (while the hamburger is still active) show a standalone
   "Free Consultation" button in the header bar, beside the toggle. */
@media (min-width: 900px) and (max-width: 1260px) {
  .site-header__cta {
    display: inline-flex;
    margin-left: auto;
  }
  .nav-toggle {
    margin-left: 14px;
  }
}
/* Desktop nav is shown, but between the mobile breakpoint and full width the
   phone number is hidden so the menu + CTA button don't crowd. */
@media (min-width: 1261px) and (max-width: 1430px) {
  .header-phone {
    display: none;
  }
}
@media (max-width: 560px) {
  .site-footer__grid {
    grid-template-columns: 1fr;
  }
}