:root {
  --dark: #151918;
  --dark2: #202623;
  --green: #78b83f;
  --cream: #f5f2e9;
  --white: #fff;
  --muted: #b8c0bb;
  --text: #18201c;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: var(--cream);
  color: var(--text);
  line-height: 1.6;
}

body.menu-open {
  overflow: hidden;
}

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

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

.container {
  width: min(1180px, 92%);
  margin: 0 auto;
}

/* Typography helpers */
.eyebrow {
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.95rem 1.25rem;
  border-radius: 4px;
  font-weight: 800;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s;
}

.btn:hover {
  opacity: 0.9;
}

.btn-primary {
  background: var(--green);
  color: #10210b;
}

.btn-outline {
  border: 1px solid #fff;
  color: #fff;
  background: transparent;
}

.btn.full {
  width: 100%;
}

/* Header / Nav */
header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(21, 25, 24, 0.96);
  backdrop-filter: blur(8px);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 74px;
  gap: 1rem;
}

.nav-logo {
  width: 190px;
  max-width: 55vw;
}

.nav-links {
  display: flex;
  gap: 1.4rem;
  align-items: center;
  color: #fff;
  font-weight: 700;
}

.nav-links a:not(.btn) {
  opacity: 0.9;
}

.nav-links a:not(.btn):hover {
  opacity: 1;
  color: var(--green);
}

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  transition: transform 0.25s, opacity 0.25s;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Hero */
.hero {
  min-height: 720px;
  display: flex;
  align-items: center;
  background:
    linear-gradient(90deg, rgba(12, 16, 14, 0.97), rgba(12, 16, 14, 0.77), rgba(12, 16, 14, 0.35)),
    url('assets/ev-level2.jpg') center / cover;
  color: #fff;
  border-bottom: 8px solid var(--green);
}

.hero-content {
  max-width: 760px;
  padding: 90px 0;
}

.hero h1 {
  font-size: clamp(2.4rem, 5.5vw, 5.2rem);
  line-height: 0.95;
  text-transform: uppercase;
  margin: 0.4rem 0 1.2rem;
}

.hero h1 span {
  color: var(--green);
}

.hero p {
  font-size: 1.15rem;
  color: #e2e7e3;
  max-width: 540px;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.hero-trust {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 3rem;
}

.hero-trust div {
  padding: 1rem;
  border-left: 3px solid var(--green);
  background: rgba(255, 255, 255, 0.06);
}

.hero-trust strong {
  display: block;
  margin-bottom: 0.2rem;
}

.hero-trust span {
  font-size: 0.84rem;
  color: #c9d0cb;
}

/* Sections */
.section {
  padding: 90px 0;
}

.section-dark {
  background: var(--dark);
  color: #fff;
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  align-items: end;
  margin-bottom: 2.4rem;
}

.section-head.centered {
  justify-content: center;
  text-align: center;
}

.section-head h2 {
  font-size: clamp(1.9rem, 3.8vw, 3.6rem);
  line-height: 1.05;
  text-transform: uppercase;
  margin: 0.4rem 0 0;
}

.section-head p {
  max-width: 520px;
  color: #5c665f;
  margin: 0;
}

.section-dark .section-head p {
  color: var(--muted);
}

/* ========== NEW: Simplified Services Grid ========== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

.service-card {
  background: #fff;
  border: 1px solid #dfe5df;
  padding: 2rem 1.5rem;
  text-align: center;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  min-height: 180px;
}

.service-card:hover {
  border-color: var(--green);
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
}

.service-icon {
  width: 64px;
  height: 64px;
  color: var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
}

.service-icon svg {
  width: 100%;
  height: 100%;
}

.service-card h3 {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.3;
  font-weight: 800;
  color: var(--text);
}

/* Cards / Grids */
.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.1rem;
}

.card {
  background: #fff;
  border: 1px solid #dfe5df;
  padding: 1.6rem;
  min-height: 180px;
}

.card.dark {
  background: var(--dark2);
  border-color: rgba(255, 255, 255, 0.14);
}

.card h3 {
  line-height: 1.2;
  margin: 0 0 0.6rem;
  font-size: 1.15rem;
}

.card p {
  font-size: 0.94rem;
  color: #616b64;
  margin: 0;
}

.card.dark p {
  color: var(--muted);
}

/* About split */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.checks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
  margin-top: 1.8rem;
}

.check:before {
  content: "✓";
  color: var(--green);
  font-weight: 900;
  margin-right: 0.5rem;
}

/* Process */
.process {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
}

.step {
  background: #fff;
  padding: 1.4rem;
  border-top: 4px solid var(--green);
  color: var(--text);
}

.step strong {
  display: block;
  margin-bottom: 0.4rem;
}

