*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --color-bg: #ffffff;
  --color-surface: #f5f7fb;
  --color-header: rgba(255, 255, 255, 0.95);
  --color-primary: #0d3b66;
  --color-primary-light: #1f5a9b;
  --color-accent: #d7263d;
  --color-text: #111111;
  --color-muted: #6b7280;
  --color-border: #e5e7eb;
  --hero-gradient: radial-gradient(circle at top left, #f4f7ff 0, #ffffff 55%);
  --radius-lg: 18px;
  --radius-md: 12px;
  --shadow-soft: 0 10px 25px rgba(15, 23, 42, 0.12);
}

:root[data-theme="dark"] {
  --color-bg: #020617;
  --color-surface: #020617;
  --color-header: rgba(15, 23, 42, 0.96);
  --color-primary: #4f9bff;
  --color-primary-light: #7ab5ff;
  --color-accent: #f97316;
  --color-text: #f9fafb;
  --color-muted: #cbd5f5;
  --color-border: #1f2937;
  --hero-gradient: radial-gradient(circle at top left, #0b1120 0, #020617 55%);
  --shadow-soft: 0 10px 25px rgba(0, 0, 0, 0.6);
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--color-text);
  background-color: var(--color-bg);
  line-height: 1.6;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.container {
  width: min(1120px, 100% - 2.5rem);
  margin: 0 auto;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-header);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0.75rem 0;
}

.top-banner {
  width: 100%;
  overflow: hidden;
}

.top-banner img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  max-height: 280px;
}

@media (max-width: 768px) {
  .top-banner img {
    max-height: 160px;
  }
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-logo {
  height: 52px;
  width: auto;
}

.main-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
}

.nav-links a {
  font-weight: 500;
  font-size: 0.95rem;
}

.nav-links a:hover {
  color: var(--color-accent);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.header-cta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.1rem;
  font-size: 0.85rem;
  white-space: nowrap;
}

.header-phone-label {
  color: var(--color-muted);
}

.header-phone {
  font-weight: 700;
  font-size: 1rem;
  color: var(--color-accent);
}

/* Theme toggle */

.theme-toggle {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--color-muted);
}

.theme-toggle:hover {
  background-color: rgba(148, 163, 184, 0.16);
}

.theme-toggle-icon {
  display: inline-block;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  background: transparent;
  padding: 0;
  cursor: pointer;
  z-index: 1001;
}

.nav-toggle span {
  display: block;
  height: 2px;
  width: 18px;
  background: var(--color-text);
  border-radius: 999px;
}

/* Hero */

.hero {
  padding: 1.75rem 0 3rem;
  background: var(--hero-gradient);
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 1.1fr);
  gap: 2.5rem;
  align-items: center;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.75rem;
  color: var(--color-accent);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.hero h1 {
  font-size: clamp(2.2rem, 3vw + 1.5rem, 3rem);
  line-height: 1.1;
  margin: 0 0 0.75rem;
  color: var(--color-primary);
}

.hero-h2 {
  margin: 0 0 0.9rem;
  font-size: 1.15rem;
  line-height: 1.25;
  font-weight: 650;
  color: var(--color-text);
}

