/* ============================================
   CJ's Building Services – Complete Stylesheet
   ============================================ */

:root {
  --navy: #0A2540;
  --navy-light: #143556;
  --charcoal: #2C3E50;
  --steel: #5D6D7E;
  --light-grey: #F5F7FA;
  --white: #FFFFFF;
  --accent: #E67E22;
  --accent-hover: #D35400;
  --text: #1A1A1A;
  --text-light: #5A6A7A;
  --border: #E1E5EB;
  --shadow: 0 4px 20px rgba(10, 37, 64, 0.08);
  --shadow-hover: 0 8px 30px rgba(10, 37, 64, 0.12);
  --radius: 8px;
  --transition: all 0.3s ease;
  --header-h: 72px;
}

/* ============================================
   DARK MODE VARIABLES
   ============================================ */

[data-theme="dark"] {
  --navy: #5b8def;
  --navy-light: #7ba3f5;
  --charcoal: #c8d0dc;
  --steel: #a0a8b4;
  --light-grey: #1a2332;
  --white: #0f1419;
  --text: #e8eaed;
  --text-light: #a0a8b4;
  --border: #2d3748;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
  --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.45);
}

/* ============================================
   RESET
   ============================================ */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: var(--text);
  line-height: 1.6;
  background: var(--white);
  font-size: 16px;
  transition: background 0.25s ease, color 0.25s ease;
}

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

a {
  color: var(--navy);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--accent);
}

ul {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
}

/* ============================================
   CONTAINER / UTILITIES
   ============================================ */

.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
}

.text-center { text-align: center; }
.mt-20 { margin-top: 20px; }
.mb-20 { margin-bottom: 20px; }

/* ============================================
   LOGOS
   IMPORTANT: each logo slot (header, hero, section
   header) holds two images — a light-mode version
   (logo.svg) and a dark-mode version (logo-white.svg).
   The rules below ensure only one is ever shown.
   ============================================ */

/* --- Header logo (170px) --- */
.logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
}

.logo .logo-light,
.logo .logo-dark {
  display: none !important;
}

html:not([data-theme="dark"]) .logo .logo-light {
  display: block !important;
  width: 170px;
  height: auto;
}

html[data-theme="dark"] .logo .logo-dark {
  display: block !important;
  width: 170px;
  height: auto;
}

/* --- Section header logo (180px), centered --- */
.section-header-logo {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  margin-bottom: 16px;
}

.section-header-logo .logo-light,
.section-header-logo .logo-dark {
  display: none !important;
  width: 180px;
  height: auto;
}

html:not([data-theme="dark"]) .section-header-logo .logo-light {
  display: block !important;
}

html[data-theme="dark"] .section-header-logo .logo-dark {
  display: block !important;
}

/* ============================================
   HEADER
   ============================================ */

.header {
  background: var(--white);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: background 0.25s;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  gap: 16px;
  min-height: var(--header-h);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-phone {
  display: none;
  font-weight: 600;
  color: var(--navy);
  font-size: 0.95rem;
  white-space: nowrap;
}

.header-phone:hover {
  color: var(--accent);
}

@media (min-width: 900px) {
  .header-phone {
    display: inline-flex;
  }
}

/* ============================================
   THEME TOGGLE
   ============================================ */

.theme-toggle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--charcoal);
  background: var(--light-grey);
  border: none;
  transition: var(--transition);
}

.theme-toggle:hover {
  background: var(--border);
}

.theme-toggle svg {
  width: 20px;
  height: 20px;
}

.theme-toggle .sun-icon {
  display: none;
}

html[data-theme="dark"] .theme-toggle .moon-icon {
  display: none;
}

html[data-theme="dark"] .theme-toggle .sun-icon {
  display: block;
}

/* ============================================
   NAVIGATION
   ============================================ */

.nav {
  display: flex;
  align-items: center;
  gap: 8px 20px;
}

