/* Networking practice tests hub — aligned with the current Netest teal theme. */
:root {
  --tests-teal: #18a193;
  --tests-teal-bright: #55d2c5;
  --tests-line: color-mix(in srgb, var(--border-color) 82%, var(--tests-teal) 18%);
  --tests-soft: color-mix(in srgb, var(--tests-teal) 10%, transparent);
}

body.tests-page {
  background:
    radial-gradient(circle at 10% 7%, color-mix(in srgb, var(--tests-teal) 7%, transparent), transparent 28rem),
    var(--bg-primary);
}

.tests-hub,
.tests-hub * {
  box-sizing: border-box;
}

.tests-hub {
  margin: 1.5rem auto 4.5rem;
  max-width: 1320px;
  overflow: hidden;
  padding: 0 1.25rem;
  width: 100%;
}

.tests-breadcrumb {
  color: var(--text-muted);
  font-size: .86rem;
  margin: 0 0 1rem;
}

.tests-breadcrumb a {
  color: var(--tests-teal-bright);
  font-weight: 800;
  text-decoration: none;
}

.tests-hero {
  align-items: center;
  background:
    radial-gradient(circle at 92% 8%, color-mix(in srgb, var(--tests-teal) 18%, transparent), transparent 25rem),
    linear-gradient(145deg, var(--bg-card), var(--bg-secondary));
  border: 1px solid var(--tests-line);
  border-radius: 1.35rem;
  display: grid;
  gap: clamp(2rem, 5vw, 5rem);
  grid-template-columns: minmax(0, 1.25fr) minmax(290px, .75fr);
  overflow: hidden;
  padding: clamp(2rem, 5vw, 4.25rem);
  position: relative;
}

.tests-hero::before {
  background: linear-gradient(90deg, var(--tests-teal), #72d3c7, #b8c568);
  content: "";
  height: 3px;
  inset: 0 0 auto;
  position: absolute;
}

.tests-eyebrow,
.tests-kicker {
  color: var(--tests-teal-bright);
  font-size: .72rem;
  font-weight: 850;
  letter-spacing: .14em;
  margin: 0 0 .75rem;
  text-transform: uppercase;
}

.tests-eyebrow {
  align-items: center;
  display: flex;
  gap: .65rem;
}

.tests-eyebrow span {
  background: currentColor;
  border-radius: 999px;
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--tests-teal) 12%, transparent);
  height: .42rem;
  width: .42rem;
}

.tests-hero h1 {
  background: none;
  color: var(--text-primary);
  font-size: clamp(2.7rem, 5vw, 4.45rem);
  font-weight: 780;
  letter-spacing: -.045em;
  line-height: 1.02;
  margin: 0;
  padding: 0;
  -webkit-text-fill-color: currentColor;
}

.tests-hero h1 span {
  color: var(--tests-teal-bright);
}

.tests-hero-copy > p:not(.tests-eyebrow) {
  color: var(--text-secondary);
  font-size: clamp(1rem, 1.4vw, 1.14rem);
  line-height: 1.72;
  margin: 1.3rem 0 0;
  max-width: 720px;
}

.tests-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-top: 1.8rem;
}

.tests-hero-actions a {
  align-items: center;
  border: 1px solid var(--tests-line);
  border-radius: .65rem;
  display: inline-flex;
  font-size: .86rem;
  font-weight: 850;
  gap: .55rem;
  justify-content: center;
  min-height: 48px;
  padding: .75rem 1.1rem;
  text-decoration: none;
}

.tests-primary-action {
  background: var(--tests-teal);
  border-color: var(--tests-teal) !important;
  box-shadow: 0 10px 24px color-mix(in srgb, var(--tests-teal) 22%, transparent);
  color: #fff;
}

