/* ==========================================================================
   CleanEnergy Gas & Solar (CEGS) - Master Stylesheet
   Pure Black Transparent Header Overlay, Provided PNG Logo & Favicon Styling
   ========================================================================== */

:root {
  /* Brand Palette */
  --color-primary: #1e5631;       /* Forest Green */
  --color-primary-dark: #133a21;  /* Deep Forest */
  --color-primary-light: #2d7a47; /* Mid Forest Green */
  --color-accent: #e5a93c;        /* Solar Amber */
  --color-accent-hover: #cf9328;
  --color-gas-blue: #1d70b8;      /* Gas Accent Blue */
  --color-gas-blue-hover: #155894;

  /* Surfaces & Neutral Tones */
  --color-bg: #f9fbf9;
  --color-surface: #ffffff;
  --color-surface-alt: #f0f4f1;
  --color-surface-dark: #090e0b;
  --color-text: #1a202c;
  --color-text-muted: #4a5568;
  --color-text-light: #f8fafc;
  --color-border: #d2dcd4;
  --color-border-light: #e2e8f0;

  /* Typography & Layout Constraints */
  --font-base: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  --max-width: 1200px;
  --max-width-narrow: 800px;
  
  /* Elevation & Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.35), 0 8px 10px -6px rgba(0, 0, 0, 0.2);

  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s ease;
}

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

html {
  font-family: var(--font-base);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-bg);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1 0 auto;
}

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

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

a:hover, a:focus-visible {
  color: var(--color-primary-dark);
}

h1, h2, h3, h4, h5, h6 {
  color: var(--color-primary-dark);
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.25rem, 5vw, 3.5rem); margin-bottom: 1.25rem; }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.5rem); margin-bottom: 1rem; }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.75rem); margin-bottom: 0.75rem; }
h4 { font-size: 1.25rem; margin-bottom: 0.5rem; }

p { margin-bottom: 1rem; color: var(--color-text); }
p.lead { font-size: 1.2rem; font-weight: 500; color: var(--color-text-muted); }

/* Accessible Focus States */
:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 3px;
}

/* Container Utility */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

.container-narrow {
  max-width: var(--max-width-narrow);
}

/* --------------------------------------------------------------------------
   Header & Pure Black Transparent Overlay Navigation
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
  transition: background-color var(--transition-normal);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 85px;
}

.brand-logo img, .brand-logo svg {
  height: 52px;
  width: auto;
  display: block;
}

.nav-desktop {
  display: none;
}

@media (min-width: 992px) {
  .nav-desktop {
    display: flex;
    align-items: center;
    gap: 2rem;
  }
}

.nav-link {
  font-weight: 600;
  font-size: 1rem;
  color: #ffffff;
  padding: 0.6rem 0.85rem;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: color var(--transition-fast), background-color var(--transition-fast);
}

.nav-link:hover {
  color: var(--color-accent);
  background-color: rgba(255, 255, 255, 0.1);
}

.nav-link.active {
  color: #ffffff;
  font-weight: 700;
  border-bottom: 3px solid var(--color-accent);
}

/* Services Dropdown Menu (Pure Black Overlay) */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-toggle {
  cursor: pointer;
}

.nav-dropdown-toggle::after {
  content: "";
  display: inline-block;
  width: 0;
  height: 0;
  margin-left: 0.25rem;
  vertical-align: middle;
  border-top: 5px solid currentColor;
  border-right: 4px solid transparent;
  border-left: 4px solid transparent;
  transition: transform var(--transition-fast);
}

.nav-dropdown:hover .nav-dropdown-toggle::after,
.nav-dropdown:focus-within .nav-dropdown-toggle::after {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 275px;
  background-color: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 0.5rem 0;
  z-index: 1200;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.25rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: #f1f5f9;
  transition: background-color var(--transition-fast), color var(--transition-fast);
}

.dropdown-item:hover {
  background-color: rgba(255, 255, 255, 0.12);
  color: var(--color-accent);
}

.dropdown-item-icon {
  font-size: 1.1rem;
  width: 24px;
  display: inline-block;
  text-align: center;
}

.dropdown-divider {
  height: 1px;
  background-color: rgba(255, 255, 255, 0.12);
  margin: 0.4rem 0;
}

/* --------------------------------------------------------------------------
   Mobile Drawer & Navigation Accordion
   -------------------------------------------------------------------------- */
.nav-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  min-height: 48px;
  padding: 0.5rem;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--radius-md);
  cursor: pointer;
  z-index: 1100;
}

@media (min-width: 992px) {
  .nav-toggle {
    display: none;
  }
}

