/* =========================================================
   Magna Electrical — stylesheet
   Colour scheme pulled from the logo: black / white / silver-grey,
   fully monochrome — a light grey "accent" stands in for what
   would otherwise be a colour, used sparingly on CTAs.
   ========================================================= */

:root {
  --black: #0a0a0a;
  --near-black: #161616;
  --grey-dark: #3a3a3a;
  --grey-mid: #8a8a8a;
  --grey-light: #d9d9d9;
  --grey-lighter: #f2f2f2;
  --white: #ffffff;
  --accent: #d6d6d6; /* light grey — used sparingly for CTAs/icons */
  --accent-dark: #767676;

  --font-head: "Archivo Black", "Arial Black", Helvetica, Arial, sans-serif;
  --font-body: "Inter", "Helvetica Neue", Arial, sans-serif;

  --max-width: 1180px;
  --radius: 10px;
  --shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--near-black);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  line-height: 1.15;
  margin: 0 0 16px;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); }
h3 { font-size: 1.15rem; }

p { margin: 0 0 16px; color: var(--grey-dark); }

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-dark);
  margin-bottom: 10px;
}

section { padding: 72px 0; }
.section-alt { background: var(--grey-lighter); }
.section-dark { background: var(--black); color: var(--white); }
.section-dark p { color: var(--grey-light); }
.section-dark h2, .section-dark h3 { color: var(--white); }

.section-head {
  max-width: 680px;
  margin: 0 auto 44px;
  text-align: center;
}
.section-head.left { margin: 0 0 44px; text-align: left; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
/* On very narrow screens, let longer button labels wrap onto a second line
   inside the pill rather than overflow the viewport. */
@media (max-width: 420px) {
  .btn { white-space: normal; text-align: center; }
}

.btn-primary { background: var(--accent); color: var(--black); }
.btn-primary:hover { background: var(--accent-dark); }

.btn-outline-light { background: transparent; color: var(--white); border-color: rgba(255,255,255,0.5); }
.btn-outline-light:hover { border-color: var(--white); background: rgba(255,255,255,0.08); }

.btn-outline-dark { background: transparent; color: var(--black); border-color: var(--black); }
.btn-outline-dark:hover { background: var(--black); color: var(--white); }

.btn-block { width: 100%; justify-content: center; }

.cta-row { display: flex; flex-wrap: wrap; gap: 14px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--grey-light);
}

.topbar {
  background: var(--black);
  color: var(--grey-light);
  font-size: 0.82rem;
}
.topbar .container {
  display: flex;
  justify-content: flex-end;
  gap: 24px;
  padding-top: 8px;
  padding-bottom: 8px;
}
.topbar a { color: var(--white); font-weight: 600; }
.topbar a:hover { color: var(--accent); }
.topbar span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }

/* Mobile-only floating call button — the topbar (with the phone number)
   is hidden below 860px, so this replaces it as the one-tap way to call. */
.mobile-call-fab {
  display: none;
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--black);
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
  z-index: 90;
}
.mobile-call-fab:hover, .mobile-call-fab:active { background: var(--accent-dark); color: var(--white); }
.mobile-call-fab .svg-icon { width: 26px; height: 26px; }

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  gap: 20px;
}

.brand { display: flex; align-items: center; gap: 12px; }
.brand img { height: 44px; width: auto; border-radius: 4px; }
.brand-text { font-family: var(--font-head); font-size: 1.05rem; letter-spacing: 0.02em; }
.brand-text span { display: block; font-family: var(--font-body); font-weight: 600; font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--grey-mid); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  font-weight: 600;
  font-size: 0.95rem;
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
}
.nav-links a:hover,
.nav-links a[aria-current="page"] { border-bottom-color: var(--accent); }

.nav-cta { display: flex; align-items: center; gap: 14px; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span {
  display: block;
  width: 26px;
  height: 3px;
  background: var(--black);
  margin: 5px 0;
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

@media (max-width: 860px) {
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 10px 24px 20px;
    border-bottom: 1px solid var(--grey-light);
    box-shadow: var(--shadow);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { display: block; width: 100%; padding: 12px 0; }
  .nav-cta .btn-outline-dark { display: none; }
  .nav-toggle { display: block; }
  .topbar { display: none; }
  .mobile-call-fab { display: flex; }
}

/* ---------- Hero ---------- */
.hero {
  background: var(--black);
  color: var(--white);
  padding: 90px 0 70px;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  right: -120px;
  top: -80px;
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(214,214,214,0.14), transparent 70%);
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 48px;
  align-items: center;
  position: relative;
}
.hero p.lead { font-size: 1.1rem; color: var(--grey-light); max-width: 540px; }
.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 36px;
}
.badge {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: var(--radius);
  padding: 12px 16px;
  font-size: 0.85rem;
  font-weight: 600;
}
.badge .bolt { color: var(--accent); font-size: 1.1rem; }

