/* Base & layout */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Segoe UI", Arial, sans-serif;
  line-height: 1.6;
  color: #333;
  background: #f9f9f9;
}

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

/* --- Sticky header --- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: #0a2342; color: #fff; border-bottom: 1px solid rgba(255,255,255,.08);
}
.header-flex { display: flex; align-items: center; justify-content: space-between; min-height: 64px; }

/* Brand */
.branding { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; }
.logo {
  height: clamp(32px, 6vw, 52px);
  width: auto;
  display: block;
}
.brand-text h1 { margin: 0; font-size: clamp(1.1rem, 2.4vw, 1.75rem); line-height: 1.2; }
.slogan { margin: 0; font-size: clamp(.72rem, 1.6vw, .95rem); color: #cbd5e1; font-style: italic; }

/* Nav */
.nav ul { list-style: none; display: flex; gap: 16px; margin: 0; padding: 0; }
.nav a { color: #fff; text-decoration: none; padding: 8px 6px; border-radius: 6px; }
.nav a:hover { background: rgba(255,255,255,.08); }

/* Hamburger (shown on <= 900px) */
.nav-toggle {
  background: transparent; border: 0; padding: 10px; margin-left: 8px; cursor: pointer;
  display: none;
}
.nav-toggle-bar {
  width: 24px; height: 2px; background: #fff; display: block; position: relative;
}
.nav-toggle-bar::before, .nav-toggle-bar::after {
  content: ""; position: absolute; left: 0; width: 24px; height: 2px; background: #fff;
}
.nav-toggle-bar::before { top: -7px; }
.nav-toggle-bar::after  { top: 7px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* Mobile nav behavior */
@media (max-width: 900px) {
  .nav-toggle { display: inline-block; }
  .nav { position: absolute; inset: 64px 0 auto 0; background: #0a2342; border-top: 1px solid rgba(255,255,255,.08); display: none; }
  .nav.open { display: block; }
  .nav ul { flex-direction: column; gap: 0; }
  .nav a { display: block; padding: 14px 20px; }
}

/* Ensure anchored sections aren’t hidden under the sticky header */
section[id] { scroll-margin-top: 80px; }

/* Hero */
.hero {
  background: url('https://rebelpumpservices.com/wp-content/uploads/2022/05/SO-Lube-1000.png') no-repeat center center/cover;
  color: #fff; text-align: center; padding: clamp(64px, 12vw, 140px) 20px;
}
.hero-content h2 { font-size: clamp(2rem, 6vw, 3rem); margin-bottom: 16px; }

/* Buttons */
.btn {
  display: inline-block; background: #ffd700; color: #0a2342;
  padding: 12px 24px; border-radius: 8px; text-decoration: none; font-weight: 700;
  transition: transform .15s ease, background .3s ease;
}
.btn:hover { background: #e6c200; transform: translateY(-1px); }
.btn-small { padding: 8px 16px; font-weight: 600; }

/* Typography & cards */
h2 { margin: 0 0 16px; color: #0a2342; }
ul { padding-left: 20px; }
.section-head { margin-bottom: 18px; }
.muted { color: #666; }

.grid { display: grid; gap: 20px; grid-template-columns: repeat(12, 1fr); }
.card {
  grid-column: span 12;
  background: #fff; border-radius: 16px; padding: 20px;
  box-shadow: 0 8px 24px rgba(0,0,0,.06), 0 2px 6px rgba(0,0,0,.05);
  transition: transform .15s ease, box-shadow .15s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(0,0,0,.08); }
@media (min-width: 640px) { .card { grid-column: span 6; } }
@media (min-width: 980px) { .card { grid-column: span 4; } }

.card-header { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 10px; }
.card-header h3 { font-size: 1.125rem; color: #0a2342; }
.tag {
  background: #eef3ff; color: #1b3a7a; border: 1px solid #d7e3ff;
  padding: 4px 8px; border-radius: 999px; font-size: .8rem; white-space: nowrap;
}

.kv { list-style: none; padding-left: 0; }
.kv li { margin: 6px 0; }
.kv strong { color: #0a2342; }

/* Contact + footer */
.contact { background: #0a2342; color: #fff; text-align: center; padding: 50px 20px; }
footer { background: #111; color: #aaa; text-align: center; padding: 15px; }

/* Dosage widget */
.dosage h3 { margin-bottom: 6px; color: #0a2342; }
.dosage-grid { display: grid; gap: 10px; grid-template-columns: 1fr auto; align-items: end; margin-top: 8px; }
.dosage input { width: 100%; padding: 10px 12px; border-radius: 8px; border: 1px solid #d8d8d8; outline: none; }
.calc-out { margin-top: 10px; font-weight: 600; }
.fineprint { margin-top: 14px; color: #777; font-size: .9rem; }
