/* System Font */
:root {
  --wp--preset--font-family--system-sans-serif: system-ui, -apple-system,
    BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
body {
  font-family: var(--wp--preset--font-family--system-sans-serif);
  font-size: 1rem;
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
/* Force inheritance on elements that often break out */
button,
input,
select,
textarea,
.wp-block-button__link,
.wp-block-navigation,
.wp-block-site-title,
h1, h2, h3, h4, h5, h6 {
  font-family: inherit;
}
/* Slightly larger base size on desktop */
@media (min-width: 768px) {
  body {
    font-size: 1.0625rem;
  }
}
/* Typography Scale */
h1 {
  font-size: clamp(1.75rem, 3.5vw, 2.4rem);
  line-height: 1.15;
  font-weight: 600;
  letter-spacing: -0.025em;
}
h2 {
  font-size: clamp(1.5rem, 2.8vw, 1.9rem);
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -0.02em;
}
h3 {
  font-size: clamp(1.3rem, 2.2vw, 1.55rem);
  line-height: 1.25;
  font-weight: 600;
  letter-spacing: -0.015em;
}
h4 {
  font-size: 1.2rem;
  line-height: 1.3;
  font-weight: 600;
}
h5 {
  font-size: 1.05rem;
  line-height: 1.35;
  font-weight: 600;
}
h6 {
  font-size: 0.95rem;
  line-height: 1.4;
  font-weight: 600;
}
/* Spacing */
p {
  margin-bottom: 1em;
}
h1, h2, h3, h4, h5, h6 {
  margin-top: 1.5em;
  margin-bottom: 0.55em;
}
/* Remove large top margin on first heading in content */
.entry-content > h1:first-child,
.entry-content > h2:first-child,
.entry-content > h3:first-child,
.wp-block-post-content > h1:first-child,
.wp-block-post-content > h2:first-child,
.wp-block-post-content > h3:first-child {
  margin-top: 0;
}
strong, b {
  font-weight: 600;
}
/* Sticky Header */
header.wp-block-template-part {
  position: sticky;
  top: var(--wp-admin--admin-bar--height, 0);
  z-index: 99;
  background-color: #ffffff;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
  transition: box-shadow 0.2s ease;
}
/* Navigation Dropdowns */
.wp-block-navigation .wp-block-navigation__submenu-container .wp-block-navigation-item {
  margin: 0 !important;
  padding-top: 4px !important;
  padding-bottom: 4px !important;
}
.wp-block-navigation .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
  padding-top: 4px !important;
  padding-bottom: 4px !important;
  line-height: 1.25 !important;
  white-space: normal;
  line-height: 1.3;
}
.wp-block-navigation__submenu-container ul,
.wp-block-navigation__submenu-container .wp-block-list,
.wp-block-navigation__submenu-container .wp-block-group,
.wp-block-navigation__submenu-container .wp-block-columns {
  gap: 0 !important;
  row-gap: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}
.wp-block-navigation__submenu-container li {
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1.25 !important;
}
.wp-block-navigation .wp-block-navigation__submenu-container {
  min-width: 320px !important;
  width: max-content !important;
  max-width: 420px;
}
/* Testimonial Slider - fixed box height*/
.testimonial-slider {
  max-width: 780px;
  margin: 0 auto 10px;
  padding: 0;
  position: relative;
  text-align: center;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  background-color: #fff;
  overflow: hidden;
  /* Fixed height – adjust this value if needed */
  height: 240px;
}
.testimonial-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.9s ease, visibility 0.9s ease;
  padding: 28px 24px;
  box-sizing: border-box;
  pointer-events: none;
  /* Center content vertically & horizontally */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
.testimonial-slide.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.testimonial-quote {
  font-size: 1.25rem;
  line-height: 1.55;
  color: #0066B3;
  margin-bottom: 1rem;
}
.testimonial-name {
  font-size: 0.95rem;
  color: #00695C;
}
/* Mobile adjustments */
@media (max-width: 600px) {
  .testimonial-slider {
    height: 280px; /* slightly taller on mobile for longer quotes */
  }
  .testimonial-slide {
    padding: 24px 18px;
  }
  .testimonial-quote {
    font-size: 1.15rem;
  }
}

/* ===== Header top columns: stay side-by-side until true phone ===== */
@media (min-width: 601px) {
  header.wp-block-template-part .wp-block-columns {
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: space-between !important; /* pushes left column left + right column right */
  }

  header.wp-block-template-part .wp-block-columns > .wp-block-column {
    flex-basis: auto !important;
    width: auto !important;
    max-width: none !important;
  }

  /* Left column takes remaining space */
  header.wp-block-template-part .wp-block-columns > .wp-block-column:first-child {
    flex: 1 1 auto;
  }

  /* Right column (CTA + search) stays compact and sits against the right edge */
  header.wp-block-template-part .header-right-col {
    flex: 0 0 auto;
    margin-left: auto; /* extra insurance */
  }
}

/* Only stack + center the top header columns on actual mobile phones */
@media (max-width: 600px) {
  header.wp-block-template-part .wp-block-columns {
    flex-direction: column !important;
    align-items: center !important;
    gap: 12px !important;
  }
  header.wp-block-template-part .wp-block-columns > .wp-block-column:first-child {
    text-align: center !important;
    width: 100% !important;
  }
  header.wp-block-template-part .header-right-col {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    width: 100% !important;
    gap: 10px !important;
  }
  header.wp-block-template-part .header-right-col .wp-block-buttons,
  header.wp-block-template-part .header-right-col .wp-block-search {
    width: auto !important;
    max-width: 260px;
    margin-left: auto !important;
    margin-right: auto !important;
  }
}

/* Mobile Header + Floating CTA (stacking rules removed – now handled above at 600px) */
@media (max-width: 781px) {
  header.wp-block-template-part .wp-block-navigation {
    justify-content: center !important;
  }
  header.wp-block-template-part {
    padding-bottom: 12px;
  }
  /* Hide header on scroll */
  header.wp-block-template-part,
  header {
    transition: transform 0.35s ease, opacity 0.35s ease !important;
  }
  body.scrolled-mobile header.wp-block-template-part,
  body.scrolled-mobile header {
    transform: translateY(-100%) !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }
  /* Floating CTA clone */
  .mobile-cta-clone {
    position: fixed !important;
    bottom: 20px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    z-index: 99999 !important;
    width: 90% !important;
    max-width: 340px !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
  }
  body.scrolled-mobile .mobile-cta-clone {
    opacity: 1 !important;
    visibility: visible !important;
  }
  .mobile-cta-clone .wp-block-buttons,
  .mobile-cta-clone .wp-block-button {
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    width: 100% !important;
  }
  .mobile-cta-clone .wp-block-button__link {
    display: block !important;
    width: 100% !important;
    text-align: center !important;
    padding: 16px 24px !important;
    font-size: 1.1rem !important;
    border-radius: 50px !important;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25) !important;
  }
  /* Make main content wider on mobile */
  .wp-block-post-content,
  .entry-content,
  .wp-site-blocks > main,
  .wp-block-group.has-global-padding {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  /* Center page & post titles on mobile only (excludes home) */
  body.single .wp-block-post-title,
  body.page .wp-block-post-title {
    text-align: center !important;
  }
}
/* Tables */
.comparison-table,
.ucmj-fee-table {
  border: 2px solid #000;
  border-collapse: collapse;
  width: 100%;
}
.comparison-table th,
.comparison-table td,
.ucmj-fee-table th,
.ucmj-fee-table td {
  border: 1px solid #000;
  padding: 6px 8px;
  text-align: left;
  vertical-align: top;
  word-break: normal;
  overflow-wrap: normal;
  hyphens: none;
}
.comparison-table thead th,
.ucmj-fee-table th {
  background-color: #eeeeee;
}
/* ===== Footer Blog Carousel – fixed top alignment ===== */
.footer-blog-carousel .wp-block-post-template {
  display: flex !important;
  flex-wrap: nowrap;
  gap: 1.5rem;
  margin: 0;
  padding: 0.25rem 0 0.5rem;
  list-style: none;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
}
.footer-blog-carousel .wp-block-post-template::-webkit-scrollbar {
  display: none;
}
.footer-blog-carousel .wp-block-post {
  flex: 0 0 calc(33.333% - 1rem);
  scroll-snap-align: start;
  min-width: 180px;
  max-width: 260px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
}
.footer-blog-carousel .wp-block-post-title {
  font-size: 0.92rem;
  font-weight: 500;
  line-height: 1.35;
  margin: 0 0 0.35rem 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.footer-blog-carousel .wp-block-post-title a {
  text-decoration: none;
  color: inherit;
}
.footer-blog-carousel .wp-block-post-title a:hover {
  text-decoration: underline;
  opacity: 0.8;
}
.footer-blog-carousel .wp-block-post-date {
  font-size: 0.78rem;
  opacity: 0.7;
  margin: 0;
  line-height: 1.2;
}
.footer-carousel-nav {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.85rem;
}
.footer-carousel-nav button {
  width: 36px;
  height: 36px;
  border: 1px solid transparent;
  border-radius: 50%;
  background: transparent;
  color: currentColor;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}
.footer-carousel-nav button svg {
  fill: currentColor;
  width: 20px;
  height: 20px;
  display: block;
}
.footer-carousel-nav button:hover {
  background-color: rgba(0, 0, 0, 0.06);
  border-color: rgba(0, 0, 0, 0.12);
}
.footer-carousel-nav button:active {
  background-color: rgba(0, 0, 0, 0.1);
}
/* ===== Mobile Last Mod + Footer – final version ===== */
@media (max-width: 781px) {
 
/* Center last-modified date row under the title on mobile */
  .last-mod {
    justify-content: center !important;
  }
  .last-mod,
  .last-mod .wp-block-post-date,
  .last-mod p,
  .last-mod .has-text-align-left {
    text-align: center !important;
  }
  .wp-block-columns {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 1.7rem !important;
    padding-left: 1.2rem !important;
    padding-right: 1.2rem !important;
    box-sizing: border-box;
  }
  /* 1. Carousel on top – one post visible, still scrollable */
  .footer-col-carousel {
    order: 1 !important;
    width: 100% !important;
    flex-basis: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  .footer-blog-carousel,
  .footer-blog-carousel .wp-block-query {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
  }
  .footer-blog-carousel .wp-block-post-template {
    display: flex !important;
    flex-wrap: nowrap !important;
    width: 100% !important;
    overflow-x: auto !important;
    scroll-snap-type: x mandatory !important;
    gap: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    scrollbar-width: none;
  }
  .footer-blog-carousel .wp-block-post-template::-webkit-scrollbar {
    display: none;
  }
  .footer-blog-carousel .wp-block-post {
    flex: 0 0 100% !important;
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    scroll-snap-align: start !important;
    margin: 0 !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    box-sizing: border-box !important;
  }
  .footer-blog-carousel .wp-block-post-title,
  .footer-blog-carousel .wp-block-post-title a {
    text-align: center !important;
    display: block !important;
    width: 100% !important;
  }
  .footer-blog-carousel .wp-block-post-date,
  .footer-blog-carousel .wp-block-post-date time {
    text-align: center !important;
    display: block !important;
    width: 100% !important;
    margin-top: 0.2rem;
  }
  .footer-carousel-nav {
    justify-content: center !important;
    margin-top: 1rem;
  }
  /* 2. Address – block centered, text left-justified */
  .footer-col-address {
    order: 2 !important;
    width: 100% !important;
    flex-basis: 100% !important;
    text-align: center !important;
  }
  .footer-col-address p {
    text-align: left !important;
    display: inline-block;
    margin-left: auto;
    margin-right: auto;
  }
  /* 3. Links at the bottom – full width row */
  .footer-col-links {
    order: 3 !important;
    width: 100% !important;
    flex-basis: 100% !important;
    text-align: center !important;
    padding-left: 8px !important;
    padding-right: 8px !important;
    box-sizing: border-box;
  }
  .footer-col-links .wp-block-navigation,
  .footer-col-links .wp-block-navigation__container,
  .footer-col-links ul {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 0 !important;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
  }
  .footer-col-links .wp-block-navigation-item {
    margin: 0 !important;
    display: flex;
    align-items: center;
  }
  .footer-col-links .wp-block-navigation-item a {
    white-space: nowrap !important;
  }
  .footer-col-links .wp-block-navigation-item:not(:last-child)::after {
    content: "•";
    display: inline-block;
    margin-left: 8px;
    margin-right: 8px;
    opacity: 0.45;
    font-size: 0.85em;
  }
}
/* ===== Tablet / Small iPad – two centered blog posts ===== */
@media (min-width: 782px) and (max-width: 1100px) {
  .wp-block-columns {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 1.7rem !important;
    padding-left: 1.5rem !important;
    padding-right: 1.5rem !important;
    box-sizing: border-box;
  }
  /* 1. Carousel on top – two posts */
  .footer-col-carousel {
    order: 1 !important;
    width: 100% !important;
    flex-basis: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  .footer-blog-carousel,
  .footer-blog-carousel .wp-block-query {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
  }
  .footer-blog-carousel .wp-block-post-template {
    display: flex !important;
    flex-wrap: nowrap !important;
    width: 100% !important;
    overflow-x: auto !important;
    scroll-snap-type: x mandatory !important;
    gap: 1.25rem !important;
    margin: 0 !important;
    padding: 0 !important;
    scrollbar-width: none;
  }
  .footer-blog-carousel .wp-block-post-template::-webkit-scrollbar {
    display: none;
  }
  .footer-blog-carousel .wp-block-post {
    flex: 0 0 calc(50% - 0.625rem) !important;
    width: calc(50% - 0.625rem) !important;
    min-width: calc(50% - 0.625rem) !important;
    max-width: calc(50% - 0.625rem) !important;
    scroll-snap-align: start !important;
    margin: 0 !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    box-sizing: border-box !important;
  }
  .footer-blog-carousel .wp-block-post-title,
  .footer-blog-carousel .wp-block-post-title a {
    text-align: center !important;
    display: block !important;
    width: 100% !important;
  }
  .footer-blog-carousel .wp-block-post-date,
  .footer-blog-carousel .wp-block-post-date time {
    text-align: center !important;
    display: block !important;
    width: 100% !important;
    margin-top: 0.2rem;
  }
  .footer-carousel-nav {
    justify-content: center !important;
    margin-top: 1rem;
  }
  /* 2. Address – block centered, text left-justified */
  .footer-col-address {
    order: 2 !important;
    width: 100% !important;
    flex-basis: 100% !important;
    text-align: center !important;
  }
  .footer-col-address p {
    text-align: left !important;
    display: inline-block;
    margin-left: auto;
    margin-right: auto;
  }
  /* 3. Links at the bottom – full width row */
  .footer-col-links {
    order: 3 !important;
    width: 100% !important;
    flex-basis: 100% !important;
    text-align: center !important;
    padding-left: 8px !important;
    padding-right: 8px !important;
    box-sizing: border-box;
  }
  .footer-col-links .wp-block-navigation,
  .footer-col-links .wp-block-navigation__container,
  .footer-col-links ul {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 0 !important;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
  }
  .footer-col-links .wp-block-navigation-item {
    margin: 0 !important;
    display: flex;
    align-items: center;
  }
  .footer-col-links .wp-block-navigation-item a {
    white-space: nowrap !important;
  }
  .footer-col-links .wp-block-navigation-item:not(:last-child)::after {
    content: "•";
    display: inline-block;
    margin-left: 8px;
    margin-right: 8px;
    opacity: 0.45;
    font-size: 0.85em;
  }
}
