/* DKI Restotech — public site styles.
   Modern "light & airy" system: deep navy + emergency red + orange accent.
   Montserrat/Roboto. Swap the variables below to re-skin the whole site. */

:root {
  --ink-navy: #122a4d;       /* headings, nav, primary text accents (deep navy) */
  --brand-navy: #0b2140;     /* dark section + footer + hero backgrounds */
  --brand-navy-2: #0a1a33;   /* darker hairline on dark backgrounds */
  --brand-red: #d81f2d;      /* emergency CTA buttons + links */
  --brand-red-dark: #b01824; /* CTA hover */
  --brand-orange: #f97316;   /* energetic accent (stars, highlights) */
  --ink: #1f2937;
  --muted: #5b6470;
  --line: #e3e7ec;
  --bg: #ffffff;
  --bg-soft: #f5f8fc;        /* soft cool-tinted neutral (trust strip, alt sections) */
  --radius: 10px;
  --radius-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(11,33,64,.06);
  --shadow-md: 0 10px 30px rgba(11,33,64,.10);
  --container: 1200px;
  --font-head: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-body: "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
}
a { color: var(--brand-red); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 700; line-height: 1.2; color: var(--ink-navy); margin-top: 0; letter-spacing: -.01em; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.btn {
  display: inline-block; padding: 13px 24px; border-radius: var(--radius);
  font-weight: 700; text-decoration: none; cursor: pointer; border: 2px solid transparent;
  font-family: var(--font-head); text-transform: uppercase; letter-spacing: .4px; font-size: .92rem;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, color .15s ease;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--brand-red); color: #fff; box-shadow: 0 6px 18px rgba(216,31,45,.28); }
.btn-primary:hover { background: var(--brand-red-dark); color: #fff; transform: translateY(-2px); box-shadow: 0 12px 26px rgba(216,31,45,.34); }
.btn-outline { border-color: rgba(255,255,255,.85); color: #fff; }
.btn-outline:hover { background: #fff; color: var(--ink-navy); transform: translateY(-2px); }

/* --- Top bar --- */
.topbar { background: var(--brand-navy); color: #e8eef7; font-size: 0.86rem; border-top: 3px solid var(--brand-red); }
.topbar .container { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 9px 20px; flex-wrap: wrap; }
.topbar a { color: #fff; }
.topbar .phone { font-weight: 700; font-size: 1.02rem; }

/* --- Header / nav --- */
.site-header { position: sticky; top: 0; z-index: 50; background: #fff; border-bottom: 1px solid var(--line); box-shadow: 0 4px 18px rgba(11,33,64,.06); }
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 14px 20px; }
.logo { display: inline-flex; align-items: center; flex: 0 0 auto; }
.logo img { height: 52px; width: auto; display: block; }
.footer-logo { background: #fff; border-radius: 8px; padding: 10px 12px; display: inline-block; margin-bottom: 14px; }
.footer-logo img { height: 40px; width: auto; display: block; }

.main-nav { display: flex; gap: 22px; align-items: center; }
.main-nav > .nav-item { position: relative; }
.main-nav > .nav-item > a {
  position: relative; color: var(--ink-navy); font-weight: 600; font-family: var(--font-head);
  padding: 10px 0; display: inline-flex; align-items: center; gap: 4px;
  font-size: .95rem; white-space: nowrap;
}
.main-nav > .nav-item > a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 2px;
  background: var(--brand-red); border-radius: 2px;
  transform: scaleX(0); transform-origin: left; transition: transform .2s ease;
}
.main-nav > .nav-item > a:hover { color: var(--brand-red); text-decoration: none; }
.main-nav > .nav-item > a:hover::after { transform: scaleX(1); }
.main-nav .caret { font-size: .7rem; }
.main-nav .submenu {
  position: absolute; top: 100%; left: 0; min-width: 230px; max-height: 70vh; overflow-y: auto;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-md); padding: 8px; display: none; z-index: 60;
}
.main-nav .nav-item.has-sub:hover .submenu { display: block; }
.main-nav .submenu a { display: block; padding: 9px 12px; color: var(--ink); border-radius: 6px; font-size: .92rem; white-space: nowrap; }
.main-nav .submenu a:hover { background: var(--bg-soft); color: var(--brand-red); text-decoration: none; }
.nav-cta-mobile { display: none; }

/* Hamburger toggle (mobile only) */
.nav-toggle {
  display: none; flex: 0 0 auto; width: 44px; height: 40px; background: none; border: 0;
  cursor: pointer; padding: 8px; margin-left: auto;
}
.nav-toggle span { display: block; height: 3px; border-radius: 2px; background: var(--ink-navy); margin: 4px 0; transition: .25s; }
body.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
body.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* --- Hero --- */
.hero {
  position: relative; color: #fff; padding: 96px 0;
  background: linear-gradient(118deg, rgba(8,22,44,.94) 0%, rgba(8,22,44,.78) 52%, rgba(8,22,44,.58) 100%),
    url("/static/hero.675b82485e53.jpg") center/cover no-repeat;
}
.hero h1 { color: #fff; font-size: clamp(2.2rem, 5vw, 3.6rem); margin: 0 0 16px; max-width: 900px; letter-spacing: -.02em; }
.hero p { font-size: 1.2rem; max-width: 660px; opacity: .96; }
.hero .cta-row { margin-top: 30px; display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.hero .phone-cta { font-family: var(--font-head); font-size: 1.6rem; font-weight: 700; color: #fff; }

/* --- Trust badges (light & airy pill strip) --- */
.trust-row { background: var(--bg-soft); border-bottom: 1px solid var(--line); }
.trust-row .container { display: flex; flex-wrap: wrap; gap: 12px 14px; justify-content: center; padding: 16px 20px; }
.trust-row .badge {
  display: inline-flex; align-items: center; gap: 9px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-pill);
  padding: 8px 16px 8px 10px; font-weight: 600; color: var(--ink-navy);
  font-size: 0.875rem; font-family: var(--font-head); box-shadow: var(--shadow-sm);
}
.trust-row .badge::before {
  content: "✓"; display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; border-radius: 50%; background: var(--brand-red);
  color: #fff; font-size: .72rem; font-weight: 800; flex: 0 0 auto;
}

/* --- Sections --- */
section.block { padding: 64px 0; }
section.block.alt { background: var(--bg-soft); }
section.block.dark { background: var(--brand-navy); color: #fff; }
section.block.dark h2, section.block.dark h3 { color: #fff; }
.section-title { text-align: center; margin: 0 0 8px; font-size: 2.1rem; }
.section-sub { text-align: center; color: var(--muted); margin: 0 auto 38px; max-width: 660px; }
section.block.dark .section-sub { color: #cdd8e4; }

.grid { display: grid; gap: 22px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; transition: box-shadow .2s, transform .2s, border-color .2s; }
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); border-color: #d4dbe6; }
.card h3 { margin-top: 0; color: var(--ink-navy); }
.card a.more { font-weight: 700; font-family: var(--font-head); color: var(--brand-red); }
.icon-card { text-align: center; }
.icon-card .ico { width: 56px; height: 56px; margin: 0 auto 14px; color: var(--brand-red); }

.prose { max-width: 780px; margin: 0 auto; }
.prose h2 { margin-top: 1.6em; }
.prose img { border-radius: var(--radius); margin: 18px 0; }
.prose ul { padding-left: 1.2em; }

.breadcrumbs { font-size: 0.9rem; color: var(--muted); padding: 16px 0; }
.breadcrumbs a { color: var(--muted); }

/* --- FAQ --- */
.faq { border-bottom: 1px solid var(--line); padding: 18px 0; }
.faq h3 { margin: 0 0 6px; font-size: 1.15rem; color: var(--ink-navy); }

/* --- Testimonials --- */
.testimonial { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; color: var(--ink); box-shadow: var(--shadow-sm); }
.testimonial .stars { color: var(--brand-orange); font-size: 1.1rem; }
.testimonial .who { font-weight: 700; font-family: var(--font-head); color: var(--ink-navy); margin-top: 10px; }

/* --- CTA band --- */
.cta-band { background: linear-gradient(120deg, var(--brand-red) 0%, var(--brand-red-dark) 100%); color: #fff; text-align: center; padding: 56px 0; }
.cta-band h2 { color: #fff; margin: 0 0 10px; }
.cta-band .phone { font-family: var(--font-head); font-size: 2.1rem; font-weight: 800; }
.cta-band a { color: #fff; }

/* --- Footer --- */
.site-footer { background: var(--brand-navy); color: #cdd8e4; padding: 56px 0 24px; }
.site-footer h4 { color: #fff; margin: 0 0 14px; font-family: var(--font-head); }
.site-footer a { color: #cdd8e4; }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 8px; }
.footer-bottom { border-top: 1px solid var(--brand-navy-2); margin-top: 32px; padding-top: 16px; font-size: 0.85rem; text-align: center; }

/* --- Lead form --- */
.lead-form label { display: block; margin-bottom: 14px; font-weight: 600; font-family: var(--font-head); color: var(--ink-navy); font-size: .92rem; }
.lead-form input, .lead-form textarea {
  display: block; width: 100%; margin-top: 6px; padding: 11px 12px; font: inherit;
  border: 1px solid var(--line); border-radius: var(--radius); background: #fff;
}
.lead-form input:focus, .lead-form textarea:focus { outline: 2px solid var(--brand-red); border-color: var(--brand-red); }
.lead-form .err { color: var(--brand-red); font-size: .85rem; }
.lead-form button { margin-top: 6px; }

/* --- Sticky mobile call button --- */
.sticky-call { position: fixed; bottom: 0; left: 0; right: 0; z-index: 60; display: none; background: var(--brand-red); color: #fff; text-align: center; padding: 14px; font-weight: 700; font-family: var(--font-head); box-shadow: 0 -4px 16px rgba(11,33,64,.18); }
.sticky-call a { color: #fff; }

/* --- Blog: contained images (never cropped) + AI byline --- */
.hero--blog { padding: 56px 0; background: var(--brand-navy); }
/* Featured image on a post: whole image visible, letterboxed on a neutral frame. */
.post-figure {
  margin: 0 0 24px; background: var(--bg-soft); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 8px; text-align: center;
}
.post-figure img {
  width: 100%; max-height: 460px; object-fit: contain; border-radius: 6px; margin: 0;
}
/* Index card thumbnail: fixed frame, full image contained (not cropped). */
.card-thumb { display: block; height: 190px; background: var(--bg-soft); border-bottom: 1px solid var(--line); }
.card-thumb img { width: 100%; height: 100%; object-fit: contain; padding: 8px; }
.ai-note {
  margin-top: 26px; padding-top: 16px; border-top: 1px solid var(--line);
  font-size: .9rem; color: var(--muted);
}
.ai-note a { font-weight: 600; }

/* --- Blog: category filter + badges --- */
.cat-filter { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 14px; }
.cat-filter a {
  display: inline-flex; align-items: center; gap: 7px; padding: 8px 16px;
  border: 1px solid var(--line); border-radius: var(--radius-pill);
  font-family: var(--font-head); font-weight: 600; font-size: .88rem;
  color: var(--ink-navy); background: #fff; transition: all .15s ease;
}
.cat-filter a:hover { border-color: var(--ink-navy); text-decoration: none; }
.cat-filter a span { font-size: .78rem; color: var(--muted); }
.cat-filter a.active { background: var(--ink-navy); border-color: var(--ink-navy); color: #fff; }
.cat-filter a.active span { color: #cdd8e4; }
.cat-result { color: var(--muted); font-size: .9rem; margin: 0 0 26px; }
.cat-badge {
  align-self: flex-start; display: inline-block; margin-bottom: 10px;
  padding: 3px 11px; border-radius: var(--radius-pill);
  background: var(--bg-soft); color: var(--brand-red); border: 1px solid var(--line);
  font-family: var(--font-head); font-weight: 700; font-size: .7rem;
  text-transform: uppercase; letter-spacing: .4px;
}
.cat-badge:hover { background: var(--brand-red); color: #fff; text-decoration: none; border-color: var(--brand-red); }

/* --- Accessibility: skip link + visible focus --- */
.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 200;
  background: var(--ink-navy); color: #fff; padding: 10px 16px; border-radius: 0 0 8px 0;
  font-family: var(--font-head); font-weight: 600;
}
.skip-link:focus { left: 0; text-decoration: none; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid var(--brand-red); outline-offset: 2px; border-radius: 3px;
}

/* [hidden] must win over the display rules below (display overrides the attr). */
.cookie-banner[hidden], .chat-panel[hidden] { display: none !important; }

/* --- Cookie notice banner --- */
.cookie-banner {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 90;
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap; justify-content: center;
  background: var(--ink-navy); color: #e8eef7; padding: 16px 20px;
  border-radius: var(--radius); box-shadow: 0 10px 40px rgba(11,33,64,.35); max-width: 1100px; margin: 0 auto;
}
.cookie-text { margin: 0; font-size: .9rem; flex: 1 1 420px; }
.cookie-text a { color: #fff; text-decoration: underline; }
.cookie-accept { flex: 0 0 auto; }

/* --- AI chat widget --- */
.chat-toggle {
  position: fixed; right: 22px; bottom: 22px; z-index: 95;
  width: 60px; height: 60px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--brand-red); color: #fff; box-shadow: 0 8px 22px rgba(216,31,45,.4);
  display: flex; align-items: center; justify-content: center; transition: transform .15s ease;
}
.chat-toggle:hover { transform: translateY(-2px) scale(1.04); }
.chat-panel {
  position: fixed; right: 22px; bottom: 94px; z-index: 95;
  width: 360px; max-width: calc(100vw - 32px); height: 480px; max-height: calc(100vh - 130px);
  display: flex; flex-direction: column; background: #fff;
  border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
  box-shadow: 0 18px 50px rgba(11,33,64,.28);
}
.chat-head {
  background: var(--ink-navy); color: #fff; padding: 14px 16px;
  font-family: var(--font-head); font-weight: 700; display: flex; align-items: center; justify-content: space-between;
}
.chat-close { background: none; border: 0; color: #fff; font-size: 1.5rem; line-height: 1; cursor: pointer; }
.chat-log { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; background: var(--bg-soft); }
.chat-msg { max-width: 82%; padding: 10px 13px; border-radius: 14px; font-size: .92rem; line-height: 1.45; white-space: pre-wrap; }
.chat-user { align-self: flex-end; background: var(--brand-red); color: #fff; border-bottom-right-radius: 4px; }
.chat-assistant { align-self: flex-start; background: #fff; color: var(--ink); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.chat-typing { color: var(--muted); font-style: italic; }
.chat-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); background: #fff; }
.chat-form input { flex: 1; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-pill); font: inherit; }
.chat-form input:focus { outline: 2px solid var(--brand-red); border-color: var(--brand-red); }
.chat-form button {
  flex: 0 0 auto; padding: 10px 18px; border: 0; border-radius: var(--radius-pill);
  background: var(--brand-red); color: #fff; font-family: var(--font-head); font-weight: 700; cursor: pointer;
}
@media (max-width: 760px) {
  .chat-toggle { right: 16px; bottom: 70px; }   /* clear the sticky call bar */
  .chat-panel { right: 12px; left: 12px; bottom: 140px; width: auto; }
}

/* Responsive split layouts (stack on mobile). Replace inline 2-col grids. */
.split { display: grid; grid-template-columns: 2fr 1fr; gap: 32px; align-items: start; }
.split-even { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: start; }

/* --- Tablet --- */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

/* --- Mobile nav + layout (<= 980px) --- */
@media (max-width: 980px) {
  .nav-toggle { display: block; }
  .header-cta { display: none; }
  .site-header .container { flex-wrap: wrap; gap: 12px; }

  .main-nav {
    display: none; flex-direction: column; align-items: stretch; gap: 0;
    position: absolute; top: 100%; left: 0; right: 0; background: #fff;
    border-top: 1px solid var(--line); box-shadow: var(--shadow-md);
    padding: 6px 0; max-height: 80vh; overflow-y: auto;
  }
  body.nav-open .main-nav { display: flex; }
  .main-nav > .nav-item { width: 100%; border-bottom: 1px solid var(--line); }
  .main-nav > .nav-item > a { justify-content: space-between; padding: 14px 20px; font-size: 1rem; }
  .main-nav > .nav-item > a::after { display: none; }
  .main-nav .caret { transition: transform .2s; }
  .main-nav > .nav-item.open .caret { transform: rotate(180deg); }
  .main-nav .submenu {
    position: static; display: none; box-shadow: none; border: 0; max-height: none;
    border-radius: 0; padding: 0 0 8px 14px; min-width: 0;
  }
  .main-nav .nav-item.open .submenu { display: block; }
  .main-nav .submenu a { padding: 11px 16px; }
  .nav-cta-mobile { display: block; margin: 12px 20px; text-align: center; }
}

/* --- Phone (<= 760px) --- */
@media (max-width: 760px) {
  .grid-3, .grid-2, .footer-grid, .split, .split-even { grid-template-columns: 1fr; }
  .sticky-call { display: block; }
  body { padding-bottom: 56px; }
  .hero { padding: 56px 0; }
  .hero h1 { font-size: clamp(1.8rem, 7vw, 2.4rem); }
  .hero p { font-size: 1.05rem; }
  section.block { padding: 40px 0; }
  .section-title { font-size: 1.6rem; }
  .topbar .container { justify-content: center; gap: 8px; font-size: .82rem; }
  .trust-row .container { gap: 10px 12px; }
  .trust-row .badge { font-size: .8rem; padding: 7px 13px 7px 9px; }
  .cta-band .phone { font-size: 1.6rem; }
  .container { padding: 0 16px; }
  /* tighten the detail sidebar when stacked */
  .split aside { width: 100%; }
}

/* --- Small phone (<= 480px) --- */
@media (max-width: 480px) {
  .grid-4 { grid-template-columns: 1fr; }
  .logo img { height: 44px; }
  .btn { padding: 12px 18px; font-size: .85rem; }
}
