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

body {
  font-family: 'Roboto', sans-serif;
  line-height: 1.6;
  background-color: #f4f4f4;
  color: #333;
}

/* Container for centering content */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header and Navigation */
.navbar {
  background: #333;
  color: #fff;
  padding: 15px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.header-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 15px;
  text-align: center;
}

.site-title {
  margin: 0;
  font-size: 2.2rem;
  color: #fff;
  font-weight: 700;
}

.nav-list {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 30px;
  padding: 0;
  margin: 0;
}

.nav-list li a {
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  font-size: 1.1rem;
  padding: 8px 16px;
  border-radius: 5px;
  transition: background-color 0.3s ease;
}

.nav-list li a:hover {
  background-color: #555;
}

/* Image Controls - Main styling for all images */
img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}

/* Frontpage Section */
.frontpage {
  position: relative;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.frontpage-img-wrapper {
  position: relative;
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
}

.frontpage-img {
  width: 100%;
  height: 400px;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.frontpage-text-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: #fff;
  background: rgba(0, 0, 0, 0.7);
  padding: 30px;
  border-radius: 12px;
  backdrop-filter: blur(10px);
}

.frontpage-text-overlay h2 {
  font-size: 2.5rem;
  margin-bottom: 15px;
  font-weight: 700;
}

.frontpage-text-overlay p {
  font-size: 1.3rem;
  color: #f0f0f0;
}

/* Services Section */
.services {
  background: #fff;
  padding: 60px 20px;
  text-align: center;
}

.services h2 {
  font-size: 2.5rem;
  margin-bottom: 40px;
  color: #333;
}

.service-cards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
  margin-top: 30px;
}

.card {
  background: #fff;
  padding: 35px;
  width: 400px;
  border: 1px solid #e0e0e0;
  border-radius: 15px;
  transition: all 0.3s ease;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 40px rgba(0,0,0,0.2);
}

/* Special styling for enlarged card */
.card-enlarged {
  transform: scale(1.5) translateY(-15px) !important;
  z-index: 10 !important;
  box-shadow: 0 30px 80px rgba(0,0,0,0.4) !important;
  transition: all 0.15s ease !important;
}

/* Make Wiring & Repairs card clickable */
.card h3:contains("Wiring & Repairs") {
  cursor: pointer;
}

/* Service Images - Controlled sizing */
.service-img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 20px;
}

.card h3 {
  font-size: 1.5rem;
  margin-bottom: 15px;
  color: #333;
}

.card p {
  font-size: 1rem;
  color: #666;
  line-height: 1.6;
}

/* About Section */
.about {
  background: #f9f9f9;
  padding: 60px 20px;
}

.about h2 {
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 40px;
  color: #333;
}

.about-content {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 40px;
  max-width: 1000px;
  margin: 0 auto;
}

/* About Image - Controlled sizing */
.about-img {
  width: 100%;
  max-width: 400px;
  height: 300px;
  object-fit: cover;
  border-radius: 15px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.about-text {
  flex: 1;
  min-width: 300px;
}

.about-text p {
  font-size: 1.1rem;
  color: #555;
  margin-bottom: 20px;
  line-height: 1.7;
}

/* Contact Section */
.contact {
  background: #333;
  color: #fff;
  padding: 60px 20px;
  text-align: center;
}

.contact h2 {
  font-size: 2.5rem;
  margin-bottom: 30px;
}

.contact-info p {
  font-size: 1.2rem;
  margin-bottom: 15px;
}

.contact-info a {
  color: #fdd835;
  text-decoration: none;
  font-weight: 500;
}

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

/* Clients Section */
.clients {
  background: #f8f9fa;
  padding: 60px 20px;
  text-align: center;
}

.clients h2 {
  font-size: 2.5rem;
  margin-bottom: 40px;
  color: #333;
  font-weight: 700;
}

.clients-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 25px;
  max-width: 1000px;
  margin: 0 auto;
}

.client-item {
  background: #fff;
  padding: 25px 20px;
  border-radius: 12px;
  font-size: 1.2rem;
  font-weight: 600;
  color: #333;
  box-shadow: 0 5px 20px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
  border-left: 4px solid #667eea;
}

.client-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
}

/* Footer */
.footer {
  background: #222;
  color: #ccc;
  padding: 20px 0;
  text-align: center;
}

/* Responsive Design */
@media (max-width: 768px) {
  .header-container {
    gap: 10px;
  }
  
  .site-title {
    font-size: 1.8rem;
  }
  
  .nav-list {
    flex-wrap: wrap;
    gap: 15px;
  }
  
  .nav-list li a {
    font-size: 1rem;
    padding: 6px 12px;
  }
  
  .frontpage-img {
    height: 300px;
  }
  
  .frontpage-text-overlay {
    padding: 20px;
  }
  
  .frontpage-text-overlay h2 {
    font-size: 1.8rem;
  }
  
  .frontpage-text-overlay p {
    font-size: 1rem;
  }
  
  .services h2,
  .about h2,
  .contact h2 {
    font-size: 2rem;
  }
  
  .card {
    width: 100%;
    max-width: 400px;
    padding: 25px;
  }
  
  .service-img {
    height: 220px;
  }
  
  .about-content {
    flex-direction: column;
    gap: 30px;
  }
  
  .about-img {
    height: 250px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 15px;
  }
  
  .site-title {
    font-size: 1.5rem;
  }
  
  .nav-list {
    gap: 10px;
  }
  
  .nav-list li a {
    font-size: 0.9rem;
    padding: 5px 8px;
  }
  
  .frontpage-img {
    height: 250px;
  }
  
  .service-img {
    height: 180px;
  }
  
  .about-img {
    height: 200px;
  }
  
  .clients h2 {
    font-size: 2rem;
  }
  
  .clients-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
  }
  
  .client-item {
    padding: 20px 15px;
    font-size: 1rem;
  }
}
