/* ==========================================================================
   Glosario Groundless — estilos
   Convención: prefijo .gl-, tokens de globals.css
   ========================================================================== */

.gl-glosario-page,
.gl-glosario-index-page {
  display: block;
  padding: clamp(24px, 4vw, 56px) clamp(20px, 4vw, 56px) 80px;
  max-width: var(--gl-max, 1320px);
  margin: 0 auto;
  font-family: 'Bricolage Grotesque', system-ui, sans-serif;
  line-height: 1.6;
}

/* Breadcrumb */
.gl-breadcrumb {
  font-size: 14px;
  opacity: 0.7;
  margin-bottom: 24px;
}
.gl-breadcrumb a {
  color: inherit;
  text-decoration: none;
}
.gl-breadcrumb a:hover {
  text-decoration: underline;
}

/* === Page de término === */
.gl-term {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}

.gl-term-header {
  border-bottom: 1px solid currentColor;
  padding-bottom: 24px;
  opacity: 1;
}
.gl-term-eyebrow {
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 8px;
  opacity: 0.6;
}
.gl-term-title {
  font-size: clamp(28px, 4.5vw, 44px);
  line-height: 1.15;
  font-weight: 600;
  margin: 0 0 12px;
  letter-spacing: -0.01em;
}
.gl-term-full {
  font-size: 15px;
  margin: 0;
  opacity: 0.7;
}

.gl-term-answer {
  margin-top: 8px;
}
.gl-term-lead {
  font-size: clamp(17px, 1.8vw, 20px);
  line-height: 1.55;
  font-weight: 400;
  margin: 0;
  padding: 20px 24px;
  border-left: 3px solid currentColor;
  background: color-mix(in srgb, currentColor 4%, transparent);
  border-radius: 0 6px 6px 0;
}

.gl-term-depth h2,
.gl-term-faq h2,
.gl-term-bib h2,
.gl-term-see h2,
.gl-term-cta h2 {
  font-size: clamp(20px, 2.2vw, 26px);
  font-weight: 600;
  margin: 0 0 16px;
  letter-spacing: -0.01em;
}
.gl-term-depth p {
  margin: 0 0 16px;
  font-size: 16px;
}

.gl-term-bib ul,
.gl-term-see ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px;
}
.gl-term-bib li a,
.gl-term-see li a {
  display: block;
  padding: 12px 14px;
  border: 1px solid color-mix(in srgb, currentColor 14%, transparent);
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  font-size: 14px;
  transition: background var(--gl-t-fast, 0.18s);
}
.gl-term-bib li a:hover,
.gl-term-see li a:hover {
  background: color-mix(in srgb, currentColor 6%, transparent);
}

.gl-term-faq .gl-faq-item {
  padding: 12px 0;
  border-bottom: 1px solid color-mix(in srgb, currentColor 10%, transparent);
}
.gl-term-faq summary {
  cursor: pointer;
  font-weight: 500;
  font-size: 16px;
  list-style: none;
  padding: 4px 0;
}
.gl-term-faq summary::-webkit-details-marker {
  display: none;
}
.gl-term-faq summary::after {
  content: '+';
  float: right;
  font-size: 22px;
  line-height: 1;
  transition: transform var(--gl-t-fast, 0.18s);
}
.gl-term-faq details[open] summary::after {
  content: '−';
}
.gl-term-faq .gl-faq-answer {
  margin-top: 8px;
  padding-left: 4px;
  font-size: 15px;
  opacity: 0.85;
}

.gl-term-cta {
  padding: 28px;
  border-radius: 12px;
  background: color-mix(in srgb, currentColor 5%, transparent);
  border: 1px solid color-mix(in srgb, currentColor 10%, transparent);
}

.gl-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}
.gl-btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
  font-size: 15px;
  transition: transform var(--gl-t-fast, 0.18s), background var(--gl-t-fast, 0.18s);
}
.gl-btn:hover {
  transform: translateY(-1px);
}
.gl-btn-primary {
  background: currentColor;
  color: var(--gl-bg, white);
}
.gl-btn-primary:hover {
  filter: brightness(0.92);
}
.gl-btn-secondary {
  border: 1px solid currentColor;
  color: inherit;
}

