/* ============================================
   Dixon Electrical Solutions Ltd — Main Stylesheet
   Deep navy + electric yellow palette.
   Military-veteran heritage (navy authority) + electrical safety (warning yellow).
   Inter typography from Google Fonts (loaded in <head>).
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Deep navy + electric yellow brand palette */
  --accent: #FFD60A;             /* electric yellow */
  --accent-dark: #E6BD00;
  --accent-hover: #FFC700;
  --accent-light: #FFF6CC;
  --primary: #0A2540;             /* deep navy */
  --primary-dark: #061A2E;
  --primary-soft: #1A3A60;
  --dark: #0A2540;
  --white: #ffffff;
  --gray-900: #0A1628;
  --gray-800: #1F2A3D;
  --gray-700: #3F4A5C;
  --gray-600: #6B7280;
  --gray-400: #9CA3AF;
  --gray-300: #D1D5DB;
  --gray-200: #E5E7EB;
  --gray-100: #F3F4F6;
  --ink: #1F2A3D;
  --bg: #ffffff;
  --card-bg: #F8FAFC;
  --border: #E5E7EB;
  --text-muted: #4F5A6C;
  --heading-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --radius: 8px;
  --shadow: 0 2px 12px rgba(10,37,64,0.08);
  --shadow-lg: 0 8px 32px rgba(10,37,64,0.14);
  --transition: 0.3s ease;
  --max-width: 1200px;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--gray-900);
  line-height: 1.6;
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

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

/* --- Typography --- */
h1, h2, h3, h4 { font-family: var(--heading-font); line-height: 1.2; font-weight: 800; color: var(--gray-900); letter-spacing: -0.01em; }
h1 { font-size: clamp(2.2rem, 5.5vw, 3.6rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 4vw, 2.4rem); font-weight: 800; }
h3 { font-size: clamp(1.2rem, 3vw, 1.5rem); font-weight: 700; }
p { font-size: 1.05rem; color: var(--gray-700); }

/* --- Buttons --- */
.btn {
  display: inline-block;
  padding: 16px 36px;
  font-size: 1.05rem;
  font-weight: 700;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
  font-family: var(--font);
}

.btn-primary {
  background: var(--accent);
  color: var(--primary);
}
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-2px); box-shadow: var(--shadow); }

.btn-secondary {
  background: transparent;
  color: var(--accent);
  border: 2px solid var(--accent);
}
.btn-secondary:hover { background: var(--accent); color: var(--primary); }

.btn-white {
  background: rgba(255,255,255,0.10);
  color: #ffffff;
  border: 2px solid rgba(255,255,255,0.30);
}
.btn-white:hover { background: rgba(255,255,255,0.20); transform: translateY(-2px); }

.btn-navy {
  background: var(--primary);
  color: #ffffff;
}
.btn-navy:hover { background: var(--primary-soft); transform: translateY(-2px); }

/* --- Phone Bar --- */
.phone-bar {
  background: var(--accent);
  color: var(--primary);
  text-align: center;
  padding: 8px 24px;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.3px;
}
.phone-bar a {
  color: var(--primary);
  font-weight: 800;
  font-size: 1rem;
}
.phone-bar a:hover { text-decoration: underline; }

/* --- Header / Nav --- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--primary);
  border-bottom: 3px solid var(--accent);
  padding: 0 24px;
}

.nav {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo {
  font-size: 1.3rem;
  font-weight: 800;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--heading-font);
  letter-spacing: -0.01em;
}
.logo .logo-mark {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  display: block;
  color: var(--accent);
}
.logo-byline {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: rgba(255,255,255,0.80);
  letter-spacing: 0.2px;
  margin-top: 2px;
  font-family: var(--font);
  text-transform: none;
}
.logo-byline strong {
  color: var(--accent);
  font-weight: 700;
}

.nav-links {
  display: flex;
  gap: 28px;
  align-items: center;
}

.nav-links a {
  font-weight: 600;
  color: #ffffff;
  transition: var(--transition);
  font-size: 0.95rem;
}
.nav-links a:hover { color: var(--accent); }

.nav-cta {
  background: var(--accent) !important;
  color: var(--primary) !important;
  padding: 10px 20px !important;
  border-radius: var(--radius) !important;
  font-weight: 700 !important;
}
.nav-cta:hover { background: var(--accent-hover) !important; }

.mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 8px;
}
.mobile-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: #ffffff;
  transition: var(--transition);
}

/* --- Hero Section --- */
.hero {
  padding: 150px 24px 80px;
  background: linear-gradient(135deg, #061A2E 0%, #0A2540 50%, #1A3A60 100%);
  color: #ffffff;
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* Home hero gets a clean stock photo background — consumer unit install. Dark gradient keeps headline legible. */
.hero--home {
  background: linear-gradient(135deg, rgba(6,26,46,0.86) 0%, rgba(10,37,64,0.78) 50%, rgba(26,58,96,0.66) 100%),
              url('../images/hero-consumer-unit-install.jpg') center center / cover no-repeat;
}

.hero::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(255,214,10,0.10) 0%, transparent 70%);
  border-radius: 50%;
}