.step span {
  font-size: 0.92rem;
  color: #5c665f;
}

/* CTA */
.cta {
  background:
    linear-gradient(90deg, rgba(16, 22, 18, 0.96), rgba(16, 22, 18, 0.68)),
    url('assets/solar-carport.jpg') center / cover;
  color: #fff;
  padding: 90px 0;
  text-align: center;
}

.cta h2 {
  font-size: clamp(2rem, 4.5vw, 4.2rem);
  line-height: 0.95;
  text-transform: uppercase;
  margin: 0.5rem 0 1rem;
}

.cta p {
  max-width: 520px;
  margin: 0 auto 1.8rem;
  color: #d5dbd7;
}

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 2rem;
}

.contact-card {
  background: #fff;
  padding: 2rem;
  border: 1px solid #e0e5e1;
}

.contact-card a {
  color: var(--green);
  font-weight: 700;
  word-break: break-all;
}

.contact-card a:hover {
  text-decoration: underline;
}

.phone-reveal {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: var(--green);
  font-weight: 700;
  cursor: pointer;
  text-align: left;
}

.phone-reveal:hover {
  text-decoration: underline;
}

.phone-reveal.revealed {
  color: var(--text);
  cursor: default;
  text-decoration: none;
}

.contact-cta h3 {
  margin-top: 0;
}

.contact-cta .note {
  margin-top: 1rem;
  font-size: 0.85rem;
  color: #6b756e;
}

/* Footer */
footer {
  background: #0f1211;
  color: #c7cec9;
  padding: 50px 0 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 2.5rem;
}

.footer-logo {
  width: 240px;
  margin-bottom: 1rem;
}

.footer-grid strong {
  display: block;
  color: #fff;
  margin-bottom: 0.6rem;
}

.footer-grid p {
  margin: 0;
  line-height: 1.7;
  font-size: 0.95rem;
}

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

/* ========== Service Sub-pages ========== */
.page-hero {
  background: var(--dark);
  color: #fff;
  padding: 80px 0 60px;
  border-bottom: 6px solid var(--green);
}

.page-hero .breadcrumb {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 1.2rem;
}

.page-hero .breadcrumb a {
  color: var(--green);
}

.page-hero h1 {
  font-size: clamp(2rem, 4vw, 3.4rem);
  text-transform: uppercase;
  line-height: 1.05;
  margin: 0 0 1rem;
}

.page-hero .lead {
  font-size: 1.15rem;
  color: #d0d6d2;
  max-width: 640px;
  margin: 0;
}

.service-content {
  padding: 70px 0;
}

.service-blurb {
  max-width: 720px;
  margin-bottom: 3.5rem;
  font-size: 1.1rem;
  line-height: 1.7;
}

.projects-heading {
  margin-bottom: 2rem;
}

.projects-heading .note {
  margin: 0.4rem 0 0;
  font-size: 0.9rem;
  color: #5f6a63;
}

.projects-heading h2 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  text-transform: uppercase;
  margin: 0.3rem 0 0;
}

.project-list {
  display: grid;
  gap: 2rem;
}

.project-card {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 2rem;
  background: #fff;
  border: 1px solid #dfe5df;
  overflow: hidden;
}

.project-card img {
  width: 100%;
  height: 100%;
  min-height: 200px;
  object-fit: cover;
}

.project-card .project-body {
  padding: 1.8rem 1.8rem 1.8rem 0;
}

.project-card h3 {
  margin: 0 0 0.6rem;
  font-size: 1.25rem;
}

.project-card .meta {
  font-size: 0.88rem;
  color: #6b756e;
  margin-bottom: 0.8rem;
}

.project-card p {
  margin: 0;
  color: #4a544e;
  font-size: 0.98rem;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--green);
  font-weight: 700;
  margin-top: 3rem;
}

.back-link:hover {
  text-decoration: underline;
}

/* ========== Responsive ========== */
@media (max-width: 980px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .process {
    grid-template-columns: repeat(3, 1fr);
  }

  .split,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .hero-trust {
    grid-template-columns: 1fr 1fr;
  }

  .project-card {
    grid-template-columns: 1fr;
  }

  .project-card .project-body {
    padding: 1.5rem;
  }
}

@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 74px;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--dark);
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    padding: 1.5rem 1.5rem 3rem;
    gap: 0;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
  }

  .nav-links.open {
    transform: translateX(0);
  }

  .nav-links a {
    padding: 1rem 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 1.1rem;
  }

  .nav-links .btn {
    margin-top: 1.5rem;
    text-align: center;
  }

  .section {
    padding: 65px 0;
  }

  .section-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .section-head.centered {
    align-items: center;
  }

  .hero {
    min-height: 580px;
  }

  .hero-content {
    padding: 70px 0 50px;
  }

  .hero-trust {
    grid-template-columns: 1fr;
  }

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

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

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