.hero-with-bg .hero-h2 {
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.hero-subtitle {
  color: var(--color-muted);
  max-width: 32rem;
  margin: 0 0 1rem;
}

.hero-subtitle:last-of-type {
  margin-bottom: 1.75rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.hero-with-bg {
  position: relative;
  background-image: url("/assets/combustion-banner-mps1.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: #fff;
  background-color: #020617;
  min-height: 300px;
  display: flex;
  align-items: center;
}

@media (max-width: 768px) {
  .hero-with-bg {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 220px;
    padding-top: 2.25rem;
    padding-bottom: 1.5rem;
  }

  .hero-with-bg .hero-panel {
    background: rgba(2, 6, 23, 0.30) !important;
    backdrop-filter: blur(1px);
  }
}

/* Dark overlay for readability */

/* Hero text overrides when using background image */
.hero-with-bg .eyebrow {
  color: rgba(255, 255, 255, 0.92);
}

.hero-with-bg h1 {
  color: #ffffff;
  text-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.hero-with-bg .hero-subtitle {
  color: rgba(255, 255, 255, 0.92);
}

/* Make the right-side hero panel readable on image backgrounds */
.hero-with-bg .hero-panel {
  background: rgba(2, 6, 23, 0.82);
  border-color: rgba(255, 255, 255, 0.18);
}

.hero-with-bg .hero-panel h2 {
  color: #ffffff;
}

.hero-with-bg .hero-note,
.hero-with-bg .hero-panel p,
.hero-with-bg .hero-panel li {
  color: rgba(255, 255, 255, 0.9);
}

.hero-with-bg .hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    rgba(0, 0, 0, 0.55),
    rgba(0, 0, 0, 0.55)
  );
  z-index: 1;
}

/* Ensure text is above the overlay */
.hero-with-bg .hero-content {
  position: relative;
  z-index: 2;
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .hero h1 {
    margin-bottom: 0.6rem;
  }

  .hero-h2 {
    font-size: 1.05rem;
    margin-bottom: 0.75rem;
  }
}

.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 0.75rem 1.4rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.08s ease-out, box-shadow 0.08s ease-out, background 0.12s ease-out, color 0.12s ease-out;
}

.btn.primary {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
  color: #ffffff;
  box-shadow: var(--shadow-soft);
}

.btn.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.4);
}

.btn.outline {
  border-color: var(--color-border);
  background: transparent;
  color: var(--color-primary);
}

.btn.outline:hover {
  border-color: var(--color-primary);
  background-color: rgba(148, 163, 184, 0.08);
}

.btn.inverse {
  background: #ffffff;
  color: var(--color-accent);
}

:root[data-theme="dark"] .btn.inverse {
  background: #020617;
  color: var(--color-accent);
  border: 1px solid var(--color-border);
}

.btn.inverse:hover {
  background: #f9fafb;
}

:root[data-theme="dark"] .btn.inverse:hover {
  background: #0b1120;
}

.btn.full-width {
  width: 100%;
}

.hero-panel {
  background: var(--color-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding: 1.75rem 1.5rem;
  border: 1px solid var(--color-border);
}

.hero-panel h2 {
  margin-top: 0;
  font-size: 1.2rem;
  color: var(--color-primary);
}

.hero-list {
  list-style: none;
  padding: 0;
  margin: 0.75rem 0 1rem;
}

.hero-list li {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.95rem;
}

.hero-list li::before {
  content: "•";
  color: var(--color-accent);
  font-size: 1.2rem;
}

.hero-note {
  font-size: 0.9rem;
  color: var(--color-muted);
}

/* Sections */

.section {
  padding: 3rem 0;
}

.section-alt {
  background-color: var(--color-surface);
}

.section-header {
  text-align: center;
  margin-bottom: 2rem;
}

.section-header.align-left {
  text-align: left;
}

.section-header h2 {
  margin: 0 0 0.5rem;
  font-size: 1.8rem;
  color: var(--color-primary);
}

.section-header p {
  margin: 0;
  color: var(--color-muted);
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--color-bg);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.3rem;
  border: 1px solid var(--color-border);
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.1);
}

.card h3 {
  margin-top: 0;
  margin-bottom: 0.4rem;
  font-size: 1.1rem;
  color: var(--color-primary);
}

.card p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--color-muted);
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.1fr);
  gap: 2rem;
  align-items: flex-start;
}

.about-highlight {
  background: var(--color-bg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  padding: 1.5rem 1.4rem;
  box-shadow: var(--shadow-soft);
}

.about-highlight h3 {
  margin-top: 0;
  margin-bottom: 0.75rem;
  color: var(--color-primary);
}

.about-highlight ul {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--color-muted);
}

