/* MitigationHub shared layout (header/nav/footer)
   Keep lightweight and framework-free for shared hosting.
*/

:root {
  --mh-blue: #003D5B;
  --mh-blue-dark: #002D43;
  --mh-green: #2D5016;
  --mh-teal: #4A90A4;
  --mh-mint: #87A878;
  --mh-gold: #8B6F47;
}

/* Base page styling (safe defaults; page-level inline styles can override) */
body {
  font-family: "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
  color: #2c3e50;
  background: linear-gradient(135deg, #f5f7fa 0%, #e8f0f5 100%);
}

.mh-main {
  max-width: 1200px;
  margin: 3rem auto;
  padding: 0 2rem;
}

.mh-main--narrow { max-width: 760px; }

.mh-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Small utilities (keep minimal) */
.mh-mt-0 { margin-top: 0; }
.mh-mt-1 { margin-top: 0.75rem; }
.mh-mt-2 { margin-top: 1rem; }
.mh-mt-3 { margin-top: 1.5rem; }
.mh-mt-4 { margin-top: 2rem; }
.mh-w-100 { width: 100%; }

.mh-text-sm { font-size: 0.95rem; }
.mh-text-xs { font-size: 14px; }
.mh-opacity-85 { opacity: 0.85; }
.mh-opacity-35 { opacity: 0.35; }

.mh-hr {
  border: 0;
  border-top: 1px solid rgba(0, 0, 0, 0.12);
}

.mh-honeypot {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.mh-hidden { display: none !important; }

/* Accessibility: skip link */
.mh-skip-link {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
  z-index: 1000;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  background: #fff;
  color: var(--mh-blue);
  border: 2px solid var(--mh-blue);
  font-weight: 800;
}

.mh-skip-link:focus {
  left: 1rem;
  top: 1rem;
  width: auto;
  height: auto;
  box-shadow: 0 10px 30px rgba(0, 61, 91, 0.25);
}

/* Make entire card clickable without losing semantic link styling */
a.mh-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

a.mh-card-link:hover { text-decoration: none; }

/* Utilities (keep pages consistent with minimal per-page CSS) */
.mh-section {
  background: #fff;
  border-radius: 15px;
  padding: 3rem;
  margin-bottom: 3rem;
  box-shadow: 0 10px 40px rgba(0, 61, 91, 0.1);
}

/* Homepage hero */
.mh-hero {
  background: #fff;
  border-radius: 18px;
  padding: 3.25rem;
  margin-bottom: 3rem;
  box-shadow: 0 14px 55px rgba(0, 61, 91, 0.12);
  border-left: 6px solid var(--mh-green);
}

.mh-hero__eyebrow {
  display: inline-flex;
  gap: 0.5rem;
  align-items: center;
  font-weight: 700;
  color: var(--mh-green);
  background: rgba(135, 168, 120, 0.18);
  border: 1px solid rgba(135, 168, 120, 0.35);
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}

.mh-hero__title {
  color: var(--mh-blue);
  font-size: 2.4rem;
  line-height: 1.15;
  letter-spacing: -0.7px;
  margin: 0 0 1rem;
}

.mh-hero__lead {
  color: #334155;
  font-size: 1.15rem;
  line-height: 1.75;
  margin: 0 0 1rem;
}

.mh-hero__bullets {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  margin: 1.25rem 0 1.5rem;
  padding: 0;
  list-style: none;
}

.mh-hero__bullets li {
  background: #f8fafc;
  border: 1px solid rgba(0, 61, 91, 0.08);
  border-left: 4px solid rgba(74, 144, 164, 0.65);
  border-radius: 12px;
  padding: 0.85rem 1rem;
}

.mh-hero__cta {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 1.25rem;
}

.mh-hero__note {
  margin-top: 1.25rem;
  padding-left: 1.25rem;
  border-left: 3px solid var(--mh-mint);
  color: #2d5016;
  font-style: italic;
}

/* Steps */
.mh-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}

.mh-step {
  background: #f8fafc;
  border-radius: 14px;
  border: 1px solid rgba(0, 61, 91, 0.08);
  padding: 1.5rem;
}

.mh-step__num {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, var(--mh-green) 0%, var(--mh-teal) 100%);
  margin-bottom: 0.75rem;
}

.mh-step__title {
  color: var(--mh-blue);
  font-size: 1.25rem;
  margin-bottom: 0.35rem;
}

.mh-step__text { color: #475569; }

/* Compact stats */
.mh-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 1rem;
}

.mh-stat {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0, 61, 91, 0.08);
  border: 1px solid rgba(0, 61, 91, 0.06);
  padding: 1.5rem;
  text-align: center;
}

