/* ==========================================================================
   International Mobile Welding Ltd. — site styles
   Structure and visual language mirror the reference build.
   All brand colours live in the :root block below — change them there
   and the whole site re-skins.
   ========================================================================== */

:root {
  /* --- Brand palette (edit these to rebrand the entire site) --- */
  --brand-dark:    #3a0a0a;   /* header + footer background — deep oxblood */
  --brand:         #b3151a;   /* accent: headings, primary buttons */
  --brand-hover:   #8f1015;
  --brand-soft:    #d9666a;   /* light accent for dark backgrounds */
  --ink:           #24160f;   /* body copy — warm near-black */
  --ink-muted:     #6a544c;
  --card-bg:       #fdf6f5;
  --card-border:   #ecd3d1;
  --page-bg:       #ffffff;
  --footer-text:   #f2e4e3;
  --badge-bg:      #fff3d6;
  --badge-text:    #7a4a00;

  /* --- Layout --- */
  --w-narrow: 1000px;
  --w-mid:    1100px;
  --w-wide:   1200px;
  --radius:   14px;
  --radius-btn: 10px;

  --font: Tahoma, Verdana, "Segoe UI", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--page-bg);
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--brand); }

.container {
  width: 100%;
  margin: 0 auto;
  padding: 0 24px;
}
.container.narrow { max-width: var(--w-narrow); }
.container.mid    { max-width: var(--w-mid); }
.container.wide   { max-width: var(--w-wide); }

.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;
}

/* ==========================================================================
   Header / navigation
   ========================================================================== */

.site-header {
  background: var(--brand-dark);
  padding: 16px 24px;
  position: sticky;
  top: 0;
  z-index: 200;
}

.header-inner {
  max-width: var(--w-wide);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

/* --- Logo --- */
.logo {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: #fff;
}
.logo-mark { flex: 0 0 auto; }
.logo-text .logo-name {
  display: block;
  font-size: 34px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.5px;
}
.logo-text .logo-sub {
  display: block;
  font-size: 11px;
  line-height: 1.3;
  margin-top: 3px;
  color: #eccbc9;
  letter-spacing: 0.2px;
}
.logo-mark { height: 52px; width: auto; }

/* --- Nav --- */
.nav-toggle {
  display: none;
  background: none;
  border: 0;
  color: #fff;
  font-size: 28px;
  line-height: 1;
  padding: 1px 6px;
  cursor: pointer;
}

.site-nav ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
}

.site-nav a {
  display: block;
  color: #fff;
  text-decoration: none;
  font-size: 16px;
  font-weight: 700;
  padding: 10px 14px;
  border-radius: 8px;
}
.site-nav a:hover,
.site-nav a:focus-visible { background: rgba(255, 255, 255, 0.12); }
.site-nav a.is-active { color: var(--brand-soft); }

.site-nav .nav-cta a {
  background: var(--brand);
  border: 2px solid #e0797d;
  padding: 10px 18px;
  border-radius: var(--radius-btn);
}
.site-nav .nav-cta a:hover { background: var(--brand-hover); }

/* --- Dropdown --- */
.has-dropdown { position: relative; display: flex; align-items: center; }

/* Caret is its own button so the Services label stays a plain link that
   navigates on the first tap, including on touch devices. */
.dd-toggle {
  background: none;
  border: 0;
  color: #fff;
  font-size: 13px;
  line-height: 1;
  padding: 10px 8px 10px 0;
  cursor: pointer;
  border-radius: 8px;
}
.dd-toggle:hover { background: rgba(255, 255, 255, 0.12); }

.dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 250px;
  background: var(--brand-dark);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 10px;
  padding: 8px;
  flex-direction: column;
  gap: 2px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
}
.has-dropdown:hover .dropdown,
.has-dropdown:focus-within .dropdown,
.has-dropdown.is-open .dropdown { display: flex; }

.dropdown a { font-weight: 400; font-size: 15px; padding: 8px 12px; }
.dropdown .dd-head {
  font-weight: 700;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px 8px 0 0;
  margin-bottom: 4px;
}
.dropdown .dd-sub { padding-left: 28px; font-size: 14px; opacity: 0.88; }
.dropdown .dd-sub::before {
  content: "– ";
  opacity: 0.6;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 16px;
  border-radius: var(--radius-btn);
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, transform 0.05s ease;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--brand);
  border: 1px solid var(--brand);
  color: #fff;
}
.btn-primary:hover { background: var(--brand-hover); border-color: var(--brand-hover); }