.hero h1 {
  margin-bottom: 20px;
  position: relative;
  color: #ffffff;
}

.hero p {
  color: rgba(255,255,255,0.92);
  font-size: 1.15rem;
  max-width: 640px;
  margin: 0 auto 36px;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  position: relative;
}

/* AI-template tell — hide ALL-CAPS section overlines on certain layouts */
.section-tag {
  display: inline-block;
  background: transparent;
  color: var(--accent-dark);
  font-weight: 700;
  font-size: 0.78rem;
  padding: 0;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 1.8px;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 4px;
}

/* --- Sections --- */
.section {
  padding: 80px 24px;
}
.section-gray { background: var(--gray-100); }
.section-dark { background: var(--primary); color: #ffffff; }
.section-yellow { background: linear-gradient(135deg, var(--accent-dark) 0%, var(--accent) 100%); color: var(--primary); }
.section-navy-deep { background: linear-gradient(135deg, #061A2E 0%, #0A2540 50%, #1A3A60 100%); color: #ffffff; }

.section-dark h1, .section-dark h2, .section-dark h3, .section-dark h4,
.section-navy-deep h1, .section-navy-deep h2, .section-navy-deep h3, .section-navy-deep h4 { color: #ffffff !important; }
.section-dark p, .section-navy-deep p { color: rgba(255,255,255,0.92); }

.section-yellow h1, .section-yellow h2, .section-yellow h3, .section-yellow h4 { color: var(--primary) !important; }
.section-yellow p { color: var(--primary); }

.section-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 48px;
}
.section-header p {
  margin-top: 12px;
}

/* --- Benefits Grid --- */
.benefits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
}

.benefit-card {
  background: var(--white);
  border-radius: 4px;
  padding: 32px;
  box-shadow: var(--shadow);
  transition: var(--transition);
  border: 1px solid var(--gray-200);
  border-top: 3px solid var(--accent);
}
.benefit-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }

.benefit-card h3 { margin-bottom: 10px; color: var(--primary); }

/* --- How It Works --- */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 32px;
}

.step {
  text-align: center;
  position: relative;
}

.step-number {
  width: 56px;
  height: 56px;
  background: var(--accent);
  color: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 800;
  margin: 0 auto 20px;
}

.step h3 { margin-bottom: 8px; color: var(--primary); }

/* --- Testimonials --- */
.testimonial-card {
  background: var(--white);
  border-radius: 4px;
  padding: 28px;
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-200);
  border-left: 3px solid var(--accent);
}

/* --- Service Cards --- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.service-card {
  background: var(--white);
  border-radius: 6px;
  padding: 28px;
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-200);
  border-top: 3px solid var(--accent);
  transition: var(--transition);
}
.service-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.service-card h3 { color: var(--primary); margin-bottom: 8px; }
.service-card .from-price {
  display: inline-block;
  margin-top: 12px;
  font-weight: 700;
  color: var(--primary);
  background: var(--accent-light);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 14px;
}
.service-card a.read-more {
  display: inline-block;
  margin-top: 14px;
  color: var(--primary);
  font-weight: 700;
  font-size: 14px;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 2px;
}

/* --- Areas Grid --- */
.areas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.area-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px 24px;
  text-align: center;
  font-weight: 600;
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-200);
  transition: var(--transition);
  color: var(--primary);
}
.area-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

/* --- About --- */
.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.about-text h2 { margin-bottom: 16px; }
.about-text p { margin-bottom: 16px; }

.about-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 28px;
}

.about-stat {
  text-align: center;
  padding: 16px;
  background: var(--gray-100);
  border-radius: var(--radius);
  border: 1px solid var(--gray-200);
}
.about-stat .number { font-size: 1.8rem; font-weight: 800; color: var(--primary); }
.about-stat .label { font-size: 0.85rem; color: var(--gray-600); margin-top: 4px; }