.mh-stat__value {
  font-size: 2.35rem;
  font-weight: 800;
  color: var(--mh-green);
  line-height: 1;
}

.mh-stat__label {
  margin-top: 0.5rem;
  color: #64748b;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
}

.mh-section__title {
  color: var(--mh-blue);
  font-size: 2rem;
  margin-bottom: 1.5rem;
  text-align: center;
}

.mh-section__lede {
  max-width: 980px;
  margin: 0 auto 1.5rem;
  text-align: center;
  color: #475569;
  font-size: 1.05rem;
  line-height: 1.7;
}

.mh-section__actions {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1.75rem;
}

.mh-section__actions--tight { margin-top: 1.25rem; }

.mh-badge-row {
  display: flex;
  justify-content: center;
  margin-bottom: 0.75rem;
}

.mh-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.mh-card {
  background: #fff;
  border-radius: 15px;
  padding: 2rem;
  box-shadow: 0 8px 30px rgba(0, 61, 91, 0.1);
  border-top: 4px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.mh-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 45px rgba(0, 61, 91, 0.16);
}

/* Featured card (recommended) */
.mh-card.is-featured {
  border: 3px solid var(--mh-green);
  border-top-width: 6px;
}

.mh-card__kicker {
  margin-top: 0.25rem;
  text-align: center;
  color: #475569;
  font-size: 0.98rem;
}

.mh-card__icon {
  font-size: 2.6rem;
  margin-bottom: 0.75rem;
  text-align: center;
}

.mh-card h3 {
  margin: 0.25rem 0 0.75rem;
  color: var(--mh-blue);
  text-align: center;
  font-size: 1.25rem;
}

.mh-card p {
  margin: 0;
  color: #475569;
}

.mh-card__list {
  margin: 0.9rem 0 0;
  padding-left: 1.15rem;
  color: #475569;
}

.mh-card__list li { margin: 0.35rem 0; }

.mh-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  border: 1px solid rgba(0, 0, 0, 0.06);
  background: rgba(135, 168, 120, 0.16);
  color: var(--mh-green);
}

.mh-price {
  margin: 1rem 0 0.85rem;
  text-align: center;
  font-size: 2.15rem;
  font-weight: 800;
  color: var(--mh-green);
  letter-spacing: -0.5px;
}

.mh-price__term {
  font-size: 1rem;
  font-weight: 700;
  color: #64748b;
  margin-left: 0.15rem;
}

.mh-card__cta {
  display: flex;
  justify-content: center;
  gap: 0.65rem;
  flex-wrap: wrap;
  margin-top: 1.25rem;
}

.mh-card__note {
  display: inline-block;
  margin-top: 0.6rem;
  font-size: 0.95rem;
  color: #334155;
}

.mh-card--neutral { border-top-color: #6b7280; }

.mh-card--primary { border-top-color: var(--mh-blue); }
.mh-card--success { border-top-color: var(--mh-green); }
.mh-card--info { border-top-color: var(--mh-teal); }
.mh-card--accent { border-top-color: var(--mh-mint); }
.mh-card--premium { border-top-color: var(--mh-gold); }

/* Tables */
.mh-table-wrap { overflow-x: auto; }

table.mh-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 10px 35px rgba(0, 61, 91, 0.08);
  border: 1px solid rgba(0, 61, 91, 0.08);
}

.mh-table th {
  text-align: left;
  padding: 1rem;
  color: #fff;
  background: linear-gradient(135deg, var(--mh-blue) 0%, var(--mh-green) 100%);
  font-weight: 800;
}

.mh-table td {
  padding: 0.95rem 1rem;
  border-top: 1px solid rgba(0, 61, 91, 0.08);
  color: #334155;
}

