/* ═══════════════════════════════════════════════
   RLM Solutions — Shared Styles
   Used by: index.html + all solution pages
═══════════════════════════════════════════════ */

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

:root {
  --dark:     #0b1a2e;
  --dark2:    #0f2240;
  --dark3:    #162c52;
  --blue:     #1a5cce;
  --blue-lt:  #2e74e8;
  --blue-glow:#4090ff;
  --orange:   #e06c3a;
  --orange-h: #c75a28;
  --white:    #ffffff;
  --off:      #e8eef5;
  --muted:    rgba(255,255,255,.62);
  --border:   rgba(255,255,255,.12);
  --border2:  rgba(255,255,255,.07);
}

html { scroll-behavior: smooth; }
body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--dark);
  color: var(--white);
  line-height: 1.6;
}

/* ── TOPBAR ── */
.topbar {
  background: var(--dark2);
  border-bottom: 1px solid var(--border2);
  padding: 7px 28px;
  display: flex; align-items: center; justify-content: flex-end; gap: 24px;
}
.topbar a { color: var(--muted); text-decoration: none; font-size: 13px; transition: color .2s; }
.topbar a:hover { color: white; }
.topbar-sep { color: var(--border); }

/* ── NAV ── */
header {
  position: sticky; top: 0; z-index: 200;
  background: var(--dark);
  border-bottom: 1px solid var(--border);
}
nav {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center;
  padding: 0 28px; height: 68px; gap: 3px;
}
.nav-logo {
  display: flex; align-items: center;
  text-decoration: none; margin-right: 24px; flex-shrink: 0;
}
.nav-logo svg { height: 44px; width: auto; }
.nav-logo img { height: 44px; width: auto; }
.nav-logo-light { display: none; }
.nav-logo-dark { display: block; }

nav ul { list-style: none; display: flex; align-items: stretch; gap: 3px; margin-left: auto; }
nav ul li { display: flex; align-items: stretch; }
nav ul li a {
  display: flex; align-items: center;
  text-decoration: none; color: rgba(255,255,255,.75);
  padding: 0 17px; font-size: 16px; font-weight: 600;
  border-bottom: 3px solid transparent;
  transition: color .2s, border-color .2s; white-space: nowrap;
}
nav ul li a:hover,
nav ul li.active a { color: white; border-bottom-color: var(--blue-glow); }
.nav-cta a {
  background: var(--orange) !important; color: white !important;
  border-bottom-color: transparent !important;
  margin: 12px 0 12px 8px; border-radius: 6px;
  padding: 0 20px !important;
}
.nav-cta a:hover { background: var(--orange-h) !important; }

/* ── SECTION HEADER BAR ── */
.sec-hdr { background: var(--dark2); border-top: 1px solid var(--border2); border-bottom: 1px solid var(--border2); padding: 18px 28px; }
.sec-hdr-inner { max-width: 1200px; margin: 0 auto; display: flex; align-items: center; gap: 14px; }
.sec-hdr-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--blue-glow); flex-shrink: 0; }
.sec-hdr h2 { font-size: 20px; font-weight: 700; color: white; }

