/* ================================================================
   ASC Template – Layout & Components
   ================================================================ */
@import url('/assets/css/icons.css');

/* ── Reset ───────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  background-color: var(--c-bg);
  color: var(--c-text);
  font-family: var(--font-body);
  font-weight: var(--fw-body);
  line-height: 1.65;
  min-height: 100vh;
}

img, svg { max-width: 100%; display: block; }

a { color: var(--c-link); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Typography ─────────────────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 700;
  text-transform: uppercase;
  color: var(--c-black);
  line-height: 1.15;
}

h1 { font-size: clamp(1.75rem, 4vw, 2.75rem); }
h2 { font-size: clamp(1.25rem, 3vw, 1.875rem); }
h3 { font-size: clamp(1rem, 2.5vw, 1.375rem); }

p { margin-bottom: var(--space); }

/* ── Layout container ───────────────────────────────────────── */
.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 calc(var(--space) * 1.5);
  width: 100%;
}

/* ── Buttons / CTAs ─────────────────────────────────────────── */
.btn, a.btn, button.btn {
  display: inline-block;
  background: var(--c-orange);
  color: var(--c-white);
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.6em 1.5em;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--transition), color var(--transition);
}
.btn:hover, a.btn:hover, button.btn:hover {
  background: var(--c-orange-light);
  color: var(--c-white);
  text-decoration: none;
}

/* ── Header ─────────────────────────────────────────────────── */
#site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--c-white);
  box-shadow: 0 1px 4px rgba(0,0,0,.1);
  height: var(--header-h);
  display: flex;
  align-items: center;
}

#site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Logo */
.site-logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  text-decoration: none;
}
.site-logo img {
  height: 46px;
  width: auto;
}
.site-logo .logo-fallback {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.35rem;
  text-transform: uppercase;
  color: var(--c-black);
  letter-spacing: 0.02em;
  text-decoration: none;
  line-height: 1;
}
.site-logo .logo-fallback em {
  font-style: normal;
  color: var(--c-orange);
}
.site-logo .logo-sub {
  display: block;
  font-size: 0.55rem;
  letter-spacing: 0.18em;
  color: var(--c-text-light);
  font-weight: 400;
  margin-top: 2px;
}

/* ── Desktop nav ────────────────────────────────────────────── */
#main-nav {
  display: flex;
  align-items: stretch;
  list-style: none;
  gap: 0;
  height: var(--header-h);
}

#main-nav > li {
  position: relative;
  display: flex;
  align-items: stretch;
}

#main-nav > li > a {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 0 0.9rem;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--c-text);
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
  transition: color var(--transition), border-color var(--transition);
}

#main-nav > li > a:hover,
#main-nav > li:hover > a {
  color: var(--c-orange);
  border-bottom-color: var(--c-orange);
  text-decoration: none;
}

/* Active top-level nav highlight removed – live site has none */

/* Dropdown carets removed – live site shows none */

/* Dropdown */
.dropdown {
  display: none;
  position: absolute;
  top: calc(var(--header-h) - 2px);
  left: 0;
  background: var(--c-white);
  min-width: 210px;
  box-shadow: 0 6px 16px rgba(0,0,0,.12);
  list-style: none;
  z-index: 1001;
  border-top: 3px solid var(--c-orange);
}

#main-nav > li:hover .dropdown {
  display: block;
}

.dropdown li a {
  display: block;
  padding: 0.65rem 1rem;
  font-family: var(--font-head);
  font-weight: 400;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--c-text);
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: all var(--transition);
}

.dropdown li a:hover,
.dropdown li a.active {
  color: var(--c-orange);
  border-left-color: var(--c-orange);
  background: rgba(247,148,29,.06);
  text-decoration: none;
}

/* ── Mobile toggle ──────────────────────────────────────────── */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  flex-direction: column;
  gap: 5px;
  flex-shrink: 0;
}
.nav-toggle span {
  display: block;
  width: 26px;
  height: 2px;
  background: var(--c-black);
  transition: all var(--transition);
}

/* ── Responsive ≤ 900px ─────────────────────────────────────── */
@media (max-width: 899px) {
  .nav-toggle { display: flex; }

  #main-nav {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: var(--c-white);
    flex-direction: column;
    align-items: stretch;
    height: auto;
    box-shadow: 0 6px 16px rgba(0,0,0,.12);
    z-index: 999;
    border-top: 3px solid var(--c-orange);
  }

  #main-nav.open { display: flex; }

  #main-nav > li { display: block; }

  #main-nav > li > a {
    height: auto;
    padding: 0.85rem 1.25rem;
    border-bottom: 1px solid var(--c-bg);
    border-left: 3px solid transparent;
  }

  /* Active top-level mobile highlight removed */

  .dropdown {
    position: static;
    box-shadow: none;
    display: block;
    background: #f9f9f9;
    border-top: none;
  }

  .dropdown li a {
    padding-left: 2rem;
    border-left: 3px solid transparent;
  }
}