.pill-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.pill {
  background: var(--color-bg);
  border-radius: 999px;
  padding: 1.05rem 1.3rem;
  border: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.pill h3 {
  margin: 0;
  font-size: 1rem;
  color: var(--color-primary);
}

.pill p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--color-muted);
}

/* Contact */

.contact-section {
  position: relative;
}

.contact-details {
  display: grid;
  gap: 1.25rem;
}

.contact-item h3 {
  margin: 0 0 0.2rem;
  font-size: 1rem;
  color: var(--color-primary);
}

.contact-item p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--color-muted);
}

.contact-panel {
  background: var(--color-bg);
  border-radius: var(--radius-lg);
  padding: 1.75rem 1.5rem;
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--color-border);
}

.contact-panel h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  color: var(--color-primary);
}

.contact-panel p {
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 0.95rem;
  color: var(--color-muted);
}

.contact-form {
  display: grid;
  gap: 0.9rem;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-muted);
}

input,
textarea {
  border-radius: 10px;
  border: 1px solid var(--color-border);
  padding: 0.6rem 0.75rem;
  font: inherit;
  resize: vertical;
  background-color: transparent;
  color: var(--color-text);
}

input:focus,
textarea:focus {
  outline: 2px solid var(--color-primary-light);
  outline-offset: 1px;
}

.form-note {
  margin-top: 0.4rem;
  font-size: 0.8rem;
  color: var(--color-muted);
}

/* CTA strip */

.cta-strip {
  background: linear-gradient(120deg, var(--color-primary), var(--color-accent));
  color: #ffffff;
  padding: 1.4rem 0;
}

.cta-strip-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.cta-strip-inner p {
  margin: 0;
  font-weight: 500;
}

/* Footer */

.site-footer {
  background: #020617;
  color: #e5e7eb;
  padding: 1.2rem 0;
}

.footer-inner {
  text-align: center;
  font-size: 0.85rem;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.footer-social {
  display: flex;
  align-items: center;
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  transition: transform 0.15s ease, background 0.15s ease;
}

.social-link svg {
  width: 20px;
  height: 20px;
  fill: #ffffff;
}

.social-link:hover {
  background: #1877f2;
  transform: translateY(-2px);
}

/* Mobile centering */
@media (max-width: 768px) {
  .footer-inner {
    flex-direction: column;
    text-align: center;
  }
}

/* Gallery */

.gallery-caption {
  font-size: 0.75rem;
  margin-top: 0.35rem;
  color: var(--color-muted);
  text-align: center;
}

.hero-compact {
  padding-bottom: 1.75rem;
}

.hero-inner-single {
  grid-template-columns: minmax(0, 1fr);
}

.gallery-intro p {
  max-width: 40rem;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.5rem;
}

.gallery-item {
  position: relative;
}

.gallery-thumb {
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  width: 100%;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.16s ease-out, box-shadow 0.16s ease-out;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.16);
}

.gallery-thumb:hover img,
.gallery-thumb:focus-visible img {
  transform: scale(1.03);
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.25);
}

.gallery-empty {
  color: var(--color-muted);
  font-size: 0.95rem;
}

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.9);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
}

.lightbox.is-open {
  display: flex;
}

.lightbox-inner {
  max-width: min(960px, 96vw);
  max-height: 90vh;
}

.lightbox-inner img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 55px rgba(0, 0, 0, 0.45);
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(15, 23, 42, 0.8);
  border: none;
  color: #ffffff;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}

.lightbox-close {
  top: 5%;
  right: 5%;
  transform: none;
  font-size: 1.8rem;
}

.lightbox-prev {
  left: 5%;
}

.lightbox-next {
  right: 5%;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(15, 23, 42, 0.95);
}

@media (max-width: 640px) {
  .lightbox-prev {
    left: 3%;
  }

  .lightbox-next {
    right: 3%;
  }
}

/* Responsive */