/* ── FOOTER ── */
footer { background: #07101d; border-top: 1px solid var(--border); padding: 52px 28px 28px; }
.footer-grid {
  max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px; padding-bottom: 36px; border-bottom: 1px solid var(--border2);
}
.footer-brand p { font-size: 13px; color: rgba(255,255,255,.45); line-height: 1.7; max-width: 210px; margin-top: 10px; }
.footer-col h4 { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .8px; color: rgba(255,255,255,.35); margin-bottom: 14px; }
.footer-col a { display: block; text-decoration: none; color: rgba(255,255,255,.55); font-size: 13.5px; margin-bottom: 8px; transition: color .15s; }
.footer-col a:hover { color: white; }
.footer-bottom { max-width: 1200px; margin: 20px auto 0; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; font-size: 12.5px; color: rgba(255,255,255,.35); }

/* ── NEWSLETTER BAND ── */
.nl-band { background: var(--dark2); border-top: 1px solid var(--border); padding: 64px 28px; text-align: center; position: relative; overflow: hidden; }
.nl-band::before { content: ''; position: absolute; inset: 0; background-image: radial-gradient(circle, rgba(64,144,255,.08) 1.5px, transparent 1.5px); background-size: 32px 32px; }
.nl-inner { max-width: 480px; margin: 0 auto; position: relative; z-index: 1; }
.nl-inner h3 { font-size: 26px; font-weight: 800; color: white; margin-bottom: 8px; }
.nl-inner p { font-size: 15px; color: var(--muted); margin-bottom: 24px; }
.nl-form { display: flex; gap: 10px; }
.nl-form input { flex: 1; padding: 13px 16px; border-radius: 7px; background: rgba(255,255,255,.1); border: 1.5px solid var(--border); color: white; font-size: 14.5px; font-family: inherit; outline: none; }
.nl-form input:focus { border-color: var(--blue-glow); }
.nl-form button { background: var(--blue); color: white; border: none; padding: 13px 24px; border-radius: 7px; font-size: 14px; font-weight: 700; cursor: pointer; font-family: inherit; white-space: nowrap; transition: background .2s; }
.nl-form button:hover { background: var(--blue-lt); }

/* ── TESTIMONIALS BAND ── */
.test-band { background: var(--dark2); border-top: 1px solid var(--border); padding: 64px 28px; }
.test-inner { max-width: 1200px; margin: 0 auto; }
.test-tag { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.2px; color: var(--muted); margin-bottom: 8px; }
.test-head { font-size: 28px; font-weight: 800; color: white; margin-bottom: 36px; }
.tgrid { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; }
.tcard { background: var(--dark3); border-radius: 12px; border: 1px solid var(--border); padding: 28px 24px; transition: border-color .2s, transform .2s; }
.tcard:hover { border-color: rgba(64,144,255,.35); transform: translateY(-3px); }
.tcard-quote { font-size: 14.5px; color: var(--muted); line-height: 1.75; font-style: italic; margin-bottom: 20px; }
.tcard-author { display: flex; align-items: center; gap: 10px; }
.tcard-dot { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg, var(--blue), var(--blue-glow)); display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; color: white; flex-shrink: 0; }
.tcard-author-info strong { display: block; font-size: 13px; color: white; font-weight: 700; }
.tcard-author-info span { font-size: 12px; color: var(--muted); }

