/*
Theme Name: TES Industrial Corporate
Theme URI: https://tes-industrial.mn/
Author: TES Industrial LLC
Description: A custom industrial equipment distribution, engineering and lifecycle-support WordPress theme created for TES Industrial LLC. Inspired by clean European industrial website architecture, with original layout, code and assets.
Version: 6.3.0
Requires at least: 6.4
Tested up to: 6.9
Requires PHP: 8.0
Text Domain: tes-industrial
License: GNU General Public License v2 or later
*/

:root {
  --tes-red: #ed1c24;
  --tes-charcoal: #202225;
  --tes-dark: #111316;
  --tes-gray: #6b7076;
  --tes-light: #f3f4f5;
  --tes-white: #ffffff;
  --tes-border: #dde0e3;
  --tes-max: 1280px;
  --tes-radius: 18px;
  --tes-shadow: 0 18px 55px rgba(15, 18, 22, .12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--tes-charcoal);
  background: var(--tes-white);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
button, input, textarea, select { font: inherit; }

.tes-container { width: min(calc(100% - 40px), var(--tes-max)); margin-inline: auto; }
.tes-section { padding: 96px 0; }
.tes-section--light { background: var(--tes-light); }
.tes-eyebrow { color: var(--tes-red); font-weight: 800; font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; }
.tes-title { margin: 10px 0 18px; font-size: clamp(2.1rem, 4vw, 4.1rem); line-height: 1.04; letter-spacing: -.045em; }
.tes-copy { max-width: 760px; color: var(--tes-gray); font-size: 1.06rem; }

/* Header */
.tes-header { position: fixed; top: 0; inset-inline: 0; z-index: 1000; padding: 18px 0; transition: .25s ease; }
.tes-header.is-scrolled { background: rgba(255,255,255,.96); backdrop-filter: blur(12px); box-shadow: 0 8px 28px rgba(16,18,20,.1); padding: 10px 0; }
.tes-nav-shell { display: flex; align-items: center; min-height: 74px; padding: 10px 14px 10px 24px; border-radius: 18px; background: rgba(28,30,33,.92); backdrop-filter: blur(12px); color: white; box-shadow: var(--tes-shadow); }
.tes-header.is-scrolled .tes-nav-shell { background: var(--tes-charcoal); }
.tes-brand { display: flex; align-items: center; gap: 12px; margin-right: auto; }
.tes-brand img { width: 150px; max-height: 54px; object-fit: contain; }
.tes-menu { display: flex; align-items: center; gap: 28px; list-style: none; padding: 0; margin: 0 22px; font-size: .92rem; font-weight: 650; }
.tes-menu a { opacity: .86; transition: .2s; }
.tes-menu a:hover { opacity: 1; color: #fff; }
.tes-quote-btn, .tes-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; border: 0; border-radius: 999px; padding: 14px 22px; font-weight: 800; transition: .22s ease; cursor: pointer; }
.tes-quote-btn, .tes-btn--red { color: #fff; background: var(--tes-red); }
.tes-quote-btn:hover, .tes-btn--red:hover { transform: translateY(-2px); background: #cc141b; }
.tes-btn--ghost { color: #fff; border: 1px solid rgba(255,255,255,.62); background: rgba(255,255,255,.06); }
.tes-btn--ghost:hover { background: #fff; color: var(--tes-charcoal); }
.tes-menu-toggle { display:none; width:44px; height:44px; border-radius:50%; border:1px solid rgba(255,255,255,.22); background:transparent; color:white; }

/* Hero slider */
.tes-hero { position: relative; height: min(860px, 94vh); min-height: 680px; overflow: hidden; background: var(--tes-dark); }
.tes-slides, .tes-slide { position: absolute; inset: 0; }
.tes-slide { opacity: 0; visibility: hidden; transition: opacity .9s ease, visibility .9s ease; background-size: cover; background-position: center; }
.tes-slide.is-active { opacity: 1; visibility: visible; }
.tes-slide::before { content:""; position:absolute; inset:0; background: linear-gradient(90deg, rgba(10,13,16,.88) 0%, rgba(10,13,16,.66) 38%, rgba(10,13,16,.24) 72%, rgba(10,13,16,.1) 100%); }
.tes-hero-content { position: relative; z-index: 3; display:flex; align-items:center; height:100%; padding-top: 120px; color:#fff; }
.tes-hero-copy { max-width: 840px; }
.tes-hero h1 { margin: 12px 0 24px; max-width: 820px; font-size: clamp(3rem, 6.2vw, 6.8rem); line-height: .95; letter-spacing: -.065em; }
.tes-hero p { max-width: 680px; margin: 0 0 32px; color: rgba(255,255,255,.82); font-size: clamp(1.02rem,1.5vw,1.28rem); }
.tes-hero-actions { display:flex; gap:14px; flex-wrap:wrap; }
.tes-slider-controls { position:absolute; z-index:5; left:50%; bottom:34px; transform:translateX(-50%); width:min(calc(100% - 40px),var(--tes-max)); display:flex; align-items:center; justify-content:space-between; color:white; }
.tes-dots { display:flex; gap:9px; }
.tes-dot { width:48px; height:3px; border:0; background:rgba(255,255,255,.35); cursor:pointer; padding:0; transition:.3s; }
.tes-dot.is-active { background:var(--tes-red); }
.tes-slide-count { font-weight:750; letter-spacing:.1em; font-size:.78rem; }

/* Categories */
.tes-category-tabs { display:grid; grid-template-columns:repeat(6,1fr); gap:12px; margin-top:-46px; position:relative; z-index:20; }
.tes-category-card { min-height:170px; padding:24px; border:1px solid var(--tes-border); border-radius:var(--tes-radius); background:#fff; box-shadow:0 14px 34px rgba(18,21,24,.09); display:flex; flex-direction:column; justify-content:space-between; transition:.25s; }
.tes-category-card:hover { transform:translateY(-8px); border-color:rgba(237,28,36,.4); }
.tes-category-icon { width:46px; height:46px; border-radius:14px; display:grid; place-items:center; color:var(--tes-red); background:#fff1f2; font-size:1.35rem; font-weight:900; }
.tes-category-card h3 { margin:20px 0 0; font-size:1rem; line-height:1.25; }

/* Split feature */
.tes-split { display:grid; grid-template-columns:1.08fr .92fr; min-height:640px; border-radius:26px; overflow:hidden; background:var(--tes-charcoal); color:#fff; }
.tes-split-image { min-height:520px; background-size:cover; background-position:center; }
.tes-split-copy { padding:clamp(44px,6vw,90px); display:flex; flex-direction:column; justify-content:center; }
.tes-split-copy .tes-copy { color:rgba(255,255,255,.72); }
.tes-bullets { display:grid; gap:14px; margin:28px 0 34px; }
.tes-bullet { display:flex; gap:12px; align-items:flex-start; }
.tes-bullet span { flex:0 0 26px; height:26px; border-radius:50%; display:grid; place-items:center; background:var(--tes-red); color:white; font-size:.78rem; }

/* Cards */
.tes-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:22px; margin-top:44px; }
.tes-card { border-radius:var(--tes-radius); overflow:hidden; background:#fff; border:1px solid var(--tes-border); transition:.25s; }
.tes-card:hover { transform:translateY(-7px); box-shadow:var(--tes-shadow); }
.tes-card-media { aspect-ratio: 4/3; background-size:cover; background-position:center; }
.tes-card-body { padding:26px; }
.tes-card h3 { margin:0 0 10px; font-size:1.35rem; }
.tes-card p { margin:0; color:var(--tes-gray); }

/* Smart tech */
.tes-tech { background:radial-gradient(circle at 80% 20%,#2d3238 0%,#171a1e 55%,#101215 100%); color:#fff; overflow:hidden; }
.tes-tech-grid { display:grid; grid-template-columns:.9fr 1.1fr; gap:80px; align-items:center; }
.tes-tech-list { display:grid; grid-template-columns:repeat(2,1fr); gap:14px; }
.tes-tech-item { padding:22px; border:1px solid rgba(255,255,255,.12); border-radius:16px; background:rgba(255,255,255,.04); }
.tes-tech-item strong { display:block; margin-bottom:5px; }
.tes-tech-item small { color:rgba(255,255,255,.62); }
.tes-orbit { position:relative; aspect-ratio:1; max-width:520px; margin:auto; border-radius:50%; border:1px solid rgba(255,255,255,.12); }
.tes-orbit::before,.tes-orbit::after { content:""; position:absolute; inset:13%; border-radius:50%; border:1px solid rgba(237,28,36,.35); }
.tes-orbit::after { inset:30%; background:var(--tes-red); box-shadow:0 0 80px rgba(237,28,36,.35); }
.tes-orbit-label { position:absolute; z-index:2; inset:30%; display:grid; place-items:center; text-align:center; font-weight:850; }
.tes-node { position:absolute; padding:10px 14px; border-radius:999px; background:#fff; color:#222; font-size:.8rem; font-weight:800; box-shadow:var(--tes-shadow); }
.tes-node.n1 { top:5%; left:38%; }.tes-node.n2 { top:32%; right:-4%; }.tes-node.n3 { bottom:9%; right:18%; }.tes-node.n4 { bottom:15%; left:0; }.tes-node.n5 { top:28%; left:-6%; }

/* Brands */
.tes-brand-grid { display:grid; grid-template-columns:repeat(5,1fr); gap:1px; border:1px solid var(--tes-border); background:var(--tes-border); margin-top:44px; }
.tes-brand-tile { min-height:130px; background:#fff; display:grid; place-items:center; padding:20px; text-align:center; font-size:1.03rem; font-weight:850; color:#34383d; }

/* Metrics */
.tes-metrics { display:grid; grid-template-columns:repeat(4,1fr); gap:1px; background:#3a3d41; border-radius:22px; overflow:hidden; }
.tes-metric { padding:42px; background:var(--tes-charcoal); color:white; }
.tes-metric strong { display:block; font-size:clamp(2.2rem,4vw,4rem); line-height:1; color:var(--tes-red); }
.tes-metric span { display:block; margin-top:10px; color:rgba(255,255,255,.68); }

/* CTA */
.tes-cta { position:relative; overflow:hidden; border-radius:26px; padding:72px; color:white; background:linear-gradient(135deg,#e01a22,#a30e14); }
.tes-cta::after { content:""; position:absolute; width:420px; height:420px; border:1px solid rgba(255,255,255,.2); border-radius:50%; right:-100px; top:-160px; }
.tes-cta-inner { position:relative; z-index:2; display:flex; align-items:center; justify-content:space-between; gap:32px; }
.tes-cta h2 { margin:0; font-size:clamp(2rem,4vw,4rem); line-height:1; max-width:760px; letter-spacing:-.045em; }
.tes-cta .tes-btn { background:white; color:var(--tes-red); flex:0 0 auto; }

/* Footer */
.tes-footer { background:#111316; color:#fff; padding:72px 0 26px; }
.tes-footer-grid { display:grid; grid-template-columns:1.3fr repeat(3,1fr); gap:50px; }
.tes-footer-logo { width:175px; margin-bottom:20px; }
.tes-footer p,.tes-footer a { color:rgba(255,255,255,.64); }
.tes-footer h4 { margin:0 0 16px; }
.tes-footer ul { list-style:none; padding:0; margin:0; display:grid; gap:10px; }
.tes-copyright { margin-top:54px; padding-top:22px; border-top:1px solid rgba(255,255,255,.1); display:flex; justify-content:space-between; gap:20px; color:rgba(255,255,255,.48); font-size:.86rem; }

/* Standard content */
.tes-content-wrap { padding:150px 0 90px; min-height:70vh; }
.entry-title { font-size:clamp(2.2rem,5vw,4.8rem); line-height:1; }

@media (max-width: 1100px) {
  .tes-menu { display:none; position:absolute; top:88px; left:20px; right:20px; margin:0; padding:24px; border-radius:18px; background:#202225; flex-direction:column; align-items:flex-start; }
  .tes-menu.is-open { display:flex; }
  .tes-menu-toggle { display:grid; place-items:center; margin-left:10px; }
  .tes-quote-btn { margin-left:auto; }
  .tes-category-tabs { grid-template-columns:repeat(3,1fr); }
  .tes-tech-grid,.tes-split { grid-template-columns:1fr; }
  .tes-tech-grid { gap:44px; }
  .tes-brand-grid { grid-template-columns:repeat(3,1fr); }
}
@media (max-width: 760px) {
  .tes-container { width:min(calc(100% - 24px),var(--tes-max)); }
  .tes-section { padding:70px 0; }
  .tes-header { padding:10px 0; }
  .tes-nav-shell { min-height:64px; padding:8px 10px 8px 16px; border-radius:14px; }
  .tes-brand img { width:120px; }
  .tes-quote-btn { display:none; }
  .tes-hero { min-height:720px; height:92vh; }
  .tes-hero h1 { font-size:clamp(2.7rem,14vw,4.6rem); }
  .tes-slide::before { background:linear-gradient(90deg,rgba(10,13,16,.9),rgba(10,13,16,.62)); }
  .tes-category-tabs { grid-template-columns:repeat(2,1fr); margin-top:-28px; }
  .tes-category-card { min-height:140px; padding:18px; }
  .tes-grid { grid-template-columns:1fr; }
  .tes-tech-list { grid-template-columns:1fr; }
  .tes-brand-grid { grid-template-columns:repeat(2,1fr); }
  .tes-metrics { grid-template-columns:repeat(2,1fr); }
  .tes-cta { padding:44px 26px; }
  .tes-cta-inner { align-items:flex-start; flex-direction:column; }
  .tes-footer-grid { grid-template-columns:1fr 1fr; }
  .tes-copyright { flex-direction:column; }
}
@media (max-width: 480px) {
  .tes-category-tabs,.tes-brand-grid,.tes-metrics,.tes-footer-grid { grid-template-columns:1fr; }
}

/* =========================
   TES Industrial v1.2 refinements
   ========================= */
body.admin-bar .tes-header { top: 32px; }
.tes-header { padding: 14px 0; }
.tes-nav-shell { min-height: 68px; padding: 8px 12px 8px 18px; border-radius: 16px; }
.tes-brand img, .tes-brand .custom-logo { width: 178px; max-height: 56px; object-fit: contain; }
.tes-brand > img { content: url('assets/images/tes-logo-light.png'); }
.tes-menu { gap: 24px; margin-inline: 20px; }
.tes-quote-btn { padding: 13px 20px; }

.tes-section--compact { padding: 76px 0; }
.tes-title { max-width: 1050px; }
.tes-copy { line-height: 1.65; }
.tes-card-arrow { align-self: flex-end; color: var(--tes-red); font-weight: 900; opacity: .7; }
.tes-category-card { min-height: 158px; }
.tes-category-card:hover .tes-card-arrow { opacity: 1; }

.tes-text-link { display:inline-block; margin-top:18px; color:var(--tes-red); font-weight:800; font-size:.92rem; }
.tes-service-card { position:relative; overflow:hidden; }
.tes-service-number { position:absolute; right:20px; top:8px; font-size:4.6rem; line-height:1; font-weight:900; color:rgba(237,28,36,.08); letter-spacing:-.08em; }

.tes-tech-grid { grid-template-columns: 1.05fr .95fr; gap: 64px; }
.tes-tech-visual { min-height: 520px; display:grid; grid-template-columns:1fr 1fr; gap:14px; align-content:center; position:relative; }
.tes-tech-core { grid-column:1 / -1; min-height:160px; border-radius:22px; padding:34px; background:linear-gradient(135deg, rgba(237,28,36,.96), rgba(173,10,18,.94)); display:flex; align-items:flex-end; justify-content:space-between; box-shadow:0 24px 70px rgba(237,28,36,.18); }
.tes-tech-core span { font-size:3.6rem; font-weight:950; letter-spacing:-.07em; }
.tes-tech-core strong { text-align:right; font-size:1.15rem; line-height:1.05; letter-spacing:.06em; }
.tes-capability { min-height:132px; padding:24px; border:1px solid rgba(255,255,255,.12); border-radius:18px; background:rgba(255,255,255,.045); display:flex; gap:16px; align-items:flex-start; }
.tes-capability > span { color:var(--tes-red); font-size:.75rem; font-weight:900; letter-spacing:.14em; }
.tes-capability strong,.tes-capability small { display:block; }
.tes-capability strong { margin-bottom:6px; }
.tes-capability small { color:rgba(255,255,255,.58); }

.tes-brand-groups { display:grid; gap:28px; margin-top:40px; }
.tes-brand-group { background:#fff; border:1px solid var(--tes-border); border-radius:20px; overflow:hidden; }
.tes-brand-group-head { padding:18px 22px; display:flex; justify-content:space-between; gap:20px; align-items:center; background:#f8f8f9; border-bottom:1px solid var(--tes-border); }
.tes-brand-group-head span { color:var(--tes-gray); font-size:.86rem; }
.tes-brand-grid { margin-top:0; border:0; background:transparent; gap:0; grid-template-columns:repeat(3,1fr); }
.tes-brand-grid--core { grid-template-columns:repeat(4,1fr); }
.tes-brand-tile { min-height:118px; display:grid; place-items:center; padding:20px; border-right:1px solid var(--tes-border); border-bottom:1px solid var(--tes-border); background:#fff; }
.tes-brand-tile:nth-child(3n) { border-right:0; }
.tes-brand-grid--core .tes-brand-tile:nth-child(3n) { border-right:1px solid var(--tes-border); }
.tes-brand-grid--core .tes-brand-tile:nth-child(4n) { border-right:0; }
.tes-brand-tile span { font-weight:900; font-size:1.06rem; letter-spacing:-.02em; }

.tes-metrics-section { padding: 58px 0 72px; }
.tes-metric strong { font-size: clamp(2.4rem, 4vw, 4.2rem); white-space:nowrap; }
.tes-metric:last-child strong { font-size: clamp(1.8rem, 3vw, 3rem); letter-spacing:-.055em; }
.tes-cta-section { padding-top: 0; }
.tes-cta-inner { align-items:center; }
.tes-eyebrow--light { color:#fff; opacity:.72; }

.tes-footer-logo { content:url('assets/images/tes-logo-light.png'); width:190px; }
.tes-footer { padding-top:64px; }
.tes-copyright { margin-top:48px; }

@media (max-width: 1100px) {
  .tes-menu { gap:16px; font-size:.84rem; margin-inline:12px; }
  .tes-brand img,.tes-brand .custom-logo { width:150px; }
  .tes-tech-visual { min-height:0; }
  .tes-brand-grid--core { grid-template-columns:repeat(2,1fr); }
  .tes-brand-grid--core .tes-brand-tile:nth-child(4n) { border-right:1px solid var(--tes-border); }
  .tes-brand-grid--core .tes-brand-tile:nth-child(2n) { border-right:0; }
}
@media (max-width: 782px) { body.admin-bar .tes-header { top:46px; } }
@media (max-width: 760px) {
  .tes-header { padding:8px 0; }
  .tes-nav-shell { min-height:60px; border-radius:12px; }
  .tes-brand img,.tes-brand .custom-logo { width:138px; }
  .tes-quote-btn { display:none; }
  .tes-section--compact { padding:58px 0; }
  .tes-tech-visual { grid-template-columns:1fr; }
  .tes-tech-core { grid-column:auto; min-height:138px; }
  .tes-tech-core span { font-size:2.8rem; }
  .tes-brand-grid,.tes-brand-grid--core { grid-template-columns:1fr 1fr; }
  .tes-brand-tile:nth-child(n) { border-right:1px solid var(--tes-border); }
  .tes-brand-tile:nth-child(2n) { border-right:0; }
  .tes-brand-group-head { align-items:flex-start; flex-direction:column; gap:4px; }
}
@media (max-width: 480px) {
  .tes-brand-grid,.tes-brand-grid--core { grid-template-columns:1fr; }
  .tes-brand-tile:nth-child(n) { border-right:0; }
  .tes-tech-core { flex-direction:column; align-items:flex-start; gap:14px; }
  .tes-tech-core strong { text-align:left; }
}

/* ===== v1.3 refinement layer ===== */
:root { --tes-header-offset: 112px; }

html { scroll-padding-top: var(--tes-header-offset); }
section[id] { scroll-margin-top: var(--tes-header-offset); }

/* Slimmer floating header while preserving the v1.2 visual language */
.tes-header { padding: 12px 0; }
.tes-header.is-scrolled { padding: 7px 0; }
.tes-nav-shell {
  min-height: 66px;
  padding: 7px 12px 7px 20px;
  border-radius: 16px;
}
.tes-brand img { width: 138px; max-height: 48px; }
.tes-menu { gap: 24px; margin: 0 18px; }
.tes-quote-btn { padding: 12px 20px; }

/* More disciplined vertical rhythm */
.tes-section { padding: 82px 0; }
.tes-section--compact { padding: 72px 0; }
.tes-metrics-section { padding: 58px 0; }
.tes-cta-section { padding: 58px 0 72px; }
.tes-section--light + .tes-metrics-section { padding-top: 54px; }
.tes-metrics-section + .tes-cta-section { padding-top: 18px; }

/* Hero content clears the fixed header */
.tes-hero-content { padding-top: 104px; }

/* Keep large headings strong without unnecessary overflow */
.tes-title { text-wrap: balance; }
.tes-hero h1 { text-wrap: balance; }

/* Slightly tighter CTA and footer transition */
.tes-cta { padding: 64px; }
.tes-footer { padding-top: 64px; }

@media (max-width: 1100px) {
  :root { --tes-header-offset: 102px; }
  .tes-menu { top: 78px; }
  .tes-section { padding: 76px 0; }
  .tes-section--compact { padding: 66px 0; }
}

@media (max-width: 760px) {
  :root { --tes-header-offset: 88px; }
  .tes-header { padding: 8px 0; }
  .tes-header.is-scrolled { padding: 5px 0; }
  .tes-nav-shell { min-height: 58px; padding: 6px 8px 6px 14px; }
  .tes-brand img { width: 112px; max-height: 42px; }
  .tes-hero-content { padding-top: 88px; }
  .tes-section { padding: 62px 0; }
  .tes-section--compact { padding: 56px 0; }
  .tes-metrics-section { padding: 46px 0; }
  .tes-cta-section { padding: 42px 0 56px; }
  .tes-cta { padding: 42px 24px; }
}


/* v1.8 company naming and footer contact consistency */
.tes-footer-address {
  color: rgba(255,255,255,.64);
  line-height: 1.65;
}

/* v1.9 partner naming and link behavior */
.tes-brand-tile {
  color: var(--tes-charcoal);
  text-decoration: none;
  cursor: pointer;
}
.tes-brand-tile span {
  text-transform: uppercase;
  letter-spacing: .035em;
  text-align: center;
}
.tes-brand-tile:hover {
  color: var(--tes-red);
  background: #fff7f7;
}
.tes-brand-tile:focus-visible {
  outline: 3px solid rgba(237,28,36,.35);
  outline-offset: -3px;
}

/* v2.0 partner logo grid */
.tes-brand-logo-tile {
  min-height: 138px;
  padding: 24px 28px;
  background: #fff;
}
.tes-partner-logo {
  display: block;
  width: 100%;
  max-width: 210px;
  max-height: 72px;
  object-fit: contain;
  object-position: center;
  filter: none;
  transition: transform .22s ease, opacity .22s ease;
}
.tes-brand-logo-tile:hover .tes-partner-logo {
  transform: scale(1.045);
}
@media (max-width: 760px) {
  .tes-brand-logo-tile {
    min-height: 116px;
    padding: 20px;
  }
  .tes-partner-logo {
    max-width: 175px;
    max-height: 62px;
  }
}


/* v2.1 transparent floating header refinement */
.tes-header,
.tes-header.is-scrolled {
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.tes-nav-shell,
.tes-header.is-scrolled .tes-nav-shell {
  background: rgba(32, 34, 37, .97);
  border: 0 !important;
  outline: 0 !important;
  box-shadow: 0 14px 34px rgba(15, 18, 22, .18);
}

.tes-header::before,
.tes-header::after,
.tes-nav-shell::before,
.tes-nav-shell::after {
  border: 0 !important;
  outline: 0 !important;
}

/* Prevent any theme/page wrapper from creating white side bands behind the menu */
body.home .tes-header {
  background-color: transparent !important;
}

/* v2.2 embedded local partner logos and alphabetical layout */
.tes-partner-logo {
  max-width: 250px;
  max-height: 96px;
}
.tes-brand-logo-tile {
  min-height: 150px;
}

/* v2.3 official uploaded logo assets */
.tes-brand-logo-tile {
  min-height: 154px;
  padding: 26px 30px;
  background: #fff;
}
.tes-partner-logo {
  width: auto;
  height: auto;
  max-width: 82%;
  max-height: 86px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}
.tes-brand-logo-tile::before,
.tes-brand-logo-tile::after {
  content: none !important;
}

/* v2.7 dedicated project partner section */
.tes-brand-grid--project {
  grid-template-columns: minmax(260px, .8fr) minmax(320px, 1.2fr);
}
.tes-project-partner-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 30px 36px;
  border-left: 1px solid var(--tes-line);
  background: #fff;
}
.tes-project-partner-copy strong {
  display: block;
  margin-bottom: 10px;
  color: var(--tes-charcoal);
  font-size: 20px;
}
.tes-project-partner-copy p {
  margin: 0;
  max-width: 690px;
  color: var(--tes-muted);
  line-height: 1.65;
}
@media (max-width: 760px) {
  .tes-brand-grid--project {
    grid-template-columns: 1fr;
  }
  .tes-project-partner-copy {
    border-left: 0;
    border-top: 1px solid var(--tes-line);
    padding: 24px;
  }
}

/* v3.2 footer address three-line formatting */
.tes-footer-address {
  display: flex;
  flex-direction: column;
  gap: 2px;
  color: rgba(255,255,255,.64);
  line-height: 1.45;
}
.tes-footer-address span {
  display: block;
  white-space: nowrap;
}
@media (max-width: 760px) {
  .tes-footer-address span {
    white-space: normal;
  }
}


/* v3.3 solution gateway and product-category pages */
.tes-category-card {
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.tes-category-card:hover {
  transform: translateY(-5px);
  border-color: rgba(239,35,42,.28);
  box-shadow: 0 18px 42px rgba(20,24,30,.12);
}
.tes-solution-page {
  background: #f5f6f7;
  min-height: 70vh;
}
.tes-solution-hero {
  padding: 190px 0 88px;
  color: #fff;
  background:
    radial-gradient(circle at 78% 28%, rgba(239,35,42,.2), transparent 34%),
    linear-gradient(135deg, #111318, #252a31);
}
.tes-solution-hero h1 {
  max-width: 1000px;
  margin: 12px 0 20px;
  font-size: clamp(46px, 7vw, 92px);
  line-height: .98;
  letter-spacing: -.055em;
}
.tes-solution-hero p {
  max-width: 760px;
  margin: 0;
  color: rgba(255,255,255,.72);
  font-size: 20px;
  line-height: 1.6;
}
.tes-product-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}
.tes-product-card {
  position: relative;
  min-height: 260px;
  padding: 34px;
  overflow: hidden;
  border: 1px solid var(--tes-line);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(20,24,30,.05);
}
.tes-product-number {
  position: absolute;
  top: 18px;
  right: 24px;
  color: rgba(239,35,42,.09);
  font-size: 86px;
  font-weight: 800;
  line-height: 1;
}
.tes-product-card h2 {
  position: relative;
  max-width: 78%;
  margin: 0 0 16px;
  font-size: 30px;
  line-height: 1.1;
}
.tes-product-card p {
  position: relative;
  max-width: 620px;
  margin: 0 0 30px;
  color: var(--tes-muted);
  line-height: 1.65;
}
.tes-product-card a {
  position: absolute;
  left: 34px;
  bottom: 30px;
  color: var(--tes-red);
  font-weight: 700;
  text-decoration: none;
}
.tes-catalog-note {
  margin-top: 28px;
  padding: 28px 32px;
  border-radius: 20px;
  color: rgba(255,255,255,.72);
  background: var(--tes-charcoal);
}
.tes-catalog-note strong {
  display: block;
  margin-bottom: 6px;
  color: #fff;
  font-size: 19px;
}
.tes-catalog-note p { margin: 0; line-height: 1.6; }
@media (max-width: 800px) {
  .tes-solution-hero { padding: 145px 0 64px; }
  .tes-product-grid { grid-template-columns: 1fr; }
  .tes-product-card { min-height: 250px; padding: 28px; }
  .tes-product-card a { left: 28px; }
}



/* v3.8 restore original category-card spacing */
.tes-category-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-height: 158px;
}

.tes-category-card h3 {
  margin-bottom: 0;
}

.tes-category-card .tes-card-arrow {
  display: block !important;
  position: static !important;
  margin-top: auto;
  align-self: flex-end;
  color: var(--tes-red);
  font-size: 22px;
  font-weight: 900;
  line-height: 1;
  opacity: .7;
  transition: opacity .2s ease, transform .2s ease;
}

.tes-category-card:hover .tes-card-arrow {
  opacity: 1;
  transform: translate(2px, -2px);
}


/* v4.1 bilingual MN | EN interface */
.tes-nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}
.tes-lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .04em;
}
.tes-lang-switch a {
  color: rgba(255,255,255,.46);
  text-decoration: none;
}
.tes-lang-switch a:hover,
.tes-lang-switch a.is-active {
  color: #fff;
}
.tes-lang-switch span {
  color: rgba(255,255,255,.22);
}
html[lang="mn"] .tes-menu {
  gap: 18px;
}
html[lang="mn"] .tes-menu a {
  font-size: 13px;
}
html[lang="mn"] .tes-category-card h3 {
  font-size: 18px;
  line-height: 1.18;
}
@media (max-width: 1100px) {
  .tes-nav-actions { margin-left: auto; }
}
@media (max-width: 760px) {
  .tes-nav-actions { gap: 10px; }
  .tes-lang-switch { font-size: 12px; }
  .tes-quote-btn { display: none; }
}


/* v4.2 solution-page photographic hero backgrounds */
.tes-solution-hero--image {
  position: relative;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  isolation: isolate;
}
.tes-solution-hero--image::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 78% 42%, rgba(237,28,36,.10), transparent 34%),
    linear-gradient(180deg, rgba(0,0,0,.06), rgba(0,0,0,.18));
  pointer-events: none;
}
.tes-solution-hero--image .tes-container {
  position: relative;
  z-index: 1;
}

/* v4.6: lower homepage category cards so the slider progress line remains visible */
.tes-category-tabs {
  margin-top: -16px;
}

@media (max-width: 760px) {
  .tes-category-tabs {
    margin-top: -10px;
  }
}


/* v4.7 Martin Engineering featured Material Handling Systems card */
.tes-product-card--featured {
  grid-column: 1 / -1;
  min-height: 420px;
  padding: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(420px, .95fr);
  align-items: stretch;
  background:
    radial-gradient(circle at 8% 16%, rgba(239,35,42,.06), transparent 32%),
    #fff;
}

.tes-product-card--featured .tes-product-number {
  z-index: 3;
}

.tes-martin-content {
  position: relative;
  z-index: 2;
  padding: 42px 40px 38px;
}

.tes-martin-label {
  margin-bottom: 14px;
  color: var(--tes-red);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.tes-product-card--featured h2 {
  max-width: 82%;
  margin-bottom: 14px;
  font-size: clamp(30px, 3vw, 46px);
}

.tes-product-card--featured p {
  max-width: 680px;
  margin-bottom: 14px;
}

.tes-martin-description {
  color: #383d45 !important;
}

.tes-martin-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 22px 0 30px;
}

.tes-martin-tags span {
  padding: 8px 12px;
  border: 1px solid rgba(239,35,42,.14);
  border-radius: 999px;
  color: #3b4047;
  background: rgba(239,35,42,.045);
  font-size: 13px;
  font-weight: 700;
}

.tes-martin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.tes-product-card--featured .tes-martin-actions a {
  position: static;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  text-decoration: none;
}

.tes-martin-primary {
  color: #fff !important;
  background: var(--tes-red);
}




.tes-martin-visual {
  min-height: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 34px 28px;
  overflow: hidden;
  border-left: 1px solid var(--tes-line);
  background:
    linear-gradient(135deg, #fafafa 0%, #f1f3f5 100%);
}

.tes-martin-visual img {
  width: 100%;
  height: auto;
  max-height: 355px;
  object-fit: contain;
  filter: drop-shadow(0 22px 24px rgba(20,24,30,.14));
}

@media (max-width: 980px) {
  .tes-product-card--featured {
    grid-template-columns: 1fr;
  }
  .tes-martin-visual {
    min-height: 310px;
    border-left: 0;
    border-top: 1px solid var(--tes-line);
  }
}

@media (max-width: 640px) {
  .tes-martin-content {
    padding: 32px 24px 28px;
  }
  .tes-product-card--featured h2 {
    max-width: 76%;
  }
  .tes-martin-actions {
    flex-direction: column;
  }
  .tes-product-card--featured .tes-martin-actions a {
    width: 100%;
  }
  .tes-martin-visual {
    min-height: 240px;
    padding: 24px 18px;
  }
}


/* v4.8 featured Martin card CTA cleanup */
.tes-martin-actions {
  justify-content: flex-start;
}


/* v4.9 Martin Engineering complete product portfolio */
.tes-martin-portfolio {
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  padding: 24px;
}

.tes-martin-portfolio img {
  width: 100%;
  max-height: none;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 18px 32px rgba(20,24,30,.14);
  filter: none;
}

.tes-portfolio-caption {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid var(--tes-line);
  border-radius: 14px;
  background: rgba(255,255,255,.92);
}

.tes-portfolio-caption > strong {
  display: block;
  margin-bottom: 12px;
  color: var(--tes-charcoal);
  font-size: 17px;
}

.tes-portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 8px 12px;
}

.tes-portfolio-grid span {
  position: relative;
  padding-left: 14px;
  color: #4b5159;
  font-size: 12px;
  line-height: 1.35;
}

.tes-portfolio-grid span::before {
  content: "";
  position: absolute;
  left: 0;
  top: .55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--tes-red);
}

@media (max-width: 980px) {
  .tes-portfolio-grid {
    grid-template-columns: repeat(2, minmax(0,1fr));
  }
}

@media (max-width: 560px) {
  .tes-martin-portfolio {
    padding: 16px;
  }
  .tes-portfolio-grid {
    grid-template-columns: 1fr;
  }
}

/* v5.0 Mongolian corporate typography */
html[lang="mn"] .tes-hero h1,
html[lang="mn"] .tes-solution-hero h1 { line-height: 1.04; }
html[lang="mn"] .tes-title { line-height: 1.12; }
html[lang="mn"] .tes-copy,
html[lang="mn"] .tes-card p,
html[lang="mn"] .tes-product-card p { line-height: 1.72; }
html[lang="mn"] .tes-footer-address { line-height: 1.5; }


/* v5.3 Mongolian content-width and line-balance refinements */
@media (min-width: 901px) {
  html[lang="mn"] .tes-title {
    width: 100%;
    max-width: 1240px;
    font-size: clamp(2.55rem, 3.55vw, 3.85rem);
    line-height: 1.08;
    letter-spacing: -.038em;
    text-wrap: pretty;
  }

  html[lang="mn"] .tes-copy {
    max-width: 980px;
    font-size: 1.08rem;
    line-height: 1.72;
  }

  /* Give longer Mongolian headings enough horizontal space */
  html[lang="mn"] #industries .tes-title,
  html[lang="mn"] #services .tes-title,
  html[lang="mn"] #brands .tes-title {
    max-width: 1280px;
  }

  /* About / integrated-capability heading and paragraph */
  html[lang="mn"] .tes-section .tes-title + .tes-copy {
    max-width: 980px;
  }

  /* Prevent overly narrow balanced lines on Mongolian headings */
  html[lang="mn"] .tes-title br {
    display: none;
  }
}

/* Tablet */
@media (min-width: 641px) and (max-width: 900px) {
  html[lang="mn"] .tes-title {
    max-width: 100%;
    font-size: clamp(2.25rem, 6vw, 3.25rem);
    line-height: 1.1;
    text-wrap: pretty;
  }

  html[lang="mn"] .tes-copy {
    max-width: 100%;
  }
}

/* Mobile keeps natural wrapping without excessive forced balancing */
@media (max-width: 640px) {
  html[lang="mn"] .tes-title {
    max-width: 100%;
    text-wrap: wrap;
    line-height: 1.12;
  }
}


/* v5.4 confirmed Mongolian line breaks */
html[lang="mn"] #brands .tes-title br,
html[lang="mn"] .tes-smart-section .tes-title br {
  display: initial;
}


/* v5.5 Hero spacing and slider-indicator overlap fix */
@media (min-width: 901px) {
  .tes-hero,
  .tes-hero-slider,
  .tes-hero-stage {
    min-height: 760px;
  }

  .tes-hero-content,
  .tes-slide-content {
    padding-bottom: 150px;
  }

  .tes-hero-actions,
  .tes-slide-actions {
    margin-bottom: 42px;
  }

  .tes-slider-progress,
  .tes-hero-progress,
  .tes-slide-progress,
  .tes-carousel-progress {
    bottom: 88px !important;
  }

  .tes-solution-cards,
  .tes-hero-cards,
  .tes-category-cards {
    transform: translateY(26px);
  }
}

/* Tablet */
@media (min-width: 641px) and (max-width: 900px) {
  .tes-hero,
  .tes-hero-slider,
  .tes-hero-stage {
    min-height: 720px;
  }

  .tes-hero-content,
  .tes-slide-content {
    padding-bottom: 135px;
  }

  .tes-hero-actions,
  .tes-slide-actions {
    margin-bottom: 34px;
  }

  .tes-slider-progress,
  .tes-hero-progress,
  .tes-slide-progress,
  .tes-carousel-progress {
    bottom: 82px !important;
  }

  .tes-solution-cards,
  .tes-hero-cards,
  .tes-category-cards {
    transform: translateY(20px);
  }
}

/* Mobile: preserve clean stacking and avoid overlap */
@media (max-width: 640px) {
  .tes-hero-content,
  .tes-slide-content {
    padding-bottom: 110px;
  }

  .tes-hero-actions,
  .tes-slide-actions {
    margin-bottom: 26px;
  }

  .tes-slider-progress,
  .tes-hero-progress,
  .tes-slide-progress,
  .tes-carousel-progress {
    bottom: 70px !important;
  }

  .tes-solution-cards,
  .tes-hero-cards,
  .tes-category-cards {
    transform: translateY(14px);
  }
}


/* v5.6 fixed smart-technology headline */
html[lang="mn"] .tes-smart-section .tes-title,
html[lang="mn"] #technology .tes-title {
  max-width: 760px;
}

html[lang="mn"] .tes-smart-section .tes-title br,
html[lang="mn"] #technology .tes-title br {
  display: block !important;
}

@media (min-width: 901px) {
  html[lang="mn"] .tes-smart-section .tes-title,
  html[lang="mn"] #technology .tes-title {
    font-size: clamp(3rem, 4.4vw, 4.6rem);
    line-height: 1.02;
  }
}


/* v5.7 compact premium hero slide indicator */
@media (min-width: 901px) {
  .tes-hero,
  .tes-hero-slider,
  .tes-hero-stage {
    min-height: 690px;
  }

  .tes-hero-content,
  .tes-slide-content {
    padding-bottom: 92px;
  }

  .tes-hero-actions,
  .tes-slide-actions {
    margin-top: 30px;
    margin-bottom: 0;
  }

  .tes-slider-progress,
  .tes-hero-progress,
  .tes-slide-progress,
  .tes-carousel-progress {
    position: absolute !important;
    left: 118px !important;
    right: auto !important;
    bottom: 174px !important;
    width: 240px !important;
    height: 3px !important;
    display: flex !important;
    gap: 8px !important;
    align-items: center !important;
    z-index: 6 !important;
    transform: none !important;
  }

  .tes-slider-progress > *,
  .tes-hero-progress > *,
  .tes-slide-progress > *,
  .tes-carousel-progress > * {
    flex: 1 1 0 !important;
    height: 3px !important;
    min-width: 0 !important;
    border-radius: 999px !important;
    background: rgba(255,255,255,.38) !important;
    opacity: 1 !important;
    transition: background-color .25s ease, transform .25s ease !important;
  }

  .tes-slider-progress > *.is-active,
  .tes-slider-progress > *.active,
  .tes-hero-progress > *.is-active,
  .tes-hero-progress > *.active,
  .tes-slide-progress > *.is-active,
  .tes-slide-progress > *.active,
  .tes-carousel-progress > *.is-active,
  .tes-carousel-progress > *.active {
    background: var(--tes-red) !important;
    transform: scaleY(1.35) !important;
  }

  .tes-solution-cards,
  .tes-hero-cards,
  .tes-category-cards {
    transform: translateY(8px);
  }
}

/* Tablet */
@media (min-width: 641px) and (max-width: 900px) {
  .tes-hero,
  .tes-hero-slider,
  .tes-hero-stage {
    min-height: 650px;
  }

  .tes-hero-content,
  .tes-slide-content {
    padding-bottom: 86px;
  }

  .tes-slider-progress,
  .tes-hero-progress,
  .tes-slide-progress,
  .tes-carousel-progress {
    left: 48px !important;
    bottom: 156px !important;
    width: 210px !important;
  }

  .tes-solution-cards,
  .tes-hero-cards,
  .tes-category-cards {
    transform: translateY(6px);
  }
}

/* Mobile */
@media (max-width: 640px) {
  .tes-hero-content,
  .tes-slide-content {
    padding-bottom: 78px;
  }

  .tes-slider-progress,
  .tes-hero-progress,
  .tes-slide-progress,
  .tes-carousel-progress {
    left: 24px !important;
    bottom: 144px !important;
    width: 170px !important;
  }

  .tes-solution-cards,
  .tes-hero-cards,
  .tes-category-cards {
    transform: translateY(4px);
  }
}


/* v5.8 consistent Mongolian hero-slide typography */
@media (min-width: 901px) {
  html[lang="mn"] .tes-hero-copy {
    width: min(100%, 940px);
    max-width: 940px;
  }

  html[lang="mn"] .tes-slide h1 {
    max-width: 900px;
    margin-top: 12px;
    margin-bottom: 22px;
    font-size: clamp(4.25rem, 5.35vw, 5.65rem);
    line-height: .98;
    letter-spacing: -.055em;
    text-wrap: balance;
  }

  html[lang="mn"] .tes-slide p {
    max-width: 780px;
    font-size: 1.15rem;
    line-height: 1.55;
  }

  html[lang="mn"] .tes-slide[data-slide="0"] h1,
  html[lang="mn"] .tes-slide[data-slide="1"] h1,
  html[lang="mn"] .tes-slide[data-slide="2"] h1,
  html[lang="mn"] .tes-slide[data-slide="3"] h1 {
    min-height: 1.95em;
    display: flex;
    align-items: flex-end;
  }

  /* Slightly reduce only the longest mining headline while preserving hierarchy */
  html[lang="mn"] .tes-slide[data-slide="0"] h1 {
    font-size: clamp(4rem, 5.05vw, 5.35rem);
  }

  /* Keep service and construction slides visually aligned */
  html[lang="mn"] .tes-slide[data-slide="1"] h1,
  html[lang="mn"] .tes-slide[data-slide="2"] h1,
  html[lang="mn"] .tes-slide[data-slide="3"] h1 {
    font-size: clamp(4.2rem, 5.2vw, 5.55rem);
  }
}

@media (min-width: 641px) and (max-width: 900px) {
  html[lang="mn"] .tes-slide h1 {
    max-width: 100%;
    font-size: clamp(3rem, 7.2vw, 4.45rem);
    line-height: 1;
    text-wrap: balance;
  }

  html[lang="mn"] .tes-slide p {
    max-width: 700px;
  }
}

@media (max-width: 640px) {
  html[lang="mn"] .tes-slide h1 {
    font-size: clamp(2.6rem, 12vw, 4rem);
    line-height: 1.02;
    letter-spacing: -.045em;
    text-wrap: balance;
  }
}


/* v6.1 content color and smart-section balance */
.tes-bullet small {
  color: rgba(255,255,255,.72);
  font-size: .94rem;
  line-height: 1.55;
}

/* Use the smart-section right side more effectively */
@media (min-width: 901px) {
  .tes-tech-grid {
    grid-template-columns: minmax(0, 1.02fr) minmax(470px, .98fr);
    gap: 48px;
    align-items: start;
  }

  .tes-tech-visual {
    margin-top: 52px;
    min-height: 500px;
  }

  .tes-tech-core {
    min-height: 176px;
    padding: 38px;
  }

  html[lang="mn"] #technology .tes-title {
    max-width: 700px;
  }

  html[lang="mn"] #technology .tes-copy {
    max-width: 690px;
  }
}

@media (min-width: 641px) and (max-width: 900px) {
  .tes-tech-visual {
    margin-top: 12px;
  }
}

@media (max-width: 640px) {
  .tes-tech-visual {
    margin-top: 8px;
  }
}
