/* ==========================================================================
   Glossary Page styles
   Used by: template-glossary.php
   ========================================================================== */

/* Hero */
.gs_gp-hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(
      120% 140% at 85% -10%,
      #2b4bb0 0%,
      rgba(43, 75, 176, 0) 55%
    ),
    linear-gradient(135deg, #071846 0%, #0f3282 55%, #203a90 100%);
  padding: 170px 20px 120px;
  text-align: center;
}

.gs_gp-hero::before,
.gs_gp-hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  pointer-events: none;
}

.gs_gp-hero::before {
  width: 480px;
  height: 480px;
  top: -220px;
  right: -140px;
}

.gs_gp-hero::after {
  width: 320px;
  height: 320px;
  bottom: -180px;
  left: -100px;
  border-color: rgba(250, 71, 22, 0.18);
}

.gs_gp-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: 0 auto;
}

.gs_gp-hero-eyebrow {
  margin: 0 0 14px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #fd7d5a;
}

.gs_gp-hero-title {
  margin: 0;
  font-size: clamp(36px, 6vw, 56px);
  line-height: 1.1;
  font-weight: 800;
  color: #ffffff;
}

@media (max-width: 600px) {
  .gs_gp-hero {
    padding: 120px 20px 80px;
  }

  .gs_gp-hero::before {
    width: 300px;
    height: 300px;
    top: -140px;
    right: -100px;
  }

  .gs_gp-hero::after {
    width: 200px;
    height: 200px;
    bottom: -110px;
    left: -70px;
  }
}

/* ==========================================================================
   Page body — search, A-Z nav, definitions
   ========================================================================== */

.gs_gp-page {
  --gp-navy: #0f3282;
  --gp-navy-dark: #071846;
  --gp-orange: #fa4716;
  --gp-orange-light: #fd7d5a;
  --gp-ink: #1c2430;
  --gp-muted: #667085;
  --gp-border: #e4e8f0;
  background: #f4f6fb;
  padding: 0 20px 60px;
  margin-bottom: 40px;
}

.gs_gp-container {
  max-width: 1180px;
  margin: 0 auto;
}

/* Search + A-Z tools card, floats up over the hero */
.gs_gp-tools {
  position: relative;
  z-index: 3;
  margin-top: -70px;
  padding: 26px 18px;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 20px 45px rgba(7, 24, 70, 0.16);
}

.gs_gp-search-wrap {
  position: relative;
  max-width: 640px;
  margin: 0 auto 20px;
}

.gs_gp-search-wrap .screen-reader-text {
  position: absolute;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  white-space: nowrap;
}

.gs_gp-search-icon {
  position: absolute;
  top: 50%;
  left: 20px;
  display: block;
  color: var(--gp-muted);
  pointer-events: none;
  transform: translateY(-50%);
  transition: color 0.2s ease;
}

.gs_gp-search-wrap:focus-within .gs_gp-search-icon {
  color: var(--gp-navy);
}

.gs_gp-search-input {
  display: block;
  width: 100%;
  height: 54px;
  margin: 0;
  padding: 0 44px 0 50px;
  font-size: 16px;
  color: var(--gp-ink);
  background: #f4f6fb;
  border: 1.5px solid transparent;
  border-radius: 999px;
  outline: none;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}

.gs_gp-search-input::-webkit-search-cancel-button,
.gs_gp-search-input::-webkit-search-decoration {
  -webkit-appearance: none;
  appearance: none;
  display: none;
}

.gs_gp-search-input::placeholder {
  color: var(--gp-muted);
}

.gs_gp-search-input:hover {
  background: #eef1f8;
}

.gs_gp-search-input:focus {
  background: #fff;
  border-color: var(--gp-navy);
  box-shadow: 0 0 0 4px rgba(15, 50, 130, 0.1);
}

.gs_gp-search-clear {
  position: absolute;
  top: 50%;
  right: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  padding: 0;
  font-size: 17px;
  line-height: 1;
  color: var(--gp-muted);
  background: #e4e8f0;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transform: translateY(-50%);
  transition:
    color 0.2s ease,
    background 0.2s ease;
}

