/* =====================================================================
   Trinity Metals — tm-wordpress.css

   Layered on top of tm-modern.css. Contains:
   1.  Missing .mg-* classes (in case the base CSS was stale at copy time)
   2.  NEW .tm-* site-wide editorial system (hero/marquee/cards) — applies
       the magnesium-page quality to the whole site
   3.  Environmental grid spacing FIX
   4.  Form styling (contact form)
   5.  News grid + single article
   6.  Contact page layout
   7.  Pagination + empty states
   8.  Mobile polish
   9.  WordPress admin bar accommodation

   Author: Trinity Metals
   ===================================================================== */


/* =====================================================================
   1.  MAGNESIUM NAMESPACE (.mg-*)
       Replicated here so the theme CSS ships complete even if the copied
       tm-modern.css was stale.
   ===================================================================== */

.mg-hero {
  position: relative;
  background: #0d1117;
  color: #fff;
  padding: clamp(5rem, 10vw, 8rem) 0 clamp(3.5rem, 7vw, 5.5rem);
  overflow: hidden;
  isolation: isolate;
}
.mg-hero-art { position: absolute; inset: 0; z-index: 0; opacity: 0.55; }
.mg-hero-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mg-hero-overlay {
  position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(180deg, rgba(13,17,23,0.35) 0%, rgba(13,17,23,0.85) 80%, rgba(13,17,23,0.95) 100%),
    radial-gradient(circle at 85% 20%, rgba(179,17,51,0.25), transparent 55%);
}
.mg-hero-inner { position: relative; z-index: 2; }
.mg-hero-inner .breadcrumb,
.mg-hero-inner .breadcrumb a { color: rgba(255,255,255,0.6); }
.mg-hero-inner .breadcrumb a:hover { color: #ff5873; }
.mg-hero-eyebrow { color: #ff5873 !important; margin-bottom: 1.25rem; }
.mg-hero-inner h1 {
  font-family: "Fraunces","Inter",serif;
  font-weight: 400;
  font-size: clamp(2.5rem, 5.5vw, 4.5rem);
  line-height: 1.02;
  letter-spacing: -0.025em;
  color: #fff;
  margin: 0 0 1.25rem;
  max-width: 22ch;
}
.mg-hero-inner h1 em { font-style: italic; color: #ff5873; }
.mg-hero-lead {
  max-width: 62ch;
  font-size: clamp(1.05rem, 1.4vw, 1.2rem);
  line-height: 1.55;
  color: rgba(255,255,255,0.78);
  margin: 0 0 2.5rem;
}
.mg-hero-marquee {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1px;
  background: rgba(255,255,255,0.12);
  border-top: 1px solid rgba(255,255,255,0.12);
  border-bottom: 1px solid rgba(255,255,255,0.12);
  margin-top: 1.5rem;
}
.mg-hero-marquee > div { background: #0d1117; padding: 1.25rem 1rem; display: flex; flex-direction: column; gap: 0.3rem; }
.mg-hero-marquee-k { font-size: 0.7rem; letter-spacing: 2.5px; text-transform: uppercase; color: rgba(255,255,255,0.5); }
.mg-hero-marquee-v { font-family: "Fraunces","Inter",serif; font-weight: 500; font-size: 1.05rem; color: #fff; letter-spacing: -0.01em; }

.mg-opener { display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.mg-opener-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; padding: 1.5rem; background: #f5f5f7; border-radius: 4px; border-left: 3px solid #b31133; }
.mg-opener-meta > div { display: flex; flex-direction: column; gap: 0.35rem; }
.mg-opener-meta-k { font-size: 0.7rem; letter-spacing: 2.5px; text-transform: uppercase; color: rgba(13,17,23,0.55); }
.mg-opener-meta-v { font-family: "Fraunces","Inter",serif; font-weight: 500; font-size: 0.98rem; line-height: 1.3; color: #0d1117; letter-spacing: -0.01em; }
@media (max-width: 900px) {
  .mg-opener { grid-template-columns: 1fr; }
  .mg-opener-meta { grid-template-columns: 1fr 1fr; }
}

.mg-tier-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.25rem; margin-top: 2.5rem; }
.mg-tier { background: #fff; border: 1px solid rgba(13,17,23,0.1); padding: 1.75rem; border-radius: 4px; transition: transform 0.3s ease, border-color 0.3s ease; }
.mg-tier:hover { transform: translateY(-3px); border-color: rgba(179,17,51,0.35); }
.mg-tier-tag { display: inline-block; font-size: 0.72rem; letter-spacing: 2.5px; text-transform: uppercase; color: #b31133; font-weight: 600; margin-bottom: 0.85rem; }
.mg-tier h3 { font-family: "Fraunces","Inter",serif; font-weight: 500; font-size: 1.2rem; color: #0d1117; margin: 0 0 0.6rem; letter-spacing: -0.01em; }
.mg-tier p { color: #4a5161; line-height: 1.55; margin: 0; font-size: 0.95rem; }
.mg-footnote { margin-top: 2rem; font-size: 0.9rem; color: rgba(13,17,23,0.6); line-height: 1.55; font-style: italic; max-width: 70ch; }

.mg-pillars { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1px; background: rgba(13,17,23,0.1); border: 1px solid rgba(13,17,23,0.1); margin-top: 2.5rem; border-radius: 4px; overflow: hidden; }
.mg-pillar { background: #fff; padding: 2rem 1.5rem; display: flex; flex-direction: column; gap: 0.6rem; }
.mg-pillar-num { font-size: 0.72rem; letter-spacing: 2.5px; color: #b31133; font-weight: 600; margin-bottom: 0.5rem; }
.mg-pillar h3 { font-family: "Fraunces","Inter",serif; font-weight: 500; font-size: 1.15rem; line-height: 1.2; margin: 0; color: #0d1117; letter-spacing: -0.01em; }
.mg-pillar p { color: #4a5161; line-height: 1.55; font-size: 0.93rem; margin: 0; }

.mg-sourcing-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
@media (max-width: 900px) { .mg-sourcing-grid { grid-template-columns: 1fr; } }
.mg-sourcing-copy .eyebrow { display: block; margin-bottom: 1rem; }
.mg-source-groups { display: grid; gap: 1.1rem; margin-top: 1.5rem; }
.mg-source-groups > div { padding: 1rem 0 1rem 1.1rem; border-left: 2px solid rgba(179,17,51,0.4); }
.mg-source-groups-h { display: block; font-family: "Fraunces","Inter",serif; font-weight: 500; font-size: 1rem; color: #0d1117; margin-bottom: 0.3rem; letter-spacing: -0.01em; }
.mg-source-groups p { margin: 0; font-size: 0.92rem; color: #4a5161; line-height: 1.55; }
.mg-sourcing-art { margin: 0; padding: 1rem; background: #f5f5f7; border-radius: 4px; }
.mg-sourcing-art img { width: 100%; height: auto; display: block; }
.mg-sourcing-art figcaption { margin-top: 0.85rem; font-size: 0.82rem; color: rgba(13,17,23,0.55); text-align: center; line-height: 1.5; padding: 0 0.75rem; }

.mg-facility-art { margin: 0; border-radius: 4px; overflow: hidden; background: #f5f5f7; }
.mg-facility-art img { width: 100%; height: auto; display: block; }

.mg-infra-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; margin-top: 2.5rem; }
.mg-infra { background: #fff; border: 1px solid rgba(13,17,23,0.1); padding: 1.5rem; border-radius: 4px; position: relative; }
.mg-infra-k { font-size: 0.72rem; letter-spacing: 2.5px; color: #b31133; font-weight: 600; margin-bottom: 0.6rem; display: block; }
.mg-infra h3 { font-family: "Fraunces","Inter",serif; font-weight: 500; font-size: 1.05rem; margin: 0 0 0.5rem; color: #0d1117; letter-spacing: -0.01em; line-height: 1.25; }
.mg-infra p { color: #4a5161; line-height: 1.55; font-size: 0.9rem; margin: 0; }

.mg-downloads { margin-top: 2.5rem; padding: 1.5rem; background: #f5f5f7; border-radius: 4px; }
.mg-downloads-k { display: block; font-size: 0.72rem; letter-spacing: 2.5px; text-transform: uppercase; color: rgba(13,17,23,0.55); margin-bottom: 1rem; }

.mg-env-art { margin: 2.5rem 0 0; padding: 1rem; background: #fff; border: 1px solid rgba(13,17,23,0.08); border-radius: 4px; }
.mg-env-art img { width: 100%; height: auto; display: block; }

/* ============================================================
   ENVIRONMENTAL GRID — spacing fix per user feedback
   Previous build felt cramped. This gives each pillar visual
   breathing room, equal heights, and a subtle card-like shell.
   ============================================================ */
.mg-env-notes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: clamp(1.25rem, 2.2vw, 2rem);
  margin-top: clamp(2.5rem, 4vw, 3.5rem);
}
.mg-env-notes > div {
  padding: 1.75rem 1.5rem;
  background: #fff;
  border: 1px solid rgba(13,17,23,0.08);
  border-left: 3px solid #b31133;
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.mg-env-notes > div:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px -18px rgba(13,17,23,0.2);
}
.mg-env-notes-h {
  display: block;
  font-family: "Fraunces","Inter",serif;
  font-weight: 500;
  font-size: 1.08rem;
  color: #0d1117;
  letter-spacing: -0.01em;
  line-height: 1.25;
}
.mg-env-notes p {
  font-size: 0.93rem;
  color: #4a5161;
  line-height: 1.6;
  margin: 0;
}

.mg-tech-section { position: relative; background: #0d1117; color: #fff; padding: clamp(4rem, 8vw, 6.5rem) 0; overflow: hidden; isolation: isolate; }
.mg-tech-art { position: absolute; inset: 0; z-index: 0; opacity: 0.55; }
.mg-tech-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mg-tech-inner { position: relative; z-index: 1; max-width: 780px; }
.mg-tech-eyebrow { color: #ff5873 !important; margin-bottom: 1.25rem; }
.mg-tech-title { color: #fff !important; margin-bottom: 1.25rem; }
.mg-tech-title em { color: #ff5873; font-style: italic; }
.mg-tech-lead { color: rgba(255,255,255,0.78); font-size: clamp(1rem, 1.3vw, 1.125rem); line-height: 1.65; margin: 0; }

.mg-logistics-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
@media (max-width: 900px) { .mg-logistics-grid { grid-template-columns: 1fr; } }
.mg-logistics-art { margin: 0; padding: 1rem; background: #f5f5f7; border-radius: 4px; }
.mg-logistics-art img { width: 100%; height: auto; display: block; }
.mg-logistics-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem 2rem; margin: 2rem 0 0; }
.mg-logistics-stats > div { padding-top: 1rem; border-top: 1px solid rgba(13,17,23,0.1); }
.mg-logistics-stats dt { font-size: 0.72rem; letter-spacing: 2.5px; text-transform: uppercase; color: rgba(13,17,23,0.55); margin-bottom: 0.3rem; }
.mg-logistics-stats dd { font-family: "Fraunces","Inter",serif; font-weight: 500; font-size: 0.98rem; color: #0d1117; margin: 0; letter-spacing: -0.01em; line-height: 1.3; }

.mg-connect { background: linear-gradient(135deg, #7a0a20 0%, #b31133 100%); color: #fff; padding: clamp(3.5rem, 6vw, 5rem) 0; }
.mg-connect-inner { max-width: 900px; text-align: center; margin: 0 auto; }
.mg-connect-eyebrow { color: rgba(255,255,255,0.7) !important; margin-bottom: 1rem; }
.mg-connect-h { font-family: "Fraunces","Inter",serif; font-weight: 400; font-size: clamp(1.75rem, 3.5vw, 2.6rem); line-height: 1.15; letter-spacing: -0.02em; color: #fff; margin: 0 0 1rem; }
.mg-connect-h em { font-style: italic; color: #ffc6d0; }
.mg-connect-p { color: rgba(255,255,255,0.82); font-size: 1.05rem; line-height: 1.55; margin: 0 auto 2rem; max-width: 56ch; }
.mg-connect-actions { display: flex; gap: 0.9rem; justify-content: center; flex-wrap: wrap; }
.mg-connect-actions .btn-primary { background: #0d1117; color: #fff; border-color: #0d1117; }
.mg-connect-actions .btn-primary:hover { background: #fff; color: #0d1117; border-color: #fff; }
.mg-connect-actions .btn-ghost { border-color: rgba(255,255,255,0.55); color: #fff; }
.mg-connect-actions .btn-ghost:hover { background: rgba(255,255,255,0.12); border-color: #fff; }


/* =====================================================================
   2.  SITE-WIDE EDITORIAL SYSTEM (.tm-*)
       Extends the magnesium aesthetic to every other page.
   ===================================================================== */

.tm-hero {
  position: relative;
  background: #0d1117;
  color: #fff;
  padding: clamp(5rem, 10vw, 8rem) 0 clamp(3.5rem, 7vw, 5.5rem);
  overflow: hidden;
  isolation: isolate;
}
.tm-hero-short { padding: clamp(3.5rem, 7vw, 5.5rem) 0 clamp(3rem, 6vw, 4.5rem); }
.tm-hero-overlay {
  position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(180deg, rgba(13,17,23,0.4) 0%, rgba(13,17,23,0.95) 100%),
    radial-gradient(circle at 82% 18%, rgba(179,17,51,0.28), transparent 58%),
    radial-gradient(circle at 10% 95%, rgba(255,88,115,0.18), transparent 60%);
}
.tm-hero-inner { position: relative; z-index: 2; }
.tm-hero-inner .breadcrumb,
.tm-hero-inner .breadcrumb a { color: rgba(255,255,255,0.6); }
.tm-hero-inner .breadcrumb a:hover { color: #ff5873; }
.tm-hero-eyebrow { color: #ff5873 !important; margin-bottom: 1.25rem; }
.tm-hero-inner h1 {
  font-family: "Fraunces","Inter",serif;
  font-weight: 400;
  font-size: clamp(2.3rem, 5vw, 4.25rem);
  line-height: 1.03;
  letter-spacing: -0.025em;
  color: #fff;
  margin: 0 0 1.25rem;
  max-width: 24ch;
}
.tm-hero-inner h1 em { font-style: italic; color: #ff5873; }
.tm-hero-lead {
  max-width: 62ch;
  font-size: clamp(1.02rem, 1.3vw, 1.18rem);
  line-height: 1.55;
  color: rgba(255,255,255,0.78);
  margin: 0 0 2.25rem;
}
.tm-hero-marquee {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1px;
  background: rgba(255,255,255,0.12);
  border-top: 1px solid rgba(255,255,255,0.12);
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
.tm-hero-marquee > div { background: #0d1117; padding: 1.25rem 1rem; display: flex; flex-direction: column; gap: 0.3rem; }
.tm-hero-marquee-k { font-size: 0.7rem; letter-spacing: 2.5px; text-transform: uppercase; color: rgba(255,255,255,0.5); }
.tm-hero-marquee-v { font-family: "Fraunces","Inter",serif; font-weight: 500; font-size: 1rem; color: #fff; letter-spacing: -0.01em; }
.tm-hero-marquee-v a { color: #fff; }
.tm-hero-marquee-v a:hover { color: #ff5873; }


/* =====================================================================
   3.  CONTACT FORM STYLING
   ===================================================================== */

.tm-contact-layout {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: clamp(2rem, 4.5vw, 4rem);
  align-items: start;
}
@media (max-width: 900px) { .tm-contact-layout { grid-template-columns: 1fr; } }

.tm-contact-main { max-width: 640px; }
.tm-contact-note {
  color: #4a5161;
  line-height: 1.65;
  margin: 0 0 2rem;
  max-width: 56ch;
}
.tm-contact-note a { color: #7a0a20; font-weight: 600; }
.tm-contact-note a:hover { color: #b31133; }

/* The form itself */
.tm-form { margin-top: 0.5rem; }
.tm-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
}
.tm-form-grid .tm-field-wide { grid-column: span 2; }
@media (max-width: 640px) {
  .tm-form-grid { grid-template-columns: 1fr; }
  .tm-form-grid .tm-field-wide { grid-column: span 1; }
}

.tm-field { display: flex; flex-direction: column; gap: 0.4rem; }
.tm-field label {
  font-size: 0.72rem;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: rgba(13,17,23,0.6);
  font-weight: 600;
}
.tm-field label span[aria-hidden] { color: #b31133; font-weight: 700; }
.tm-field input,
.tm-field textarea,
.tm-field select {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  background: #fff;
  border: 1px solid rgba(13,17,23,0.15);
  border-radius: 4px;
  padding: 0.85rem 1rem;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 1rem;
  color: #0d1117;
  line-height: 1.4;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.tm-field textarea { resize: vertical; min-height: 140px; }
.tm-field select {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none' stroke='%230d1117' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'><polyline points='1,1 6,7 11,1'/></svg>");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 12px;
  padding-right: 2.5rem;
}
.tm-field input:hover,
.tm-field textarea:hover,
.tm-field select:hover { border-color: rgba(13,17,23,0.3); }
.tm-field input:focus,
.tm-field textarea:focus,
.tm-field select:focus {
  outline: none;
  border-color: #b31133;
  box-shadow: 0 0 0 4px rgba(179,17,51,0.12);
}

.tm-form-hp { position: absolute !important; left: -9999px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }

.tm-form-footer {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  justify-content: space-between;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}
.tm-form-note {
  margin: 0;
  font-size: 0.82rem;
  color: rgba(13,17,23,0.55);
  line-height: 1.55;
  max-width: 44ch;
}

.tm-form-notice {
  padding: 1rem 1.25rem;
  border-radius: 4px;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
  line-height: 1.55;
}
.tm-form-success { background: #e6f4ea; border: 1px solid #a8d5b5; color: #1a6631; }
.tm-form-error   { background: #fdecea; border: 1px solid #f5b8b1; color: #8a1b12; }

/* Aside panels on the contact page */
.tm-contact-side { display: grid; gap: 1.25rem; }
.tm-contact-card {
  background: #fff;
  border: 1px solid rgba(13,17,23,0.1);
  border-radius: 4px;
  padding: clamp(1.5rem, 2.5vw, 2rem);
}
.tm-contact-card .eyebrow { display: block; margin-bottom: 0.75rem; }
.tm-contact-card h3 {
  font-family: "Fraunces","Inter",serif;
  font-weight: 500;
  font-size: 1.35rem;
  margin: 0 0 1rem;
  color: #0d1117;
  letter-spacing: -0.01em;
}
.tm-contact-address { color: #4a5161; line-height: 1.6; margin: 0 0 1.25rem; }
.tm-contact-stats {
  display: grid;
  gap: 0.9rem;
  margin: 0;
  padding-top: 1rem;
  border-top: 1px solid rgba(13,17,23,0.08);
}
.tm-contact-stats > div { display: grid; grid-template-columns: 100px 1fr; align-items: start; }
.tm-contact-stats dt { font-size: 0.7rem; letter-spacing: 2.5px; text-transform: uppercase; color: rgba(13,17,23,0.55); font-weight: 600; padding-top: 3px; }
.tm-contact-stats dd { margin: 0; font-size: 0.95rem; color: #0d1117; line-height: 1.55; }
.tm-contact-stats dd a { color: #7a0a20; font-weight: 600; }

.tm-contact-card-dark { background: #0d1117; color: #fff; border-color: #0d1117; }
.tm-contact-card-dark .eyebrow { color: #ff5873; }
.tm-contact-card-dark h3 { color: #fff; }
.tm-desk-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; }
.tm-desk-list li { padding-left: 1rem; border-left: 2px solid rgba(255,88,115,0.6); color: rgba(255,255,255,0.78); line-height: 1.55; font-size: 0.92rem; }
.tm-desk-list strong { color: #fff; font-weight: 600; display: block; margin-bottom: 0.15rem; font-size: 0.95rem; }


/* =====================================================================
   4.  NEWS GRID + ARTICLE
   ===================================================================== */

.tm-news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: clamp(1.25rem, 2.5vw, 2rem);
  margin-top: 2rem;
}
.tm-news-card {
  background: #fff;
  border: 1px solid rgba(13,17,23,0.08);
  border-radius: 4px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  height: 100%;
}
.tm-news-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 40px -25px rgba(13,17,23,0.22);
  border-color: rgba(179,17,51,0.35);
}
.tm-news-card-link { display: flex; flex-direction: column; height: 100%; color: inherit; text-decoration: none; }
.tm-news-card-media { aspect-ratio: 16/10; overflow: hidden; background: #f2f3f6; }
.tm-news-card-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.6s ease; }
.tm-news-card:hover .tm-news-card-media img { transform: scale(1.04); }
.tm-news-card-media-placeholder {
  background: linear-gradient(135deg, #0d1117 0%, #1a1f27 100%);
  display: flex; align-items: center; justify-content: center;
}
.tm-news-card-media-placeholder span { color: rgba(255,255,255,0.55); font-family: "Fraunces","Inter",serif; font-size: 1.6rem; letter-spacing: 0.02em; }
.tm-news-card-body { padding: 1.5rem 1.5rem 1.75rem; display: flex; flex-direction: column; gap: 0.5rem; flex: 1; }
.tm-news-card-eyebrow {
  font-size: 0.7rem; letter-spacing: 2.5px; text-transform: uppercase;
  color: #b31133; font-weight: 600;
}
.tm-news-card-title {
  font-family: "Fraunces","Inter",serif;
  font-weight: 500;
  font-size: 1.3rem;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: #0d1117;
  margin: 0;
}
.tm-news-card-date { font-size: 0.82rem; color: rgba(13,17,23,0.55); margin: 0; }
.tm-news-card-excerpt { font-size: 0.93rem; color: #4a5161; line-height: 1.6; margin: 0; flex: 1; }
.tm-news-card-cta { font-size: 0.88rem; color: #7a0a20; font-weight: 600; display: inline-flex; align-items: center; gap: 0.3rem; }
.tm-news-card-cta .arrow { transition: transform 0.3s ease; }
.tm-news-card:hover .tm-news-card-cta .arrow { transform: translateX(4px); }

/* Article hero (solid dark version — image is shown separately below) */
.tm-article-hero {
  position: relative;
  background: #0d1117;
  color: #fff;
  padding: clamp(5rem, 10vw, 7.5rem) 0 clamp(2.5rem, 5vw, 4rem);
  overflow: hidden;
  isolation: isolate;
}
.tm-article-hero::after {
  content: "";
  position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(circle at 85% 30%, rgba(179,17,51,0.20), transparent 55%),
    radial-gradient(circle at 15% 90%, rgba(122,10,32,0.18), transparent 55%);
  pointer-events: none;
}
.tm-article-hero-inner { position: relative; z-index: 2; }
.tm-article-hero-inner .breadcrumb,
.tm-article-hero-inner .breadcrumb a { color: rgba(255,255,255,0.6); }
.tm-article-eyebrow { color: #ff5873 !important; margin-bottom: 1rem; }
.tm-article-title {
  font-family: "Fraunces","Inter",serif;
  font-weight: 400;
  font-size: clamp(2rem, 4.5vw, 3.6rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: #fff;
  margin: 0 0 1rem;
  max-width: 28ch;
}
.tm-article-meta { color: rgba(255,255,255,0.65); font-size: 0.92rem; margin: 0; letter-spacing: 0.02em; }

/* Centered featured image between hero and prose.
   The <figure> itself is the centered block — max-width + margin:auto. */
.tm-article-feature {
  display: block;
  max-width: 880px;
  width: calc(100% - clamp(2rem, 6vw, 4rem));
  margin: calc(-1 * clamp(2rem, 5vw, 4rem)) auto 0;
  padding: 0;
  position: relative;
  z-index: 3;
  box-sizing: border-box;
}
.tm-article-feature-img,
.tm-article-feature .tm-article-feature-img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 560px;
  object-fit: cover;
  object-position: center center;
  margin: 0;
  border-radius: 10px;
  box-shadow: 0 30px 70px -25px rgba(0,0,0,0.45), 0 0 0 1px rgba(255,255,255,0.06);
  background: #0d1117;
}
@media (max-width: 720px) {
  .tm-article-feature { margin-top: calc(-1 * clamp(1rem, 4vw, 2rem)); width: calc(100% - 1.5rem); }
  .tm-article-feature-img { max-height: 380px; border-radius: 6px; box-shadow: 0 20px 40px -20px rgba(0,0,0,0.45); }
}

/* Article prose */
.tm-article-body { padding-top: clamp(3rem, 5vw, 4.5rem); }
.tm-article-prose { max-width: 740px; margin: 0 auto; }
.tm-article-prose p { font-size: 1.1rem; line-height: 1.75; color: #2a303a; margin: 0 0 1.5rem; }
.tm-article-prose h2 {
  font-family: "Fraunces","Inter",serif; font-weight: 500;
  font-size: clamp(1.6rem, 2.5vw, 2rem);
  line-height: 1.2; letter-spacing: -0.01em;
  color: #0d1117; margin: 2.5rem 0 1rem;
}
.tm-article-prose h3 {
  font-family: "Fraunces","Inter",serif; font-weight: 500;
  font-size: 1.3rem; line-height: 1.25;
  color: #0d1117; margin: 2rem 0 0.75rem;
}
.tm-article-prose a { color: #7a0a20; font-weight: 500; border-bottom: 1px solid rgba(179,17,51,0.25); }
.tm-article-prose a:hover { color: #b31133; border-bottom-color: #b31133; }
.tm-article-prose ul, .tm-article-prose ol { padding-left: 1.5rem; margin: 0 0 1.5rem; line-height: 1.7; color: #2a303a; }
.tm-article-prose li { margin-bottom: 0.5rem; }
.tm-article-prose blockquote {
  border-left: 3px solid #b31133;
  padding: 0.5rem 0 0.5rem 1.5rem;
  margin: 2rem 0;
  font-family: "Fraunces","Inter",serif; font-style: italic;
  font-size: 1.2rem; color: #0d1117; line-height: 1.5;
}
.tm-article-prose img, .tm-article-prose figure { max-width: 100%; height: auto; border-radius: 4px; margin: 2rem 0; }
.tm-article-prose .wp-caption-text,
.tm-article-prose figcaption { font-size: 0.85rem; color: rgba(13,17,23,0.6); text-align: center; margin-top: 0.5rem; font-style: italic; }

.tm-article-next { background: #f5f5f7; padding: clamp(3rem, 5vw, 4.5rem) 0; }
.tm-article-next-inner { display: flex; align-items: end; justify-content: space-between; gap: 1.5rem; margin-bottom: 2rem; flex-wrap: wrap; }
.tm-article-next-inner h2 { font-family: "Fraunces","Inter",serif; font-weight: 500; font-size: clamp(1.5rem, 2.5vw, 2rem); margin: 0.5rem 0 0; letter-spacing: -0.01em; }

.tm-empty-state { text-align: center; padding: 4rem 0; }
.tm-empty-state h2 { font-family: "Fraunces","Inter",serif; font-weight: 500; font-size: 2rem; margin: 0.5rem 0 1rem; }
.tm-empty-state p { color: #4a5161; line-height: 1.6; max-width: 52ch; margin: 0 auto; }

/* Pagination */
/* =====================================================================
   5.  PAGE-LEVEL POLISH
   ===================================================================== */

/* Give every section consistent vertical rhythm */
main#site-main > section + section { border-top: none; }

/* Soften default focus outline to match brand */
*:focus-visible { outline: 3px solid rgba(179,17,51,0.35); outline-offset: 2px; border-radius: 2px; }

/* Smooth scroll when jumping to anchor (#contact etc.) */
html { scroll-behavior: smooth; scroll-padding-top: 80px; }

/* Improve bento image rendering on homepage */
.bento-item img { transition: transform 0.5s ease; }
.bento-item:hover img { transform: scale(1.03); }


/* =====================================================================
   6.  MOBILE POLISH
   ===================================================================== */

@media (max-width: 900px) {
  .tm-hero { padding-top: clamp(4rem, 12vw, 5.5rem); }
  .tm-hero-inner h1 { font-size: clamp(2rem, 8vw, 2.8rem); }
  .tm-hero-lead { font-size: 1rem; }
  .tm-hero-marquee > div { padding: 1rem 0.85rem; }

  .mg-hero-inner h1 { font-size: clamp(2rem, 8vw, 2.9rem); }
  .mg-hero-lead { font-size: 1rem; }
  .mg-hero-marquee > div { padding: 1rem 0.85rem; }

  .mg-env-notes { grid-template-columns: 1fr; }
  .mg-env-notes > div { padding: 1.5rem 1.25rem; }

  .tm-contact-layout { gap: 2rem; }
  .tm-contact-side { order: -1; }

  .mg-logistics-stats { grid-template-columns: 1fr 1fr; gap: 1rem; }

  .tm-news-card-body { padding: 1.25rem 1.25rem 1.5rem; }
  .tm-news-card-title { font-size: 1.15rem; }

  .tm-article-prose p { font-size: 1rem; line-height: 1.7; }
  .tm-article-prose h2 { font-size: 1.5rem; }

  .tm-article-next-inner { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 640px) {
  .mg-logistics-stats { grid-template-columns: 1fr; }
  .tm-contact-stats > div { grid-template-columns: 80px 1fr; }
  .tm-form-footer { flex-direction: column; align-items: stretch; }
  .tm-form-footer button { width: 100%; }
  .tm-hero-marquee { grid-template-columns: 1fr; }
  .mg-hero-marquee { grid-template-columns: 1fr 1fr; }
  .tm-hero-marquee { grid-template-columns: 1fr 1fr; }
}


/* =====================================================================
   7.  WP ADMIN BAR ACCOMMODATION
   ===================================================================== */

.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) {
  .admin-bar .site-header { top: 46px; }
}


/* =====================================================================
   8.  FINE-TUNING FOR EXISTING STATIC SITE CLASSES
       These give other pages (Home, About, Products, etc.) a touch of
       the magnesium-page polish without breaking existing layouts.
   ===================================================================== */

/* Existing .page-hero gets a subtle dark tinge option when paired with
   the .page-hero-dark class — used by some old pages. */
.page-hero-dark {
  background: #0d1117;
  color: #fff;
}
.page-hero-dark h1 { color: #fff; }

/* Hover state lift on existing cards */
.bento-item, .division-card, .capability, .stream-tile {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.bento-item:hover, .division-card:hover, .capability:hover, .stream-tile:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 32px -24px rgba(13,17,23,0.2);
}

/* ============================================================
   News pagination — modern pill + circle design
   ============================================================ */
.tm-news-grid--paginated .tm-news-card.tm-is-off { display: none !important; }

.tm-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: clamp(2.5rem, 5vw, 4rem) auto 0;
  padding: 1.25rem 1.5rem;
  max-width: fit-content;
  background: #fff;
  border: 1px solid rgba(13,17,23,0.06);
  border-radius: 999px;
  box-shadow: 0 10px 30px -18px rgba(13,17,23,0.2);
  font-family: inherit;
}

.tm-pagination-pages {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.tm-pagination-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: #2a303a;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0;
  user-select: none;
}

.tm-pagination-num {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  letter-spacing: 0.02em;
}
.tm-pagination-num:hover:not(.is-active):not(:disabled) {
  background: rgba(122,10,32,0.08);
  color: #7a0a20;
}
.tm-pagination-num.is-active {
  background: #7a0a20;
  color: #fff;
  box-shadow: 0 8px 20px -10px rgba(122,10,32,0.6);
  cursor: default;
}

.tm-pagination-arrow {
  padding: 0.55rem 1rem;
  border-radius: 999px;
  color: #4a5161;
  letter-spacing: 0.02em;
}
.tm-pagination-arrow svg {
  display: block;
  transition: transform 0.2s ease;
}
.tm-pagination-arrow:hover:not(:disabled) {
  color: #7a0a20;
  background: rgba(122,10,32,0.08);
}
.tm-pagination-arrow[data-go="prev"]:hover:not(:disabled) svg { transform: translateX(-2px); }
.tm-pagination-arrow[data-go="next"]:hover:not(:disabled) svg { transform: translateX(2px); }

.tm-pagination-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

@media (max-width: 560px) {
  .tm-pagination { gap: 0.4rem; padding: 0.75rem 0.85rem; }
  .tm-pagination-arrow span { display: none; }
  .tm-pagination-arrow { width: 40px; height: 40px; padding: 0; border-radius: 50%; }
  .tm-pagination-num { width: 36px; height: 36px; font-size: 0.9rem; }
}