.btn-secondary {
  background: #fff;
  border: 1px solid var(--card-border);
  color: var(--ink);
}
.btn-secondary:hover { background: var(--card-bg); }

.btn-small { padding: 8px 14px; font-size: 15px; }

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  margin-top: 18px;
}

/* ==========================================================================
   Hero carousel
   ========================================================================== */

.hero-carousel {
  position: relative;
  height: 420px;
  overflow: hidden;
  background: #2b1512;   /* shows only while the hero image loads */
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 0.7s ease;
  pointer-events: none;
}
.hero-slide.is-active { opacity: 1; pointer-events: auto; }

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(24, 6, 5, 0.55), rgba(24, 6, 5, 0.68));
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1100px;
  padding: 0 70px;
  color: #fff;
}

.hero-content h1 {
  font-size: 44px;
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 12px;
  color: #fff;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.45);
}

.hero-content p {
  font-size: 18px;
  margin: 0 auto;
  max-width: 900px;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.5);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  background: rgba(0, 0, 0, 0.18);
  border: 0;
  color: #fff;
  font-size: 30px;
  line-height: 1;
  padding: 6px 14px;
  cursor: pointer;
  border-radius: 6px;
}
.hero-arrow:hover { background: rgba(0, 0, 0, 0.4); }
.hero-prev { left: 14px; }
.hero-next { right: 14px; }

.hero-dots {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  display: flex;
  gap: 10px;
}
.hero-dots button {
  width: 11px; height: 11px;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  padding: 0;
}
.hero-dots button.is-active { background: #fff; }

/* ==========================================================================
   Page banner (inner pages)
   ========================================================================== */

.page-banner {
  position: relative;
  min-height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background-size: cover;
  background-position: center;
  color: #fff;
}
.page-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(24, 6, 5, 0.58), rgba(24, 6, 5, 0.72));
}
.page-banner .container { position: relative; z-index: 2; }
.page-banner h1 {
  font-size: 40px;
  margin: 0 0 8px;
  color: #fff;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.45);
}
.page-banner p {
  margin: 0;
  font-size: 18px;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.5);
}

/* ==========================================================================
   Section shells + headings
   ========================================================================== */

.about-block { padding: 44px 0 8px; }
.featured    { padding: 36px 0; }
.industries-block { padding: 20px 0 10px; }
.section     { padding: 40px 0; }
.section-alt { background: var(--card-bg); }

.section-head {
  max-width: var(--w-narrow);
  margin: 10px auto 18px;
  text-align: center;
}
.section-head h2 {
  font-size: 24px;
  font-weight: 700;
  color: var(--brand);
  margin: 0 0 8px;
}
.section-head p {
  margin: 0;
  color: var(--ink-muted);
}

h3 { font-size: 19px; margin: 0 0 8px; }

/* --- Breadcrumbs --- */
.crumbs {
  max-width: var(--w-mid);
  margin: 0 auto 22px;
  font-size: 14px;
  color: var(--ink-muted);
}
.crumbs a { color: var(--brand); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.crumbs span { margin: 0 4px; }

.prose { max-width: var(--w-narrow); margin: 0 auto; }
.prose p { margin: 0 0 14px; }
.prose h3 { margin-top: 22px; color: var(--brand); }
.prose ul { margin: 0 0 14px; padding-left: 22px; }
.prose li { margin-bottom: 6px; }

/* ==========================================================================
   Feature rows (image + copy, alternating)
   ========================================================================== */

.feature-row {
  max-width: var(--w-mid);
  margin: 0 auto 34px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: center;
}
.feature-row.reverse .feature-media { order: 2; }

.feature-media img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--card-border);
}
.feature-copy h2 {
  font-size: 24px;
  color: var(--brand);
  margin: 0 0 10px;
}
.feature-copy ul { padding-left: 20px; margin: 0 0 16px; }
.feature-copy li { margin-bottom: 6px; }

/* ==========================================================================
   Service cards
   ========================================================================== */

.services-grid {
  max-width: var(--w-mid);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 18px;
}

.service-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 18px 16px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: 0 1px 0 0 rgba(0, 0, 0, 0.03);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.hover-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(0, 48, 0, 0.10);
}

.service-card h3 { color: var(--ink); margin: 0 0 10px; }
.service-card ul {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
  font-size: 15px;
  color: var(--ink-muted);
}
.service-card li { margin-bottom: 6px; }
.service-card .btn { margin-top: auto; }

/* ==========================================================================
   Industries
   ========================================================================== */