/* ---------- SVG icons (replace emoji so the look stays consistent on every device) ---------- */
.svg-icon {
  width: 1.1em;
  height: 1.1em;
  fill: currentColor;
  display: inline-block;
  vertical-align: -0.15em;
  flex-shrink: 0;
}
.icon .svg-icon,
.icon-circle .svg-icon,
.contact-card .icon .svg-icon {
  width: 1.6rem;
  height: 1.6rem;
}
.work-photo .svg-icon { width: 1.8rem; height: 1.8rem; margin: 0 auto 8px; display: block; }

/* ---------- Hero photo carousel ---------- */
.hero-carousel {
  position: relative;
  background: var(--grey-light);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow);
}
.carousel-frame {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: 6px;
  overflow: hidden;
  background: var(--grey-mid);
}
.carousel-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.5s ease;
}
.carousel-slide.active { opacity: 1; }
.carousel-slide img { width: 100%; height: 100%; object-fit: cover; }
.carousel-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 30px 18px 14px;
  background: linear-gradient(to top, rgba(10,10,10,0.85), transparent);
  color: var(--white);
  font-weight: 700;
  font-size: 0.95rem;
}
.carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(10,10,10,0.55);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.carousel-nav:hover { background: rgba(10,10,10,0.8); }
.carousel-prev { left: 10px; }
.carousel-next { right: 10px; }
.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
}
.carousel-dots button {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  padding: 0;
  background: var(--grey-mid);
  cursor: pointer;
}
.carousel-dots button.active { background: var(--black); }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Service cards ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}
@media (max-width: 980px) { .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .card-grid { grid-template-columns: minmax(0, 1fr); } }

.card {
  background: var(--white);
  border: 1px solid var(--grey-light);
  border-radius: var(--radius);
  padding: 28px 24px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card .icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: var(--black);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 16px;
}
.card h3 { margin-bottom: 8px; }
.card p { margin-bottom: 0; font-size: 0.95rem; }

/* ---------- Why us columns ---------- */
.trio {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
  text-align: center;
}
@media (max-width: 760px) { .trio { grid-template-columns: minmax(0, 1fr); } }
.trio .icon-circle {
  width: 62px;
  height: 62px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--black);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
}

/* ---------- Credentials (4-up) ---------- */
.creds-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 28px;
  text-align: center;
}
@media (max-width: 980px) { .creds-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .creds-grid { grid-template-columns: minmax(0, 1fr); } }
.creds-grid .icon-circle {
  width: 62px;
  height: 62px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--black);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
}
.creds-grid h3 { font-size: 1.05rem; }
.creds-grid p { font-size: 0.92rem; }

/* ---------- Service area ---------- */
.area-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 48px;
  align-items: center;
}
@media (max-width: 860px) { .area-wrap { grid-template-columns: minmax(0, 1fr); } }
.area-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 20px;
}
.area-list li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  font-weight: 600;
  padding: 10px 14px;
  background: var(--white);
  border-radius: 8px;
  border: 1px solid var(--grey-light);
  overflow-wrap: break-word;
}
.area-list li.hq { background: var(--black); color: var(--white); border-color: var(--black); }
.area-list .bolt { color: var(--accent); }

/* ---------- Our work ---------- */
.work-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
@media (max-width: 900px) { .work-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .work-grid { grid-template-columns: minmax(0, 1fr); } }

.work-card {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--grey-light);
  background: var(--white);
}
.work-photo {
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, var(--grey-light), var(--grey-lighter));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--grey-mid);
  font-weight: 700;
  font-size: 0.85rem;
  text-align: center;
  padding: 16px;
}
.work-photo img { width: 100%; height: 100%; object-fit: cover; }
.work-photo .bolt { display: block; font-size: 1.8rem; color: var(--grey-mid); margin-bottom: 8px; }
.work-body { padding: 18px 20px; }
.work-body h3 { font-size: 1rem; margin-bottom: 6px; }
.work-body p { font-size: 0.9rem; margin-bottom: 0; }

.work-note {
  background: var(--grey-lighter);
  border: 1px dashed var(--grey-mid);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin-top: 36px;
  font-size: 0.92rem;
}

