/* ==========================================================================
   Testing facilities page (testing-facilities.html)
   Scoped to .tf so nothing here leaks into other pages. Loads after the base
   sheets, which force text-transform:capitalize on every bare h1-h6 - each
   heading below therefore resets its own casing explicitly.
   ========================================================================== */

.tf {
  --tf-navy: #0c549e;
  --tf-navy-dk: #06305c;
  --tf-red: #df1d2f;
  --tf-ink: #3c3a3a;
  --tf-muted: #66788f;
  --tf-line: #dce4ee;
  --tf-soft: #f4f7fb;
}

.tf,
.tf *,
.tf *::before,
.tf *::after {
  box-sizing: border-box;
}

.tf {
  display: block;
  color: var(--tf-ink);
  font-size: 13px;
  line-height: 1.6;
}

.tf p {
  margin: 0 0 12px;
  color: var(--tf-ink);
  font-size: 13px;
}

/* The page title now sits over the banner - see css/page-hero.css. */

.tf-intro {
  max-width: 980px;
  margin: 0 0 30px;
}

/* ==========================================================================
   Section heads
   ========================================================================== */

.tf-head {
  margin: 0 0 16px;
}

.tf .tf-head h2 {
  display: inline-block;
  margin: 0;
  padding: 0 0 7px;
  color: var(--tf-navy);
  font-size: 19px;
  font-weight: normal;
  line-height: 1.3;
  text-transform: uppercase;
  border-bottom: 3px solid var(--tf-red);
}

/* ==========================================================================
   Testing method lists
   ========================================================================== */

.tf-methods {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin: 0 0 34px;
}

.tf-method {
  padding: 20px 22px;
  background: var(--tf-soft);
  border: 1px solid var(--tf-line);
  border-radius: 6px;
}

.tf .tf-method h3 {
  margin: 0 0 12px;
  padding: 0 0 7px;
  color: var(--tf-navy);
  font-size: 15px;
  font-weight: normal;
  line-height: 1.3;
  text-transform: uppercase;
  border-bottom: 2px solid var(--tf-red);
}

.tf-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.tf-list li {
  position: relative;
  margin: 0;
  padding: 5px 0 5px 20px;
  border-bottom: 1px solid #e7edf5;
}

.tf-list li:last-child {
  border-bottom: 0;
}

.tf-list li::before {
  content: "\25B8";
  position: absolute;
  top: 5px;
  left: 2px;
  color: var(--tf-red);
}

/* ==========================================================================
   Facility gallery
   ========================================================================== */

.tf-gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin: 0 0 34px;
}

.tf-card {
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--tf-line);
  border-radius: 6px;
  box-shadow: 0 6px 18px rgba(6, 39, 75, 0.06);
}

/* Flex + min-height so a caption that wraps to two lines still leaves the
   image tops aligned across the row. */
