/*
Theme Name: MMM Electrical
Theme URI: https://mmmelectricalprojects.co.za
Author: MMM Electrical Projects
Description: High-converting, SEO-focused WordPress theme for MMM Electrical Projects — electrical contractors, solar installers and COC specialists in Gauteng. Includes service, area and landing page templates, sticky call bar, WhatsApp button and JSON-LD schema.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: mmm-electrical
Tags: business, services, one-column, custom-menu, custom-logo, featured-images, blog
*/

:root {
  --brand: #f7941d;
  --brand-dark: #d97a06;
  --navy: #0d1b2a;
  --navy-soft: #16293d;
  --ink: #101828;
  --muted: #5b6675;
  --line: #e4e8ee;
  --surface: #f7f9fc;
  --white: #ffffff;
  --radius: 14px;
  --shadow: 0 10px 30px -12px rgba(13, 27, 42, 0.25);
  --container: 1180px;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--white);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .display {
  font-family: "Poppins", system-ui, sans-serif;
  color: var(--navy);
  line-height: 1.15;
  margin: 0 0 0.5em;
  font-weight: 700;
}

h1 { font-size: clamp(2rem, 5vw, 3.1rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 3.2vw, 2.1rem); }
h3 { font-size: 1.15rem; }

a { color: var(--brand-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }
ul { padding-left: 1.15rem; }
li { margin-bottom: 0.4rem; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.section { padding: 64px 0; }
.section--surface { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.muted { color: var(--muted); }
.lead { font-size: 1.08rem; color: var(--muted); max-width: 62ch; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.75rem; font-weight: 700; color: var(--brand-dark); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 22px; border-radius: 999px; font-weight: 700;
  border: 1px solid transparent; cursor: pointer; text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:hover { transform: translateY(-1px); text-decoration: none; }
.btn--primary { background: var(--brand); color: #1a1206; box-shadow: var(--shadow); }
.btn--primary:hover { background: var(--brand-dark); color: #fff; }
.btn--ghost { border-color: rgba(255, 255, 255, 0.35); color: #fff; }
.btn--outline { border-color: var(--line); color: var(--navy); background: #fff; }
.btn--wa { background: #25d366; color: #05320f; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(255, 255, 255, 0.94); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar { background: var(--navy); color: #cdd7e3; font-size: 0.83rem; }
.topbar .container { display: flex; justify-content: space-between; gap: 12px; padding-top: 8px; padding-bottom: 8px; flex-wrap: wrap; }
.topbar a { color: #fff; font-weight: 600; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 20px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: "Poppins", sans-serif; font-weight: 800; color: var(--navy); font-size: 1.05rem; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 36px; height: 36px; border-radius: 10px; background: linear-gradient(135deg, var(--brand), var(--brand-dark)); display: grid; place-items: center; color: #fff; font-weight: 800; }
.nav { display: flex; align-items: center; gap: 6px; }
.nav ul { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav a { color: var(--navy); font-weight: 600; font-size: 0.94rem; padding: 8px 12px; border-radius: 8px; }
.nav a:hover { background: var(--surface); text-decoration: none; }
.nav .sub-menu { display: none; position: absolute; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 8px; min-width: 230px; flex-direction: column; }
.nav li { position: relative; margin: 0; }
.nav li:hover > .sub-menu { display: flex; }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; font-weight: 700; }

@media (max-width: 960px) {
  .nav-toggle { display: block; }
  .nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--line); padding: 12px 20px 20px; }
  .nav.is-open { display: block; }
  .nav ul { flex-direction: column; gap: 2px; }
  .nav .sub-menu { position: static; display: flex; border: none; box-shadow: none; padding-left: 12px; }
}

/* ---------- Hero ---------- */
.hero { background: linear-gradient(160deg, var(--navy) 0%, var(--navy-soft) 55%, #1e3a5f 100%); color: #fff; padding: 70px 0 78px; }
.hero h1, .hero h2 { color: #fff; }
.hero .lead { color: #c9d5e3; }
.hero-grid { display: grid; gap: 36px; grid-template-columns: 1.15fr 0.85fr; align-items: start; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }
.badges { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 22px 0 0; }
.badges li { background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.18); color: #e6eef7; padding: 6px 12px; border-radius: 999px; font-size: 0.8rem; margin: 0; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }

/* ---------- Cards ---------- */
.grid { display: grid; gap: 18px; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; } }

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card h3 { margin-bottom: 6px; }
.card p { margin: 0; color: var(--muted); font-size: 0.94rem; }
.card .more { display: inline-block; margin-top: 12px; font-weight: 700; color: var(--brand-dark); }

.stat { text-align: center; }
.stat strong { display: block; font-family: "Poppins", sans-serif; font-size: 2rem; color: var(--brand-dark); }

/* ---------- Forms ---------- */
.quote-form { background: #fff; border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); color: var(--ink); }
.quote-form h3 { margin-bottom: 4px; }
.field { margin-bottom: 12px; }
.field label { display: block; font-size: 0.82rem; font-weight: 700; margin-bottom: 5px; color: var(--navy); }
.field input, .field select, .field textarea {
  width: 100%; padding: 11px 13px; border: 1px solid var(--line);
  border-radius: 10px; font: inherit; background: #fff;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--brand); border-color: var(--brand); }
.hp { position: absolute; left: -9999px; }
.form-note { font-size: 0.78rem; color: var(--muted); margin-top: 10px; }
.notice { padding: 12px 14px; border-radius: 10px; margin-bottom: 14px; font-weight: 600; }
.notice--ok { background: #e8f8ee; color: #14532d; }
.notice--err { background: #fdecec; color: #7f1d1d; }

/* ---------- FAQ ---------- */
.faq details { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin-bottom: 10px; background: #fff; }
.faq summary { font-weight: 700; cursor: pointer; color: var(--navy); }
.faq p { color: var(--muted); margin: 10px 0 0; }

/* ---------- CTA band ---------- */
.cta-band { background: linear-gradient(120deg, var(--brand), var(--brand-dark)); color: #2b1a03; padding: 44px 0; }
.cta-band h2 { color: #22160a; margin-bottom: 6px; }
.cta-band .inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }

/* ---------- Breadcrumbs ---------- */
.crumbs { font-size: 0.82rem; color: var(--muted); padding: 14px 0 0; }
.crumbs a { color: var(--muted); }

/* ---------- Post / page body ---------- */
.entry { max-width: 74ch; }
.entry h2 { margin-top: 1.6em; }
.entry ul { margin-bottom: 1.2em; }
.meta { font-size: 0.82rem; color: var(--muted); margin-bottom: 18px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: #b9c6d6; padding: 54px 0 90px; }
.site-footer h4 { color: #fff; font-size: 0.95rem; margin-bottom: 12px; }
.site-footer a { color: #d7e2ee; font-size: 0.9rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, 0.12); margin-top: 32px; padding-top: 18px; font-size: 0.82rem; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* ---------- Conversion widgets ---------- */
.callbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 80; display: none; background: var(--navy); border-top: 1px solid rgba(255,255,255,.12); }
.callbar a { flex: 1; text-align: center; padding: 14px 8px; font-weight: 700; color: #fff; font-size: 0.92rem; }
.callbar a.call { background: var(--brand); color: #1a1206; }
@media (max-width: 860px) { .callbar { display: flex; } body { padding-bottom: 54px; } }

.wa-float {
  position: fixed; right: 18px; bottom: 74px; z-index: 80;
  width: 54px; height: 54px; border-radius: 50%; background: #25d366; color: #fff;
  display: grid; place-items: center; box-shadow: var(--shadow); font-weight: 800;
}
@media (min-width: 861px) { .wa-float { bottom: 22px; } }

.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); }
.pagination { display: flex; gap: 8px; margin-top: 28px; flex-wrap: wrap; }
.pagination .page-numbers { padding: 8px 13px; border: 1px solid var(--line); border-radius: 9px; color: var(--navy); }
.pagination .current { background: var(--brand); border-color: var(--brand); }
