/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: 'Inter', sans-serif; color: #1a2a3a; line-height: 1.6; background: #fff; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }

/* ── Buttons ── */
.btn-primary {
  display: inline-block; background: #0056b3; color: #fff !important;
  padding: .8rem 2rem; border-radius: 4px; font-weight: 600;
  font-size: .95rem; transition: background .2s; border: none; cursor: pointer;
}
.btn-primary:hover { background: #004494; }
.btn-outline {
  display: inline-block; border: 2px solid #fff; color: #fff !important;
  padding: .75rem 1.8rem; border-radius: 4px; font-weight: 600; transition: all .2s;
}
.btn-outline:hover { background: rgba(255,255,255,.15); }

/* ── Flash alerts ── */
.flash-alert { padding: .85rem 1.5rem; text-align: center; font-weight: 500; font-size: .95rem; }
.flash-success { background: #d4edda; color: #155724; border-bottom: 1px solid #c3e6cb; }
.flash-danger  { background: #f8d7da; color: #721c24; border-bottom: 1px solid #f5c6cb; }

/* ── Header — white background so logo colours show correctly ── */
.site-header {
  position: sticky; top: 0; z-index: 1000;
  background: #ffffff; border-bottom: 2px solid #e2e8f0;
  box-shadow: 0 2px 10px rgba(0,0,0,.08);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }

.logo { display: flex; align-items: center; }
.logo-img { height: 50px; width: auto; display: block; }

/* ── Navigation ── */
.main-nav { display: flex; align-items: center; }
.nav-root { display: flex; align-items: center; list-style: none; gap: 2px; }

.nav-item { position: relative; list-style: none; }

.nav-link {
  display: flex; align-items: center; gap: 4px;
  padding: .55rem .9rem; color: #2d3748;
  font-size: .88rem; font-weight: 600;
  border-radius: 4px; transition: color .15s, background .15s;
  white-space: nowrap;
}
.nav-link:hover { color: #0056b3; background: #f0f6ff; }
.caret { font-size: .7rem; opacity: .6; }

/* ── Dropdown — no gap so cursor never loses hover ── */
.nav-item.has-dropdown { position: relative; }

/* Invisible bridge: extends hover area below the link to meet the menu */
.nav-item.has-dropdown::after {
  content: ''; position: absolute;
  top: 100%; left: 0; right: 0; height: 8px;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px); /* visual gap covered by ::after bridge */
  left: 0;
  min-width: 220px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-top: 2px solid #0056b3;
  border-radius: 0 0 8px 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
  z-index: 9999;
  list-style: none;
  padding: .4rem 0;
}
.nav-item.has-dropdown:hover > .dropdown-menu { display: block; }
.dropdown-menu li { list-style: none; }
.dropdown-menu li a {
  display: block; padding: .65rem 1.2rem;
  color: #2d3748; font-size: .87rem; font-weight: 500;
  transition: background .15s, color .15s; white-space: nowrap;
  border-left: 3px solid transparent;
}
.dropdown-menu li a:hover { background: #f0f6ff; color: #0056b3; border-left-color: #0056b3; }

/* Quote button in nav */
.btn-quote {
  background: #0056b3 !important; color: #fff !important;
  padding: .5rem 1.2rem !important; border-radius: 4px !important;
  margin-left: .5rem; font-weight: 600 !important;
}
.btn-quote:hover { background: #004494 !important; }

/* ISO badge in header */
.header-iso-badge {
  display: flex; align-items: center; gap: .35rem;
  text-decoration: none; color: #1a2a3a;
  border: 1px solid #e2e8f0; border-radius: 6px;
  padding: .25rem .5rem; transition: border-color .2s;
  white-space: nowrap;
}
.header-iso-badge:hover { border-color: #0056b3; }
.header-iso-logo { height: 25px; width: auto; display: block; }
.header-iso-text { font-size: .62rem; font-weight: 700; line-height: 1.3; color: #1a2a3a; }
.header-iso-text small { font-weight: 400; color: #5a6a7a; }

/* Mobile toggle */
.menu-toggle {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 4px;
}
.menu-toggle span { display: block; width: 24px; height: 2px; background: #2d3748; border-radius: 2px; }

/* ── Hero ── */
.hero {
  position: relative; min-height: 600px; display: flex; align-items: center;
  background: linear-gradient(135deg, #0f1923 0%, #0a2a4a 50%, #0056b3 100%);
  overflow: hidden;
}
.hero-slide {
  position: absolute; inset: 0;
  background-size: cover; background-position: center; background-repeat: no-repeat;
  opacity: 0; transition: opacity 1s ease;
}
.hero-slide.active { opacity: 1; }
.hero-overlay { position: absolute; inset: 0; background: rgba(10,20,35,.6); z-index: 1; }
.hero-content { position: relative; z-index: 2; }
.hero h1 { font-size: clamp(1.9rem, 4vw, 3.1rem); color: #fff; font-weight: 700; line-height: 1.2; margin-bottom: 1.25rem; }
.hero h1 span { color: #4da3ff; }
.hero p { font-size: 1.1rem; color: #a8c0d6; max-width: 560px; margin-bottom: 2rem; }
.hero-btns { display: flex; gap: 1rem; flex-wrap: wrap; }

/* Slider dots */
.slider-dots { position: absolute; bottom: 1.5rem; left: 50%; transform: translateX(-50%); display: flex; gap: .5rem; z-index: 3; }
.slider-dot { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,.4); border: none; cursor: pointer; transition: background .3s; }
.slider-dot.active { background: #fff; }

/* ── Value cards ── */
.section-value { padding: 5rem 0; background: #f8fafc; }
.value-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.5rem; }
.value-card {
  background: #fff; padding: 2rem 1.5rem; border-radius: 8px;
  text-align: center; box-shadow: 0 2px 8px rgba(0,0,0,.06);
  border-top: 3px solid #0056b3; transition: transform .2s;
}
.value-card:hover { transform: translateY(-4px); }
.value-card .icon { font-size: 2rem; margin-bottom: .75rem; }
.value-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: .5rem; }
.value-card p { font-size: .9rem; color: #5a6a7a; }

/* ── Services section ── */
.section-services { padding: 5rem 0; }
.section-title { font-size: 2rem; font-weight: 700; text-align: center; margin-bottom: 3rem; }
.section-title::after { content: ''; display: block; width: 60px; height: 3px; background: #0056b3; margin: .75rem auto 0; }
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.5rem; }
.service-card {
  display: block; padding: 2rem; border: 1px solid #e2e8f0; border-radius: 8px;
  color: #1a2a3a; transition: all .2s;
}
.service-card:hover { border-color: #0056b3; box-shadow: 0 4px 20px rgba(0,86,179,.12); transform: translateY(-3px); }
.service-card h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: .75rem; color: #0056b3; }
.service-card p { font-size: .9rem; color: #5a6a7a; margin-bottom: 1rem; }
.learn-more { font-size: .88rem; color: #0056b3; font-weight: 600; }

/* ── Industries section ── */
.section-industries { padding: 5rem 0; background: #0f1923; }
.section-industries .section-title { color: #fff; }
.section-industries .section-title::after { background: #4da3ff; }
.industry-grid { display: flex; justify-content: center; gap: 3rem; flex-wrap: wrap; }
.industry-item { text-align: center; color: #a8c0d6; }
.industry-item span { font-size: 2.5rem; display: block; margin-bottom: .5rem; }
.industry-item p { font-size: .95rem; font-weight: 600; }

/* ── CTA ── */
.section-cta { padding: 5rem 0; background: #0056b3; text-align: center; }
.section-cta h2 { font-size: 2rem; color: #fff; margin-bottom: 1rem; }
.section-cta p { color: #cde; margin-bottom: 2rem; font-size: 1.05rem; }
.section-cta .btn-primary { background: #fff; color: #0056b3 !important; }
.section-cta .btn-primary:hover { background: #e8f0fb; }

/* ── Page hero ── */
.page-hero {
  background: linear-gradient(135deg, #0f1923 0%, #0a2a4a 100%);
  padding: 4rem 0; text-align: center;
}
.page-hero h1 { color: #fff; font-size: 2.2rem; font-weight: 700; margin-bottom: .75rem; }
.page-hero p { color: #a8c0d6; font-size: 1.05rem; }

/* ── Content pages ── */
.section-content { padding: 4rem 0; }
.content-grid { display: grid; grid-template-columns: 1fr 300px; gap: 3rem; }
.content-main h2 { font-size: 1.6rem; margin-bottom: 1rem; }
.content-main p { color: #4a5a6a; margin-bottom: 1.5rem; }
.cap-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin-top: 1.5rem; }
.cap-card { padding: 1.5rem; border: 1px solid #e2e8f0; border-radius: 8px; background: #f8fafc; }
.cap-card h3, .cap-card h4 { font-size: .95rem; color: #0056b3; font-weight: 700; margin-bottom: .75rem; }
.cap-card ul { list-style: none; }
.cap-card ul li { font-size: .88rem; color: #4a5a6a; padding: .2rem 0; }
.cap-card ul li::before { content: '→ '; color: #0056b3; }
.cap-card p { font-size: .9rem; color: #4a5a6a; }
.sidebar-cta { background: #0056b3; color: #fff; padding: 2rem; border-radius: 8px; }
.sidebar-cta h3 { margin-bottom: .75rem; }
.sidebar-cta p { font-size: .9rem; margin-bottom: 1.25rem; opacity: .9; }
.sidebar-cta .btn-primary { background: #fff; color: #0056b3 !important; display: block; text-align: center; }
.feature-list { list-style: none; margin: 1.5rem 0; }
.feature-list li { padding: .5rem 0; color: #4a5a6a; font-size: .95rem; border-bottom: 1px solid #f0f4f8; }

/* Dynamic content from editor */
.dynamic-content { color: #4a5a6a; }
.dynamic-content h1,.dynamic-content h2,.dynamic-content h3 { color: #1a2a3a; margin: 1.25rem 0 .75rem; }
.dynamic-content p { margin-bottom: .9rem; }
.dynamic-content ul,.dynamic-content ol { margin: .75rem 0 .75rem 1.5rem; }
.dynamic-content li { margin-bottom: .3rem; }
.dynamic-content strong { color: #1a2a3a; }
.dynamic-content a { color: #0056b3; text-decoration: underline; }

/* ── Contact form ── */
.contact-form { max-width: 760px; margin: 0 auto; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.form-group { margin-bottom: 1.25rem; }
.form-group label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: .4rem; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: .75rem 1rem; border: 1px solid #cbd5e0;
  border-radius: 4px; font-size: .95rem; font-family: inherit; transition: border-color .2s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none; border-color: #0056b3; box-shadow: 0 0 0 3px rgba(0,86,179,.1);
}

/* ── Math CAPTCHA ── */
.captcha-group label { font-weight: 700; color: #1a2a3a; font-size: .95rem; }
.captcha-group label span { display: inline-block; background: #0056b3; color: #fff; font-size: 1.1rem; font-weight: 800; padding: .15rem .7rem; border-radius: 4px; margin: 0 .2rem; letter-spacing: .05em; }
.captcha-group input { max-width: 160px; }

/* ── Footer ── */
.site-footer { background: #0f1923; color: #a8c0d6; padding: 4rem 0 0; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2.5rem; margin-bottom: 3rem; }
.footer-brand .footer-logo { height: 90px; width: auto; margin-bottom: 1rem; filter: brightness(0) invert(1); }
.footer-brand p { font-size: .9rem; line-height: 1.7; max-width: 260px; }
.footer-company-name { font-size: 1rem; font-weight: 700; color: #e0eaf4; margin-bottom: .3rem; }
.footer-contact-line { font-size: .88rem; color: #9ba8b5; margin-bottom: .25rem; display: flex; align-items: center; gap: .4rem; }
.footer-contact-line a { color: #9ba8b5; transition: color .2s; }
.footer-contact-line a:hover { color: #4da3ff; }
.footer-contact-icon { font-size: .85rem; }
.footer-iso-cert { margin-bottom: .5rem; font-size: .82rem; color: #6a7a8a; text-align: center; }
.footer-iso-cert a { color: #4da3ff; text-decoration: underline; font-weight: 600; }
.footer-iso-cert a:hover { color: #fff; }
.footer-grid h4 { color: #fff; font-size: .95rem; margin-bottom: 1rem; }
.footer-grid ul { list-style: none; }
.footer-grid ul li { margin-bottom: .4rem; }
.footer-grid ul li a { font-size: .88rem; color: #9ba8b5; transition: color .2s; }
.footer-grid ul li a:hover { color: #4da3ff; }
.footer-grid p { font-size: .9rem; }
.footer-cta-btn {
  display: inline-block; background: #0056b3; color: #fff;
  padding: .6rem 1.4rem; border-radius: 4px; font-size: .9rem; margin-top: .5rem;
}
.footer-cta-btn:hover { background: #004494; color: #fff; }
.footer-bottom { border-top: 1px solid #1e3a5f; padding: 1.5rem 0; text-align: center; }
.footer-bottom p { font-size: .85rem; color: #6a7a8a; }

/* ── 404 ── */
.error-page { text-align: center; padding: 6rem 1.5rem; }
.error-page h1 { font-size: 5rem; color: #0056b3; }
.error-page h2 { font-size: 1.5rem; margin-bottom: 1rem; }
.error-page p { color: #5a6a7a; margin-bottom: 2rem; }

/* ── Responsive ── */
@media (max-width: 960px) {
  .content-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .main-nav {
    display: none; position: absolute; top: 72px; left: 0; right: 0;
    background: #fff; border-top: 2px solid #e2e8f0;
    padding: 1rem; flex-direction: column; align-items: flex-start;
    box-shadow: 0 8px 20px rgba(0,0,0,.1);
  }
  .main-nav.open { display: flex; }
  .nav-root { flex-direction: column; width: 100%; gap: 0; }
  .nav-item { width: 100%; }
  .nav-link { padding: .7rem 1rem; width: 100%; color: #2d3748; }
  .btn-quote { margin: .5rem 0 0; width: 100%; text-align: center; }
  .nav-item.has-dropdown::after { display: none; }
  .dropdown-menu { position: static; box-shadow: none; border: none; border-top: 1px solid #e2e8f0; background: #f8fafc; border-radius: 0; min-width: 0; }
  .dropdown-menu li a { color: #4a5568; border-left: none; padding-left: 2rem; }
  .nav-item.has-dropdown:hover > .dropdown-menu { display: none; }
  .nav-item.has-dropdown.open > .dropdown-menu { display: block; }
  .menu-toggle { display: flex; }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero { min-height: 480px; }
  .hero h1 { font-size: 1.8rem; }
}
