/* ==========================================================================
   gv-cat-text
   Shared styles for category "top text" and "bottom text" include blocks.
   Uses the host site's default font stack via system-ui fallback — no
   external Google Fonts dependency to keep page weight and PageSpeed clean.
   ========================================================================== */

:root {
  --gv-cat-text-brand: #0A155C;
  --gv-cat-text-color: #424242;
  --gv-cat-text-color-muted: #666666;
  --gv-cat-text-bg-panel: #F8FAFC;
  --gv-cat-text-divider: #E1E1E1;
  --gv-cat-text-font-display: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --gv-cat-text-font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --gv-cat-text-max-w: 1200px;
  --gv-cat-text-content-w: 924px;
  --gv-cat-text-gutter: 16px;
  --gv-cat-text-radius: 3px;
  --gv-cat-text-lh: 1.3;
}

/* Scoped base — only affects elements inside our blocks, not the host page */
.gv-cat-text-top,
.gv-cat-text-top *,
.gv-cat-text-top *::before,
.gv-cat-text-top *::after,
.gv-cat-text-bottom,
.gv-cat-text-bottom *,
.gv-cat-text-bottom *::before,
.gv-cat-text-bottom *::after {
  box-sizing: border-box;
}

.gv-cat-text-top,
.gv-cat-text-bottom {
  font: 16px/var(--gv-cat-text-lh) var(--gv-cat-text-font-body);
  color: var(--gv-cat-text-color);
  -webkit-font-smoothing: antialiased;
}

.gv-cat-text-top a,
.gv-cat-text-bottom a {
  color: var(--gv-cat-text-brand);
  text-decoration: none;
}
.gv-cat-text-top a:hover,
.gv-cat-text-bottom a:hover {
  text-decoration: underline;
}

/* ==========================================================================
   Top text — title strip + tabs (desktop) / accordion (mobile)
   ========================================================================== */

.gv-cat-text-top {
  max-width: var(--gv-cat-text-max-w);
  margin: 0 auto;
  padding: 0 var(--gv-cat-text-gutter);
}

/* Title strip */
.gv-cat-text-title-strip {
  background: var(--gv-cat-text-bg-panel);
  text-align: center;
  padding: 16px var(--gv-cat-text-gutter);
  border-bottom: 1px solid var(--gv-cat-text-divider);
}
.gv-cat-text-title {
  font-family: var(--gv-cat-text-font-display);
  font-weight: 700;
  color: var(--gv-cat-text-brand);
  font-size: 24px;
  line-height: 1.2;
  margin: 0;
}
@media (min-width: 768px) {
  .gv-cat-text-title { font-size: 36px; line-height: 1.1; }
}

/* Desktop tab nav */
.gv-cat-text-tabs { display: none; }
@media (min-width: 1024px) {
  .gv-cat-text-tabs {
    display: flex;
    gap: 6px;
    justify-content: center;
    padding-top: 8px;
  }
}
.gv-cat-text-tab-btn {
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: var(--gv-cat-text-radius) var(--gv-cat-text-radius) 0 0;
  padding: 10px 14px 8px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  line-height: var(--gv-cat-text-lh);
  color: var(--gv-cat-text-color-muted);
  border-bottom: 3px solid transparent;
  transition: color 300ms, border-color 300ms;
}
.gv-cat-text-tab-btn:hover {
  color: var(--gv-cat-text-brand);
  border-bottom-color: var(--gv-cat-text-brand);
}
.gv-cat-text-tab-btn.gv-cat-text-is-active {
  color: var(--gv-cat-text-brand);
  border-bottom-color: var(--gv-cat-text-brand);
}
/* While the cursor is anywhere in the tab strip, only the hovered tab shows
   the underline. The previously-active tab fades back to its inactive look
   so the indicator visibly follows the cursor. Returns when the cursor leaves. */
.gv-cat-text-tabs:hover .gv-cat-text-tab-btn.gv-cat-text-is-active:not(:hover) {
  color: var(--gv-cat-text-color-muted);
  border-bottom-color: transparent;
}

/* Tab panels container */
.gv-cat-text-panels {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 10px;
}
@media (min-width: 1024px) {
  .gv-cat-text-panels { display: block; gap: 0; padding: 0; }
}

