/* home.css — the MTSLabTech homepage (index.html only).
   Everything is scoped to html.mts-home so no other page changes: the menu
   bar (built by project-common.js on every page) is only recoloured here,
   blue and white with the MTSLabTech logo; its links, login / logout, cloud
   sync and project switching are untouched. */

.mts-home{
  --h-navy: #0a2f6b;
  --h-blue: #0d4aa6;
  --h-blue-2: #1565d8;
  --h-sky: #e8f1fc;
  --h-line: #d6e2f2;
  --h-text: #14233d;
  --h-muted: #52627a;
  --h-yellow: #f5b700;
  --h-radius: 14px;
  /* the lab theme's colours, re-pointed to blue on this page */
  --lab-bg: #f3f7fc;
  --lab-teal: var(--h-blue);
  --lab-teal-mid: var(--h-blue-2);
  --lab-teal-soft: var(--h-sky);
  --lab-teal-text: var(--h-navy);
}
.mts-home body{ background: #f3f7fc; color: var(--h-text); }

/* ---------- menu bar: white, logo, blue active pill ---------- */
.mts-home.mts-theme-lab .mts-side-bar{
  background: #ffffff;
  color: var(--h-text);
  min-height: 64px;
  padding: 0 18px;
  box-shadow: 0 1px 0 var(--h-line), 0 4px 14px rgba(10, 47, 107, 0.06);
}
.mts-home.mts-theme-lab .mts-side-brand{
  display: flex; align-items: center; gap: 10px;
  color: var(--h-navy);
  border-right: 1px solid var(--h-line);
  padding: 6px 16px 6px 2px;
  letter-spacing: 0;
}
.mts-home .mts-side-brand svg{ width: 46px; height: 34px; color: var(--h-blue); flex: none; }
.mts-home .mts-side-brand .home-brand-text{ display: flex; flex-direction: column; line-height: 1.05; }
.mts-home .mts-side-brand .home-brand-text b{ font-size: 1.35rem; font-weight: 800; color: var(--h-navy); letter-spacing: -0.01em; }
.mts-home .mts-side-brand .home-brand-text b span{ color: var(--h-blue-2); }
.mts-home .mts-side-brand .home-brand-text small{ font-size: 0.68rem; font-weight: 600; color: var(--h-muted); letter-spacing: 0.02em; }
.mts-home.mts-theme-lab .mts-side-item,
.mts-home.mts-theme-lab .mts-side-tool{ color: var(--h-text); }
.mts-home.mts-theme-lab .mts-side-item:hover,
.mts-home.mts-theme-lab .mts-side-cat.mts-side-open > .mts-side-item,
.mts-home.mts-theme-lab .mts-side-tool:hover{ background: var(--h-sky); color: var(--h-navy); }
.mts-home.mts-theme-lab .mts-side-item.mts-side-active,
.mts-home.mts-theme-lab .mts-side-cat.mts-side-active > .mts-side-item{ background: var(--h-blue); color: #fff; }
@media (hover: hover){
  .mts-home.mts-theme-lab .mts-side-cat:hover > .mts-side-item{ background: var(--h-sky); color: var(--h-navy); }
}
.mts-home.mts-theme-lab .mts-side-user{ color: var(--h-muted); border-left-color: var(--h-line); }
.mts-home.mts-theme-lab .mts-side-logout{ color: var(--h-blue); border-color: var(--h-blue); font-weight: 600; }
.mts-home.mts-theme-lab .mts-side-logout:hover{ background: var(--h-sky); }

/* ---------- hero ---------- */
.mts-home.mts-theme-lab .sheet-header.home-hero{
  position: relative;
  overflow: hidden;
  background: var(--h-navy);
  color: #fff;
  border-bottom: none;
  min-height: 330px;
}
.mts-home .home-hero-art{ position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.mts-home .home-hero-inner{
  position: relative;
  max-width: 1400px;
  margin: 0 auto;
  padding: 40px 24px 70px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  flex-wrap: wrap;
}
.mts-home .home-hero-text{ max-width: 640px; }
.mts-home.mts-theme-lab .home-hero-title{
  margin: 0;
  color: #fff;
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}
.mts-home .home-hero-title span{ color: var(--h-yellow); }
.mts-home .home-hero-sub{ margin: 10px 0 0; font-size: clamp(1.15rem, 2.6vw, 1.7rem); font-weight: 700; color: #fff; }
.mts-home .home-hero-tag{ margin: 12px 0 0; font-size: clamp(0.95rem, 1.8vw, 1.2rem); font-style: italic; color: #dce9fb; max-width: 520px; }
.mts-home .home-hero-badges{ list-style: none; margin: 22px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 24px; }
.mts-home .home-hero-badges li{ display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 0.92rem; }
.mts-home .home-hero-badges svg{ width: 26px; height: 26px; fill: var(--h-yellow); flex: none; }
.mts-home .home-hero-side{ display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.mts-home .home-project-card{
  background: rgba(255, 255, 255, 0.95);
  color: var(--h-text);
  border-radius: 12px;
  padding: 10px 14px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
  min-width: 220px;
}
.mts-home .home-project-label{ display: block; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--h-muted); margin-bottom: 4px; }
.mts-home.mts-theme-lab .home-project-card .project-banner{ color: var(--h-text); font-size: 0.9rem; }
.mts-home.mts-theme-lab .home-hero .install-hint{ color: #fff; border-color: rgba(255, 255, 255, 0.6); background: rgba(10, 47, 107, 0.5); }

/* ---------- page body ---------- */
.mts-home.mts-theme-lab main{ max-width: 1400px; margin: 0 auto; padding: 0 20px 20px; gap: 22px; }
.mts-home .home-row h2, .mts-home .home-updates h2{ display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font-size: 1.15rem; font-weight: 800; }
.mts-home .home-row h2 svg, .mts-home .home-updates h2 svg{ width: 22px; height: 22px; flex: none; }

/* search, overlapping the bottom of the hero */
.mts-home .home-search{ position: relative; z-index: 5; max-width: 860px; width: 100%; margin: -34px auto 0; }
.mts-home .home-search-box{
  display: flex; align-items: center; gap: 10px;
  background: #fff;
  border-radius: 999px;
  padding: 6px 6px 6px 18px;
  box-shadow: 0 8px 26px rgba(10, 47, 107, 0.18);
  border: 1px solid var(--h-line);
}
.mts-home .home-search-box > svg{ width: 22px; height: 22px; fill: var(--h-blue); flex: none; }
.mts-home.mts-theme-lab .home-search-box input{
  flex: 1; min-width: 0;
  border: none; outline: none; background: transparent; box-shadow: none;
  font: inherit; font-size: 1rem; color: var(--h-text); padding: 10px 4px;
}
.mts-home .home-btn-primary{
  border: none; border-radius: 999px;
  background: var(--h-blue); color: #fff;
  font: inherit; font-weight: 700; font-size: 1rem;
  padding: 11px 26px; cursor: pointer;
}
.mts-home .home-btn-primary:hover{ background: var(--h-navy); }
.mts-home .home-search-results{
  position: absolute; left: 12px; right: 12px; top: calc(100% + 6px);
  background: #fff; border: 1px solid var(--h-line); border-radius: 12px;
  box-shadow: 0 12px 30px rgba(10, 47, 107, 0.18);
  max-height: 420px; overflow-y: auto; padding: 6px;
}
.mts-home .home-search-results a{
  display: flex; justify-content: space-between; gap: 12px; align-items: baseline;
  padding: 9px 12px; border-radius: 8px; text-decoration: none; color: var(--h-text);
}
.mts-home .home-search-results a:hover, .mts-home .home-search-results a.home-sr-active{ background: var(--h-sky); }
.mts-home .home-search-results a b{ font-weight: 650; }
.mts-home .home-search-results a small{ color: var(--h-muted); font-size: 0.78rem; text-align: right; flex: none; max-width: 45%; }
.mts-home .home-search-empty{ padding: 12px; color: var(--h-muted); }

/* category cards */
.mts-home .home-cats{ display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-top: 8px; }
.mts-home .home-cat{
  --c: var(--h-blue); --c-soft: #e8f1fc;
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px;
  background: #fff;
  border: 1px solid var(--h-line);
  border-radius: var(--h-radius);
  overflow: hidden;
  padding: 0 12px 14px;
  text-decoration: none; color: var(--h-text);
  box-shadow: 0 2px 8px rgba(10, 47, 107, 0.06);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.mts-home .home-cat:hover{ transform: translateY(-3px); box-shadow: 0 10px 22px rgba(10, 47, 107, 0.14); }
.mts-home .home-cat-art{
  display: flex; align-items: center; justify-content: center;
  width: calc(100% + 24px); height: 92px; margin-bottom: 6px;
  background: linear-gradient(180deg, var(--c-soft), #fff);
  color: var(--c);
}
.mts-home .home-cat-art svg{ width: 92px; height: 60px; }
.mts-home .home-cat-name{ font-weight: 800; font-size: 0.98rem; line-height: 1.2; }
.mts-home .home-cat-sub{ font-size: 0.78rem; color: var(--h-muted); line-height: 1.35; flex: 1; }
.mts-home .home-cat-go{ margin-top: 6px; background: var(--c); color: #fff; font-weight: 700; font-size: 0.82rem; border-radius: 999px; padding: 6px 18px; }
.mts-home .home-cat-agg{ --c: #1356b8; --c-soft: #dce9fb; }
.mts-home .home-cat-cem{ --c: #138a4b; --c-soft: #dcf3e5; }
.mts-home .home-cat-con{ --c: #5b3fc7; --c-soft: #e8e2fb; }
.mts-home .home-cat-nb{ --c: #d4600f; --c-soft: #fde7d6; }
.mts-home .home-cat-bit{ --c: #0f7f86; --c-soft: #d8f1f2; }
.mts-home .home-cat-bitu{ --c: #2b3440; --c-soft: #e3e7ec; }
.mts-home .home-cat-misc{ --c: #3949ab; --c-soft: #e1e5f8; }

/* quick access / popular modules / promo */
.mts-home .home-row{ display: grid; grid-template-columns: minmax(250px, 1fr) minmax(320px, 1.7fr) minmax(250px, 1fr); gap: 16px; align-items: stretch; }
.mts-home .home-quick{ background: var(--h-navy); color: #fff; border-radius: var(--h-radius); padding: 16px; display: flex; flex-direction: column; }
.mts-home .home-quick h2{ color: var(--h-yellow); }
.mts-home .home-quick h2 svg{ fill: var(--h-yellow); }
.mts-home .home-quick ul{ list-style: none; margin: 0 0 14px; padding: 4px; background: #fff; border-radius: 10px; flex: 1; }
.mts-home .home-quick li a{
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 10px; color: var(--h-text); text-decoration: none; font-weight: 600; font-size: 0.92rem;
  border-bottom: 1px solid #eef2f8;
}
.mts-home .home-quick li:last-child a{ border-bottom: none; }
.mts-home .home-quick li a::after{ content: "\203A"; font-size: 1.2rem; color: var(--h-navy); }
.mts-home .home-quick li a:hover{ background: var(--h-sky); border-radius: 6px; }
.mts-home .home-btn-yellow{
  display: inline-flex; justify-content: center; align-items: center; gap: 6px;
  background: var(--h-yellow); color: #14233d; font-weight: 800;
  border-radius: 999px; padding: 10px 18px; text-decoration: none;
}
.mts-home .home-btn-yellow:hover{ filter: brightness(1.05); }

.mts-home .home-popular{ background: #fff; border: 1px solid var(--h-line); border-radius: var(--h-radius); padding: 16px; }
.mts-home .home-popular h2{ color: var(--h-navy); }
.mts-home .home-popular h2 svg{ fill: var(--h-blue-2); }
.mts-home .home-pop-grid{ display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.mts-home .home-pop{
  display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center;
  border: 1px solid var(--h-line); border-radius: 12px; overflow: hidden; padding-bottom: 10px;
  text-decoration: none; color: var(--h-text); font-weight: 700; font-size: 0.9rem; background: #f8fbff;
}
.mts-home .home-pop:hover{ border-color: var(--h-blue-2); box-shadow: 0 6px 16px rgba(10, 47, 107, 0.12); }
.mts-home .home-pop-art{ width: 100%; height: 64px; background-size: cover; background-position: center; }
.mts-home .home-pop-agg .home-pop-art{ background: radial-gradient(circle at 20% 70%, #8a8f96 0 9px, transparent 10px), radial-gradient(circle at 45% 60%, #6d737b 0 11px, transparent 12px), radial-gradient(circle at 70% 72%, #9aa0a8 0 8px, transparent 9px), radial-gradient(circle at 85% 55%, #7b8189 0 10px, transparent 11px), linear-gradient(#cfd8e3, #b6c2d0); }
.mts-home .home-pop-cem .home-pop-art{ background: radial-gradient(ellipse at 50% 110%, #c9c4b8 0 46%, transparent 47%), linear-gradient(#e9ecef, #d6dbe1); }
.mts-home .home-pop-con .home-pop-art{ background: linear-gradient(135deg, transparent 38%, #b8bec6 38% 62%, transparent 62%), repeating-linear-gradient(90deg, #d0d5db 0 26px, #c2c8cf 26px 30px); }
.mts-home .home-pop-bit .home-pop-art{ background: radial-gradient(circle at 30% 65%, #2b2f35 0 7px, transparent 8px), radial-gradient(circle at 60% 55%, #1e2126 0 9px, transparent 10px), radial-gradient(circle at 80% 72%, #34383f 0 7px, transparent 8px), linear-gradient(#4b5058, #2d3137); }
.mts-home .home-pop-bitu .home-pop-art{ background: radial-gradient(ellipse at 50% 100%, #111 0 30%, transparent 31%), linear-gradient(90deg, transparent 44%, #1a1a1a 44% 56%, transparent 56%), linear-gradient(#f5c518, #e0a800); }
.mts-home .home-pop-nb .home-pop-art{ background: linear-gradient(180deg, #a9c4df 0 40%, transparent 40%), linear-gradient(0deg, #8a7a66 0 35%, #b9a68c 35% 60%, #a9c4df 60%); }

.mts-home .home-promo{
  position: relative; overflow: hidden;
  border-radius: var(--h-radius); padding: 18px 18px 20px; color: #fff;
  background: linear-gradient(160deg, rgba(10, 47, 107, 0.97), rgba(13, 74, 166, 0.88)), linear-gradient(0deg, #3f7f3a, #6aa864);
  display: flex; flex-direction: column;
}
.mts-home .home-promo::after{
  content: ""; position: absolute; right: -40px; bottom: -40px; width: 200px; height: 200px;
  border-radius: 50%; border: 10px solid rgba(245, 183, 0, 0.55);
}
.mts-home.mts-theme-lab .home-promo h2{ display: block; color: #fff; font-size: 1.6rem; line-height: 1.1; margin-bottom: 14px; }
.mts-home .home-promo h2 span{ color: var(--h-yellow); }
.mts-home .home-promo ul{ list-style: none; margin: 0 0 16px; padding: 0; flex: 1; }
.mts-home .home-promo li{ display: flex; align-items: flex-start; gap: 10px; margin-bottom: 9px; font-weight: 600; font-size: 0.92rem; }
.mts-home .home-promo li::before{
  content: "\2713"; flex: none; width: 20px; height: 20px; border-radius: 50%;
  background: #22a35a; color: #fff; font-size: 0.75rem; display: flex; align-items: center; justify-content: center;
}
.mts-home .home-promo .home-btn-yellow{ align-self: flex-start; position: relative; z-index: 1; }

/* latest updates */
.mts-home .home-news{ background: #fff; border: 1px solid var(--h-line); border-radius: var(--h-radius); padding: 16px; }
.mts-home .home-news-head{ display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.mts-home .home-news h2{ display: flex; align-items: center; gap: 8px; margin: 0; font-size: 1.15rem; font-weight: 800; color: var(--h-navy); }
.mts-home .home-news h2 svg{ width: 22px; height: 22px; flex: none; fill: var(--h-blue-2); }
.mts-home .home-news-all{ color: var(--h-blue); font-weight: 700; font-size: 0.88rem; text-decoration: none; white-space: nowrap; }
.mts-home .home-news-all:hover{ text-decoration: underline; }
/* the newest 8, 2 rows x 4 (2 columns on tablets, 1 on phones) */
.mts-home .home-news-list{ display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 1100px){ .mts-home .home-news-list{ grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px){ .mts-home .home-news-list{ grid-template-columns: 1fr; } }
.mts-home .home-news-item{ display: flex; gap: 12px; align-items: center; min-width: 0; padding: 8px; border: 1px solid #eef2f8; border-radius: 10px; text-decoration: none; color: var(--h-text); }
.mts-home .home-news-item:hover{ border-color: var(--h-blue-2); background: var(--h-sky); }
.mts-home .home-news-thumb{ flex: none; width: 76px; height: 58px; border-radius: 8px; background: #e8eef7 center / cover no-repeat; }
.mts-home .home-news-thumb.home-news-nophoto{ background: linear-gradient(135deg, var(--h-navy), var(--h-blue-2)); }
.mts-home .home-news-text{ display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.mts-home .home-news-text small{ color: var(--h-muted); font-size: 0.72rem; font-weight: 600; }
.mts-home .home-news-text b{ font-size: 0.9rem; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }

.mts-home .home-updates{ background: #fff; border: 1px solid var(--h-line); border-radius: var(--h-radius); padding: 16px; }
.mts-home .home-updates h2{ color: var(--h-navy); }
.mts-home .home-updates h2 svg{ fill: var(--h-blue-2); }
/* the newest 9, 3 x 3 (2 columns on tablets, 1 on phones) */
.mts-home .home-updates ul{ list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px 20px; }
@media (max-width: 1100px){ .mts-home .home-updates ul{ grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.mts-home .home-updates li{ display: flex; align-items: center; gap: 12px; padding: 7px 4px; border-bottom: 1px solid #eef2f8; }
.mts-home .home-upd-date{ flex: none; width: 44px; text-align: center; line-height: 1; color: var(--h-blue); }
.mts-home .home-upd-date b{ display: block; font-size: 1.1rem; font-weight: 800; }
.mts-home .home-upd-date small{ font-size: 0.7rem; font-weight: 700; text-transform: uppercase; }
.mts-home .home-updates li a, .mts-home .home-updates li span.home-upd-text{ flex: 1; color: var(--h-text); text-decoration: none; font-weight: 600; font-size: 0.9rem; }
.mts-home .home-updates li a:hover{ color: var(--h-blue); text-decoration: underline; }
.mts-home .home-upd-new{ flex: none; background: var(--h-blue); color: #fff; font-size: 0.7rem; font-weight: 700; border-radius: 999px; padding: 2px 9px; }

/* all modules: the existing groups and tiles, in the blue theme */
.mts-home .home-all{ display: flex; flex-direction: column; gap: 22px; scroll-margin-top: 12px; }
.mts-home .home-all > section{ scroll-margin-top: 12px; }
.mts-home.mts-theme-lab .home-all-title{ font-size: 1.3rem; font-weight: 800; color: var(--h-navy); margin: 8px 0 -6px; }
.mts-home.mts-theme-lab .group-title{ color: var(--h-navy); border-bottom-color: var(--h-blue); }
.mts-home.mts-theme-lab .intro-panel h2{ border-bottom-color: var(--h-blue); }
.mts-home.mts-theme-lab .tile{ border-left: 4px solid var(--h-blue-2); border-radius: 10px; }
.mts-home.mts-theme-lab a.tile:hover{ border-left-color: var(--h-navy); box-shadow: 0 8px 18px rgba(10, 47, 107, 0.12); }
.mts-home.mts-theme-lab .tile-status-ready{ color: var(--h-blue); }
.mts-home.mts-theme-lab .tile-disabled{ border-left-color: var(--h-line); }

/* footer */
.mts-home.mts-theme-lab .sheet-footer.home-footer{
  max-width: none; margin: 10px 0 0; padding: 0;
  background: var(--h-navy); color: #c9d8ef; font-size: 0.85rem;
}
.mts-home .home-footer-inner{
  max-width: 1400px; margin: 0 auto; padding: 22px 24px;
  display: flex; align-items: center; gap: 18px 30px; flex-wrap: wrap;
}
.mts-home .home-footer-brand{ display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; padding-right: 26px; border-right: 1px solid rgba(255, 255, 255, 0.2); }
.mts-home .home-footer-brand svg{ width: 52px; height: 40px; color: #fff; }
.mts-home .home-footer-brand span{ display: flex; flex-direction: column; line-height: 1.1; }
.mts-home .home-footer-brand b{ font-size: 1.4rem; font-weight: 800; }
.mts-home .home-footer-brand small{ font-size: 0.72rem; color: #c9d8ef; }
.mts-home .home-footer-tag{ margin: 0; flex: 1; font-style: italic; font-size: 1.05rem; color: #fff; }
.mts-home .home-footer-links{ display: flex; flex-wrap: wrap; gap: 6px 0; }
.mts-home .home-footer-links a{ color: #fff; text-decoration: none; padding: 0 12px; border-left: 1px solid rgba(255, 255, 255, 0.3); }
.mts-home .home-footer-links a:first-child{ border-left: none; }
.mts-home .home-footer-links a:hover{ text-decoration: underline; }
.mts-home .home-footer-note{ max-width: 1400px; margin: 0 auto; padding: 0 24px 18px; font-size: 0.75rem; color: #9fb4d6; }

/* ---------- smaller screens ---------- */
@media (max-width: 1100px){
  .mts-home .home-row{ grid-template-columns: 1fr 1fr; }
  .mts-home .home-popular{ grid-column: 1 / -1; order: -1; }
}
@media (max-width: 760px){
  .mts-home .mts-side-brand .home-brand-text small{ display: none; }
  .mts-home .mts-side-brand .home-brand-text b{ font-size: 1.1rem; }
  .mts-home .home-hero-inner{ padding: 26px 16px 62px; }
  .mts-home .home-hero-side{ align-items: flex-start; width: 100%; }
  .mts-home .home-row{ grid-template-columns: 1fr; }
  .mts-home .home-pop-grid{ grid-template-columns: repeat(2, 1fr); }
  .mts-home .home-search{ margin-top: -28px; }
  .mts-home .home-btn-primary{ padding: 10px 16px; }
  .mts-home .home-footer-brand{ border-right: none; padding-right: 0; }
  .mts-home .home-footer-tag{ flex-basis: 100%; }
}
@media (max-width: 480px){
  .mts-home .home-cats{ grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .mts-home .home-cat-art{ height: 72px; }
  .mts-home .home-cat-sub{ font-size: 0.72rem; }
  .mts-home .home-updates ul{ grid-template-columns: 1fr; }
  .mts-home.mts-theme-lab .home-search-box input{ font-size: 0.92rem; }
  .mts-home .home-search-box{ padding-left: 12px; }
}

/* the homepage never prints its decorations */
@media print{
  .mts-home .home-hero-art, .mts-home .home-search, .mts-home .home-cats, .mts-home .home-row, .mts-home .home-updates{ display: none !important; }
}

/* your logo file (Images/mtslabtech-logo.png), once it is added */
.mts-home.mts-theme-lab .mts-side-brand.home-has-logo{ padding: 3px 12px 3px 0; }
.mts-home .home-brand-logo{ display: block; height: 62px; width: auto; max-width: 200px; object-fit: contain; }
.mts-home .home-footer-brand.home-has-logo{ background: #fff; border-radius: 10px; padding: 6px 10px; border-right: none; }
.mts-home .home-footer-logo{ display: block; height: 58px; width: auto; max-width: 210px; object-fit: contain; }
@media (max-width: 760px){ .mts-home .home-brand-logo{ height: 56px; max-width: 180px; } }

/* keep the whole menu on one line beside the logo */
.mts-home.mts-theme-lab .mts-side-item{ padding: 7px 6px; gap: 5px; }
.mts-home.mts-theme-lab .mts-side-brand{ padding-right: 12px; margin-right: 2px; }
.mts-home .mts-side-brand .home-brand-text b{ font-size: 1.2rem; }
.mts-home .mts-side-brand .home-brand-text small{ font-size: 0.62rem; }
.mts-home .mts-side-brand svg{ width: 40px; height: 30px; }

/* phones: logo on its own line above the menu icons; a darker overlay keeps
   the hero text readable where the light sky shows through */
.mts-home .home-hero-inner{ z-index: 2; }
@media (max-width: 760px){
  .mts-home .home-hero::after{
    content: ""; position: absolute; inset: 0; z-index: 1;
    background: linear-gradient(180deg, rgba(6, 42, 107, 0.9) 0%, rgba(10, 61, 145, 0.75) 60%, rgba(10, 61, 145, 0.45) 100%);
  }
}
/* ---------- menu bar fit (2026-11-11): one line on laptops, ☰ panel on phones ----------
   Logo a little smaller (same shape); the rest of the layout comes from theme-lab.css. */
.mts-home .home-brand-logo{ height: 52px; max-width: 170px; }
.mts-home.mts-theme-lab .mts-side-brand.home-has-logo{ padding: 4px 12px 4px 0; }
.mts-home.mts-theme-lab .mts-side-bar{ min-height: 62px; }
@media (max-width: 1360px){
  .mts-home .home-brand-logo{ height: 46px; max-width: 150px; }
  .mts-home.mts-theme-lab .mts-side-brand.home-has-logo{ padding-right: 8px; }
}
@media (max-width: 900px){
  .mts-home .home-brand-logo{ height: 46px; max-width: 150px; }
  .mts-home.mts-theme-lab .mts-side-bar{ min-height: 58px; padding: 4px 12px; }
  .mts-home.mts-theme-lab .mts-side-brand{ border-right: none; }
  .mts-home.mts-theme-lab .mts-side-burger{ border-color: var(--h-line); }
  .mts-home.mts-theme-lab .mts-side-burger span{ color: var(--h-navy); }
  .mts-home.mts-theme-lab .mts-nav-open .mts-side-nav,
  .mts-home.mts-theme-lab .mts-nav-open .mts-side-tools{ border-top-color: var(--h-line); }
  .mts-home.mts-theme-lab .mts-side-fly{ border-color: var(--h-line); background: #f7faff; }
}

/* active project card: stays a compact card at the right of the hero even for
   a long project name (cut to 3 lines; the full name shows on hover) */
.mts-home .home-hero-side{ flex: 0 1 360px; max-width: 360px; }
.mts-home .home-project-card{ width: 100%; box-sizing: border-box; }
.mts-home.mts-theme-lab .home-project-card .project-banner{ flex-direction: column; align-items: flex-start; gap: 8px; }
.mts-home.mts-theme-lab .home-project-card .mts-proj-name{
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3;
  overflow: hidden; white-space: normal;
  font-size: 0.82rem; line-height: 1.35; font-weight: 700;
  border-radius: 8px; padding: 6px 10px; max-width: 100%; box-sizing: border-box;
}
@media (max-width: 760px){
  .mts-home .home-hero-side{ flex-basis: 100%; max-width: 100%; }
}

/* ===== photos (Images/home/, taken from the approved design) ===== */

/* hero: the paving photo on the right, fading into the blue on the left */
.mts-home.mts-theme-lab .sheet-header.home-hero{
  min-height: 360px;
  background:
    linear-gradient(90deg, #062a6b 0%, #0a3d91 calc(100% - 820px), rgba(10, 61, 145, 0.55) calc(100% - 640px), rgba(10, 61, 145, 0) calc(100% - 420px)),
    url("Images/home/hero.jpg") right center / auto 100% no-repeat,
    #0a3d91;
}
.mts-home .home-hero-inner{ padding-bottom: 80px; }
.mts-home .home-hero-title, .mts-home .home-hero-sub, .mts-home .home-hero-tag{ text-shadow: 0 2px 8px rgba(0, 0, 0, 0.35); }

/* category cards: photo on top, icon, name, text, button — on a light tint */
.mts-home .home-cat{ padding: 0 12px 16px; background: linear-gradient(180deg, var(--c-soft) 0%, #ffffff 75%); border-color: color-mix(in srgb, var(--c) 25%, #ffffff); }
.mts-home .home-cat-photo{
  display: block; width: calc(100% + 24px); height: 96px; margin: 0 -12px 0;
  background: var(--c) center / cover no-repeat;
}
.mts-home .home-cat-art{ width: auto; height: auto; margin: 10px 0 2px; background: none; }
.mts-home .home-cat-art svg{ width: 54px; height: 36px; }
.mts-home .home-cat-agg .home-cat-photo{ background-image: url("Images/home/cat-aggregate.jpg"); }
.mts-home .home-cat-cem .home-cat-photo{ background-image: url("Images/home/cat-cement.jpg"); }
.mts-home .home-cat-con .home-cat-photo{ background-image: url("Images/home/cat-concrete.jpg"); }
.mts-home .home-cat-nb .home-cat-photo{ background-image: url("Images/home/cat-nonbituminous.jpg"); }
.mts-home .home-cat-bit .home-cat-photo{ background-image: url("Images/home/cat-bituminous.jpg"); }
.mts-home .home-cat-bitu .home-cat-photo{ background-image: url("Images/home/pop-bitumen.jpg"); }
.mts-home .home-cat-misc .home-cat-photo{ background: url("Images/home/cat-misc.svg") center / cover no-repeat, linear-gradient(135deg, #2c3e9e, #7986cb); }

/* popular modules: photo thumbnails */
.mts-home .home-pop-art{ height: 72px; background-size: cover !important; background-position: center !important; }
.mts-home .home-pop-agg .home-pop-art{ background: url("Images/home/pop-aggregate.jpg"); }
.mts-home .home-pop-cem .home-pop-art{ background: url("Images/home/pop-cement.jpg"); }
.mts-home .home-pop-con .home-pop-art{ background: url("Images/home/pop-concrete.jpg"); }
.mts-home .home-pop-bit .home-pop-art{ background: url("Images/home/pop-dbm.jpg"); }
.mts-home .home-pop-bitu .home-pop-art{ background: url("Images/home/pop-bitumen.jpg"); }
.mts-home .home-pop-nb .home-pop-art{ background: url("Images/home/pop-road.jpg"); }

/* "Build Better" panel: the road from the hero photo behind the blue */
.mts-home .home-promo{
  background:
    linear-gradient(160deg, rgba(10, 47, 107, 0.97) 0%, rgba(13, 74, 166, 0.85) 55%, rgba(13, 74, 166, 0.35) 100%),
    url("Images/home/pop-road.jpg") center / cover;
}

/* project name cut to 3 lines: no sliver of a 4th line in the padding */
.mts-home.mts-theme-lab .home-project-card .mts-proj-name{ padding: 0; border: solid transparent; border-width: 6px 10px; }

@media (max-width: 760px){
  .mts-home.mts-theme-lab .sheet-header.home-hero{ background: url("Images/home/hero.jpg") 70% center / cover no-repeat, #0a3d91; }
}

/* ================= Visitor (not logged in) — see index.js ================= */
.mts-home .home-welcome{ display: block !important; }
.mts-home .home-welcome-text{ margin: 2px 0 12px; color: var(--h-text); font-size: 0.92rem; line-height: 1.45; }
.mts-home .home-welcome-btns{ display: flex; flex-wrap: wrap; gap: 8px; }
.mts-home .home-welcome-btn{
  flex: 1 1 120px; text-align: center; text-decoration: none; font-weight: 700; font-size: 0.92rem;
  padding: 10px 14px; border-radius: 10px; border: 1.5px solid var(--h-blue); color: var(--h-blue); background: #fff;
}
.mts-home .home-welcome-btn:hover{ background: var(--h-sky); }
.mts-home .home-welcome-btn.home-welcome-primary{ background: var(--h-blue); color: #fff; }
.mts-home .home-welcome-btn.home-welcome-primary:hover{ background: var(--h-navy); }
/* small lock on things that open after login */
.mts-visitor .mts-home-lockable, .mts-visitor .home-cat, .mts-visitor .home-pop, .mts-visitor #all-modules a.tile{ position: relative; }
.mts-visitor .home-cat::after, .mts-visitor .home-pop::after, .mts-visitor #all-modules a.tile::after{
  content: ""; position: absolute; top: 8px; right: 8px; width: 18px; height: 18px; border-radius: 50%;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b26a00' stroke-width='2.4' stroke-linecap='round'%3E%3Crect x='5' y='11' width='14' height='9' rx='2'/%3E%3Cpath d='M8 11V8a4 4 0 0 1 8 0v3'/%3E%3C/svg%3E") center / 12px no-repeat;
  box-shadow: 0 1px 3px rgba(0,0,0,.25); pointer-events: none;
}