.tests-primary-action:hover { background: #117e74; color: #fff; }

.tests-secondary-action {
  background: var(--bg-card);
  color: var(--text-primary);
}

.tests-secondary-action:hover { border-color: var(--tests-teal); color: var(--tests-teal-bright); }

.tests-hero-panel {
  background: color-mix(in srgb, var(--bg-card) 88%, transparent);
  border: 1px solid var(--tests-line);
  border-radius: 1rem;
  box-shadow: 0 24px 60px rgba(5, 24, 35, .18);
  min-width: 0;
  padding: 1.3rem;
}

.tests-score-ring {
  align-items: baseline;
  border-bottom: 1px solid var(--tests-line);
  display: flex;
  gap: .6rem;
  padding: .2rem 0 1.1rem;
}

.tests-score-ring strong {
  color: var(--tests-teal-bright);
  font-size: 2.4rem;
  line-height: 1;
}

.tests-score-ring span {
  color: var(--text-secondary);
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.tests-hero-panel ul {
  display: grid;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: .5rem 0 0;
}

.tests-hero-panel li {
  align-items: center;
  display: grid;
  gap: .75rem;
  grid-template-columns: 32px minmax(0, 1fr);
  padding: .75rem 0;
}

.tests-hero-panel li i {
  align-items: center;
  background: var(--tests-soft);
  border-radius: .6rem;
  color: var(--tests-teal-bright);
  display: flex;
  height: 32px;
  justify-content: center;
}

.tests-hero-panel strong,
.tests-hero-panel small { display: block; }
.tests-hero-panel strong { color: var(--text-primary); font-size: .84rem; }
.tests-hero-panel small { color: var(--text-muted); font-size: .7rem; margin-top: .12rem; }

.tests-section {
  margin-top: clamp(3rem, 6vw, 5rem);
}

.tests-section-heading {
  align-items: end;
  display: flex;
  gap: 2rem;
  justify-content: space-between;
  margin-bottom: 1.35rem;
}

.tests-section-heading h2,
.test-method h2,
.test-study-grid h2 {
  color: var(--text-primary);
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  letter-spacing: -.025em;
  line-height: 1.12;
  margin: 0;
}

.tests-section-heading > div > p:last-child,
.test-method-copy > p:last-child {
  color: var(--text-secondary);
  line-height: 1.6;
  margin: .55rem 0 0;
}

.tests-count {
  align-items: baseline;
  background: var(--bg-card);
  border: 1px solid var(--tests-line);
  border-radius: 999px;
  color: var(--text-muted);
  display: flex;
  flex: 0 0 auto;
  font-size: .72rem;
  gap: .35rem;
  padding: .5rem .8rem;
}

.tests-count strong { color: var(--tests-teal-bright); font-size: 1rem; }

.tests-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.test-card {
  --card-color: var(--tests-teal);
  background: var(--bg-card);
  border: 1px solid var(--tests-line);
  border-radius: 1rem;
  display: flex;
  flex-direction: column;
  min-height: 325px;
  min-width: 0;
  overflow: hidden;
  padding: 1.3rem;
  position: relative;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.test-card::before {
  background: var(--card-color);
  content: "";
  height: 3px;
  inset: 0 0 auto;
  position: absolute;
}

.test-card:hover {
  border-color: var(--card-color);
  box-shadow: 0 16px 38px rgba(4, 26, 38, .12);
  transform: translateY(-3px);
}

.test-card-featured { --card-color: #22b9aa; }
.test-network-plus { --card-color: #8d79ed; }
.test-routing { --card-color: #4f8cff; }
.test-switching { --card-color: #efad4f; }
.test-security { --card-color: #e46a7e; }
.test-ipv6 { --card-color: #50b77b; }
.test-troubleshooting { --card-color: #d27bd7; }

.test-card-top {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 1.1rem;
}

.test-icon {
  align-items: center;
  background: color-mix(in srgb, var(--card-color) 13%, transparent);
  border: 1px solid color-mix(in srgb, var(--card-color) 25%, transparent);
  border-radius: .8rem;
  color: var(--card-color);
  display: flex;
  font-size: 1.1rem;
  height: 44px;
  justify-content: center;
  width: 44px;
}

.test-level {
  color: var(--text-muted);
  font-size: .64rem;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.test-category {
  color: var(--card-color) !important;
  font-size: .66rem !important;
  font-weight: 850;
  letter-spacing: .1em;
  margin: 0 0 .35rem !important;
  text-transform: uppercase;
}

.test-card h3 {
  color: var(--text-primary);
  font-size: 1.3rem;
  line-height: 1.2;
  margin: 0 0 .55rem;
}

.test-card > p:not(.test-category) {
  color: var(--text-secondary);
  font-size: .82rem;
  line-height: 1.58;
  margin: 0;
}

.test-card > ul {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  list-style: none;
  margin: 1rem 0;
  padding: 0;
}

.test-card > ul li {
  background: var(--bg-secondary);
  border: 1px solid var(--tests-line);
  border-radius: 999px;
  color: var(--text-muted);
  font-size: .65rem;
  font-weight: 750;
  padding: .28rem .5rem;
}

.test-card > a {
  align-items: center;
  background: color-mix(in srgb, var(--card-color) 11%, var(--bg-card));
  border: 1px solid color-mix(in srgb, var(--card-color) 18%, transparent);
  border-radius: .65rem;
  color: var(--card-color);
  display: flex;
  font-size: .8rem;
  font-weight: 850;
  justify-content: space-between;
  margin-top: auto;
  min-height: 43px;
  padding: .65rem .75rem;
  text-decoration: none;
}

.test-card > a:hover { border-color: var(--card-color); color: var(--card-color); }
.test-card > a i { font-size: .68rem; transition: transform .2s ease; }
.test-card > a:hover i { transform: translateX(4px); }

.test-method {
  align-items: center;
  background:
    radial-gradient(circle at 95% 5%, var(--tests-soft), transparent 20rem),
    var(--bg-card);
  border: 1px solid var(--tests-line);
  border-radius: 1.1rem;
  display: grid;
  gap: 2rem;
  grid-template-columns: minmax(260px, .8fr) minmax(0, 1.2fr);
  margin-top: clamp(3rem, 6vw, 5rem);
  padding: clamp(1.5rem, 3.5vw, 2.5rem);
}

.test-method ol {
  counter-reset: none;
  display: grid;
  gap: .65rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.test-method li {
  align-items: center;
  background: var(--bg-secondary);
  border: 1px solid var(--tests-line);
  border-radius: .75rem;
  display: grid;
  gap: .85rem;
  grid-template-columns: 38px minmax(0, 1fr);
  padding: .75rem;
}

.test-method li > span {
  align-items: center;
  background: var(--tests-soft);
  border: 1px solid color-mix(in srgb, var(--tests-teal) 25%, transparent);
  border-radius: .65rem;
  color: var(--tests-teal-bright);
  display: flex;
  font-size: .65rem;
  font-weight: 900;
  height: 38px;
  justify-content: center;
}

.test-method strong { color: var(--text-primary); display: block; font-size: .86rem; }
.test-method li p { color: var(--text-muted); font-size: .72rem; line-height: 1.4; margin: .12rem 0 0; }

.test-study-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, .75fr);
  margin-top: 1rem;
}

.test-study-path,
.test-companions {
  background: var(--bg-card);
  border: 1px solid var(--tests-line);
  border-radius: 1.1rem;
  padding: clamp(1.4rem, 3vw, 2rem);
}

.study-steps {
  display: grid;
  gap: .55rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 1.35rem;
}

.study-steps a,
.test-companions > a {
  align-items: center;
  background: var(--bg-secondary);
  border: 1px solid var(--tests-line);
  border-radius: .75rem;
  color: var(--text-primary);
  display: grid;
  gap: .7rem;
  min-width: 0;
  padding: .8rem;
  text-decoration: none;
  transition: border-color .2s ease, transform .2s ease;
}

.study-steps a { grid-template-columns: 30px minmax(0, 1fr); }
.study-steps a:hover,
.test-companions > a:hover { border-color: var(--tests-teal); transform: translateX(3px); }

.study-steps a > span {
  align-items: center;
  background: var(--tests-soft);
  border-radius: 50%;
  color: var(--tests-teal-bright);
  display: flex;
  font-size: .68rem;
  font-weight: 900;
  height: 30px;
  justify-content: center;
}

.study-steps strong,
.study-steps small,
.test-companions strong,
.test-companions small { display: block; }
.study-steps strong,
.test-companions strong { color: var(--text-primary); font-size: .82rem; }
.study-steps small,
.test-companions small { color: var(--text-muted); font-size: .68rem; margin-top: .12rem; }

.test-companions {
  display: flex;
  flex-direction: column;
}

.test-companions h2 { margin-bottom: 1.35rem; }
.test-companions > a { grid-template-columns: 30px minmax(0, 1fr) auto; margin-bottom: .55rem; }
.test-companions > a > i:first-child { color: var(--tests-teal-bright); text-align: center; }
.test-companions > a > i:last-child { color: var(--tests-teal-bright); font-size: .65rem; }

@media (max-width: 1050px) {
  .tests-hero,
  .test-method,
  .test-study-grid { grid-template-columns: 1fr; }
  .tests-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
  .tests-hub { padding: 0 .75rem; }
  .tests-hero { border-radius: 1rem; padding: 1.6rem; }
  .tests-hero h1 { font-size: clamp(2.25rem, 11vw, 3rem); }
  .tests-section-heading { align-items: flex-start; flex-direction: column; gap: .75rem; }
  .tests-grid,
  .study-steps { grid-template-columns: 1fr; }
  .test-card { min-height: 0; }
}