/* Veteran badge */
.veteran-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--primary);
  color: var(--accent);
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 24px;
}
.veteran-badge svg { width: 18px; height: 18px; }

/* --- FAQ --- */
.faq-list {
  max-width: 760px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid var(--gray-200);
}

.faq-question {
  width: 100%;
  background: none;
  border: none;
  padding: 20px 0;
  font-size: 1.05rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font);
  color: var(--gray-900);
}

.faq-question::after {
  content: '+';
  font-size: 1.4rem;
  font-weight: 300;
  transition: var(--transition);
  color: var(--primary);
}

.faq-item.active .faq-question::after { transform: rotate(45deg); }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; }
.faq-answer p { padding-bottom: 20px; }
.faq-item.active .faq-answer { max-height: 400px; }

/* --- Footer --- */
.footer {
  background: var(--primary-dark);
  color: #ffffff;
  padding: 60px 24px 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.footer-brand p {
  color: rgba(255,255,255,0.65);
  margin-top: 12px;
  font-size: 0.95rem;
}

.footer h4 {
  font-size: 1rem;
  margin-bottom: 16px;
  color: var(--accent);
}

.footer ul li { margin-bottom: 8px; }
.footer ul a {
  color: rgba(255,255,255,0.65);
  transition: var(--transition);
  font-size: 0.95rem;
}
.footer ul a:hover { color: var(--white); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.10);
  margin-top: 40px;
  padding-top: 24px;
  text-align: center;
  color: rgba(255,255,255,0.50);
  font-size: 0.85rem;
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
}

/* --- CTA Banner --- */
.cta-banner {
  text-align: center;
  padding: 80px 24px;
}
.cta-banner h2 { margin-bottom: 16px; }
.cta-banner p {
  color: rgba(255,255,255,0.85);
  max-width: 540px;
  margin: 0 auto 32px;
}

/* --- Form helpers --- */
.form-group { margin-bottom: 18px; }
.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  font-size: 0.95rem;
  color: var(--primary);
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: var(--font);
  transition: var(--transition);
  background: var(--white);
  color: var(--gray-900);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(10,37,64,0.10);
}

/* --- Mobile --- */
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .about-content { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--primary);
    flex-direction: column;
    padding: 24px;
    gap: 16px;
    border-bottom: 1px solid var(--gray-200);
    box-shadow: var(--shadow);
  }
  .nav-links.active { display: flex; }
  .mobile-toggle { display: flex; }

  .hero { padding: 120px 24px 60px; }

  .footer-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
  .about-stats { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
}

/* --- Sticky Mobile CTA Bar --- */
.mobile-cta-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 998;
  background: rgba(10,37,64,0.97);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(255,255,255,0.10);
  padding: 8px 12px;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.mobile-cta-bar a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 8px;
  border-radius: var(--radius);
  font-size: 0.85rem;
  font-weight: 700;
  text-align: center;
  transition: var(--transition);
}

.mobile-cta-phone {
  background: rgba(255,255,255,0.10);
  color: #ffffff;
}
.mobile-cta-quote {
  background: var(--accent);
  color: var(--primary);
}

@media (max-width: 768px) {
  .mobile-cta-bar { display: grid; }
  body { padding-bottom: 72px; }
}

/* --- Legal pages --- */
.legal-page { padding: 130px 0 80px; }
.legal-page h1 { color: var(--primary); font-size: 2.4rem; margin: 0 0 16px 0; }
.legal-page .legal-sub { color: var(--gray-600); margin: 0 0 32px 0; }
.legal-page h2 { color: var(--primary); font-size: 1.3rem; margin: 36px 0 12px 0; }
.legal-page p, .legal-page li { color: var(--gray-700); line-height: 1.65; margin-bottom: 12px; }
.legal-page ul { padding-left: 20px; margin-bottom: 16px; }
.legal-page strong { color: var(--gray-900); }
.legal-page a { color: var(--primary); border-bottom: 1px solid var(--accent); }

/* --- Thank-you / 404 helpers --- */
.thank-you-content {
  text-align: center;
  padding: 80px 24px;
  max-width: 600px;
  margin: 0 auto;
}
.thank-you-icon {
  width: 80px;
  height: 80px;
  background: var(--accent-light);
  color: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  margin: 0 auto 24px;
}

/* --- Gallery --- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}
.gallery-grid img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--gray-200);
}