/* Sub-page testimonials (test-card pattern) */
.test-band-inner { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.test-card { background: var(--dark3); border-radius: 12px; border: 1px solid var(--border); padding: 32px 28px; transition: border-color .2s, transform .2s; }
.test-card:hover { border-color: rgba(64,144,255,.35); transform: translateY(-3px); }
.test-quote { font-size: 15px; color: var(--muted); line-height: 1.75; font-style: italic; margin: 0 0 18px; }
.test-attr { font-size: 13px; font-weight: 700; color: white; }

/* ── CTA BAND ── */
.cta-band { background: linear-gradient(135deg, var(--dark3), var(--dark2)); border-top: 1px solid var(--border); padding: 80px 28px; text-align: center; }
.cta-inner { max-width: 640px; margin: 0 auto; }
.cta-inner h2 { font-size: 34px; font-weight: 800; color: white; margin-bottom: 14px; line-height: 1.25; }
.cta-inner p { font-size: 16px; color: var(--muted); line-height: 1.75; margin-bottom: 32px; }
.cta-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.btn-orange { display: inline-block; text-decoration: none; background: var(--orange); color: white; padding: 14px 32px; border-radius: 6px; font-size: 15px; font-weight: 700; transition: background .2s, transform .15s; }
.btn-orange:hover { background: var(--orange-h); transform: translateY(-2px); }
.btn-outline-w { display: inline-block; text-decoration: none; border: 2px solid rgba(255,255,255,.3); color: white; padding: 13px 28px; border-radius: 6px; font-size: 15px; font-weight: 600; transition: border-color .2s, background .2s; }
.btn-outline-w:hover { border-color: rgba(255,255,255,.7); background: rgba(255,255,255,.06); }

/* ── HAMBURGER BUTTON ── */
.hamburger {
  display: none; cursor: pointer; background: none; border: none;
  padding: 8px; margin-left: auto; z-index: 301;
}
.hamburger span {
  display: block; width: 24px; height: 2.5px; background: white;
  border-radius: 2px; transition: transform .3s, opacity .3s;
}
.hamburger span + span { margin-top: 6px; }
.hamburger.active span:nth-child(1) { transform: translateY(8.5px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-8.5px) rotate(-45deg); }

/* ── MOBILE NAV OVERLAY ── */
.mobile-nav-overlay {
  display: none; position: fixed; inset: 0; background: rgba(0,0,0,.6);
  z-index: 299; opacity: 0; transition: opacity .3s;
}
.mobile-nav-overlay.active { display: block; opacity: 1; }

/* ── RESPONSIVE ── */
@media (max-width: 780px) {
  .hamburger { display: flex; flex-direction: column; justify-content: center; }

  nav ul {
    position: fixed; top: 0; right: -280px; width: 280px; height: 100vh;
    background: var(--dark2); z-index: 300;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 80px 0 32px; margin: 0;
    box-shadow: -4px 0 20px rgba(0,0,0,.4);
    transition: right .3s ease;
    overflow-y: auto;
  }
  nav ul.open { right: 0; display: flex; }
  nav ul li { display: block; }
  nav ul li a {
    padding: 16px 28px; font-size: 16px; border-bottom: 1px solid var(--border2);
    border-left: 3px solid transparent; white-space: normal;
  }
  nav ul li a:hover,
  nav ul li.active a { border-bottom-color: var(--border2); border-left-color: var(--blue-glow); }
  .nav-cta a {
    margin: 16px 20px 0 !important; padding: 14px 20px !important;
    text-align: center; border-radius: 8px !important;
    border-left-color: transparent !important;
  }

  .footer-grid { grid-template-columns: 1fr 1fr; }
  .tgrid { grid-template-columns: 1fr; }
  .test-band-inner { grid-template-columns: 1fr; }
  .nl-form { flex-direction: column; }

  /* Stats bar: 2 columns on tablet */
  .stats-inner { grid-template-columns: 1fr 1fr !important; }
  .stat-item { padding: 12px 0; }

  /* Hero bar: 2 columns */
  .hero-bar { flex-wrap: wrap; }
  .hero-bar-item { flex: 1 1 45%; min-width: 140px; }

  /* Domain / challenge grids */
  .domain-grid { grid-template-columns: 1fr !important; }
  .challenges-grid { grid-template-columns: 1fr !important; }
  .advisory-inner { grid-template-columns: 1fr !important; gap: 36px !important; }

  /* CTA band */
  .cta-band h2 { font-size: 26px; }
}

@media (max-width: 500px) {
  .footer-grid { grid-template-columns: 1fr; }
  .topbar { display: none; }

  /* Stats bar: single column on small phones */
  .stats-inner { grid-template-columns: 1fr !important; }

  /* Hero adjustments */
  .hero-bar-item { flex: 1 1 100%; border-right: none !important; border-bottom: 1px solid rgba(255,255,255,.1); padding: 14px 20px; }
  .hero-bar-item:last-child { border-bottom: none; }

  .ind-hero { min-height: 380px !important; }
  .ind-hero-inner { padding: 60px 20px 50px !important; }
  .ind-hero h1 { font-size: 28px !important; }
  .ind-hero p { font-size: 15px !important; }
  .sol-hero-actions { flex-direction: column; }
  .sol-hero-actions a { text-align: center; }

  /* Section titles */
  .section-title { font-size: 24px; }
  .cta-band h2 { font-size: 22px; }

  /* Footer */
  .footer-bottom { flex-direction: column; text-align: center; }
}

/* ── Icon images (replacing emojis) ── */
.icon-img {
  display: inline-block;
  width: 28px;
  height: 28px;
  object-fit: contain;
  vertical-align: middle;
  flex-shrink: 0;
}
/* Larger icons in section heading cards */
.sol-card-icon .icon-img,
.sol-card-icon img.icon-img { width: 32px; height: 32px; }
/* Smaller inline icons (contact links, span wrappers) */
.clink .icon-img,
.clink span img.icon-img,
span .icon-img { width: 18px; height: 18px; }
/* Service card icons */
.svc-ico .icon-img { width: 22px; height: 22px; }
/* Vendor / step icons */
.vendor-step-icon .icon-img,
.risk-icon .icon-img,
.domain-icon .icon-img { width: 26px; height: 26px; }

/* ═══════════════════════════════════════════════
   LIGHT MODE — must be LAST to override defaults
═══════════════════════════════════════════════ */
@media (prefers-color-scheme: light) {
  :root {
    --dark:     #ffffff;
    --dark2:    #f4f6f9;
    --dark3:    #e8edf3;
    --blue:     #1a5cce;
    --blue-lt:  #2e74e8;
    --blue-glow:#1a5cce;
    --orange:   #d4612e;
    --orange-h: #b84f1f;
    --white:    #1a1a2e;
    --off:      #f0f2f6;
    --muted:    rgba(26,26,46,.6);
    --border:   rgba(0,0,0,.1);
    --border2:  rgba(0,0,0,.06);
  }

  body { color: #1a1a2e; }

  /* Topbar */
  .topbar { background: #f4f6f9; border-bottom-color: rgba(0,0,0,.06); }
  .topbar a { color: rgba(26,26,46,.6); }
  .topbar a:hover { color: #1a1a2e; }
  .topbar-sep { color: rgba(0,0,0,.15); }

  /* Nav */
  header { background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.08); border-bottom-color: rgba(0,0,0,.06); }
  nav ul li a { color: rgba(26,26,46,.7); }
  nav ul li a:hover, nav ul li.active a { color: #1a1a2e; border-bottom-color: var(--blue-glow); }
  .nav-cta a { color: white !important; }
  .hamburger span { background: #1a1a2e; }

  /* Nav logo: swap to blue version */
  .nav-logo-dark { display: none !important; }
  .nav-logo-light { display: block !important; }

  /* Section headers */
  .sec-hdr { background: #f4f6f9; border-color: rgba(0,0,0,.06); }
  .sec-hdr h2 { color: #1a1a2e; }

  /* Footer — keep dark in light mode for contrast */
  footer { background: #0b1a2e; }
  footer, footer * { color: inherit; }
  .footer-brand p { color: rgba(255,255,255,.45); }
  .footer-col h4 { color: rgba(255,255,255,.35); }
  .footer-col a { color: rgba(255,255,255,.55); }
  .footer-col a:hover { color: white; }
  .footer-bottom { color: rgba(255,255,255,.35); }
  footer .nav-logo img,
  .footer-brand img { filter: brightness(0) invert(1); }

  /* Cards & content blocks */
  .tcard { background: #fff; border-color: rgba(0,0,0,.1); }
  .tcard:hover { border-color: rgba(26,92,206,.4); }
  .tcard-quote { color: rgba(26,26,46,.6); }
  .tcard-author-info strong { color: #1a1a2e; }
  .tcard-author-info span { color: rgba(26,26,46,.5); }
  .test-card { background: #fff; border-color: rgba(0,0,0,.1); }
  .test-card:hover { border-color: rgba(26,92,206,.4); }
  .test-quote { color: rgba(26,26,46,.6); }
  .test-attr { color: #1a1a2e; }

  /* CTA band — keep dark for visual punch */
  .cta-band { background: linear-gradient(135deg, #0f2240, #1a3f7a); }
  .cta-band, .cta-band * { color: inherit; }
  .cta-inner h2 { color: white; }
  .cta-inner p { color: rgba(255,255,255,.7); }

  /* Newsletter */
  .nl-band { background: #f4f6f9; }
  .nl-inner h3 { color: #1a1a2e; }
  .nl-inner p { color: rgba(26,26,46,.6); }
  .nl-form input { background: rgba(0,0,0,.05); border-color: rgba(0,0,0,.15); color: #1a1a2e; }
  .nl-form input::placeholder { color: rgba(26,26,46,.35); }
  .nl-form button { color: white; }

  /* Testimonials */
  .test-head { color: #1a1a2e; }
  .test-tag { color: rgba(26,26,46,.5); }
  .tcard-dot { color: white; }

  /* Buttons */
  .btn-orange { color: white; }
  .btn-outline-w { border-color: rgba(0,0,0,.2); color: #1a1a2e; }
  .btn-outline-w:hover { border-color: rgba(0,0,0,.5); background: rgba(0,0,0,.04); }

  /* Expertise / domain tags */
  .exp-tag { background: rgba(26,92,206,.08); border-color: rgba(26,92,206,.2); color: #1a5cce; }
  a.exp-tag:hover { background: rgba(26,92,206,.15); border-color: rgba(26,92,206,.4); color: #1a5cce; }

  /* Icons — recolor white PNGs to dark blue for light backgrounds */
  .icon-img { filter: brightness(0) saturate(100%) invert(18%) sepia(90%) saturate(2000%) hue-rotate(215deg) brightness(90%); }
  /* Keep icons white inside gradient/dark containers */
  .svc-ico .icon-img,
  .cta-band .icon-img,
  footer .icon-img { filter: none; }
  /* Icon containers — swap to light blue tint */
  .domain-icon { background: rgba(26,92,206,.08); border-color: rgba(26,92,206,.2); }
  .check-icon { background: rgba(26,92,206,.08); border-color: #1a5cce; }
  .check-icon svg { stroke: #1a5cce; }
  .ci { background: rgba(26,92,206,.08); border-color: #1a5cce; }
  .ci svg { stroke: #1a5cce; }

  /* Form inputs */
  input, textarea, select { background: rgba(0,0,0,.04); border-color: rgba(0,0,0,.15); color: #1a1a2e; }
  input::placeholder, textarea::placeholder { color: rgba(26,26,46,.35); }
  input:focus, textarea:focus, select:focus { border-color: var(--blue-glow); box-shadow: 0 0 0 3px rgba(26,92,206,.12); background: rgba(0,0,0,.02); }

  /* Section backgrounds — force light */
  .criteria-section, .expertise-section { background: #fff; }

  /* Mobile nav in light mode */
  @media (max-width: 780px) {
    nav ul { background: #fff; box-shadow: -4px 0 24px rgba(0,0,0,.15); }
    nav ul li a { color: rgba(26,26,46,.7); border-bottom-color: rgba(0,0,0,.06); }
    nav ul li a:hover { color: #1a1a2e; }
  }
}

/* ══════════════════════════════════════════════════════════════
   SOL-HERO BACKGROUND IMAGE
   ══════════════════════════════════════════════════════════════ */
.sol-hero-bg {
  position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  width: 100%; height: 100%; object-fit: cover; object-position: center 30%;
}
.sol-hero-overlay {
  position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(100deg, rgba(11,26,46,.95) 35%, rgba(11,26,46,.75) 60%, rgba(11,26,46,.25) 100%);
  z-index: 1;
}

@media (prefers-color-scheme: light) {
  .sol-hero-overlay {
    background: linear-gradient(100deg, rgba(11,26,46,.92) 35%, rgba(11,26,46,.7) 60%, rgba(11,26,46,.15) 100%);
  }
}

/* ══════════════════════════════════════════════════════════════
   CONTACT MODAL
   ══════════════════════════════════════════════════════════════ */
.contact-modal-overlay {
  display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 9999;
  background: rgba(0,0,0,.6); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  align-items: center; justify-content: center;
}
.contact-modal-overlay.active { display: flex; }
.contact-modal {
  background: #0f2240; border: 1px solid rgba(255,255,255,.1);
  border-radius: 16px; padding: 40px 36px; width: 100%; max-width: 520px;
  max-height: 90vh; overflow-y: auto; position: relative;
  box-shadow: 0 24px 64px rgba(0,0,0,.4);
}
.contact-modal-close {
  position: absolute; top: 16px; right: 16px; background: none; border: none;
  color: rgba(255,255,255,.5); font-size: 24px; cursor: pointer; line-height: 1;
  transition: color .15s;
}
.contact-modal-close:hover { color: white; }
.contact-modal h2 { font-size: 24px; font-weight: 800; color: white; margin-bottom: 6px; }
.contact-modal .modal-sub { font-size: 14px; color: rgba(255,255,255,.55); margin-bottom: 28px; }
.contact-modal label { display: block; font-size: 12.5px; font-weight: 600; color: rgba(255,255,255,.7); margin-bottom: 5px; }
.contact-modal input, .contact-modal textarea {
  width: 100%; padding: 11px 14px; border: 1.5px solid rgba(255,255,255,.15);
  border-radius: 7px; font-size: 14px; color: white;
  background: rgba(255,255,255,.07); font-family: inherit; outline: none;
  transition: border-color .2s, box-shadow .2s; box-sizing: border-box;
}
.contact-modal input::placeholder, .contact-modal textarea::placeholder { color: rgba(255,255,255,.3); }
.contact-modal input:focus, .contact-modal textarea:focus {
  border-color: var(--blue-glow); box-shadow: 0 0 0 3px rgba(64,144,255,.15);
  background: rgba(255,255,255,.1);
}
.contact-modal textarea { resize: vertical; min-height: 80px; }
.contact-modal .modal-field { margin-bottom: 14px; }
.contact-modal .modal-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.contact-modal .modal-submit {
  width: 100%; padding: 13px; background: var(--orange); color: white;
  border: none; border-radius: 7px; font-size: 15px; font-weight: 700;
  cursor: pointer; font-family: inherit; transition: background .2s, transform .15s;
  margin-top: 8px;
}
.contact-modal .modal-submit:hover { background: var(--orange-h); transform: translateY(-1px); }
.contact-modal .modal-submit:disabled { opacity: .6; cursor: not-allowed; transform: none; }
.contact-modal .captcha-row { margin: 16px 0 8px; }

@media (max-width: 600px) {
  .contact-modal { padding: 28px 20px; margin: 16px; }
  .contact-modal .modal-row { grid-template-columns: 1fr; }
}

@media (prefers-color-scheme: light) {
  .contact-modal { background: #fff; border-color: rgba(0,0,0,.1); box-shadow: 0 24px 64px rgba(0,0,0,.15); }
  .contact-modal h2 { color: #1a1a2e; }
  .contact-modal .modal-sub { color: rgba(26,26,46,.55); }
  .contact-modal label { color: rgba(26,26,46,.7); }
  .contact-modal input, .contact-modal textarea {
    background: rgba(0,0,0,.04); border-color: rgba(0,0,0,.15); color: #1a1a2e;
  }
  .contact-modal input::placeholder, .contact-modal textarea::placeholder { color: rgba(26,26,46,.35); }
  .contact-modal input:focus, .contact-modal textarea:focus {
    border-color: var(--blue-glow); box-shadow: 0 0 0 3px rgba(26,92,206,.12); background: rgba(0,0,0,.02);
  }
  .contact-modal-close { color: rgba(26,26,46,.4); }
  .contact-modal-close:hover { color: #1a1a2e; }
}
