:root {
  --color-dark: #12181f;
  --color-navy: #1b2530;
  --color-accent: #2e8bff;
  --color-accent-dark: #1c6fdc;
  --color-light: #f5f7fa;
  --color-muted: #6b7683;
  --radius: 10px;
  --max-width: 1160px;
  font-size: 16px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--color-dark);
  background: #fff;
  line-height: 1.6;
}

h1, h2, h3 { line-height: 1.2; margin-top: 0; }
a { color: var(--color-accent-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

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

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-dark);
  color: #fff;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.logo {
  font-weight: 700;
  font-size: 1.25rem;
  color: #fff;
  letter-spacing: 0.5px;
}
.logo:hover { text-decoration: none; opacity: 0.85; }
.main-nav a {
  color: #cfd6dd;
  margin-left: 28px;
  font-weight: 500;
}
.main-nav a:hover { color: #fff; text-decoration: none; }
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
}

@media (max-width: 720px) {
  .main-nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--color-dark);
    flex-direction: column;
    padding: 12px 24px 20px;
  }
  .main-nav.open { display: flex; }
  .main-nav a { margin: 10px 0; }
  .nav-toggle { display: block; }
}

/* Hero */
.hero {
  position: relative;
  color: #fff;
  padding: 140px 0;
  text-align: center;
  overflow: hidden;
  background: var(--color-dark);
}
.hero-slider {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.5s ease-in-out;
}
.hero-slide.active { opacity: 1; }
.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(135deg, rgba(18,24,31,0.82), rgba(27,37,48,0.72));
}
.hero-inner { position: relative; z-index: 2; max-width: 780px; margin: 0 auto; padding: 0 24px; }
.hero h1 { font-size: 2.4rem; margin-bottom: 20px; }
.hero-lead { font-size: 1.1rem; color: #e4e8ec; margin-bottom: 32px; }
.hero-dots {
  position: absolute;
  z-index: 2;
  bottom: 24px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 10px;
}
.hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  cursor: pointer;
  border: none;
  padding: 0;
  transition: background 0.2s ease;
}
.hero-dot.active { background: #fff; }

.btn {
  display: inline-block;
  padding: 14px 30px;
  border-radius: var(--radius);
  font-weight: 600;
  border: none;
  cursor: pointer;
  font-size: 1rem;
}
.btn-primary {
  background: var(--color-accent);
  color: #fff;
}
.btn-primary:hover {
  background: var(--color-accent-dark);
  text-decoration: none;
}

/* Sections */
.section { padding: 80px 0; }
.section.alt { background: var(--color-light); }
.section h2 {
  font-size: 2rem;
  margin-bottom: 40px;
  text-align: center;
}

/* Services */
.grid { display: grid; gap: 32px; }
.services-grid { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.card {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 2px 14px rgba(0,0,0,0.08);
}
.card img { width: 100%; height: 200px; object-fit: cover; display: block; }
.card h3, .card p { padding: 0 20px; }
.card h3 { margin-top: 20px; }
.card p { color: var(--color-muted); padding-bottom: 20px; }

/* Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}
.gallery-grid img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 6px;
  cursor: pointer;
  transition: transform 0.15s ease;
}
.gallery-grid img:hover { transform: scale(1.03); }

/* About */
.about-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 48px;
  align-items: center;
}
.about-image img { width: 100%; border-radius: var(--radius); }
.contact-line { margin-top: 24px; }
@media (max-width: 760px) {
  .about-inner { grid-template-columns: 1fr; }
}

/* Contact form */
.contact-form { max-width: 620px; margin: 32px auto 0; }
.form-row { margin-bottom: 18px; display: flex; flex-direction: column; }
.form-row label { font-weight: 600; margin-bottom: 6px; font-size: 0.9rem; }
.form-row input,
.form-row select,
.form-row textarea {
  padding: 12px 14px;
  border: 1px solid #d3d9e0;
  border-radius: 6px;
  font-size: 1rem;
  font-family: inherit;
}
.form-status { margin-top: 16px; font-weight: 600; }
.form-status.success { color: #1e8e3e; }
.form-status.error { color: #d93025; }

/* Footer */
.site-footer {
  background: var(--color-dark);
  color: #cfd6dd;
  text-align: center;
  padding: 36px 0;
  font-size: 0.9rem;
}
.site-footer a { color: #fff; }

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 24px;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 6px; }
.lightbox-close {
  position: absolute;
  top: 24px;
  right: 32px;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  background: none;
  border: none;
}

/* Sample Map Viewer */
.map-section .map-intro {
  max-width: 720px;
  margin: 0 0 28px;
  color: var(--color-muted);
}
.map-viewer-frame {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(18, 24, 31, 0.18);
  border: 1px solid rgba(18, 24, 31, 0.08);
}
#mapViewer, #mapViewerSolar {
  width: 100%;
  height: 560px;
  background: #12181f;
}
.map-caption {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  font-size: 0.9rem;
  color: var(--color-muted);
}
.map-caption strong { color: var(--color-dark); }
.card-link {
  display: inline-block;
  margin-top: 10px;
  font-weight: 600;
  color: var(--color-accent-dark);
}

@media (max-width: 640px) {
  #mapViewer, #mapViewerSolar { height: 380px; }
}

/* Solar field link card (in maps overview) */
.map-link-card { padding: 0; }
.map-link-card-inner {
  display: flex;
  flex-direction: column;
  gap: 6px;
  justify-content: center;
  height: 180px;
  padding: 0 28px;
  background: var(--color-navy);
  color: #fff;
  text-decoration: none;
}
.map-link-card-inner:hover { text-decoration: none; background: var(--color-dark); }
.map-link-card-title { font-size: 1.4rem; font-weight: 700; }
.map-link-card-desc { color: #cfd6dd; font-size: 0.95rem; }

/* model-viewer progress bar */
.model-viewer-progress {
  display: block;
  width: 60%;
  height: 4px;
  background: rgba(255,255,255,0.2);
  border-radius: 2px;
  margin: 0 auto;
  position: relative;
  top: 278px;
}
.model-viewer-progress-bar {
  width: var(--progress-bar-width, 0%);
  height: 100%;
  background: var(--color-accent);
  border-radius: 2px;
}
