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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f0f4f8;
  color: #222;
}

/* Hero Section */
.hero-section {
  background: linear-gradient(90deg, #004aad 60%, #d32f2f 20%, #fbc02d 20%);
  padding: 80px 20px 60px;
  text-align: center;
  color: white;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.15);
  border-radius: 12px;
  max-width: 1200px;
  margin: 40px auto 60px;
}

.hero-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  max-width: 1100px;
  width: 100%;
  flex-grow: 1;
  justify-content: center;
}

.logo-text-row {
  display: flex;
  align-items: center;
  gap: 40px;
  flex-wrap: wrap;
  justify-content: center;
  max-width: 100%;
}

.hero-logo {
  height: 180px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.3));
}

.hero-text-lines {
  font-size: 32px;
  font-weight: 700;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 200px;
}

.hero-text-lines p {
  margin: 8px 0;
  line-height: 1.1;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.35);
}

/* Hero text colors: red, white, blue */
.hero-text-lines p:nth-child(1) {
  color: #d32f2f; /* red */
}

.hero-text-lines p:nth-child(2) {
  color: white;
}

.hero-text-lines p:nth-child(3) {
  color: #004aad; /* blue */
}

/* Navigation */
.main-nav {
  margin-top: 30px;
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  justify-content: center;
  background-color: #002366; /* deep blue */
  padding: 0.6rem 1.5rem;
  border-radius: 12px;
  position: sticky;
  top: 0;
  z-index: 999;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}

#mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  color: #fbc02d;
  font-size: 1.8rem;
  cursor: pointer;
}

.nav-links {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.nav-links.open {
  display: block;
}

.main-nav a, .nav-links a {
  color: #fbc02d; /* bright yellow */
  font-weight: 600;
  text-decoration: none;
  padding: 10px 16px;
  border-radius: 8px;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.main-nav a:hover, .nav-links a:hover {
  background-color: #d32f2f; /* red */
  color: white;
}

.main-nav a.active {
  background-color: #fbc02d;
  color: #002366;
  font-weight: 700;
}

/* Sections */
section {
  max-width: 1100px;
  margin: 4rem auto;
  padding: 0 1rem;
}

h2 {
  color: #d32f2f; /* red */
  font-size: 2rem;
  text-align: center;
  margin-bottom: 1rem;
  text-transform: uppercase;
}

p {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  color: #003366; /* dark blue */
}
/* About Section */
#about {
  background: #f9fafc;
  padding: 2rem 1rem 3rem;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  max-width: 900px;
  margin: 4rem auto;
  color: #003366;
  font-size: 1.1rem;
  line-height: 1.6;
  text-align: center;
}

/* Mission & Vision Section */
.mission-vision-section {
  max-width: 1100px;
  margin: 4rem auto;
  padding: 0 1rem;
  text-align: center;
}

.mission-vision-container {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
  margin-top: 2rem;
}

.mission-vision-card {
  background: #004aad; /* Deep Blue */
  color: white;
  padding: 2rem;
  border-radius: 16px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
  flex: 1 1 320px;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.mission-vision-card h3 {
  margin-top: 1rem;
  margin-bottom: 1rem;
  font-size: 1.8rem;
  font-weight: 700;
  color: #ffd600; /* Bright Yellow */
  text-transform: uppercase;
}

.mission-vision-card p {
  font-size: 1.1rem;
  line-height: 1.5;
  color: #e0e6f1;
}

.mission-icon, .vision-icon {
  font-size: 3.5rem;
  color: #ffd600;
}

@media (max-width: 768px) {
  .mission-vision-container {
    flex-direction: column;
    gap: 1.5rem;
  }

  .mission-vision-card {
    max-width: 100%;
  }
}

/* Why Choose Us Section */
#why-choose-us {
  margin-top: 4rem;
  text-align: center;
}

.choose-us-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
  padding: 0 1rem;
}

.choose-us-card {
  background: linear-gradient(to bottom right, #ffffff, #f0f6ff);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
  transition: transform 0.4s ease, box-shadow 0.4s ease, border 0.4s;
  text-align: center;
  padding-bottom: 1rem;
  position: relative;
}

.choose-us-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-bottom: 4px solid #004aad;
}

.choose-us-card h3 {
  margin: 1rem 0 0.5rem;
  color: #004aad;
  font-size: 1.3rem;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.choose-us-card h3 i {
  color: #ffd600;
  font-size: 1.1rem;
}

.choose-us-card p {
  padding: 0 1.2rem;
  color: #333;
  font-size: 1rem;
}

.choose-us-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
  border: 1px solid #004aad;
}

/* Services */
.services-section {
  padding: 4rem 2rem;
  background: #fff;
}

.section-title {
  text-align: center;
  font-size: 2.5rem;
  color: #0033cc;
  margin-bottom: 1rem;
  animation: fadeInUp 1s ease-out;
}