.industries-grid {
  max-width: var(--w-mid);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

.panel {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 20px 24px 24px;
}
.panel h3 {
  text-align: center;
  font-size: 20px;
  margin: 4px 0 14px;
}
.panel ul { margin: 0; padding-left: 20px; }
.panel li { margin-bottom: 8px; }

/* ==========================================================================
   CTA strip
   ========================================================================== */

.cta-strip {
  text-align: center;
  padding: 26px 0 44px;
}
.cta-strip h2 {
  font-size: 24px;
  color: var(--brand);
  margin: 0 0 6px;
}
.cta-strip p { margin: 0 0 16px; }

/* ==========================================================================
   Contact page
   ========================================================================== */

.contact-grid {
  max-width: var(--w-mid);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 30px;
  align-items: start;
}

.contact-form label {
  display: block;
  font-weight: 700;
  font-size: 15px;
  margin: 0 0 6px;
}
.contact-form .field { margin-bottom: 16px; }
.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  font-family: var(--font);
  font-size: 16px;
  color: var(--ink);
  padding: 11px 12px;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-btn);
  background: #fff;
}
.contact-form textarea { min-height: 150px; resize: vertical; }
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: 2px solid var(--brand);
  outline-offset: 1px;
}
.form-note { font-size: 14px; color: var(--ink-muted); margin: 10px 0 0; }

.contact-detail {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}
.contact-detail .label {
  font-weight: 700;
  min-width: 76px;
}
.contact-detail a { text-decoration: none; }
.contact-detail a:hover { text-decoration: underline; }

.map-embed {
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: 20px;
}
.map-embed iframe { width: 100%; height: 320px; border: 0; display: block; }

/* --- Stats strip --- */
.stats {
  max-width: var(--w-mid);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  text-align: center;
}
.stat {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 20px 14px;
}
.stat .num {
  display: block;
  font-size: 32px;
  font-weight: 700;
  color: var(--brand);
  line-height: 1.1;
}
.stat .lbl { font-size: 15px; color: var(--ink-muted); }

/* ==========================================================================
   TSSA certificates
   ========================================================================== */

.cert-heading {
  max-width: var(--w-mid);
  margin: 30px auto 12px;
  font-size: 17px;
  color: var(--brand);
}
.cert-heading:first-of-type { margin-top: 0; }

.cert-table-wrap {
  max-width: var(--w-mid);
  margin: 0 auto;
  overflow-x: auto;
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
}

.cert-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  background: #fff;
}
.cert-table th,
.cert-table td {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--card-border);
  vertical-align: top;
}
.cert-table thead th {
  background: var(--brand-dark);
  color: #fff;
  font-size: 14px;
  letter-spacing: 0.2px;
  white-space: nowrap;
}
.cert-table tbody tr:nth-child(even) { background: var(--card-bg); }
.cert-table tbody tr:last-child td { border-bottom: 0; }
.cert-table td:first-child { white-space: nowrap; color: var(--brand); }

.cert-note {
  max-width: var(--w-mid);
  margin: 14px auto 0;
  font-size: 15px;
  color: var(--ink-muted);
}
.cert-note a { color: var(--brand); font-weight: 700; }

/* --- Certificate chips (homepage band) --- */
.cert-chips {
  max-width: var(--w-mid);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}
.cert-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  background: #fff;
  border: 1px solid var(--card-border);
  border-radius: 999px;
  padding: 9px 16px;
  font-size: 14px;
  color: var(--ink);
}
.cert-chip strong {
  color: var(--brand);
  font-size: 13px;
  letter-spacing: 0.3px;
}

/* ==========================================================================
   Floating certifications badge
   ========================================================================== */