.gs_gp-search-clear:hover {
  color: #fff;
  background: var(--gp-navy);
}

.gs_gp-search-clear[hidden] {
  display: none;
}

.gs_gp-alpha-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.gs_gp-alpha-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--gp-navy);
  background: transparent;
  border: 1px solid var(--gp-border);
  border-radius: 50%;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    color 0.2s ease,
    background 0.2s ease,
    border-color 0.2s ease;
}

.gs_gp-alpha-btn:hover,
.gs_gp-alpha-btn.is-active {
  color: #fff;
  background: var(--gp-navy);
  border-color: var(--gp-navy);
  transform: translateY(-2px);
}

.gs_gp-alpha-btn.is-disabled {
  color: #c3c9d4;
  background: #f4f6fb;
  border-color: #eceff4;
  cursor: not-allowed;
}

.gs_gp-alpha-btn.is-disabled:hover {
  transform: none;
  color: #c3c9d4;
  background: #f4f6fb;
  border-color: #eceff4;
}

/* Letter groups */
.gs_gp-groups {
  margin-top: 55px;
}

.gs_gp-group {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 20px;
  margin-bottom: 35px;
  scroll-margin-top: 30px;
}

.gs_gp-group.is-hidden {
  display: none;
}

.gs_gp-group-marker span {
  position: sticky;
  top: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  font-size: 26px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, var(--gp-navy-dark), var(--gp-navy));
  border-radius: 14px;
  box-shadow: 0 10px 22px rgba(15, 50, 130, 0.22);
}

.gs_gp-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.gs_gp-card {
  position: relative;
  overflow: hidden;
  padding: 24px 26px;
  background: #fff;
  border: 1px solid var(--gp-border);
  border-radius: 14px;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    border-color 0.25s ease;
}

.gs_gp-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--gp-orange), var(--gp-orange-light));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.gs_gp-card:hover {
  border-color: rgba(15, 50, 130, 0.25);
  box-shadow: 0 16px 34px rgba(15, 50, 130, 0.1);
  transform: translateY(-4px);
}

.gs_gp-card:hover::before {
  transform: scaleX(1);
}

.gs_gp-card.is-hidden {
  display: none;
}

.gs_gp-card-term {
  margin: 0 0 16px;
  font-size: 22px;
  font-weight: 700;
  color: var(--gp-navy-dark);
}

.gs_gp-card-definition {
  font-size: 18px;
  line-height: 1.7;
  color: #3f4757;
}

.gs_gp-card-definition p {
  margin: 0px;
  padding: 0 0 8px !important;
  font-size: 14px;
}

.gs_gp-card-definition p:last-child {
  margin-bottom: 0;
}

.gs_gp-card-definition a {
  color: var(--gp-navy);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s ease;
}

.gs_gp-card-definition a:hover {
  color: var(--gp-orange);
}

.gs_gp-no-results,
.gs_gp-empty {
  margin-top: 40px;
  padding: 40px 20px;
  text-align: center;
  font-size: 17px;
  font-weight: 600;
  color: var(--gp-muted);
  background: #fff;
  border: 1px dashed var(--gp-border);
  border-radius: 14px;
}

@media (max-width: 900px) {
  .gs_gp-cards {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .gs_gp-tools {
    margin-top: -50px;
    padding: 18px 10px;
    border-radius: 14px;
  }

  .gs_gp-search-input {
    height: 50px;
    padding-left: 46px;
    font-size: 15px;
  }

  .gs_gp-search-icon {
    left: 16px;
  }

  .gs_gp-alpha-btn {
    width: 32px;
    height: 32px;
    font-size: 13px;
  }

  .gs_gp-group {
    grid-template-columns: 1fr;
  }

  .gs_gp-group-marker span {
    position: static;
    width: 46px;
    height: 46px;
    font-size: 20px;
    border-radius: 10px;
  }
  .gs_gp-card {
    padding: 16px 14px;
  }
  .gs_gp-card-term {
    margin: 0 0 8px;
    font-size: 18px;
  }
}