@media (max-width: 520px) {
  .services-grid,
  .grid-4,
  .process,
  .checks {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    flex-direction: column;
  }

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

  .nav-logo {
    width: 140px;
  }
}

/* ========== Project list on service pages ========== */
.project-list {
  display: grid;
  gap: 2.5rem;
}

.project-item {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 2rem;
  align-items: start;
  background: #fff;
  border: 1px solid #dfe5df;
  overflow: hidden;
}

.project-thumb {
  cursor: pointer;
  overflow: hidden;
  background: #1a1f1c;
  min-height: 220px;
  position: relative;
}

.project-thumb img {
  width: 100%;
  height: 100%;
  min-height: 220px;
  object-fit: cover;
  transition: transform 0.35s ease;
  display: block;
}

.project-thumb:hover img {
  transform: scale(1.04);
}

.project-info {
  padding: 1.8rem 1.8rem 1.8rem 0;
}

.project-info h3 {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
}

.project-info .meta {
  font-size: 0.88rem;
  color: #6b756e;
  margin-bottom: 0.8rem;
}

.project-info p {
  margin: 0;
  color: #4a544e;
  font-size: 0.98rem;
  line-height: 1.6;
}

/* ========== Gallery Modal ========== */
.gallery-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.gallery-modal[hidden] {
  display: none;
}

.gallery-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 12, 10, 0.88);
  cursor: pointer;
}

.gallery-panel {
  position: relative;
  background: #111;
  max-width: 960px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(0,0,0,0.5);
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 0.28s ease, transform 0.28s ease;
}

.gallery-panel.animate-in,
.gallery-panel.animate-in-mobile {
  opacity: 1;
  transform: scale(1);
}

.gallery-panel.animate-out {
  opacity: 0;
  transform: scale(0.94);
}

.gallery-close {
  position: absolute;
  top: 12px;
  right: 14px;
  z-index: 10;
  width: 44px;
  height: 44px;
  border: none;
  background: rgba(0,0,0,0.55);
  color: #fff;
  font-size: 1.8rem;
  line-height: 1;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.gallery-close:hover {
  background: rgba(0,0,0,0.8);
}

.gallery-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0a0c0b;
  min-height: 320px;
  max-height: 58vh;
}

.gallery-main-img {
  max-width: 100%;
  max-height: 58vh;
  object-fit: contain;
  display: block;
}

.gallery-thumbs {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  background: #161a18;
  overflow-x: auto;
  justify-content: center;
}

.gallery-thumb {
  width: 72px;
  height: 54px;
  object-fit: cover;
  border-radius: 3px;
  cursor: pointer;
  opacity: 0.55;
  border: 2px solid transparent;
  transition: opacity 0.2s, border-color 0.2s;
}

.gallery-thumb:hover,
.gallery-thumb.active {
  opacity: 1;
  border-color: var(--green);
}

.gallery-caption {
  padding: 14px 20px 18px;
  background: #111;
  color: #e2e7e3;
}

.gallery-caption h3 {
  margin: 0 0 0.4rem;
  font-size: 1.1rem;
  color: #fff;
}

.gallery-caption p {
  margin: 0;
  font-size: 0.92rem;
  color: #a8b0ab;
  line-height: 1.5;
}

.gallery-nav {
  position: absolute;
  top: 45%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border: none;
  background: rgba(0,0,0,0.5);
  color: #fff;
  font-size: 1.8rem;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  transition: background 0.2s;
}

.gallery-nav:hover {
  background: rgba(0,0,0,0.75);
}

.gallery-nav.prev { left: 12px; }
.gallery-nav.next { right: 12px; }

body.gallery-open {
  overflow: hidden;
}

/* Mobile adjustments for gallery + projects */
@media (max-width: 768px) {
  .project-item {
    grid-template-columns: 1fr;
  }

  .project-info {
    padding: 1.4rem;
  }

  .project-thumb {
    min-height: 200px;
  }

  .gallery-panel {
    max-height: 95vh;
    border-radius: 0;
  }

  .gallery-main {
    min-height: 240px;
    max-height: 50vh;
  }

  .gallery-nav {
    width: 42px;
    height: 42px;
    font-size: 1.5rem;
  }

  .gallery-thumbs {
    padding: 10px;
  }

  .gallery-thumb {
    width: 60px;
    height: 45px;
  }
}


.services-grid-6 {
  grid-template-columns: repeat(3, 1fr);
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.1rem;
}
@media (max-width: 900px) {
  .services-grid-6, .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 600px) {
  .services-grid-6, .grid-3 {
    grid-template-columns: 1fr;
  }
}