.nav a {
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--charcoal);
  position: relative;
  padding: 4px 0;
}

.nav a:hover,
.nav a.active {
  color: var(--navy);
}

.nav a.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--accent);
}

.nav .btn {
  margin-left: 8px;
  padding: 10px 18px;
  font-size: 0.9rem;
}

.nav .btn::after {
  display: none;
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--accent);
  color: white !important;
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  line-height: 1.2;
}

.btn:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(230, 126, 34, 0.35);
  color: white !important;
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--navy);
  color: var(--navy) !important;
}

.btn-outline:hover {
  background: var(--navy);
  color: white !important;
  box-shadow: none;
}

.btn-large {
  padding: 16px 32px;
  font-size: 1.05rem;
}

html[data-theme="dark"] .btn-outline {
  border-color: var(--navy);
  color: var(--navy) !important;
}

html[data-theme="dark"] .btn-outline:hover {
  background: var(--navy);
  color: #0f1419 !important;
}

/* ============================================
   MOBILE MENU BUTTON
   ============================================ */

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  flex-direction: column;
}

.mobile-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--navy);
  margin: 5px 0;
  transition: var(--transition);
  border-radius: 1px;
}

.mobile-toggle.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.mobile-toggle.open span:nth-child(2) {
  opacity: 0;
}

.mobile-toggle.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ============================================
   HERO
   ============================================ */

.hero {
  background: linear-gradient(135deg, #0A2540 0%, #143556 100%);
  color: white;
  padding: 90px 0 100px;
  position: relative;
  overflow: hidden;
}

.hero.has-image {
  background:
    linear-gradient(
      105deg,
      rgba(10, 37, 64, 0.88) 0%,
      rgba(10, 37, 64, 0.72) 55%,
      rgba(20, 53, 86, 0.6) 100%
    ),
    url('../images/hero-block-paving.jpg') center / cover no-repeat;
  min-height: 480px;
  display: flex;
  align-items: center;
  padding: 70px 0;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 50%;
  height: 100%;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="80" cy="20" r="40" fill="rgba(255,255,255,0.03)"/><circle cx="20" cy="80" r="30" fill="rgba(255,255,255,0.02)"/></svg>');
  background-size: cover;
  pointer-events: none;
}

.hero.has-image::before {
  display: none;
}

.hero-content {
  position: relative;
  max-width: 680px;
}

.hero h1 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 18px;
  letter-spacing: -0.5px;
  color: white;
}

.hero p {
  font-size: 1.15rem;
  opacity: 0.92;
  margin-bottom: 32px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.95);
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.hero .btn {
  background: var(--accent);
}

.hero .btn:hover {
  background: var(--accent-hover);
}

.hero .btn-outline {
  border-color: rgba(255, 255, 255, 0.6);
  color: white !important;
  background: transparent;
}

.hero .btn-outline:hover {
  background: white;
  color: #0A2540 !important;
  border-color: white;
}

.hero-phone {
  display: inline-block;
  font-weight: 600;
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.9);
  margin-top: 16px;
}

.hero-phone:hover {
  color: white;
}

/* ============================================
   TRUST BAR
   ============================================ */

.trust-bar {
  background: var(--light-grey);
  padding: 22px 0;
  border-bottom: 1px solid var(--border);
}

.trust-items {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 32px 48px;
  text-align: center;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--charcoal);
}

.trust-item svg {
  width: 22px;
  height: 22px;
  color: var(--accent);
  flex-shrink: 0;
}

.trust-item a {
  color: var(--charcoal);
  font-weight: 600;
}

.trust-item a:hover {
  color: var(--accent);
}

/* ============================================
   SECTIONS
   ============================================ */

.section {
  padding: 80px 0;
}

.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 50px;
}

.section-header h2 {
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 14px;
  letter-spacing: -0.3px;
}

.section-header p {
  color: var(--text-light);
  font-size: 1.05rem;
}