/* ── Page content ───────────────────────────────────────────── */
#page-content {
  padding: calc(var(--space) * 3) 0 calc(var(--space) * 4);
  min-height: calc(100vh - var(--header-h) - 320px);
}

/* Breadcrumb */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.78rem;
  color: var(--c-text-light);
  margin-bottom: calc(var(--space) * 1.75);
}

.breadcrumb a {
  color: var(--c-text-light);
  text-decoration: none;
  transition: color var(--transition);
}
.breadcrumb a:hover { color: var(--c-orange); text-decoration: none; }

.breadcrumb-sep {
  color: var(--c-text-light);
  opacity: .5;
  font-size: 0.7em;
}

/* Page heading */
.page-heading {
  margin-bottom: calc(var(--space) * 2);
  padding-bottom: calc(var(--space) * 1.25);
  border-bottom: 3px solid var(--c-orange);
}

.page-heading h1 { margin-bottom: 0.4rem; }
.page-heading h2 {
  font-size: 1.15rem;
  font-weight: 400;
  color: var(--c-text);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 0.5rem;
}

/* ── Contact block #bottom ──────────────────────────────────── */
#bottom {
  background: var(--c-white);
  color: var(--c-text);
  padding: 60px 0;
}

#bottom h2 {
  color: var(--c-black);
  font-size: 1.5rem;
  letter-spacing: 0.2em;
  text-align: center;
  margin-bottom: calc(var(--space) * 2.5);
}

.contact-cols {
  display: table;
  width: 100%;
  table-layout: fixed;
}

.contact-col {
  display: table-cell;
  text-align: center;
  vertical-align: top;
  padding: 0 1.5rem;
}

@media (max-width: 767px) {
  .contact-cols  { display: block; }
  .contact-col   { display: block; padding: 0 0 2.5rem; }
  .contact-col:last-child { padding-bottom: 0; }
}

.contact-icon {
  display: block;
  font-size: 0.4rem; /* 5em pseudo-elements → 32px icons */
  line-height: 5;
  margin-bottom: 0.9rem;
}

.contact-col address,
.contact-col p {
  font-size: 0.9rem;
  font-style: normal;
  line-height: 1.9;
  margin: 0;
  color: var(--c-text);
}

.contact-col a {
  color: var(--c-text);
  text-decoration: underline;
  transition: color var(--transition);
}
.contact-col a:hover { color: var(--c-orange); text-decoration: underline; }

.view-map {
  color: var(--c-text);
  text-decoration: underline;
  font-size: 0.9rem;
  transition: color var(--transition);
}
.view-map:hover { color: var(--c-orange); }

/* ── Footer bar ─────────────────────────────────────────────── */
#site-footer {
  background: #111;
  color: var(--c-text-light);
  font-size: 0.78rem;
  padding: calc(var(--space) * 1.1) 0;
}

#site-footer .footer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

#site-footer p { margin: 0; }

#site-footer a {
  color: var(--c-text-light);
  text-decoration: none;
  margin: 0 0.4rem;
  transition: color var(--transition);
}
#site-footer a:hover { color: var(--c-orange); }

#site-footer .pipe { margin: 0 0.2rem; opacity: .35; }

.scroll-top {
  background: none;
  border: none;
  color: var(--c-orange);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 0 0 1rem;
  flex-shrink: 0;
  transition: color var(--transition);
}
.scroll-top:hover { color: var(--c-orange-light); }

/* ── Inner page layout (two-column: icon badges left, content right) ── */
.inner-layout {
  display: flex;
  gap: 3rem;
  align-items: flex-start;
  margin-top: calc(var(--space) * 1.5);
}

.inner-icons {
  flex: 0 0 140px;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding-top: 0.25rem;
}

.icon-badge {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 1px 5px rgba(0,0,0,0.08);
}
.icon-badge em {
  font-size: 1rem;
  line-height: 1;
  display: block;
}
.inner-icons img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Pull-quote / blockquote on inner pages */
.page-quote {
  margin: 2rem 0 1rem;
  padding: 1rem 1.5rem;
  border-left: 3px solid var(--c-orange);
  color: var(--c-text-light);
  font-style: italic;
  font-size: 0.95rem;
  line-height: 1.65;
}
.page-quote cite {
  display: block;
  margin-top: 0.5rem;
  font-style: normal;
  font-size: 0.85rem;
  color: var(--c-text-light);
}

