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

body {
  font-family: "Arial", sans-serif;
  line-height: 1.6;
  /* Use a pure white page background for a clean, spacious feel */
  background-color: #ffffff;
  color: #333;
  scroll-behavior: smooth;
}

/* Color palette for solar & EV theme */
:root {
  --primary-color: #007bff; /* electric blue */
  --secondary-color: #28a745; /* eco green */
  --highlight-color: #ffc107; /* solar yellow */
  --dark-color: #343a40;
}

/* Header and navigation */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: #ffffff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  z-index: 1000;
}

.navbar {
  max-width: 1200px;
  margin: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 1rem;
}

.navbar .logo img {
  height: 50px;
  width: auto;
}

/* Site title next to logo */
.site-name {
  font-size: 1.2rem;
  font-weight: 600;
  margin-left: 0.5rem;
  color: var(--dark-color);
}

.navbar nav {
  display: flex;
  gap: 1rem;
}

.navbar nav a {
  color: var(--dark-color);
  text-decoration: none;
  padding: 0.5rem;
  font-weight: 500;
  transition: color 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.navbar nav a:hover {
  color: var(--secondary-color);
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}

.hamburger span {
  width: 25px;
  height: 3px;
  background: #333;
}

@media (max-width: 768px) {
  .navbar nav {
    position: absolute;
    top: 70px;
    right: 0;
    background: #fff;
    flex-direction: column;
    width: 200px;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  }
  .navbar nav.active {
    transform: translateX(0);
  }
  .hamburger {
    display: flex;
  }
}

/* Hero section */
.hero {
  position: relative;
  background-image: url('../images/charging_station.jpg');
  background-size: cover;
  background-position: center;
  color: #fff;
  min-height: 70vh;
  display: flex;
  align-items: center;
  text-align: center;
  padding: 2rem 1rem;
  margin-top: 70px; /* offset for fixed header */
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
}

.hero-content {
  position: relative;
  max-width: 800px;
  margin: auto;
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  line-height: 1.2;
  color: var(--highlight-color);
}

.hero p {
  font-size: 1.2rem;
  color: #f8f9fa;
}

/* Section generic styles */
.section {
  padding: 4rem 1rem;
}

.section-title {
  text-align: center;
  margin-bottom: 2rem;
  font-size: 2rem;
  color: var(--primary-color);
}

/* Services & applications grids */
.services-grid,
.applications-grid {
  display: grid;
  gap: 1rem;
}

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

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

.service-item,
.application-item {
  background: #fff;
  border-radius: 8px;
  padding: 1rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.service-item h3,
.application-item h3 {
  color: var(--secondary-color);
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

/* Categories section */
.categories-image img {
  width: 100%;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Sustainability section */
.sustainability .subtitle {
  text-align: center;
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
  color: var(--secondary-color);
}

.sustainability-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
}

.sustainability-content .image {
  flex: 1;
  max-width: 600px;
}

.sustainability-content .image img {
  width: 100%;
  border-radius: 8px;
  display: block;
}

.sustainability-content .text {
  flex: 1;
  max-width: 600px;
  font-size: 1rem;
  color: #333;
}

@media (min-width: 992px) {
  .sustainability-content {
    flex-direction: row;
    align-items: center;
    gap: 2rem;
  }
  .sustainability-content .image,
  .sustainability-content .text {
    max-width: none;
  }
}

.service-item p,
.application-item p {
  font-size: 0.95rem;
}

/* EV charging and inverter sections */
.ev-charging,
.inverter {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  max-width: 1200px;
  margin: auto;
}

.ev-charging .img,
.inverter .img {
  width: 100%;
  overflow: hidden;
}

.ev-charging img,
.inverter img {
  width: 100%;
  border-radius: 8px;
  display: block;
}

.ev-charging .content,
.inverter .content {
  flex: 1;
}

.ev-charging ul,
.inverter ul {
  margin-top: 1rem;
  padding-left: 1rem;
  list-style-type: disc;
}

.ev-charging li,
.inverter li {
  margin-bottom: 0.5rem;
}

.inverter blockquote {
  margin-top: 1rem;
  font-style: italic;
  color: #555;
  border-left: 4px solid #007b5e;
  padding-left: 1rem;
}

@media (min-width: 992px) {
  .ev-charging,
  .inverter {
    flex-direction: row;
    align-items: center;
  }
  .ev-charging .img,
  .inverter .img {
    flex: 1;
  }
  .ev-charging .content,
  .inverter .content {
    flex: 1;
  }
}

/* Contact section */
/* Contact section styled on light background */
.contact {
  background: #f8f9fa;
  color: #333;
}

.contact a {
  color: var(--primary-color);
  text-decoration: none;
}

.contact-details {
  max-width: 600px;
  margin: auto;
  margin-bottom: 2rem;
  text-align: center;
}

.contact form {
  max-width: 600px;
  margin: auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.contact input,
.contact textarea {
  padding: 0.75rem;
  border-radius: 4px;
  border: none;
  resize: vertical;
}

.contact button {
  padding: 0.75rem;
  border: none;
  background: var(--secondary-color);
  color: #fff;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
  transition: background 0.3s ease;
}

.contact button:hover {
  background: var(--highlight-color);
}

/* Mission & vision */
.mission-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 1000px;
  margin: auto;
}
.mission-item {
  background: #fff;
  padding: 1rem;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.mission-item h3 {
  color: var(--secondary-color);
  margin-bottom: 0.5rem;
}
.mission-item p {
  color: #333;
  font-size: 1rem;
}
@media (min-width: 768px) {
  .mission-content {
    flex-direction: row;
  }
}

/* Blog section */
.blog-posts {
  display: grid;
  gap: 1rem;
  max-width: 1200px;
  margin: 0 auto 2rem auto;
}
/* 2 columns on medium screens, 3 on large screens */
@media (min-width: 576px) {
  .blog-posts {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 992px) {
  .blog-posts {
    grid-template-columns: repeat(3, 1fr);
  }
}

.post {
  background: #fff;
  border-radius: 8px;
  padding: 1rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.post h3 {
  margin-bottom: 0.5rem;
  color: var(--primary-color);
}
.post p {
  font-size: 0.95rem;
  color: #555;
}

/* FAQ section */
.faq-list {
  max-width: 800px;
  margin: 0 auto;
}
.faq-list details {
  background: #fff;
  margin-bottom: 0.5rem;
  padding: 0.75rem 1rem;
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}
.faq-list summary {
  cursor: pointer;
  font-weight: 600;
  outline: none;
}
.faq-list p {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: #555;
}

/* Footer */
.footer {
  background: #212529;
  color: #ccc;
  padding: 2rem 1rem;
  text-align: center;
}

.footer .social a {
  color: #ccc;
  margin: 0 0.5rem;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer .social a:hover {
  color: #fff;
}

/* Chat bot styles */
.chat-widget {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1001;
  font-size: 14px;
  font-family: inherit;
}

.chat-toggle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary-color);
  color: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.chat-toggle i {
  font-size: 20px;
}

.chat-window {
  position: absolute;
  bottom: 60px;
  right: 0;
  width: 300px;
  max-height: 400px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  display: none;
  flex-direction: column;
  overflow: hidden;
}

.chat-window.active {
  display: flex;
}

.chat-header {
  background: var(--primary-color);
  color: #fff;
  padding: 0.75rem;
  font-weight: bold;
}

.chat-messages {
  flex: 1;
  padding: 0.75rem;
  overflow-y: auto;
  background: #f7f7f7;
}

.chat-message {
  margin-bottom: 0.5rem;
  display: flex;
}

.chat-message.user {
  justify-content: flex-end;
}

.chat-message.bot {
  justify-content: flex-start;
}

.chat-bubble {
  padding: 0.5rem 0.75rem;
  border-radius: 16px;
  max-width: 80%;
  word-wrap: break-word;
}

.chat-message.user .chat-bubble {
  background: var(--primary-color);
  color: #fff;
  border-bottom-right-radius: 0;
}

.chat-message.bot .chat-bubble {
  background: #e9ecef;
  color: #333;
  border-bottom-left-radius: 0;
}

.chat-input-area {
  display: flex;
  border-top: 1px solid #dee2e6;
}

.chat-input-area input {
  flex: 1;
  border: none;
  padding: 0.5rem;
  font-size: 0.9rem;
  outline: none;
}

.chat-input-area button {
  background: var(--secondary-color);
  color: #fff;
  border: none;
  padding: 0 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chat-input-area button:hover {
  background: var(--highlight-color);
}