.section-alt {
  background: var(--light-grey);
}

/* ============================================
   SERVICE CARDS
   ============================================ */

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 28px;
}

.service-card {
  background: var(--white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
}

.service-card-img {
  height: 180px;
  background: linear-gradient(135deg, #1a3a5c, #0A2540);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.service-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.service-card:hover .service-card-img img {
  transform: scale(1.05);
}

.service-card-body {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.service-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 10px;
}

.service-card p {
  color: var(--text-light);
  font-size: 0.95rem;
  margin-bottom: 18px;
  flex: 1;
}

.service-card .btn {
  align-self: flex-start;
  padding: 10px 18px;
  font-size: 0.9rem;
}

/* ============================================
   WHY CHOOSE US
   ============================================ */

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 28px;
}

.feature-box {
  text-align: center;
  padding: 28px 20px;
}

.feature-icon {
  width: 56px;
  height: 56px;
  background: rgba(230, 126, 34, 0.12);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
  color: var(--accent);
  font-size: 1.5rem;
}

.feature-box h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 8px;
}

.feature-box p {
  color: var(--text-light);
  font-size: 0.95rem;
}

/* ============================================
   TRADE BADGE (Checkatrade)
   ============================================ */

.trade-badge {
  display: flex;
  justify-content: center;
  margin-top: 44px;
}

.trade-badge-card {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 32px;
  box-shadow: var(--shadow);
}

.trade-badge-logo {
  width: 190px;
  height: auto;
  display: block;
  margin: 0 auto;
}

/* ============================================
   AREAS
   ============================================ */

.areas-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 20px;
}

.area-tag {
  background: var(--white);
  border: 1px solid var(--border);
  padding: 8px 18px;
  border-radius: 50px;
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--charcoal);
  transition: var(--transition);
  display: inline-block;
}

a.area-tag:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(230, 126, 34, 0.05);
}

/* ============================================
   CTA BANNER
   ============================================ */

.cta-banner {
  background: linear-gradient(135deg, #0A2540, #143556);
  color: white;
  padding: 60px 0;
  text-align: center;
}

.cta-banner h2 {
  font-size: clamp(1.6rem, 3vw, 2rem);
  font-weight: 800;
  margin-bottom: 14px;
  color: white;
}

.cta-banner p {
  opacity: 0.9;
  margin-bottom: 28px;
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.9);
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

.cta-banner .btn {
  background: var(--accent);
}

.cta-banner .btn:hover {
  background: var(--accent-hover);
}

.cta-phone {
  display: inline-block;
  font-size: 1.35rem;
  font-weight: 700;
  color: white;
  margin-bottom: 16px;
}

.cta-phone:hover {
  color: white;
  text-decoration: underline;
}

/* ============================================
   PAGE HERO
   ============================================ */

.page-hero {
  background: linear-gradient(135deg, #0A2540 0%, #143556 100%);
  color: white;
  padding: 50px 0 60px;
  text-align: center;
}

.page-hero h1 {
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  font-weight: 800;
  margin-bottom: 12px;
  color: white;
}

.page-hero p {
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto;
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.92);
}

.page-hero-image {
  margin: 0 auto 24px;
  max-width: 800px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}

.page-hero-image img {
  width: 100%;
  height: auto;
  display: block;
  max-height: 400px;
  object-fit: cover;
}

/* ============================================
   CONTENT
   ============================================ */

.content-block {
  max-width: 800px;
  margin: 0 auto;
}

.content-block h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--navy);
  margin: 36px 0 14px;
}

.content-block h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--charcoal);
  margin: 28px 0 10px;
}

.content-block p {
  margin-bottom: 16px;
  color: var(--text);
}

.content-block ul {
  margin: 12px 0 20px 24px;
}

.content-block li {
  margin-bottom: 8px;
}

.benefits-list {
  list-style: none;
  margin-left: 0 !important;
}

