/* =============================================================
   ISG Compounds - professional.css
   One stylesheet that gives every page the same font, a consistent
   text scale and tighter spacing.
   To undo everything: remove the <link ... professional.css> line
   from the pages (or just delete this file).
   ============================================================= */

:root {
  --isg-font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Roboto, Arial, sans-serif;
  --isg-ink: #2b2d33;
  --isg-muted: #5f6670;
  --isg-brand: #293593;
  --isg-accent: #00a3e0;
  --isg-line: #e1e6ee;
  --isg-soft: #f5f7fb;
}

/* ---------- One font everywhere ---------- */
html body,
html body * {
  font-family: var(--isg-font) !important;
}

/* ---------- Base text ---------- */
html body {
  color: var(--isg-ink);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* ---------- Page frame: centred, consistent width ---------- */
/* (not applied to the home page: its carousel is laid out for the original width) */
body:not(:has(#hero)) .container {
  max-width: 1240px;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}

/* Home-page carousel keeps its original text metrics so the cards are sized as designed */
#hero {
  font-size: 14px;
  line-height: 1;
}

/* ---------- Navigation (size and colour only, layout untouched) ---------- */
.navbar .menu > li > a {
  font-size: 16px;
  font-weight: 500;
  color: var(--isg-ink);
  transition: color .15s ease;
}
.navbar .menu > li > a:hover {
  color: var(--isg-accent);
}

/* ---------- Markets dropdown: stays on screen, easy to reach, scrolls ---------- */
.services.open .dropdown {
  display: block;
}
@media (min-width: 960px) {
  .navbar .services .dropdown {
    top: 100%;                       /* directly under "Markets": no gap, so it stays open */
    right: 0;
    left: auto;                      /* opens towards the left so it never runs off the screen */
    margin: 0;
    width: 340px;
    max-width: calc(100vw - 24px);
    box-sizing: border-box;
    height: auto !important;
    max-height: 320px;
    overflow-x: hidden;
    overflow-y: auto !important;
    overscroll-behavior: contain;    /* mouse wheel scrolls the list, not the page behind it */
    scrollbar-width: thin;
    scrollbar-color: #fff rgba(255, 255, 255, .3);
  }
  .navbar .services .dropdown li {
    width: auto !important;
    display: block !important;
    white-space: normal;
    text-align: left;
  }
  .navbar .services .dropdown::-webkit-scrollbar { width: 8px; }
  .navbar .services .dropdown::-webkit-scrollbar-track { background: rgba(255, 255, 255, .3); border-radius: 4px; }
  .navbar .services .dropdown::-webkit-scrollbar-thumb { background: #fff; border-radius: 4px; }
}

/* ---------- Divider under the header: less dead space ---------- */
body:not(:has(#hero)) .container > .line {
  margin-bottom: 20px;
}

/* Space between content and the divider above the footer */
.container > article.main ~ .line {
  margin-top: 24px;
}

/* ---------- Main content ---------- */
article.main {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding: 4px 24px 20px;
  box-sizing: border-box;
}

/* Headings: one consistent look */
article.main h1,
article.main h2 {
  color: var(--isg-brand);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .03em;
  line-height: 1.25;
  text-align: left !important;
}
article.main h1 {
  font-size: 28px;
  margin: 8px 0 20px;
}
article.main h1::after {
  content: "";
  display: block;
  width: 56px;
  height: 3px;
  margin-top: 12px;
  background: var(--isg-accent);
}
article.main h2 {
  font-size: 22px;
  margin: 26px 0 12px;
}

/* Headings used by the contact-information block */
h2.u-text {
  color: var(--isg-brand);
  font-size: 22px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .03em;
  line-height: 1.25;
}
.u-container-layout[style*="margin-top"] {
  margin-top: 8px !important;
}

/* Text */
article.main p {
  font-size: 16px;
  line-height: 1.7;
  margin: 0 0 14px;
}
article.main ul,
article.main ol {
  margin: 0 0 16px;
  padding-left: 22px;
}
article.main li {
  font-size: 16px;
  line-height: 1.6;
  margin: 0 0 6px;
}

/* Remove truly empty spacer paragraphs */
article.main p:empty {
  display: none;
}

/* Links */
article.main a {
  color: var(--isg-brand);
  text-decoration: none;
}
article.main a:hover {
  color: var(--isg-accent);
  text-decoration: underline;
}

/* PDF download icons keep their normal size on every screen */
article.main img[src*="pdf"] {
  width: auto !important;
  height: 35px !important;
  max-width: none;
}

/* Images inside text and tables never overflow */
article.main p img,
article.main td img {
  max-width: 100%;
}

/* ---------- Data tables (product grades) ---------- */
article.main table:has(> thead) {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0 28px;
  font-size: 15px;
}
article.main table:has(> thead) th {
  background: var(--isg-brand);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  text-align: left;
  padding: 12px 14px;
  border: 0;
  vertical-align: middle;
}
article.main table:has(> thead) th:nth-child(1) { width: 18% !important; }
article.main table:has(> thead) th:nth-child(2) { width: 34% !important; }
article.main table:has(> thead) th:nth-child(3) { width: 12% !important; }
article.main table:has(> thead) th:nth-child(4) { width: 20% !important; }
article.main table:has(> thead) th:nth-child(5) { width: 10% !important; }
article.main table:has(> thead) th:nth-child(6) { width: 6% !important; }
article.main table:has(> thead) td {
  padding: 12px 14px;
  vertical-align: top;
  font-size: 15px;
  line-height: 1.55;
  border: 0;
  border-bottom: 1px solid var(--isg-line);
}
article.main table:has(> thead) tbody tr:nth-child(even) {
  background: var(--isg-soft);
}
article.main table:has(> thead) tbody tr:hover {
  background: #eaf0fb;
}
article.main table:has(> thead) td p {
  font-size: 15px;
  line-height: 1.55;
  margin: 0 0 8px;
}
article.main table:has(> thead) td p:last-child {
  margin-bottom: 0;
}

/* ---------- Forms ---------- */
article.main label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--isg-ink);
  margin-bottom: 4px;
}
article.main input[type="text"],
article.main input[type="email"],
article.main input[type="tel"],
article.main input[type="password"],
article.main input[type="search"],
article.main select,
article.main textarea {
  font-size: 15px;
  padding: 9px 11px;
  border: 1px solid #c9d1de;
  border-radius: 4px;
  background: #fff;
  box-sizing: border-box;
  transition: border-color .15s ease, box-shadow .15s ease;
}
article.main input:focus,
article.main select:focus,
article.main textarea:focus {
  outline: 0;
  border-color: var(--isg-brand);
  box-shadow: 0 0 0 3px rgba(41, 53, 147, .15);
}
article.main input[type="submit"],
article.main button[type="submit"] {
  background: var(--isg-brand);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  padding: 10px 26px;
  border: 0;
  border-radius: 4px;
  cursor: pointer;
  transition: background .15s ease;
}
article.main input[type="submit"]:hover,
article.main button[type="submit"]:hover {
  background: #1f2a78;
}

/* ---------- Footer ---------- */
footer {
  font-size: 14px;
  color: var(--isg-muted);
  padding: 16px 0 28px;
  text-align: center;
}

/* ---------- Small screens ---------- */
@media (max-width: 768px) {
  article.main {
    padding-left: 16px;
    padding-right: 16px;
  }
  article.main h1 {
    font-size: 24px;
  }
  article.main h2 {
    font-size: 19px;
  }
  article.main table:has(> thead) {
    display: block;
    overflow-x: auto;
  }
}