@media (max-width: 900px) {
  .hero-inner,
  .split {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero {
    padding-top: 2.5rem;
  }

  .header-inner {
    gap: 0.75rem;
  }
}

@media (max-width: 768px) {
  .site-header .container {
    width: 100%;
    margin: 0;
    padding-inline: 0.75rem;
  }

  .nav-links {
    position: absolute;
    right: 0.75rem;
    top: calc(100% + 0.6rem);
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 14px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
    list-style: none;
    margin: 0;
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    transform-origin: top;
    transform: scaleY(0);
    opacity: 0;
    pointer-events: none;
    z-index: 1000;
  }

  .nav-links.is-open,
  .nav-links.open {
    transform: scaleY(1);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-links a {
    display: block;
    padding: 0.75rem 0.9rem;
    border-radius: 10px;
    text-decoration: none;
    color: var(--color-text);
  }

  .nav-links a:hover {
    background: rgba(0, 0, 0, 0.06);
    color: var(--color-accent);
  }

  .nav-toggle {
    display: inline-flex;
    width: 44px;
    height: 44px;
    border-radius: 999px;
  }

  .main-nav {
    position: relative;
    flex: 1;
  }

  .header-cta {
    display: none;
  }

  .hero-panel {
    order: -1;
  }

  .section {
    padding: 2.25rem 0;
  }

  .brand-logo {
    height: 44px;
  }
}

@media (max-width: 480px) {
  .container {
    width: min(100% - 1.75rem, 480px);
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .pill {
    border-radius: 18px;
  }
}

.review-cta {
  margin: 4rem auto;
  padding: 0;
}

.review-cta-inner {
  background: linear-gradient(135deg, #0b3cff, #c11212);
  border-radius: 20px;
  padding: 2.5rem 2rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.25);
}

.review-text h2 {
  color: #ffffff;
  margin: 0;
  margin-bottom: 0.4rem;
  font-size: 1.8rem;
}

.review-text p {
  color: rgba(255, 255, 255, 0.95);
  max-width: 28rem;
  font-size: 1rem;
}

.review-button {
  display: inline-block;
  background: #ffffff;
  color: #000;
  padding: 1rem 2.2rem;
  border-radius: 999px;
  font-weight: 800;
  font-size: 1.05rem;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.review-button:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
}

/* --- site-alert (force final styling + animation) --- */
.site-alert {
  font-weight: 800;
  color: #b91c1c;
  text-align: center;
  margin: 24px auto;
  display: block;
  max-width: 900px;
  text-transform: uppercase;
  background-color: #fff5f5;
  border: 2px solid #b91c1c;
  padding: 12px 18px;
  border-radius: 6px;
  animation: pulse-attention 4s ease-in-out 5 !important;
}

@keyframes pulse-attention {
  0% { opacity: 1; }
  50% { opacity: 0.35; }
  100% { opacity: 1; }
}

/* Optional: keep this commented while testing */
/*
@media (prefers-reduced-motion: reduce) {
  .inspection-reminder { animation: none !important; }
}
*/
/* --- end --- */

.inspection-reminder-image {
  position: relative;
  z-index: 10;
}

.inspection-reminder-image a,
.inspection-reminder-image img {
  pointer-events: auto !important;
  cursor: pointer;
}

.inspection-reminder-image {
  text-align: center;
  margin-top: 12px;
  margin-bottom: 32px;
}

.inspection-reminder-image img {
  display: block;
  margin: 0 auto;
  max-width: 600px;
  width: 100%;
  height: auto;
}

/* Mobile */
@media (max-width: 768px) {
  .inspection-reminder-image img {
    max-width: 90%;
  }
}

.ase-badge {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 14px;
  margin-bottom: 12px;
  max-width: 760px;
}

.ase-badge img {
  width: 64px;
  height: auto;
  flex-shrink: 0;
}

.ase-badge p {
  margin: 0;
  line-height: 1.4;
}

@media (max-width: 640px) {
  .ase-badge {
    flex-direction: column;
    align-items: flex-start;
  }

  .ase-badge img {
    width: 56px; /* was 64px */
  }
}