/* Rick Crouch & Associates — static site.
   Palette kept uniform with the CaseSafe program and promo site:
   navy #0d1b3e / #16305e, blue #1d4ed8, WhatsApp green #25D366. */

:root {
  --navy: #0d1b3e;
  --navy-2: #16305e;
  --blue: #1d4ed8;
  --blue-dark: #1a44b8;
  --ink: #212529;
  --grey: #6c757d;
  --bg-soft: #f1f3f5;
  --wa: #25D366;
  --radius: 12px;
  --shadow: 0 2px 10px rgba(13, 27, 62, .08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  line-height: 1.65;
  background: #fff;
}
img { max-width: 100%; height: auto; }
a { color: var(--blue); }
a:hover { color: var(--blue-dark); }

.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

h1, h2, h3, h4 { line-height: 1.25; color: var(--navy); }
h1 { font-size: 2.1rem; }
h2 { font-size: 1.55rem; }
h3 { font-size: 1.15rem; }

/* ---------- header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: #fff; border-bottom: 1px solid #e4e8ee; box-shadow: var(--shadow);
}
/* The full nav row (brand + six items + login + phone) needs ~1150px, so the
   header stretches to the viewport edges (fluid, unlike the boxed body) and
   collapses to the hamburger below 1280px — same breakpoint as the
   tap-to-expand submenu JS in base.html. */
.site-header .header-inner {
  display: flex; align-items: center; gap: 14px; min-height: 68px;
  max-width: none;
}
.brand { display: flex; flex-direction: column; text-decoration: none; margin-right: auto; }
.brand-name { font-weight: 800; font-size: 1.15rem; color: var(--navy); }
.brand-name span { color: var(--blue); }
.brand-tag { font-size: .72rem; color: var(--grey); letter-spacing: .02em; }
.header-cta {
  background: var(--navy); color: #fff; font-weight: 700; text-decoration: none;
  padding: 9px 16px; border-radius: 999px; font-size: .92rem; white-space: nowrap;
}
.header-cta:hover { background: var(--navy-2); color: #fff; }
.header-login {
  border: 2px solid var(--navy); color: var(--navy); font-weight: 700;
  text-decoration: none; padding: 7px 14px; border-radius: 999px;
  font-size: .92rem; white-space: nowrap;
}
.header-login:hover { background: var(--navy); color: #fff; }

.main-nav .mobile-login-item { display: none; }
.main-nav > ul { list-style: none; margin: 0; padding: 0; display: flex; }
.main-nav a {
  display: block; padding: 10px; text-decoration: none; color: var(--navy);
  font-weight: 600; font-size: .95rem; white-space: nowrap;
}
.main-nav a:hover { color: var(--blue); }
.main-nav .nav-item { position: relative; }
.has-children > a::after {
  content: " \25BE"; font-size: .8em; color: var(--grey);
}
.main-nav .dropdown, .main-nav .sub-dropdown {
  display: none; position: absolute; left: 0; top: 100%;
  background: #fff; border: 1px solid #e4e8ee; border-radius: 10px;
  box-shadow: var(--shadow); min-width: 240px; padding: 6px; z-index: 200;
}
/* Dropdowns of the right-most menu items align to their right edge so they
   never run off the viewport (Areas We Serve was overflowing on the right). */
.main-nav > ul > li:nth-last-child(-n+3) > .dropdown { left: auto; right: 0; }
.main-nav .dropdown li { position: relative; }
.main-nav .dropdown a { padding: 8px 12px; border-radius: 6px; font-weight: 500; white-space: normal; }
.main-nav .dropdown a:hover { background: var(--bg-soft); }
.main-nav .has-children:hover > .dropdown,
.main-nav .has-children.expanded > .dropdown { display: block; }
.main-nav .dropdown .has-children:hover > .sub-dropdown,
.main-nav .dropdown .has-children.expanded > .sub-dropdown { display: block; }
/* Flyouts may be taller than short viewports, so they scroll internally.
   No menu nests deeper than this, so the overflow cannot clip a child menu
   (overflow on .dropdown itself would hide every .sub-dropdown flyout). */
.main-nav .sub-dropdown { left: 100%; top: -6px; max-height: 75vh; overflow-y: auto; }
.main-nav > ul > li:nth-last-child(-n+3) > .dropdown .sub-dropdown { left: auto; right: 100%; }

.quote-top { margin: 2px 0 20px; }

.nav-toggle {
  display: none; background: none; border: 1px solid #d5dbe4; border-radius: 8px;
  font-size: 1.3rem; padding: 4px 12px; cursor: pointer; color: var(--navy);
}

/* ---------- hero ---------- */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 60%, #1d3a75 100%);
  color: #fff; padding: 56px 0;
}
.hero h1 { color: #fff; font-size: 2.5rem; margin: 0 0 8px; }
.hero-tagline { font-size: 1.25rem; font-weight: 600; color: #bcd0ff; margin: 0 0 18px; }
.hero-lead { font-size: 1.05rem; max-width: 560px; color: #e7ecf7; }
.hero-grid { display: flex; align-items: center; gap: 40px; }
.hero-text { flex: 1.2; }
.hero-image { flex: 1; }
.hero-image img { border-radius: var(--radius); box-shadow: 0 10px 30px rgba(0,0,0,.35); }
.hero-actions { margin-top: 24px; display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- buttons ---------- */
.btn {
  display: inline-block; padding: 11px 22px; border-radius: 999px;
  text-decoration: none; font-weight: 700; font-size: .98rem; border: 2px solid transparent;
  cursor: pointer;
}
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-dark); color: #fff; }
.btn-whatsapp { background: var(--wa); color: #fff; }
.btn-whatsapp:hover { background: #1eb857; color: #fff; }
.btn-light { background: #fff; color: var(--navy); }
.btn-light:hover { background: #e9eefb; color: var(--navy); }
.btn-outline { border-color: var(--navy); color: var(--navy); }
.btn-outline:hover { background: var(--navy); color: #fff; }

/* ---------- sections ---------- */
.section { padding: 44px 0; }
.section-title { text-align: center; margin: 0 0 26px; font-size: 1.8rem; }
.band { background: var(--bg-soft); padding: 40px 0; }
.band-navy { background: linear-gradient(135deg, var(--navy), var(--navy-2)); color: #e7ecf7; }
.band-navy h2 { color: #fff; }
.big-quote { max-width: 720px; margin: 0 auto; text-align: center; }
.big-quote p { font-size: 1.35rem; font-style: italic; color: var(--navy); margin: 0 0 12px; }
.big-quote cite { color: var(--grey); font-style: normal; }

/* ---------- cards ---------- */
.card-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}
.card {
  background: #fff; border: 1px solid #e4e8ee; border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow); text-decoration: none; color: inherit;
  display: flex; flex-direction: column; transition: transform .12s ease, box-shadow .12s ease;
}
a.card:hover { transform: translateY(-3px); box-shadow: 0 6px 18px rgba(13,27,62,.14); color: inherit; }
.card h3 { margin: 0 0 8px; color: var(--navy); }
.card p { margin: 0 0 14px; color: #444; }
.card-more { margin-top: auto; font-weight: 700; color: var(--blue); font-size: .92rem; }

.service-card { border-top: 4px solid var(--blue); }

/* Seven service hubs wrap 4+3 in the boxed section instead of 3+3+1. */
.services-grid { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }

.experience { display: grid; grid-template-columns: 1fr 1fr 1.2fr; gap: 28px; align-items: center; }
.experience-img img { border-radius: var(--radius); box-shadow: 0 8px 24px rgba(0,0,0,.35); }
.experience-video iframe {
  width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0;
  border-radius: var(--radius); box-shadow: 0 8px 24px rgba(0,0,0,.35); display: block;
}
.experience-video-caption { font-size: .85rem; color: #9fb2d8; margin: 8px 0 0; text-align: center; }
.experience-text { }

/* testimonials */
.testimonial { text-align: center; align-items: center; }
.testimonial-img {
  width: 96px; height: 96px; border-radius: 50%; object-fit: cover;
  margin: 0 auto 12px; border: 3px solid var(--bg-soft);
}
.testimonial-quote { font-style: italic; color: #444; }
.testimonial-name { font-weight: 800; color: var(--navy); margin: 8px 0 0; }
.testimonial-role { color: var(--grey); font-size: .88rem; margin: 0; }

/* info columns */
.info-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 30px; }
.info-cols .section-title { text-align: left; font-size: 1.3rem; }
.tick-list { list-style: none; padding: 0; margin: 0; }
.tick-list li { padding: 5px 0 5px 28px; position: relative; }
.tick-list li::before {
  content: "\2713"; position: absolute; left: 4px; color: var(--blue); font-weight: 800;
}

/* ---------- inner pages ---------- */
.page-hero {
  background: linear-gradient(135deg, var(--navy), var(--navy-2));
  color: #fff; padding: 40px 0;
}
.page-hero h1 { color: #fff; margin: 0 0 6px; }
.page-intro { color: #cdd9f2; max-width: 720px; font-size: 1.05rem; margin: 0; }
.content-page { padding: 36px 20px 56px; }
.content-page > * { max-width: 860px; }
.content-page img { border-radius: 8px; margin: 14px 0; }
.content-page iframe {
  width: 100%; max-width: 720px; aspect-ratio: 16 / 9; height: auto;
  border: 0; display: block; margin: 12px 0 28px;
}
.content-page h2 { margin-top: 34px; }
.breadcrumb { font-size: .88rem; color: var(--grey); margin-bottom: 18px; }
.breadcrumb a { text-decoration: none; }
.breadcrumb span[aria-hidden] { margin: 0 6px; }

.cta-strip {
  margin-top: 44px; max-width: none;
  background: var(--bg-soft); border-radius: var(--radius); padding: 26px 30px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
}
.cta-strip h3 { margin: 0 0 4px; }
.cta-strip p { margin: 0; color: #444; }
.cta-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- contact ---------- */
.contact-layout {
  display: grid; grid-template-columns: 1fr 1.4fr; gap: 36px; margin-top: 12px;
  max-width: none;
}
.contact-details { background: var(--bg-soft); border-radius: var(--radius); padding: 26px; }
.contact-details h2 { margin-top: 0; }
.psiara { color: var(--grey); font-size: .88rem; }
.contact-form {
  background: #fff; border: 1px solid #e4e8ee; border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow);
}
.contact-form h2 { margin-top: 0; }
.form-row { margin-bottom: 14px; }
.form-row label { display: block; font-weight: 600; margin-bottom: 4px; font-size: .93rem; }
.form-row input, .form-row textarea {
  width: 100%; padding: 10px 12px; border: 1px solid #c9d2e0; border-radius: 8px;
  font: inherit; background: #fbfcfe;
}
.form-row input:focus, .form-row textarea:focus {
  outline: 2px solid var(--blue); outline-offset: -1px; background: #fff;
}
.req { color: #c0392b; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-note { color: var(--grey); font-size: .85rem; margin-top: 12px; }
.form-status { display: none; padding: 10px 14px; border-radius: 8px; margin-bottom: 14px; font-weight: 600; }
.form-status.success { display: block; background: #e6f7ec; color: #1d7a41; border: 1px solid #b5e3c5; }
.form-status.error { display: block; background: #fdecea; color: #a93226; border: 1px solid #f5b7b1; }

/* ---------- footer ---------- */
.site-footer { background: var(--navy); color: #c3cee6; margin-top: 40px; }
.footer-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px; padding: 44px 20px;
}
.site-footer h4 { color: #fff; margin: 0 0 12px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { padding: 3px 0; }
.site-footer a { color: #c3cee6; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-motto { font-style: italic; color: #9fb2d8; }
.footer-social { border-top: 1px solid rgba(255,255,255,.12); padding: 16px 0 4px; }
.footer-social .container { display: flex; gap: 10px; }
.footer-social a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,.1);
  color: #fff; font-size: 1.1rem; text-decoration: none;
}
.footer-social a:hover { background: var(--blue); color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding: 14px 0; font-size: .85rem; }
.footer-bottom p { margin: 0; }

/* ---------- responsive ---------- */
/* The full nav row (brand + six items + login + phone) needs ~1000px, so the
   header collapses to the hamburger below 1100px — same breakpoint as the
   tap-to-expand submenu JS in base.html. */
@media (max-width: 1280px) {
  .header-inner { flex-wrap: wrap; }
  .nav-toggle { display: block; }
  .header-cta { display: none; }
  /* Client Login moves into the opened menu — it cannot fit the top row once
     the nav is collapsed. */
  .header-login { display: none; }
  .main-nav { display: none; width: 100%; }
  .main-nav.open { display: block; }
  .main-nav > ul { flex-direction: column; }
  .main-nav .mobile-login-item { display: block; border-bottom: 1px solid #e4e8ee; }
  .main-nav .mobile-login-item a { font-weight: 800; color: var(--blue); }
  .main-nav .dropdown, .main-nav .sub-dropdown {
    position: static; display: none; border: none; box-shadow: none;
    min-width: 0; padding-left: 16px; max-height: none; overflow: visible;
  }
  .main-nav .has-children.expanded > .dropdown { display: block; }
}

@media (max-width: 900px) {
  .hero-grid, .experience, .contact-layout { flex-direction: column; grid-template-columns: 1fr; display: grid; }
  .hero h1 { font-size: 1.9rem; }
}
