.legal-hub-page #content {
  background: #f7f9fc;
}

.legal-hub {
  display: grid;
  width: min(calc(100% - 48px), 1120px);
  margin: 0 auto;
  padding: 48px 0;
}

.legal-hub-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.legal-hub-tile {
  --tile-accent: #245ca8;
  --tile-soft: #edf3fb;
  --tile-border: #d8e2ef;
  --tile-icon: url('/assets/icons/legal/file-text.svg');
  position: relative;
  display: grid;
  min-width: 0;
  aspect-ratio: 1;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 20px;
  padding: 28px;
  border: 1px solid var(--tile-border);
  border-radius: 8px;
  background: #fff;
  color: #17181b;
  box-shadow: 0 3px 8px rgba(23, 24, 27, .025);
  transition: border-color .2s ease, background-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.legal-hub-tile--privacidad {
  --tile-accent: #246a60;
  --tile-soft: #edf7f3;
  --tile-border: #d6e6df;
  --tile-icon: url('/assets/icons/legal/shield-check.svg');
}

.legal-hub-tile--cookies {
  --tile-accent: #94620d;
  --tile-soft: #fbf5e8;
  --tile-border: #e8dfca;
  --tile-icon: url('/assets/img/cookie.svg');
}

.legal-hub-tile-top,
.legal-hub-tile-bottom {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.legal-hub-number {
  color: var(--tile-accent);
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.legal-hub-accent {
  width: 36px;
  height: 3px;
  background: var(--tile-accent);
  transition: width .2s ease;
}

.legal-hub-icon {
  display: block;
  width: 68px;
  height: 68px;
  align-self: center;
  background: var(--tile-accent);
  -webkit-mask: var(--tile-icon) center / contain no-repeat;
  mask: var(--tile-icon) center / contain no-repeat;
}

.legal-hub-tile h2 {
  min-width: 0;
  margin: 0;
  font-size: 28px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.legal-hub-arrow {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  place-items: center;
  border-radius: 50%;
  background: var(--tile-soft);
  color: var(--tile-accent);
  transition: background-color .2s ease, color .2s ease;
}

.legal-hub-arrow::after {
  display: block;
  width: 21px;
  height: 21px;
  background: currentColor;
  -webkit-mask: url('/assets/icons/legal/arrow-up-right.svg') center / contain no-repeat;
  mask: url('/assets/icons/legal/arrow-up-right.svg') center / contain no-repeat;
  content: "";
}

.legal-hub-tile:focus-visible {
  border-color: var(--tile-accent);
  background: var(--tile-soft);
  outline: 3px solid var(--tile-accent);
  outline-offset: 4px;
}

.legal-hub-tile:focus-visible .legal-hub-arrow {
  background: var(--tile-accent);
  color: #fff;
}

@media (hover: hover) and (pointer: fine) {
  .legal-hub-tile:hover {
    border-color: var(--tile-accent);
    background: var(--tile-soft);
    box-shadow: 0 14px 30px rgba(23, 24, 27, .08);
    transform: translateY(-4px);
  }

  .legal-hub-tile:hover .legal-hub-arrow {
    background: var(--tile-accent);
    color: #fff;
  }

  .legal-hub-tile:hover .legal-hub-accent {
    width: 56px;
  }
}

.legal-navigation {
  position: sticky;
  top: 74px;
  z-index: 30;
  border-bottom: 1px solid #d5dce5;
  background: #fff;
}

.legal-navigation-links {
  display: grid;
  width: min(calc(100% - 48px), 900px);
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0 auto;
}

.legal-navigation a {
  display: flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  padding: 12px 8px;
  border-bottom: 3px solid transparent;
  color: #424b57;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
}

.legal-navigation a:hover,
.legal-navigation a[aria-current="page"] {
  border-bottom-color: #1054a5;
  color: #1054a5;
  background: #f4f8fc;
}

.legal-navigation a:focus-visible {
  outline: 3px solid #1054a5;
  outline-offset: 3px;
}

@media (max-width: 980px) {
  .legal-navigation {
    top: 62px;
  }

  .legal-hub-tile {
    padding: 22px;
  }

  .legal-hub-tile h2 {
    font-size: 24px;
  }

  .legal-hub-icon {
    width: 56px;
    height: 56px;
  }

  .legal-hub-arrow {
    width: 36px;
    height: 36px;
    flex-basis: 36px;
  }
}

@media (max-width: 760px) {
  .legal-hub {
    width: calc(100% - 32px);
    padding: 36px 0 48px;
  }

  .legal-hub-grid {
    width: min(100%, 340px);
    grid-template-columns: 1fr;
    justify-self: center;
    gap: 16px;
  }
}

@media (max-width: 640px) {
  .legal-navigation-links {
    width: calc(100% - 28px);
  }

  .legal-navigation a {
    padding: 12px 4px;
    font-size: 13px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .legal-hub-tile,
  .legal-hub-accent,
  .legal-hub-arrow {
    transition: none;
  }

  .legal-hub-tile:hover {
    transform: none;
  }
}