.cert-badge {
  position: fixed;
  right: 14px;
  bottom: 14px;
  z-index: 150;
  background: var(--brand-dark);
  color: #fff;
  border: 1px solid #6b3232;
  border-radius: 12px;
  padding: 14px 18px;
  text-align: center;
  font-size: 15px;
  line-height: 1.5;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.25);
  max-width: 200px;
}
.cert-badge strong { display: block; margin-bottom: 6px; }
.cert-badge a {
  color: #fff;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.35);
}
.cert-badge a:hover { border-bottom-color: #fff; }
.cert-badge .pill {
  display: inline-block;
  margin-top: 6px;
  background: var(--badge-bg);
  color: var(--badge-text);
  font-weight: 700;
  font-size: 14px;
  border-radius: 8px;
  padding: 2px 10px;
}
.cert-badge .close {
  position: absolute;
  top: 2px; right: 6px;
  background: none; border: 0;
  color: rgba(255, 255, 255, 0.6);
  font-size: 16px; cursor: pointer;
  line-height: 1;
}
.cert-badge .close:hover { color: #fff; }

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  background: var(--brand-dark);
  color: var(--footer-text);
  padding: 44px 0 20px;
  margin-top: 10px;
}

.footer-inner {
  max-width: var(--w-wide);
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1fr;
  gap: 30px;
}

.footer-card {
  border: 2px solid #8a4f4f;
  border-radius: var(--radius);
  padding: 22px 20px;
  text-align: center;
  background: rgba(255, 255, 255, 0.04);
}
.footer-mark {
  height: 54px;
  width: auto;
  margin: 0 auto 12px;
}
.footer-card h2 {
  font-size: 22px;
  margin: 0 0 12px;
  color: #fff;
}
.footer-card p { margin: 6px 0; }
.footer-card a { color: var(--footer-text); text-decoration: none; }
.footer-card a:hover { text-decoration: underline; }

.footer-col { text-align: center; }
.footer-col h3 {
  font-size: 17px;
  color: #fff;
  margin: 0 0 12px;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 7px; }
.footer-col a {
  color: var(--footer-text);
  text-decoration: none;
  font-size: 15px;
}
.footer-col a:hover { text-decoration: underline; }
.footer-col p { margin: 0 0 14px; font-size: 15px; }

.footer-col .btn-primary {
  border-color: #b3565a;
  color: #fff;
}

.social-row {
  margin-top: 18px;
}
.social-row h3 { margin-bottom: 8px; }

.footer-bottom {
  max-width: var(--w-wide);
  margin: 30px auto 0;
  padding: 16px 24px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  text-align: center;
  font-size: 14px;
  color: rgba(230, 239, 231, 0.8);
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1024px) {
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  .nav-toggle { display: block; }

  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--brand-dark);
    padding: 10px 24px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 14px 24px rgba(0, 0, 0, 0.3);
    /* The full services list is taller than a phone screen, so the panel
       has to scroll on its own — otherwise the lower links are unreachable. */
    max-height: calc(100vh - 90px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; align-items: stretch; gap: 2px; }
  .site-nav a { padding: 12px 10px; }
  .site-nav .nav-cta a { text-align: center; margin-top: 8px; }

  /* On mobile the whole services list is simply expanded — no caret needed. */
  .has-dropdown { display: block; }
  .dd-toggle { display: none; }
  .dropdown {
    display: flex;
    position: static;
    border: 0;
    box-shadow: none;
    padding: 0 0 0 14px;
    min-width: 0;
    background: none;
  }
  .dropdown .dd-head { border-bottom: 0; margin-bottom: 0; }

  .hero-carousel { height: auto; min-height: 460px; }
  .hero-content { padding: 60px 56px; }
  .hero-content h1 { font-size: 30px; }
  .hero-content p { font-size: 16px; }

  .page-banner h1 { font-size: 28px; }

  .feature-row { grid-template-columns: 1fr; gap: 18px; }
  .feature-row.reverse .feature-media { order: 0; }
  .feature-media img { height: 220px; }

  .industries-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }

  .logo-text .logo-name { font-size: 27px; }
  .logo-text .logo-sub { font-size: 10px; }

  .cert-badge {
    font-size: 13px;
    padding: 8px 30px 8px 12px;
    max-width: none;
    left: 14px;
    right: 14px;
    bottom: 10px;
    line-height: 1.35;
  }
  .cert-badge strong { display: inline; margin: 0 4px 0 0; }
  .cert-badge .pill { margin-top: 0; margin-left: 6px; font-size: 13px; }
}

@media (max-width: 640px) {
  /* Stack the certificate table into labelled cards rather than scrolling it. */
  .cert-table-wrap { border: 0; overflow: visible; }
  .cert-table, .cert-table tbody, .cert-table tr, .cert-table td { display: block; width: 100%; }
  .cert-table thead { display: none; }
  .cert-table tr {
    background: var(--card-bg) !important;
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    margin-bottom: 12px;
    padding: 6px 4px;
  }
  .cert-table td { border-bottom: 0; padding: 6px 14px; }
  .cert-table td::before {
    content: attr(data-label) ": ";
    font-weight: 700;
    color: var(--ink-muted);
  }
}

@media (max-width: 560px) {
  .services-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr; }
  .hero-arrow { font-size: 22px; padding: 4px 9px; }
  .hero-content { padding: 60px 44px; }
}