/* Aside con todos los términos */
.gl-glosario-aside {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid color-mix(in srgb, currentColor 14%, transparent);
}
.gl-glosario-aside h3 {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 12px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  opacity: 0.7;
}
.gl-glosario-aside ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.gl-glosario-aside li a {
  display: inline-block;
  padding: 6px 12px;
  font-size: 14px;
  border: 1px solid color-mix(in srgb, currentColor 18%, transparent);
  border-radius: 999px;
  text-decoration: none;
  color: inherit;
}
.gl-glosario-aside li a.active {
  background: currentColor;
  color: var(--gl-bg, white);
  border-color: currentColor;
}

/* === Index === */
.gl-glosario-hero {
  text-align: left;
  margin-bottom: 48px;
}
.gl-glosario-eyebrow {
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.6;
  margin: 0 0 8px;
}
.gl-glosario-hero h1 {
  font-size: clamp(32px, 5vw, 54px);
  line-height: 1.1;
  margin: 0 0 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.gl-glosario-intro {
  font-size: clamp(16px, 1.6vw, 19px);
  max-width: 70ch;
  opacity: 0.85;
  margin: 0;
}

.gl-glosario-grid {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.gl-glosario-card {
  display: block;
}
.gl-card-link {
  display: block;
  padding: 24px;
  border: 1px solid color-mix(in srgb, currentColor 14%, transparent);
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  height: 100%;
  transition: border-color var(--gl-t-fast, 0.18s), transform var(--gl-t-fast, 0.18s);
}
.gl-card-link:hover {
  border-color: currentColor;
  transform: translateY(-2px);
}
.gl-card-abbrev {
  font-size: 22px;
  margin: 0 0 4px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.gl-card-full {
  font-size: 13px;
  opacity: 0.7;
  margin: 0 0 12px;
}
.gl-card-blurb {
  font-size: 14px;
  line-height: 1.5;
  margin: 0 0 16px;
  opacity: 0.85;
}
.gl-card-cta {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.gl-glosario-cta {
  margin-top: 56px;
  padding: 36px;
  border-radius: 12px;
  background: color-mix(in srgb, currentColor 5%, transparent);
  text-align: left;
}
.gl-glosario-cta h2 {
  font-size: clamp(22px, 2.4vw, 28px);
  margin: 0 0 12px;
  font-weight: 600;
}
.gl-glosario-cta p {
  margin: 0;
  font-size: 16px;
  opacity: 0.85;
}

.gl-footer {
  margin-top: 80px;
  padding-top: 32px;
  border-top: 1px solid color-mix(in srgb, currentColor 14%, transparent);
}
.gl-footer-inner p {
  font-size: 14px;
  opacity: 0.7;
  margin: 0;
}
.gl-footer a {
  color: inherit;
  text-decoration: underline;
}

@media (max-width: 920px) {
  .gl-term-bib ul,
  .gl-term-see ul {
    grid-template-columns: 1fr;
  }
  .gl-glosario-grid {
    grid-template-columns: 1fr;
  }
}

/* Tabla comparativa (RDWC vs DWC y futuras comparaciones) */
.gl-table-wrap {
  overflow-x: auto;
  margin: 1.2rem 0 1.6rem;
  -webkit-overflow-scrolling: touch;
}
.gl-compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  color: inherit;
}
.gl-compare-table th,
.gl-compare-table td {
  text-align: left;
  padding: 0.7rem 0.9rem;
  border: 1px solid color-mix(in srgb, currentColor 12%, transparent);
  vertical-align: top;
}
.gl-compare-table thead th {
  background: color-mix(in srgb, currentColor 8%, transparent);
  font-weight: 700;
}
.gl-compare-table tbody th[scope="row"] {
  background: color-mix(in srgb, currentColor 4%, transparent);
  font-weight: 600;
  white-space: nowrap;
}
.gl-compare-table tbody tr:hover td {
  background: color-mix(in srgb, currentColor 3%, transparent);
}
@media (max-width: 640px) {
  .gl-compare-table { font-size: 0.88rem; }
  .gl-compare-table tbody th[scope="row"] { white-space: normal; }
}