.benefits-list li {
  position: relative;
  padding-left: 28px;
  margin-bottom: 12px;
  color: var(--text-light);
}

.benefits-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

/* ============================================
   CONTACT
   ============================================ */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 50px;
  align-items: start;
}

.contact-info h3 {
  font-size: 1.3rem;
  color: var(--navy);
  margin-bottom: 16px;
}

.contact-info p {
  margin-bottom: 10px;
  color: var(--text-light);
}

.contact-info strong {
  color: var(--charcoal);
}

.contact-phone-large {
  display: inline-block;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--navy);
  margin: 12px 0;
}

.contact-phone-large:hover {
  color: var(--accent);
}

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 6px;
  color: var(--charcoal);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 1rem;
  transition: var(--transition);
  background: var(--white);
  color: var(--text);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(230, 126, 34, 0.15);
}

.form-group textarea {
  min-height: 140px;
  resize: vertical;
}

/* ============================================
   FAQ
   ============================================ */

.faq-item {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 14px;
  overflow: hidden;
}

.faq-question {
  width: 100%;
  text-align: left;
  padding: 18px 22px;
  background: none;
  border: none;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--navy);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: inherit;
  transition: background 0.2s;
}

.faq-question:hover {
  background: var(--light-grey);
}

.faq-question span {
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--text-light);
  transition: transform 0.25s;
}

.faq-answer {
  padding: 0 22px 18px;
  color: var(--text-light);
  display: none;
}

.faq-item.open .faq-answer {
  display: block;
}

.faq-item.open .faq-question span {
  transform: rotate(45deg);
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
  background: #0A2540;
  color: rgba(255, 255, 255, 0.85);
  padding: 60px 0 30px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer h4 {
  color: white;
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 18px;
}

.footer p {
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 12px;
  color: rgba(255, 255, 255, 0.8);
}

.footer a {
  color: rgba(255, 255, 255, 0.8);
  display: block;
  margin-bottom: 8px;
  font-size: 0.95rem;
}

.footer a:hover {
  color: var(--accent);
}

.footer-phone {
  display: inline-block !important;
  font-size: 1.15rem !important;
  font-weight: 700 !important;
  color: white !important;
  margin-bottom: 8px;
}

.footer .btn {
  background: var(--accent);
  color: white !important;
  display: inline-flex;
  margin-top: 4px;
}

.footer .btn:hover {
  background: var(--accent-hover);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 24px;
  text-align: center;
  font-size: 0.9rem;
  opacity: 0.75;
}

.footer-bottom p {
  margin: 0;
  color: rgba(255, 255, 255, 0.7);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 960px) {
  .nav {
    display: none;
  }

  .mobile-toggle {
    display: flex;
  }

  .nav.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    gap: 4px;
    border-bottom: 1px solid var(--border);
    z-index: 999;
  }

  .nav.open a {
    padding: 12px 8px;
    width: 100%;
  }

  .nav.open a.active::after {
    display: none;
  }

  .nav.open .btn {
    margin: 8px 0 0;
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 900px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 600px) {
  .header-inner {
    padding: 12px 0;
  }

  /* Header logo becomes smaller on phones */
  html:not([data-theme="dark"]) .logo .logo-light,
  html[data-theme="dark"] .logo .logo-dark {
    width: 130px;
  }

  /* Section logo remains clearly visible but responsive */
  .section-header-logo .logo-light,
  .section-header-logo .logo-dark {
    width: 160px;
  }

  .hero {
    padding: 60px 0 70px;
  }

  .hero.has-image {
    min-height: auto;
    padding: 50px 0;
  }

  .section {
    padding: 55px 0;
  }

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

  .trust-items {
    gap: 18px 24px;
  }

  .page-hero {
    padding: 40px 0 45px;
  }

  .page-hero-image {
    margin-bottom: 18px;
    border-radius: 8px;
  }

  .page-hero-image img {
    max-height: 220px;
  }
}
