/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&family=Montserrat:wght@700&display=swap');

body {
  font-family: 'Poppins', sans-serif;
  margin: 0;
  padding: 0;
  transition: background-color 0.3s ease, color 0.3s ease;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
}

:root {
  --primary: #0066cc;       /* Vibrant blue (main brand color) */
  --secondary: #00a859;     /* Fresh green (energy/sustainability) */
  --dark: #1a1a2e;          /* Deep navy (professional base) */
  --accent: #ff6b35;        /* Orange accent (call-to-actions) */
  --light: #f8f9fa;         /* Light background */
}

/* General Hero Section (for non-services pages) */
.hero-section {
  position: relative;
  height: 80vh;
  min-height: 400px;
  display: flex;
  align-items: center;
  color: white;
  overflow: hidden;
}

.hero-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

.hero-video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(rgba(0, 102, 204, 0.7), rgba(0, 168, 89, 0.7));
  z-index: 2;
}

.hero-content {
  position: relative;
  z-index: 3;
  text-align: center;
  padding: 1rem;
}

.hero-title {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
  animation: fadeInUp 1s ease;
}

.hero-subtitle {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  animation: fadeInUp 1s ease 0.3s forwards;
  opacity: 0;
}

.hero-cta {
  animation: fadeInUp 1s ease 0.6s forwards;
  opacity: 0;
}

/* Hero Energy Section (for non-services pages) */
.hero-energy:not(.services-hero) {
  height: 60vh;
  position: relative;
  overflow: hidden;
  transition: background 0.5s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #001d3d, #003566);
}

.hero-energy:not(.services-hero) .energy-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  background: radial-gradient(circle at center, #00f2ff 0%, #000 100%);
  animation: pulseEnergy 6s ease-in-out infinite;
  opacity: 0.2;
}

body.bg-dark .hero-energy:not(.services-hero) .energy-bg {
  background: radial-gradient(circle at center, #ffeb3b 0%, #1a1a1a 100%);
  animation: pulseDarkEnergy 8s ease-in-out infinite;
  opacity: 0.3;
}

/* Services Hero Section (specific to services.html) */
.services-hero {
  height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--light);
  color: var(--dark);
  position: relative;
  overflow: hidden;
}

.services-hero .container {
  position: relative;
  z-index: 2;
}

.services-hero .energy-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  background: linear-gradient(145deg, #001d3d, #003566);
  opacity: 0.5;
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulseEnergy {
  0%, 100% { transform: scale(1); opacity: 0.2; }
  50% { transform: scale(1.2); opacity: 0.4; }
}

@keyframes pulseDarkEnergy {
  0%, 100% { transform: scale(1); opacity: 0.3; }
  50% { transform: scale(1.3); opacity: 0.5; }
}

/* Service Cards */
.service-card {
  transition: all 0.4s ease;
  border: none;
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.service-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}

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

.service-card .card-title {
  color: var(--primary);
  margin-bottom: 0.75rem;
}

/* Animate on Scroll */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.animated {
  opacity: 1;
  transform: translateY(0);
}

/* Energy Pulse Effect */
.energy-pulse {
  position: relative;
}

.energy-pulse::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: inherit;
  box-shadow: 0 0 0 0 rgba(0, 102, 204, 0.7);
  animation: pulse 2s infinite;
  opacity: 0;
  pointer-events: none;
}

@keyframes pulse {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(0, 102, 204, 0.7);
    opacity: 0.7;
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 10px rgba(0, 102, 204, 0);
    opacity: 0;
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(0, 102, 204, 0);
    opacity: 0;
  }
}

/* Responsive Typography and Spacing */
html {
  font-size: 14px;
}

@media (min-width: 576px) {
  html {
    font-size: 15px;
  }
  .hero-title {
    font-size: 3rem;
  }
  .hero-subtitle {
    font-size: 1.5rem;
  }
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
  .hero-title {
    font-size: 3.5rem;
  }
  .hero-subtitle {
    font-size: 1.75rem;
  }
}

@media (min-width: 992px) {
  html {
    font-size: 17px;
  }
  .hero-title {
    font-size: 4rem;
  }
  .hero-subtitle {
    font-size: 2rem;
  }
}

h1 {
  font-size: 2rem;
}

@media (min-width: 768px) {
  h1 {
    font-size: 2.5rem;
  }
}

@media (min-width: 1200px) {
  h1 {
    font-size: 3rem;
  }
}

/* About Image */
.about-image-container {
  position: relative;
  padding-bottom: 56.25%;
  overflow: hidden;
}

.about-image-container img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Dark Mode Modal Adjustments */
body.bg-dark .modal-content {
  background-color: #2d2d3a; /* Dark gray background for contrast */
  color: #f8f9fa; /* Light text for readability */
}

body.bg-dark .modal-header {
  border-bottom: 1px solid #444; /* Subtle border in dark mode */
}

body.bg-dark .modal-footer {
  border-top: 1px solid #444; /* Subtle border in dark mode */
}

body.bg-dark .modal-title,
body.bg-dark .modal-body,
body.bg-dark .modal-footer .btn {
  color: #f8f9fa; /* Ensure all text is light */
}

body.bg-dark .btn-close {
  filter: invert(1); /* Invert close button icon for visibility */
}