:root {
  --primary-color: #011d38;
  --secondary-color: #4caf50; /* A green based on the icon/logo */
  --text-color: #333;
  --white: #ffffff;
  --font-family: "Montserrat", sans-serif;
  --transition: all 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  color: var(--text-color);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 20px 0;
  z-index: 1000;
  background-color: var(--primary-color);
  transition: var(--transition);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo img {
  height: 60px;
  object-fit: contain;
  object-position: center;

}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 30px;
}

.nav-link {
  color: var(--white);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: var(--transition);
}

.nav-link:hover {
  color: var(--secondary-color);
}

.btn-primary {
  background-color: transparent;
  color: var(--white);
  border: 1px solid var(--white);
  padding: 8px 16px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: var(--transition);
}

.btn-primary:hover {
  background-color: var(--white);
  color: var(--primary-color);
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
}

.mobile-menu-btn span {
  display: block;
  width: 25px;
  height: 2px;
  background-color: var(--white);
  transition: var(--transition);
}

/* Hero Section */
.hero {
  display: flex;
  min-height: 100vh;
  padding-top: 70px; /* offset for header */
}

.hero-content {
  flex: 1;
  background-color: var(--primary-color);
  color: var(--white);
  padding: 80px 10%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}

.hero-logo {
  max-width: 250px;
}

.hero h1 {
  font-size: 3rem;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 30px;
}

.btn-outline {
  display: inline-block;
  color: var(--white);
  text-decoration: none;
  border: 1px solid var(--white);
  padding: 10px 30px;
  font-size: 14px;
  font-weight: 600;
  transition: var(--transition);
}

.btn-outline:hover {
  background-color: var(--white);
  color: var(--primary-color);
}

.hero-image {
  flex: 1;
  /* Using one of the provided images, specifically the solar panels one */
  background-image: url("assets/fotoPaneles.jpeg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* Quiénes somos */
.about {
  padding: 80px 20px;
  background-color: var(--white);
  text-align: center;
}

.about-container {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.about-logo {
  max-width: 150px;
  margin-bottom: 20px;
}

.about-container h2 {
  font-weight: 700;
  font-size: 2.5rem;
  color: var(--text-color);
  margin-bottom: 30px;
}

.about p {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.8;
}

/* A qué nos dedicamos (Servicios) */
.services {
  background-color: var(--primary-color);
  padding: 80px 20px 100px;
  text-align: center;
  color: var(--white);
}

.services-title {
  font-size: 2.5rem;
  font-weight: 600;
  margin-bottom: 60px;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  max-width: 1000px;
  margin: 0 auto;
}

.card {
  background-color: var(--white);
  color: var(--text-color);
  padding: 50px 30px 40px;
  position: relative;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.card-icon {
  position: absolute;
  top: -30px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 60px;
  background-color: #5b9b3e; /* Green color match from image */
  color: var(--primary-color);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  border: 3px solid var(--white);
}

.card h3 {
  font-size: 15px;
  font-weight: 800;
  margin-bottom: 15px;
  color: var(--primary-color);
  text-transform: uppercase;
}

.card p {
  font-size: 12px;
  line-height: 1.6;
  font-weight: 500;
}

/* Footer Tagline */
.footer {
  padding: 60px 20px;
  text-align: center;
  background-color: var(--white);
}

.footer h2 {
  font-weight: 400;
  font-size: 2rem;
  color: var(--text-color);
  line-height: 1.2;
}

/* Responsive */
@media (max-width: 900px) {
  .nav-menu {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--primary-color);
    padding: 20px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }

  .nav-menu.active {
    display: flex;
  }

  .mobile-menu-btn {
    display: flex;
  }

  .hero {
    flex-direction: column;
  }

  .hero-content {
    padding: 60px 20px;
  }

  .hero-image {
    min-height: 400px;
  }

  .hero h1 {
    font-size: 2.2rem;
  }

  .services-grid {
    grid-template-columns: 1fr;
    gap: 60px; /* Give more gap for the negative margin icon */
  }

  .footer h2 {
    font-size: 1.5rem;
  }
}

/* Gallery Section */
.gallery {
  padding: 80px 0 60px;
  background-color: var(--white);
  text-align: center;
}

.gallery-title {
  font-weight: 700;
  font-size: 2.2rem;
  color: var(--text-color);
  line-height: 1.2;
  margin-bottom: 40px;
  padding: 0 20px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  padding: 0 10px;
}

.gallery-grid img {
  width: 100%;
  height: 400px;
  object-fit: cover;
  transition: var(--transition);
}

.gallery-grid img:hover {
  filter: brightness(0.8);
}

/* Contact Section */
.contact {
  background-color: var(--primary-color);
  color: var(--white);
  padding: 80px 20px;
}

.contact-container {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  gap: 50px;
  align-items: center;
}

.contact-image {
  flex: 1;
}

.contact-image img {
  width: 100%;
  border-radius: 4px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.contact-info {
  flex: 1;
}

.contact-info h2 {
  font-size: 2rem;
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 40px;
}

.contact-label {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 4px;
  margin-bottom: 20px;
  opacity: 0.9;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 12px;
  font-size: 16px;
  font-weight: 500;
}

.contact-item svg,
.contact-item img {
  color: #25D366; /* Standard WhatsApp green */
  flex-shrink: 0;
}

.contact-item img {
  object-fit: contain;
}

/* Final Footer */
.final-footer {
  background-color: var(--white);
  padding: 30px 20px;
  text-align: center;
  font-size: 12px;
  color: #888;
}

@media (max-width: 900px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .contact-container {
    flex-direction: column;
    text-align: center;
  }
  
  .contact-item {
    justify-content: center;
  }

  .gallery-grid img {
    height: 300px;
  }
}

/* WhatsApp Container & Floating Button */
.whatsapp-container {
  position: fixed;
  bottom: 40px;
  right: 40px;
  z-index: 1001;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 15px;
}

.whatsapp-msg {
  background-color: #fff;
  color: var(--text-color);
  padding: 12px 20px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  font-size: 14px;
  font-weight: 600;
  position: relative;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.5s ease;
  pointer-events: none;
  white-space: nowrap;
}

.whatsapp-msg.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.whatsapp-msg::after {
  content: "";
  position: absolute;
  bottom: -8px;
  right: 25px;
  border-width: 8px 8px 0 8px;
  border-style: solid;
  border-color: #fff transparent transparent transparent;
}

.close-msg {
  background: none;
  border: none;
  color: #888;
  font-size: 18px;
  cursor: pointer;
  margin-left: 10px;
  line-height: 1;
  padding: 0;
  vertical-align: middle;
}

.close-msg:hover {
  color: var(--primary-color);
}

.whatsapp-float {
  width: 60px;
  height: 60px;
  background-color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  transition: var(--transition);
}

.whatsapp-float:hover {
  transform: scale(1.1);
  background-color: #f8f8f8;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

.whatsapp-float img {
  width: 35px;
  height: 35px;
  object-fit: contain;
}

@media (max-width: 900px) {
  .whatsapp-container {
    bottom: 20px;
    right: 20px;
  }

  .whatsapp-float {
    width: 50px;
    height: 50px;
  }

  .whatsapp-float img {
    width: 25px;
    height: 25px;
  }

  .whatsapp-msg {
    font-size: 12px;
    padding: 8px 15px;
  }
}