.services-intro {
  max-width: 800px;
  margin: 0 auto 1rem;
  font-size: 1rem;
  line-height: 1.6;
  color: #444;
  text-align: center;
  animation: fadeInUp 1.2s ease-out;
}

.services-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  padding: 2rem 0;
}

.service-card {
  position: relative;
  background: #f0f0f0;
  color: #fff;
  font-weight: 600;
  padding: 2rem;
  border-radius: 1.5rem;
  overflow: hidden;
  text-align: center;
  cursor: pointer;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  z-index: 0;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  animation: fadeIn 1.2s ease forwards;
  color: #222;
  text-shadow: none;
}

.service-card p {
  position: relative;
  font-size: 1rem;
  z-index: 1;
}

.service-card:hover {
  transform: scale(1.05);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.service-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 0.5s ease;
  z-index: -2;
}

.service-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.25);
  opacity: 0;
  transition: opacity 0.5s ease;
  z-index: -1;
}

.service-card:hover::before,
.service-card:hover::after {
  opacity: 1;
}

.service-card.bg1::before { background-image: url('assets/services/transformer.jpg'); }
.service-card.bg2::before { background-image: url('assets/services/bg1.jpg'); }
.service-card.bg3::before { background-image: url('assets/services/powerlines-sunset.jpg'); }
.service-card.bg4::before { background-image: url('assets/services/substation.jpg'); }
.service-card.bg5::before { background-image: url('assets/services/ups-panel.jpg'); }

.service-card:nth-child(3n+1) { background-color: #ff0000cc; }
.service-card:nth-child(3n+2) { background-color: #ffcc00cc; }
.service-card:nth-child(3n+3) { background-color: #0033cccc; }

/* Animations */
@keyframes fadeInUp {
  0% {
    opacity: 0;
    transform: translateY(40px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Core Values */
.core-values {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.core-values > div {
  background: #004aad;
  color: white;
  padding: 1rem;
  border-radius: 12px;
  flex: 1 1 200px;
  text-align: center;
  font-weight: bold;
}

/* Testimonials */
#testimonials {
  background: #004aad;
  color: #fbc02d;
  padding: 3rem 1rem;
  border-radius: 12px;
  text-align: center;
}

.testimonial-slider {
  position: relative;
  max-width: 700px;
  margin: 1rem auto 0;
  overflow: hidden;
}

.testimonial {
  display: none;
  font-style: italic;
  font-size: 1.2rem;
  line-height: 1.4;
  padding: 0 1rem;
  min-height: 120px;
}

.testimonial.active {
  display: block;
  animation: fadeIn 0.8s ease forwards;
}

.testimonial cite {
  display: block;
  margin-top: 1rem;
  font-style: normal;
  font-weight: 700;
  font-size: 1rem;
  color: #ffd600;
}

/* Testimonial navigation buttons */
#testimonial-prev,
#testimonial-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: #ffd600;
  font-size: 2rem;
  cursor: pointer;
  padding: 0 0.5rem;
  user-select: none;
}

#testimonial-prev {
  left: 0;
}

#testimonial-next {
  right: 0;
}

/* Distributors */
.distributors ul {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  list-style: none;
  padding: 0;
}

.distributors li {
  background: #ffd600;
  padding: 0.5rem 1rem;
  border-radius: 24px;
  font-weight: 600;
  color: #004aad;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Contact */
.contact p {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.8rem;
  color: #003366;
}

.contact a {
  color: #004aad;
  text-decoration: none;
}

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

/* Map */
#map {
  margin: 1rem auto 2rem;
  width: 100%;
  max-width: 600px;
  height: 250px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

/* Footer */
footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.5rem;
  background-color: #022f66;
  color: #fbc02d;
  padding: 20px 0;
  font-weight: 600;
  position: relative;
  z-index: 10;
}

.footer-container {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: center;
}

footer p {
  color: #fbc02d !important;
  font-weight: 600;
  position: relative;
  z-index: 20;
}

.social-links a {
  color: #fbc02d;
  margin: 0 10px;
  font-size: 1.4rem;
  transition: color 0.3s ease;
  text-decoration: none;
}

.social-links a:hover {
  color: #ffffff;
}



/* Responsive */
@media (max-width: 768px) {
  .hero-logo {
    height: 120px;
  }

  .hero-text-lines {
    font-size: 24px;
    min-width: auto;
  }

  .logo-text-row {
    gap: 20px;
  }

  .main-nav {
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.8rem 1rem;
  }

  /* Mobile nav */
  #mobile-menu-toggle {
    display: block;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    width: 100%;
    background-color: #002366;
    border-radius: 12px;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    padding: 12px;
    border-bottom: 1px solid #fbc02d;
  }

  .choose-us-list {
    grid-template-columns: 1fr;
  }

  .services-list {
    grid-template-columns: 1fr;
  }

  .core-values {
    flex-direction: column;
  }

  footer {
    flex-direction: column;
    text-align: center;
    gap: 0.5rem;
  }

  .footer-container {
    flex-direction: column;
    gap: 0.5rem;
  }
}
