/* =========================================================
   Global Research Hub - custom.css
   Mobile-first, colourful stylesheet. Everything is scoped
   under .grh so it will not fight your WordPress theme.
   ========================================================= */

:root {
  --grh-indigo: #4f46e5;
  --grh-indigo-dark: #3730a3;
  --grh-teal: #0d9488;
  --grh-amber: #f59e0b;
  --grh-pink: #ec4899;
  --grh-sky: #0ea5e9;
  --grh-green: #22c55e;
  --grh-wa: #25d366;
  --grh-wa-dark: #128c7e;
  --grh-ink: #1e1b4b;
  --grh-text: #334155;
  --grh-muted: #64748b;
  --grh-bg: #f5f7ff;
  --grh-card: #ffffff;
  --grh-line: #e2e8f0;
  --grh-radius: 18px;
  --grh-shadow: 0 8px 24px rgba(79, 70, 229, 0.12);
}

.grh,
.grh *,
.grh *::before,
.grh *::after { box-sizing: border-box; }

.grh {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: var(--grh-text);
  background: var(--grh-bg);
  padding-bottom: 76px; /* room for sticky mobile bar */
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

.grh h1, .grh h2, .grh h3, .grh h4 {
  color: var(--grh-ink);
  line-height: 1.25;
  margin: 0 0 12px;
  font-weight: 800;
}
.grh h1 { font-size: 1.9rem; }
.grh h2 { font-size: 1.5rem; }
.grh h3 { font-size: 1.15rem; }
.grh p { margin: 0 0 14px; }
.grh a { color: var(--grh-indigo); }
.grh img { max-width: 100%; height: auto; display: block; }
.grh ul, .grh ol { margin: 0 0 14px; padding-left: 1.2rem; }
.grh li { margin-bottom: 6px; }

/* ---------- Layout ---------- */
.grh-section { padding: 36px 16px; }
.grh-wrap { max-width: 1100px; margin: 0 auto; }
.grh-center { text-align: center; }
.grh-lead { font-size: 1.08rem; color: var(--grh-text); }
.grh-eyebrow {
  display: inline-block;
  background: rgba(245, 158, 11, 0.18);
  color: #b45309;
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 12px;
}
.grh-section-title { text-align: center; margin-bottom: 8px; }
.grh-section-sub { text-align: center; color: var(--grh-muted); margin-bottom: 26px; }

/* ---------- Hero ---------- */
.grh-hero {
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 45%, #ec4899 100%);
  color: #fff;
  padding: 36px 16px 44px;
  border-radius: 0 0 28px 28px;
}
.grh-hero h1, .grh-hero p { color: #fff; }
.grh-hero .grh-eyebrow { background: rgba(255,255,255,0.2); color: #fff; }
.grh-hero__inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  gap: 26px;
  align-items: center;
}
.grh-hero__img {
  width: 100%;
  max-width: 320px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  margin: 0 auto;
  border-radius: 26px;
  border: 4px solid rgba(255,255,255,0.55);
  box-shadow: 0 14px 34px rgba(0,0,0,0.28);
}
.grh-hero--teal { background: linear-gradient(135deg, #0d9488 0%, #0ea5e9 60%, #4f46e5 100%); }
.grh-hero--amber { background: linear-gradient(135deg, #f59e0b 0%, #ef4444 60%, #ec4899 100%); }
.grh-hero--green { background: linear-gradient(135deg, #16a34a 0%, #0d9488 60%, #0ea5e9 100%); }
.grh-hero--plum { background: linear-gradient(135deg, #7c3aed 0%, #db2777 100%); }

/* ---------- Buttons ---------- */
.grh-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.grh-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none !important;
  border: 2px solid transparent;
  cursor: pointer;
  text-align: center;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  font-family: inherit;
}
.grh-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(0,0,0,0.18); }
.grh-btn--primary { background: var(--grh-amber); color: #3b2300 !important; }
.grh-btn--indigo { background: var(--grh-indigo); color: #fff !important; }
.grh-btn--wa { background: var(--grh-wa); color: #053b1d !important; }
.grh-btn--mail { background: #fff; color: var(--grh-indigo) !important; border-color: var(--grh-indigo); }
.grh-btn--ghost { background: transparent; color: #fff !important; border-color: rgba(255,255,255,0.8); }

/* ---------- Chips (service sub-nav) ---------- */
.grh-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 14px 16px;
  background: #fff;
  border-bottom: 1px solid var(--grh-line);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.grh-chips::-webkit-scrollbar { display: none; }
.grh-chips a {
  flex: 0 0 auto;
  padding: 8px 14px;
  border-radius: 999px;
  background: #eef2ff;
  color: var(--grh-indigo-dark);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  white-space: nowrap;
}
.grh-chips a.is-active { background: var(--grh-indigo); color: #fff; }

/* ---------- Cards & grids ---------- */
.grh-grid { display: grid; gap: 18px; grid-template-columns: 1fr; }
.grh-card {
  --c: var(--grh-indigo);
  background: var(--grh-card);
  border-radius: var(--grh-radius);
  box-shadow: var(--grh-shadow);
  border-top: 6px solid var(--c);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.grh-card__body { padding: 18px 18px 20px; display: flex; flex-direction: column; flex: 1; }
.grh-card__body p { flex: 1; }
.grh-card img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.grh-card--pad { padding: 20px 18px; }
.grh-grid > .grh-card:nth-child(6n+1) { --c: var(--grh-indigo); }
.grh-grid > .grh-card:nth-child(6n+2) { --c: var(--grh-teal); }
.grh-grid > .grh-card:nth-child(6n+3) { --c: var(--grh-amber); }
.grh-grid > .grh-card:nth-child(6n+4) { --c: var(--grh-pink); }
.grh-grid > .grh-card:nth-child(6n+5) { --c: var(--grh-sky); }
.grh-grid > .grh-card:nth-child(6n+6) { --c: var(--grh-green); }
.grh-link { font-weight: 700; text-decoration: none; color: var(--c, var(--grh-indigo)) !important; }
.grh-icon {
  width: 46px; height: 46px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; margin-bottom: 10px;
  background: color-mix(in srgb, var(--c) 15%, white);
}

/* ---------- Two-column feature block ---------- */
.grh-split { display: grid; gap: 22px; align-items: center; }
.grh-split img { border-radius: 22px; box-shadow: var(--grh-shadow); max-width: 360px; margin: 0 auto; width: 100%; aspect-ratio: 1/1; object-fit: cover; }
.grh-panel {
  background: #fff;
  border-radius: var(--grh-radius);
  padding: 22px 18px;
  box-shadow: var(--grh-shadow);
}

/* ---------- Check list ---------- */
.grh-checks { list-style: none; padding: 0; }
.grh-checks li { position: relative; padding-left: 30px; margin-bottom: 10px; }
.grh-checks li::before {
  content: "\2713";
  position: absolute; left: 0; top: 1px;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--grh-teal); color: #fff;
  font-size: 0.8rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
.grh-checks--no li::before { content: "\2715"; background: var(--grh-pink); }

/* ---------- Steps ---------- */
.grh-steps { counter-reset: step; list-style: none; padding: 0; display: grid; gap: 14px; }
.grh-steps li {
  counter-increment: step;
  background: #fff;
  border-radius: var(--grh-radius);
  padding: 16px 16px 16px 64px;
  position: relative;
  box-shadow: var(--grh-shadow);
  margin: 0;
}
.grh-steps li::before {
  content: counter(step);
  position: absolute; left: 14px; top: 14px;
  width: 38px; height: 38px; border-radius: 50%;
  background: linear-gradient(135deg, var(--grh-indigo), var(--grh-pink));
  color: #fff; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
.grh-steps strong { display: block; color: var(--grh-ink); }

/* ---------- FAQ (details/summary) ---------- */
.grh-faq details {
  background: #fff;
  border-radius: 14px;
  box-shadow: var(--grh-shadow);
  margin-bottom: 12px;
  border-left: 6px solid var(--grh-teal);
}
.grh-faq details:nth-child(even) { border-left-color: var(--grh-pink); }
.grh-faq summary {
  cursor: pointer;
  list-style: none;
  padding: 16px 44px 16px 16px;
  font-weight: 700;
  color: var(--grh-ink);
  position: relative;
  min-height: 48px;
}
.grh-faq summary::-webkit-details-marker { display: none; }
.grh-faq summary::after {
  content: "+";
  position: absolute; right: 16px; top: 10px;
  font-size: 1.5rem; color: var(--grh-indigo);
}
.grh-faq details[open] summary::after { content: "\2212"; }
.grh-faq details > div { padding: 0 16px 14px; }

/* ---------- Notes / badges ---------- */
.grh-note {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-left: 6px solid var(--grh-amber);
  border-radius: 12px;
  padding: 14px 16px;
  margin: 18px 0;
}
.grh-note--info { background: #eff6ff; border-color: #bfdbfe; border-left-color: var(--grh-sky); }
.grh-todo { background: #fef08a; padding: 0 4px; border-radius: 4px; }
.grh-badges { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; padding: 0; list-style: none; }
.grh-badges li {
  margin: 0; padding: 6px 12px; border-radius: 999px;
  background: #eef2ff; color: var(--grh-indigo-dark);
  font-weight: 600; font-size: 0.9rem;
}
.grh-badges li:nth-child(3n+2) { background: #ccfbf1; color: #115e59; }
.grh-badges li:nth-child(3n+3) { background: #fce7f3; color: #9d174d; }

/* ---------- Stats strip ---------- */
.grh-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grh-stat {
  background: #fff; border-radius: var(--grh-radius);
  padding: 16px 10px; text-align: center; box-shadow: var(--grh-shadow);
}
.grh-stat strong { display: block; font-size: 1.15rem; color: var(--grh-indigo); }
.grh-stat span { font-size: 0.88rem; color: var(--grh-muted); }

/* ---------- Timeline (About) ---------- */
.grh-timeline { border-left: 4px solid var(--grh-indigo); margin: 0 0 14px 8px; padding-left: 18px; }
.grh-timeline__item { position: relative; margin-bottom: 20px; }
.grh-timeline__item::before {
  content: ""; position: absolute; left: -27px; top: 6px;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--grh-pink); border: 3px solid #fff; box-shadow: 0 0 0 2px var(--grh-indigo);
}
.grh-timeline__item h3 { margin-bottom: 2px; }
.grh-timeline__meta { color: var(--grh-muted); font-size: 0.9rem; margin-bottom: 4px; }

/* ---------- Tables ---------- */
.grh-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: 14px; box-shadow: var(--grh-shadow); background: #fff; }
.grh-table { width: 100%; border-collapse: collapse; min-width: 520px; }
.grh-table th { background: var(--grh-indigo); color: #fff; text-align: left; padding: 12px; font-size: 0.95rem; }
.grh-table td { padding: 12px; border-bottom: 1px solid var(--grh-line); vertical-align: top; }
.grh-table tr:nth-child(even) td { background: #f8faff; }

/* ---------- CTA band ---------- */
.grh-cta {
  background: linear-gradient(135deg, #0d9488 0%, #4f46e5 100%);
  color: #fff;
  text-align: center;
  padding: 34px 18px;
  border-radius: 24px;
  margin: 8px 16px 0;
}
.grh-cta h2, .grh-cta p { color: #fff; }
.grh-cta .grh-actions { align-items: stretch; max-width: 420px; margin-left: auto; margin-right: auto; }

/* ---------- Quote form ---------- */
.grh-form { background: #fff; border-radius: 22px; padding: 22px 16px; box-shadow: var(--grh-shadow); border-top: 6px solid var(--grh-amber); }
.grh-form__grid { display: grid; gap: 14px; grid-template-columns: 1fr; }
.grh-field label { display: block; font-weight: 700; color: var(--grh-ink); margin-bottom: 6px; font-size: 0.95rem; }
.grh-field label span { color: var(--grh-pink); }
.grh-field input,
.grh-field select,
.grh-field textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  font-size: 16px; /* prevents iOS zoom */
  font-family: inherit;
  color: var(--grh-ink);
  background: #f8faff;
  border: 2px solid var(--grh-line);
  border-radius: 12px;
  outline: none;
}
.grh-field textarea { min-height: 110px; resize: vertical; }
.grh-field input:focus,
.grh-field select:focus,
.grh-field textarea:focus { border-color: var(--grh-indigo); background: #fff; box-shadow: 0 0 0 4px rgba(79,70,229,0.15); }
.grh-field--full { grid-column: 1 / -1; }
.grh-check { display: flex; gap: 10px; align-items: flex-start; font-size: 0.92rem; }
.grh-check input { width: 22px; height: 22px; min-height: 0; margin-top: 2px; flex: 0 0 auto; }
.grh-preview {
  white-space: pre-wrap;
  background: #f0fdf4;
  border: 1px dashed var(--grh-green);
  border-radius: 12px;
  padding: 12px;
  font-size: 0.88rem;
  color: #14532d;
  margin: 0;
  max-height: 260px;
  overflow: auto;
}
.grh-form__msg { margin-top: 10px; font-weight: 600; color: var(--grh-indigo-dark); }

/* ---------- Contact pills ---------- */
.grh-contact { display: grid; gap: 12px; }
.grh-contact a {
  display: flex; align-items: center; gap: 12px;
  background: #fff; border-radius: 16px; padding: 14px 16px;
  text-decoration: none; box-shadow: var(--grh-shadow);
  color: var(--grh-ink); font-weight: 700; min-height: 56px;
}
.grh-contact a small { display: block; font-weight: 500; color: var(--grh-muted); }

/* ---------- Sticky mobile action bar ---------- */
.grh-sticky {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 9999;
  display: flex; gap: 8px; padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
  background: rgba(255,255,255,0.96);
  box-shadow: 0 -6px 18px rgba(30,27,75,0.15);
}
.grh-sticky a {
  flex: 1; min-height: 46px; display: flex; align-items: center; justify-content: center;
  border-radius: 12px; font-weight: 700; font-size: 0.92rem; text-decoration: none;
  background: #eef2ff; color: var(--grh-indigo-dark);
}
.grh-sticky a.grh-sticky__wa { background: var(--grh-wa); color: #053b1d; }
.grh-sticky a.grh-sticky__quote { background: var(--grh-amber); color: #3b2300; }

/* ---------- Legal text ---------- */
.grh-legal h2 { margin-top: 26px; font-size: 1.25rem; }
.grh-legal { background: #fff; border-radius: var(--grh-radius); padding: 22px 18px; box-shadow: var(--grh-shadow); }

/* =========================================================
   Tablet 600px+
   ========================================================= */
@media (min-width: 600px) {
  .grh-grid { grid-template-columns: repeat(2, 1fr); }
  .grh-form__grid { grid-template-columns: 1fr 1fr; }
  .grh-stats { grid-template-columns: repeat(4, 1fr); }
  .grh-actions { flex-direction: row; flex-wrap: wrap; }
  .grh-contact { grid-template-columns: repeat(2, 1fr); }
}

/* =========================================================
   Desktop 900px+
   ========================================================= */
@media (min-width: 900px) {
  .grh { padding-bottom: 0; }
  .grh h1 { font-size: 2.6rem; }
  .grh h2 { font-size: 1.9rem; }
  .grh-section { padding: 56px 24px; }
  .grh-hero { padding: 64px 24px; border-radius: 0 0 40px 40px; }
  .grh-hero__inner { grid-template-columns: 1.3fr 1fr; gap: 44px; }
  .grh-hero__img { max-width: 440px; }
  .grh-split { grid-template-columns: 1fr 1fr; gap: 44px; }
  .grh-split--reverse > :first-child { order: 2; }
  .grh-grid--3 { grid-template-columns: repeat(3, 1fr); }
  .grh-steps { grid-template-columns: repeat(2, 1fr); }
  .grh-chips { justify-content: center; }
  .grh-cta { margin: 8px auto 0; max-width: 1100px; padding: 52px 24px; }
  .grh-sticky { display: none; }
  .grh-actions .grh-btn { min-width: 190px; }
}

@media (prefers-reduced-motion: reduce) {
  .grh-btn, .grh-btn:hover { transition: none; transform: none; }
}