.nav-toggle-icon {
  width: 24px;
  height: 20px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.nav-toggle-icon span {
  display: block;
  width: 100%;
  height: 3px;
  background-color: #ffffff;
  border-radius: 2px;
  transition: transform var(--transition-normal), opacity var(--transition-normal);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-icon span:nth-child(1) {
  transform: translateY(8.5px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-icon span:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-icon span:nth-child(3) {
  transform: translateY(-8.5px) rotate(-45deg);
}

.nav-drawer {
  position: fixed;
  top: 85px;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 1050;
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transform: translateX(100%);
  transition: transform var(--transition-normal);
  overflow-y: auto;
}

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

.nav-drawer .nav-link {
  font-size: 1.15rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  justify-content: space-between;
  color: #ffffff;
}

.mobile-services-list {
  padding-left: 1rem;
  margin-top: 0.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.mobile-services-list .dropdown-item {
  font-size: 1rem;
  padding: 0.5rem 0.75rem;
  color: #cbd5e1;
}

/* --------------------------------------------------------------------------
   Hero Video Wrapper & Sleek Black Overlay
   -------------------------------------------------------------------------- */
.hero-video-wrapper {
  position: relative;
  min-height: 82vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: #000000;
  color: #ffffff;
  padding: 4rem 0;
}

.hero-video {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: translate(-50%, -50%);
  z-index: 1;
  pointer-events: none;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.78) 0%, rgba(0, 0, 0, 0.5) 60%, rgba(0, 0, 0, 0.9) 100%);
  z-index: 2;
}

.hero-content {
  position: relative;
  z-index: 3;
  max-width: 850px;
}

.hero-title {
  color: #ffffff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
}

.hero-subtitle {
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  color: #f1f5f9;
  margin-bottom: 2rem;
  line-height: 1.6;
}

@media (prefers-reduced-motion: reduce) {
  .hero-video {
    display: none;
  }
}

/* --------------------------------------------------------------------------
   Buttons & CTAs
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.75rem 1.75rem;
  font-size: 1rem;
  font-weight: 700;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  border: 2px solid transparent;
  text-align: center;
}

.btn-primary {
  background-color: var(--color-primary);
  color: #ffffff;
}

.btn-primary:hover {
  background-color: var(--color-primary-dark);
  color: #ffffff;
  box-shadow: var(--shadow-md);
}

.btn-accent {
  background-color: var(--color-accent);
  color: var(--color-primary-dark);
}

.btn-accent:hover {
  background-color: var(--color-accent-hover);
  color: var(--color-primary-dark);
  box-shadow: var(--shadow-md);
}

.btn-gas {
  background-color: var(--color-gas-blue);
  color: #ffffff;
}

.btn-gas:hover {
  background-color: var(--color-gas-blue-hover);
  color: #ffffff;
  box-shadow: var(--shadow-md);
}

.btn-outline-light {
  border-color: #ffffff;
  color: #ffffff;
  background: transparent;
}

.btn-outline-light:hover {
  background-color: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}

.btn-lg {
  min-height: 54px;
  padding: 1rem 2.25rem;
  font-size: 1.1rem;
}

.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

/* --------------------------------------------------------------------------
   Grid Layouts, Feature Imagery & Cards
   -------------------------------------------------------------------------- */
.section {
  padding: 4.5rem 0;
}

.section-alt {
  background-color: var(--color-surface-alt);
}

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

.section-dark h2, .section-dark h3 {
  color: #ffffff;
}

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

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

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

@media (min-width: 640px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

.feature-image-wrapper {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--color-border);
}

.feature-image-wrapper img {
  width: 100%;
  height: 100%;
  max-height: 480px;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.feature-image-wrapper:hover img {
  transform: scale(1.03);
}

.pillar-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.pillar-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.pillar-icon {
  width: 56px;
  height: 56px;
  background-color: var(--color-surface-alt);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  margin-bottom: 1.25rem;
  color: var(--color-primary);
}

.project-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.project-card-media {
  height: 200px;
  overflow: hidden;
  position: relative;
}

.project-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

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

.project-card-header {
  background: var(--color-primary-dark);
  color: #ffffff;
  padding: 1.25rem 1.5rem;
  border-bottom: 4px solid var(--color-accent);
}

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

.badge {
  display: inline-block;
  padding: 0.35rem 0.85rem;
  font-size: 0.85rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-solar {
  background-color: rgba(229, 169, 60, 0.15);
  color: #b87c14;
}

.badge-gas {
  background-color: rgba(29, 112, 184, 0.15);
  color: var(--color-gas-blue);
}

.badge-green {
  background-color: rgba(30, 86, 49, 0.15);
  color: var(--color-primary);
}

.client-logo-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 3rem;
  padding: 1.5rem 0;
}

.client-logo-item {
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: grayscale(100%) opacity(0.8);
  transition: filter var(--transition-fast);
}

.client-logo-item:hover {
  filter: grayscale(0%) opacity(1);
}

.client-logo-item img {
  max-height: 100%;
  width: auto;
  object-fit: contain;
}

.process-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .process-list {
    grid-template-columns: repeat(5, 1fr);
  }
}

.process-step {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  position: relative;
}

.process-num {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #ffffff;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.branch-card {
  background: var(--color-surface);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
}

.branch-card.hq {
  border-color: var(--color-primary);
}

.branch-badge {
  display: inline-block;
  background: var(--color-primary);
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  margin-bottom: 0.75rem;
}

.lead-form-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  padding: 2.5rem;
  box-shadow: var(--shadow-lg);
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--color-text);
}

.form-control, .form-select, textarea.form-control {
  width: 100%;
  min-height: 48px;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  font-family: inherit;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background-color: var(--color-surface);
  color: var(--color-text);
  transition: border-color var(--transition-fast);
}

.form-control:focus, .form-select:focus {
  border-color: var(--color-primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(30, 86, 49, 0.15);
}

.form-hint {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-top: 0.35rem;
}

.cta-banner {
  background: linear-gradient(135deg, #000000 0%, var(--color-primary-dark) 100%);
  color: #ffffff;
  padding: 3.5rem 0;
  border-radius: var(--radius-lg);
  margin: 3rem 0;
  box-shadow: var(--shadow-lg);
}

.cta-banner h2 {
  color: #ffffff;
}

.site-footer {
  background-color: #050806;
  color: var(--color-text-light);
  padding: 4rem 0 2rem 0;
  margin-top: auto;
  border-top: 5px solid var(--color-accent);
}

.site-footer a {
  color: #cbd5e1;
}

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

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

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr;
  }
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
  text-align: center;
  font-size: 0.9rem;
  color: #94a3b8;
}

@media (min-width: 768px) {
  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

.text-center { text-align: center; }
.text-accent { color: var(--color-accent); }
.text-gas { color: var(--color-gas-blue); }
.text-muted { color: var(--color-text-muted); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