.inner-content {
  flex: 1 1 0;
  min-width: 0;
  max-width: 716px;
}
/* Content-only pages (no icon column): centre the text slab */
.inner-layout > .inner-content:only-child {
  margin-inline: auto;
}

/* H1 for inner pages: thin, letter-spaced, centred, no orange underline */
.inner-h1 {
  font-family: var(--font-head);
  font-size: clamp(1.5rem, 3.5vw, 2.4rem);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--c-black);
  text-align: center;
  line-height: 1.15;
  margin-bottom: calc(var(--space) * 2);
}

/* Lead / intro paragraph on inner pages */
.inner-lead {
  font-size: 1.1rem;
  color: #888;
  line-height: 1.7;
  margin-bottom: calc(var(--space) * 1.5);
}

/* Outline CTA – transparent bg, orange border, text dark */
.btn-outline, a.btn-outline {
  display: inline-block;
  background: transparent;
  color: var(--c-text);
  border: 2px solid var(--c-orange);
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.55em 1.5em;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--transition), color var(--transition);
}
.btn-outline:hover, a.btn-outline:hover {
  background: var(--c-orange);
  color: #fff;
  text-decoration: none;
}

@media (max-width: 767px) {
  .inner-layout {
    flex-direction: column;
    gap: 1.5rem;
  }
  .inner-icons {
    flex: none;
    flex-direction: row;
    gap: 1rem;
  }
  .icon-badge {
    width: 80px;
    height: 80px;
  }
  .icon-badge em { font-size: 0.65rem; }
}

/* ── Content heading overrides (matching live: h3 orange, h2 dark/centred) ─ */
.inner-content h2,
.diagram-page h2 {
  font-weight: 400;
  text-align: center;
  letter-spacing: 0.2em;
  margin-bottom: calc(var(--space) * 1.5);
}
.inner-content h3,
.diagram-page h3 {
  color: var(--c-orange);
  font-weight: 400;
  text-transform: none;
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  letter-spacing: 0.05em;
  line-height: 1.45;
  margin-bottom: 0.4rem;
}
.inner-content h4,
.diagram-page h4 {
  color: #808080;
  font-weight: 400;
  font-size: clamp(0.95rem, 1.4vw, 1.15rem);
  letter-spacing: 0.06em;
  line-height: 1.5;
  margin-bottom: 0.6rem;
}

/* In-text links in content – dark + underlined (live: color #000, underline) */
.inner-content a:not(.btn):not(.btn-outline),
.diagram-page a:not(.btn):not(.btn-outline) {
  color: var(--c-black);
  text-decoration: underline;
}
.inner-content a:not(.btn):not(.btn-outline):hover,
.diagram-page a:not(.btn):not(.btn-outline):hover {
  color: var(--c-orange);
  text-decoration: underline;
}

/* ── Diagram-page layout (SARA, Bitumen Chemistry) ─────────── */
.diagram-page {
  margin-top: calc(var(--space) * 1.5);
}
.diagram-top {
  display: flex;
  gap: 2.5rem;
  align-items: flex-start;
  margin-bottom: calc(var(--space) * 2.5);
}
.diagram-graphic {
  flex: 0 0 60%;
  max-width: 60%;
}
.diagram-graphic img {
  width: 100%;
  height: auto;
  display: block;
}
.diagram-meta {
  flex: 1 1 0;
  min-width: 0;
}
.diagram-graphic-full {
  text-align: center;
  margin-bottom: calc(var(--space) * 2);
}
.diagram-graphic-full img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

/* SARA legend */
.sara-legend {
  list-style: none;
  padding: 0;
  margin: 0.75rem 0 0;
}
.sara-legend li {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.3rem;
  font-size: 0.88rem;
  color: var(--c-text);
}
.sara-legend li img {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

@media (max-width: 767px) {
  .diagram-top {
    flex-direction: column;
    gap: 1.5rem;
  }
  .diagram-graphic {
    flex: none;
    max-width: 100%;
    width: 100%;
  }
}

/* ── Downstream – full-bleed orange band ────────────────────── */
.ds-band {
  background: var(--c-orange);
  padding: 3rem 0 3.5rem;
  width: 100%;
}

.ds-band__title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(1.2rem, 2.5vw, 1.75rem);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--c-black);
  text-align: center;
  margin-bottom: 2.5rem;
}