.tf-card__cap {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 8px 11px;
  background: #4a5a6b;
  color: #fff;
  font-size: 11px;
  font-weight: bold;
  line-height: 1.3;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.tf-card figure,
.tf-card .tf-card__media {
  display: block;
  margin: 0;
  padding: 0;
  background: #eef2f7;
}

.tf-card img {
  display: block;
  width: 100%;
  height: 165px;
  margin: 0;
  object-fit: cover;
}

/* ==========================================================================
   Quality assurance / external lab
   ========================================================================== */

.tf-assure {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin: 0 0 34px;
}

.tf-panel {
  padding: 20px 22px;
  background: var(--tf-soft);
  border: 1px solid var(--tf-line);
  border-left: 4px solid var(--tf-navy);
  border-radius: 6px;
}

.tf-panel--alt {
  border-left-color: var(--tf-red);
}

.tf .tf-panel h3 {
  margin: 0 0 9px;
  padding: 0;
  color: var(--tf-navy);
  font-size: 15px;
  font-weight: normal;
  line-height: 1.3;
  text-transform: uppercase;
}

.tf .tf-panel--alt h3 {
  color: var(--tf-red);
}

.tf-panel p:last-child {
  margin-bottom: 0;
}

/* ==========================================================================
   Capabilities summary
   ========================================================================== */

.tf-caps {
  padding: 30px 26px 26px;
  background:
    radial-gradient(circle at 1px 1px, #dbe4ef 1px, transparent 0) 0 0 / 18px 18px,
    linear-gradient(180deg, #f7fafd, #fff 60%);
  border: 1px solid var(--tf-line);
  border-radius: 10px;
}

.tf-caps__head {
  margin: 0 0 22px;
  text-align: center;
}

.tf-caps__kicker {
  display: inline-block;
  margin: 0 0 8px;
  padding: 4px 12px;
  background: rgba(12, 84, 158, 0.08);
  border-radius: 999px;
  color: var(--tf-navy);
  font-size: 10.5px;
  font-weight: bold;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.tf .tf-caps__head h2 {
  margin: 0;
  padding: 0;
  color: var(--tf-navy-dk);
  font-size: 21px;
  font-weight: normal;
  line-height: 1.25;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  border: 0;
}

/* Three lanes, each with its own accent. */
.tf-caps__lanes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.tf-lane {
  --lane: var(--tf-navy);
  position: relative;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--tf-line);
  border-radius: 9px;
  box-shadow: 0 8px 22px rgba(6, 39, 75, 0.07);
}

.tf-lane--mech {
  --lane: #0f7d8c;
}

.tf-lane--rel {
  --lane: var(--tf-red);
}

.tf-lane__top {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 15px 16px;
  background: linear-gradient(135deg, var(--tf-navy-dk), #0a4680);
  border-top: 4px solid var(--lane);
}

.tf-lane__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  background: var(--lane);
  border-radius: 8px;
  color: #fff;
  font-size: 15px;
}

.tf .tf-lane__top h3 {
  margin: 0;
  padding: 0;
  color: #fff;
  font-size: 13px;
  font-weight: normal;
  line-height: 1.25;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border: 0;
}

/* Oversized index digit, watermarked into the header. */
.tf-lane__no {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, 0.16);
  font-size: 34px;
  font-weight: bold;
  line-height: 1;
  letter-spacing: -0.03em;
  pointer-events: none;
}

.tf-lane__list {
  margin: 0;
  padding: 6px 16px 14px;
  list-style: none;
}

.tf-lane__list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px dashed #e3eaf3;
  font-size: 12.5px;
}

.tf-lane__list li:last-child {
  border-bottom: 0;
}

.tf-lane__list i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 19px;
  height: 19px;
  /* Flat fallback first for browsers without color-mix(). */
  background: #eef3f9;
  background: color-mix(in srgb, var(--lane) 12%, #fff);
  border-radius: 5px;
  color: var(--lane);
  font-size: 9px;
}

/* Certifications as pressed-metal stamps. */
.tf-stamps {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px dashed var(--tf-line);
}

.tf-stamps__label {
  margin-right: 4px;
  color: var(--tf-muted);
  font-size: 10.5px;
  font-weight: bold;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.tf-stamps__row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tf-stamps__row li {
  padding: 6px 13px;
  background: linear-gradient(180deg, #fff, #eef3f9);
  border: 1px solid #c7d5e4;
  border-radius: 4px;
  box-shadow: inset 0 1px 0 #fff;
  color: var(--tf-navy-dk);
  font-size: 11.5px;
  font-weight: bold;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.tf-closing {
  margin-top: 22px;
  padding: 16px 22px;
  background: linear-gradient(90deg, var(--tf-navy-dk), var(--tf-navy));
  border-radius: 4px;
  color: #fff;
}

.tf-closing p {
  margin: 0;
  color: #fff;
}

.tf-closing strong {
  display: block;
  font-size: 14px;
  text-transform: uppercase;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

/* 4 up -> 3 -> 2 -> 1 as the container narrows. */
@media screen and (max-width: 1100px) {
  .tf-gallery {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media screen and (max-width: 900px) {
  .tf-gallery,
  .tf-caps__lanes {
    grid-template-columns: 1fr 1fr;
  }
}

@media screen and (max-width: 650px) {
  .tf-methods,
  .tf-gallery,
  .tf-assure,
  .tf-caps__lanes {
    grid-template-columns: 1fr;
  }

  .tf-caps {
    padding: 22px 16px 20px;
  }

  .tf-stamps {
    gap: 8px;
  }


  .tf-card img {
    height: 210px;
  }
}