.mh-table tbody tr:nth-child(even) { background: #f8fafc; }

.mh-table .is-highlight {
  background: rgba(135, 168, 120, 0.16);
  font-weight: 700;
}

/* Callouts */
.mh-callout {
  background: #f8fafc;
  border: 1px solid rgba(0, 61, 91, 0.10);
  border-left: 5px solid var(--mh-teal);
  border-radius: 14px;
  padding: 1.5rem;
}

.mh-callout--success { border-left-color: var(--mh-green); background: rgba(135, 168, 120, 0.12); }
.mh-callout--warning { border-left-color: #f59e0b; background: rgba(245, 158, 11, 0.12); }
.mh-callout--premium { border-left-color: var(--mh-gold); background: rgba(139, 111, 71, 0.12); }

/* Forms */
.mh-form__row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.mh-field label {
  display: block;
  margin-bottom: 0.4rem;
  font-weight: 800;
  color: var(--mh-blue);
}

.mh-input,
.mh-select,
.mh-textarea {
  width: 100%;
  padding: 12px;
  border: 2px solid rgba(0, 61, 91, 0.14);
  border-radius: 10px;
  font-size: 1rem;
  font-family: inherit;
  background: #fff;
}

.mh-input:focus,
.mh-select:focus,
.mh-textarea:focus {
  outline: none;
  border-color: var(--mh-teal);
  box-shadow: 0 0 0 3px rgba(74, 144, 164, 0.14);
}

.mh-status {
  display: none;
  padding: 14px;
  border-radius: 12px;
  margin-bottom: 14px;
  font-weight: 800;
}

.mh-status.is-ok {
  display: block;
  background: #d4edda;
  color: #155724;
  border: 2px solid #c3e6cb;
}

.mh-status.is-err {
  display: block;
  background: #f8d7da;
  color: #721c24;
  border: 2px solid #f5c6cb;
}

.mh-status.is-warn {
  display: block;
  background: #fff3cd;
  color: #856404;
  border: 2px solid #ffeaa7;
}

.mh-button {
  display: inline-block;
  padding: 0.75rem 2rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

.mh-button-primary {
  background: linear-gradient(135deg, var(--mh-blue) 0%, var(--mh-green) 100%);
  color: #fff;
}

.mh-button-secondary {
  background: transparent;
  color: var(--mh-blue);
  border: 2px solid var(--mh-blue);
}

.mh-button-primary:hover { transform: scale(1.03); box-shadow: 0 8px 20px rgba(0, 61, 91, 0.25); }
.mh-button-secondary:hover { background: var(--mh-blue); color: #fff; }

/* Accessibility: clear focus rings */
.mh-button:focus-visible,
.mh-nav a.mh-nav__link:focus-visible,
.mh-input:focus-visible,
.mh-select:focus-visible,
.mh-textarea:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(14, 165, 233, 0.7);
  outline-offset: 3px;
}

/* Header */
.mh-header {
  background: linear-gradient(135deg, var(--mh-blue) 0%, var(--mh-green) 100%);
  color: #fff;
  padding: 2rem 0;
  box-shadow: 0 4px 20px rgba(0, 61, 91, 0.3);
}

.mh-header__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.mh-header__title {
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin: 0;
}

.mh-header__tagline {
  font-size: 1.05rem;
  opacity: 0.95;
  font-weight: 300;
  letter-spacing: 0.3px;
  margin: 0.35rem 0 0;
}

.mh-header__badge {
  background: rgba(255, 255, 255, 0.15);
  padding: 0.65rem 1.25rem;
  border-radius: 50px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  font-weight: 500;
  font-size: 0.95rem;
  white-space: nowrap;
}

/* Nav */
.mh-nav {
  background: var(--mh-blue-dark);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.mh-nav__list {
  list-style: none;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
}

.mh-nav__item { margin: 0; }

.mh-nav a.mh-nav__link {
  display: block;
  color: #fff;
  text-decoration: none;
  padding: 1rem 1.5rem;
  transition: all 0.2s ease;
  font-weight: 500;
  border-bottom: 3px solid transparent;
}

.mh-nav a.mh-nav__link:hover {
  background: rgba(74, 144, 164, 0.2);
  border-bottom-color: var(--mh-teal);
}

.mh-nav a.mh-nav__link.is-active {
  border-bottom-color: var(--mh-mint);
  background: rgba(135, 168, 120, 0.14);
}

/* Footer */
.mh-footer {
  background: var(--mh-blue);
  color: #fff;
  padding: 3rem 0 2rem;
  margin-top: 4rem;
}

.mh-footer__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 3rem;
}

.mh-footer__title {
  color: var(--mh-mint);
  margin: 0 0 1rem;
  font-size: 1.2rem;
}

.mh-footer a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  display: block;
  margin-bottom: 0.5rem;
}

.mh-footer a:hover { color: var(--mh-teal); }

.mh-footer__bottom {
  text-align: center;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.6);
}

@media (max-width: 768px) {
  .mh-header__title { font-size: 2rem; }
  .mh-nav__list { flex-direction: column; }
  .mh-nav__link { padding: 0.75rem 1rem; }

  .mh-section { padding: 2rem 1.5rem; }
  .mh-main { padding: 0 1rem; }
  .mh-hero { padding: 2rem 1.5rem; }
  .mh-hero__title { font-size: 2rem; }
}