.ds-grid {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  gap: 2rem;
  align-items: center;
}

/* Column headings */
.ds-col__head {
  font-family: var(--font-head);
  font-weight: 400;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--c-black);
  margin-bottom: 0.9rem;
}

/* List */
.ds-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.ds-list li {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.35rem 0;
  font-size: 0.85rem;
  color: var(--c-black);
}

.ds-list li img {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

/* Numbered badge */
.ds-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  min-width: 22px;
  border-radius: 50%;
  background: var(--c-black);
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1;
  flex-shrink: 0;
}

/* Central SVG – dominant element */
.ds-center img {
  width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

/* Right column – align items so badges are on the right side of icon */
.ds-col--right .ds-list li {
  flex-direction: row;
}

/* Responsive ≤ 767px */
@media (max-width: 767px) {
  .ds-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 1.5rem;
  }
  .ds-center {
    grid-column: 1 / -1;
    order: -1;
    max-width: 260px;
    margin: 0 auto 0.5rem;
  }
  .ds-num {
    width: 18px;
    height: 18px;
    min-width: 18px;
    font-size: 0.6rem;
  }
  .ds-list li img {
    width: 22px;
    height: 22px;
  }
}

/* ── ASC Media article list ─────────────────────────────────── */
.media-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.media-item {
  padding: 1.5rem 0;
  border-bottom: 1px solid #ddd;
}
.media-item:first-child { padding-top: 0; }
.media-item:last-child  { border-bottom: none; }

/* h2 title override: left-aligned, dark, uppercase (not centred like default inner-content h2) */
.media-item h2 {
  font-family: var(--font-head);
  font-size: clamp(1rem, 2vw, 1.25rem);
  font-weight: 700;
  color: var(--c-black);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-align: left;
  margin-bottom: 0.5rem;
}

.media-item__teaser {
  font-size: 0.9rem;
  color: var(--c-text);
  margin-bottom: 0.6rem;
}

.media-item__readmore {
  margin: 0;
  font-size: 0.88rem;
}

.media-item__readmore a {
  color: var(--c-black);
  text-decoration: underline;
  transition: color var(--transition);
}
.media-item__readmore a:hover { color: var(--c-orange); }

/* ── Responsive video embed (16:9) ─────────────────────────── */
.video-responsive {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  margin: calc(var(--space) * 1.5) 0;
}
.video-responsive iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ── Partners list ──────────────────────────────────────────── */
.partner-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.partner-item {
  display: flex;
  align-items: flex-start;
  gap: 1.75rem;
  padding: 1.75rem 0;
  border-bottom: 1px solid #ddd;
}
.partner-item:first-child { padding-top: 0; }
.partner-item:last-child  { border-bottom: none; }

.partner-item__logo {
  flex: 0 0 120px;
  width: 120px;
}
.partner-item__logo img {
  width: 100%;
  height: auto;
  display: block;
}

.partner-item__body h2 {
  font-family: var(--font-head);
  font-size: clamp(1rem, 2vw, 1.25rem);
  font-weight: 400;
  color: var(--c-orange);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-align: left;
  margin-bottom: 0.4rem;
}
.partner-item__body p {
  font-size: 0.9rem;
  color: var(--c-text);
  margin-bottom: 0.3rem;
}
.partner-item__body a {
  color: var(--c-black);
  text-decoration: underline;
  font-size: 0.88rem;
  transition: color var(--transition);
}
.partner-item__body a:hover { color: var(--c-orange); }

@media (max-width: 767px) {
  .partner-item {
    flex-direction: column;
    gap: 1rem;
  }
  .partner-item__logo { flex: none; width: 90px; }
}

/* ── Contact form ───────────────────────────────────────────── */
.contact-form {
  margin-top: calc(var(--space) * 1.5);
  max-width: 600px;
}

.contact-form .form-group {
  margin-bottom: 1.1rem;
}

.contact-form label {
  display: block;
  font-size: 0.85rem;
  font-family: var(--font-head);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--c-black);
  margin-bottom: 0.3rem;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
  width: 100%;
  padding: 0.55rem 0.75rem;
  border: 1px solid #ccc;
  background: #fff;
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--c-text);
  outline: none;
  transition: border-color var(--transition);
  box-sizing: border-box;
}
.contact-form input[type="text"]:focus,
.contact-form input[type="email"]:focus,
.contact-form textarea:focus {
  border-color: var(--c-orange);
}

.contact-form textarea { resize: vertical; min-height: 140px; }

.contact-form .form-submit { margin-top: 0.5rem; }

/* ── Utilities ──────────────────────────────────────────────── */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