/* ---------- Reviews ---------- */
.review-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}
@media (max-width: 900px) { .review-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .review-grid { grid-template-columns: minmax(0, 1fr); } }
.review-card {
  background: var(--white);
  border: 1px solid var(--grey-light);
  border-radius: var(--radius);
  padding: 24px;
}
.review-stars { color: var(--accent-dark); letter-spacing: 2px; margin-bottom: 10px; }
.review-quote { font-style: italic; margin-bottom: 14px; }
.review-name { font-weight: 700; font-size: 0.9rem; }
.review-source { font-size: 0.82rem; color: var(--grey-mid); }

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--black);
  color: var(--white);
  border-radius: var(--radius);
  padding: 48px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.cta-band h2 { margin-bottom: 6px; }
.cta-band p { color: var(--grey-light); margin-bottom: 0; }

/* ---------- About page ---------- */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 48px;
  align-items: start;
}
@media (max-width: 860px) { .about-grid { grid-template-columns: minmax(0, 1fr); } }
.checklist { list-style: none; margin: 24px 0; padding: 0; display: grid; gap: 12px; }
.checklist-2row {
  grid-template-columns: none;
  grid-template-rows: repeat(2, auto);
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  column-gap: 28px;
  row-gap: 14px;
  justify-content: center;
}
@media (max-width: 640px) {
  .checklist-2row { grid-template-rows: none; grid-auto-flow: row; grid-auto-columns: unset; grid-template-columns: minmax(0, 1fr); }
}
.checklist li { display: flex; gap: 12px; align-items: flex-start; font-weight: 600; }
.checklist li::before {
  content: "✓";
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--black);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
}

/* ---------- Contact page ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
}
@media (max-width: 980px) { .contact-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .contact-grid { grid-template-columns: minmax(0, 1fr); } }

.contact-card {
  background: var(--white);
  border: 1px solid var(--grey-light);
  border-radius: var(--radius);
  padding: 30px 22px;
  text-align: center;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.contact-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.contact-card .icon {
  width: 54px;
  height: 54px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: var(--black);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}
.contact-card h3 { margin-bottom: 6px; font-size: 1rem; }
.contact-card p { font-size: 0.9rem; margin-bottom: 14px; word-break: break-word; }

.map-note {
  background: var(--grey-lighter);
  border-radius: var(--radius);
  padding: 34px;
  margin-top: 40px;
  text-align: center;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--black);
  color: var(--grey-light);
  padding: 60px 0 24px;
}
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 32px;
  padding-bottom: 36px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
@media (max-width: 860px) { .footer-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: minmax(0, 1fr); } }

.footer-grid h4 { color: var(--white); font-size: 0.95rem; margin-bottom: 16px; }
.footer-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.footer-brand img { height: 36px; border-radius: 4px; }
.footer-grid p { color: var(--grey-mid); font-size: 0.9rem; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer-links li { overflow-wrap: break-word; min-width: 0; }
.footer-links a { color: var(--grey-light); font-size: 0.92rem; }
.footer-links a:hover { color: var(--accent); }

.social-row { display: flex; gap: 12px; margin-top: 6px; }
.social-row a {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
}
.social-row a:hover { border-color: var(--accent); color: var(--accent); }
.social-row .svg-icon { width: 18px; height: 18px; }

.footer-bottom {
  padding-top: 22px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.82rem;
  color: var(--grey-mid);
}

.cookie-settings-btn {
  background: none;
  border: none;
  color: var(--grey-mid);
  font-size: 0.82rem;
  font-family: inherit;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
}
.cookie-settings-btn:hover { color: var(--accent); }

/* ---------- Cookie consent banner ---------- */
.cookie-banner {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 999;
  background: var(--black);
  color: var(--white);
  padding: 18px 20px;
  box-shadow: 0 -8px 24px rgba(0,0,0,0.3);
}
.cookie-banner.show { display: block; }
.cookie-banner-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.cookie-banner-inner p { margin: 0; font-size: 0.88rem; max-width: 620px; color: var(--white); }
.cookie-banner-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.cookie-banner-link { color: var(--grey-light); font-size: 0.85rem; text-decoration: underline; white-space: nowrap; }
.cookie-banner-actions .btn { padding: 10px 20px; font-size: 0.85rem; }
@media (max-width: 700px) {
  .cookie-banner-inner { flex-direction: column; align-items: flex-start; }
  .cookie-banner-actions { width: 100%; }
}

/* ---------- Page hero (inner pages) ---------- */
.page-hero {
  background: var(--black);
  color: var(--white);
  padding: 64px 0;
}
.page-hero p { color: var(--grey-light); max-width: 620px; margin-bottom: 0; }