/* Mobile accordion header (hidden on desktop) */
.gv-cat-text-accordion-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  border: none;
  background: #fff;
  cursor: pointer;
  padding: 12px 0;
  font: 600 16px/var(--gv-cat-text-lh) var(--gv-cat-text-font-display);
  color: var(--gv-cat-text-brand);
}
@media (min-width: 1024px) {
  .gv-cat-text-accordion-btn { display: none; }
}

/* Accordion +/− icon */
.gv-cat-text-accordion-icon {
  position: relative;
  display: inline-block;
  width: 14px;
  height: 14px;
  color: var(--gv-cat-text-brand);
  margin-left: 12px;
  flex-shrink: 0;
}
.gv-cat-text-accordion-icon::before,
.gv-cat-text-accordion-icon::after {
  content: '';
  position: absolute;
  background: currentColor;
}
.gv-cat-text-accordion-icon::before {
  top: 50%; left: 0; right: 0; height: 2px; transform: translateY(-50%);
}
.gv-cat-text-accordion-icon::after {
  top: 0; bottom: 0; left: 50%; width: 2px; transform: translateX(-50%);
  transition: transform 200ms, opacity 200ms;
}
.gv-cat-text-panel.gv-cat-text-is-active .gv-cat-text-accordion-icon::after {
  transform: translateX(-50%) scaleY(0);
  opacity: 0;
}

/* Panel body — collapsed on mobile, always-open on desktop when active */
.gv-cat-text-panel-body {
  overflow: hidden;
  max-height: 0;
  transition: max-height 600ms ease-in-out;
  background: var(--gv-cat-text-bg-panel);
}
.gv-cat-text-panel.gv-cat-text-is-active .gv-cat-text-panel-body {
  max-height: 1500px;
}
@media (min-width: 1024px) {
  .gv-cat-text-panel-body {
    display: none;
    max-height: none;
    transition: none;
    border-radius: var(--gv-cat-text-radius);
  }
  .gv-cat-text-panel.gv-cat-text-is-active .gv-cat-text-panel-body {
    display: block;
  }
}

.gv-cat-text-panel-inner {
  margin: 0 auto;
  max-width: var(--gv-cat-text-content-w);
  padding: 16px;
}
@media (min-width: 1024px) {
  .gv-cat-text-panel-inner {
    text-align: center;
    padding: 24px 16px 32px;
  }
}
.gv-cat-text-panel-inner p { margin: 0 0 0.75em; }
.gv-cat-text-panel-inner p:last-child { margin-bottom: 0; }

/* ==========================================================================
   Bottom text — heading + rich body (buying considerations / FAQ)
   ========================================================================== */

.gv-cat-text-bottom {
  background: #fff;
  padding: 32px var(--gv-cat-text-gutter);
  max-width: var(--gv-cat-text-max-w);
  margin: 0 auto;
}
.gv-cat-text-bottom-heading {
  font-family: var(--gv-cat-text-font-display);
  font-weight: 700;
  color: var(--gv-cat-text-brand);
  font-size: 18px;
  line-height: 1.2;
  margin: 0 0 16px;
}
@media (min-width: 768px) { .gv-cat-text-bottom-heading { font-size: 20px; } }
@media (min-width: 960px) { .gv-cat-text-bottom-heading { font-size: 24px; } }

.gv-cat-text-bottom-body { max-width: var(--gv-cat-text-content-w); }
.gv-cat-text-bottom-body p { margin: 0 0 0.75em; }

.gv-cat-text-bottom-body h3 {
  font-family: inherit;
  font-weight: 700;
  color: var(--gv-cat-text-brand);
  font-size: 16px;
  line-height: var(--gv-cat-text-lh);
  margin: 1em 0 0;
}

.gv-cat-text-bottom-body ul {
  list-style: disc inside;
  margin: 0 0 1em;
  padding: 0;
}
.gv-cat-text-bottom-body li {
  padding-left: 15px;
  text-indent: -21px;
  margin: 0 0 0.5em 15px;
}
.gv-cat-text-bottom-body li a strong,
.gv-cat-text-bottom-body li strong a {
  color: var(--gv-cat-text-brand);
}

.gv-cat-text-bottom-body iframe {
  max-width: 100%;
  aspect-ratio: 16/9;
  width: 560px;
  height: auto;
  border: 0;
}
