:root {
  --primary-color: #2e8b57;
  --secondary-color: #ffd700;
  --accent-color: #ff6b35;
  --dark-color: #1a1a1a;
  --light-color: #f8f9fa;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: #333;
  overflow-x: hidden;
}

/* Navegación */
.navbar {
  background: rgba(46, 139, 87, 0.95) !important;
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 20px rgba(46, 139, 87, 0.1);
  transition: all 0.3s ease;
}

.navbar-brand {
  font-weight: bold;
  font-size: 1.8rem;
  color: white !important;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}
.navbar-brand img {
  height: 48px;
  width: auto;
  margin-right: 10px;
}

.navbar-nav .nav-link {
  color: white !important;
  font-weight: 500;
  margin: 0 10px;
  transition: all 0.3s ease;
  position: relative;
}

.navbar-nav .nav-link:hover {
  color: var(--secondary-color) !important;
  transform: translateY(-2px);
}

.navbar-nav .nav-link::after {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 50%;
  background-color: var(--secondary-color);
  transition: all 0.3s ease;
}

.navbar-nav .nav-link:hover::after {
  width: 100%;
  left: 0;
}

/* Hero Section */
.hero {
  background: linear-gradient(
    135deg,
    var(--primary-color),
    #228b22,
    var(--secondary-color)
  );
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><defs><radialGradient id="solar" cx="50%" cy="50%" r="50%"><stop offset="0%" style="stop-color:%23FFD700;stop-opacity:0.1"/><stop offset="100%" style="stop-color:%23FFD700;stop-opacity:0"/></radialGradient></defs><circle cx="500" cy="200" r="150" fill="url(%23solar)"/><circle cx="800" cy="600" r="100" fill="url(%23solar)"/><circle cx="200" cy="700" r="120" fill="url(%23solar)"/></svg>')
    no-repeat center;
  background-size: cover;
  opacity: 0.3;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  color: white;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
  margin-bottom: 20px;
}

.hero .subtitle {
  font-size: clamp(1.2rem, 2.5vw, 1.8rem);
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 30px;
}

.solar-animation {
  position: absolute;
  top: 20%;
  right: 10%;
  width: 360px;
  height: 300px;
  z-index: 1;
}
.solar-animation img {
  width: 100%;
  height: auto;
  border-radius: 16px;
  box-shadow: 0 0 20px rgba(255, 107, 53, 0.5);
}
.sun {
  width: 80px;
  height: 80px;
  background: var(--secondary-color);
  border-radius: 50%;
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  box-shadow: 0 0 30px var(--secondary-color);
  animation: pulse 2s infinite;
}

.solar-panel {
  width: 120px;
  height: 80px;
  background: linear-gradient(45deg, #1e3c72, #2a5298);
  position: absolute;
  bottom: 50px;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.solar-panel::before {
  content: "";
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  bottom: 10px;
  background: linear-gradient(45deg, #4a90e2, #7bb3f0);
  border-radius: 4px;
}

.energy-rays {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.ray {
  width: 2px;
  height: 60px;
  background: var(--secondary-color);
  position: absolute;
  opacity: 0.7;
  animation: energyFlow 1.5s infinite ease-in-out;
}

.ray:nth-child(1) {
  transform: rotate(0deg) translateY(-40px);
  animation-delay: 0s;
}
.ray:nth-child(2) {
  transform: rotate(60deg) translateY(-40px);
  animation-delay: 0.2s;
}
.ray:nth-child(3) {
  transform: rotate(120deg) translateY(-40px);
  animation-delay: 0.4s;
}

@keyframes pulse {
  0%,
  100% {
    transform: translateX(-50%) scale(1);
  }
  50% {
    transform: translateX(-50%) scale(1.1);
  }
}

@keyframes energyFlow {
  0% {
    opacity: 0;
    transform: rotate(0deg) translateY(-40px) scale(0.5);
  }
  50% {
    opacity: 1;
    transform: rotate(0deg) translateY(-40px) scale(1);
  }
  100% {
    opacity: 0;
    transform: rotate(0deg) translateY(-40px) scale(0.5);
  }
}

/* Botones */
.btn-primary-custom {
  background: linear-gradient(45deg, var(--accent-color), #ff8c00);
  border: none;
  color: white;
  padding: 15px 30px;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: 50px;
  box-shadow: 0 5px 15px rgba(255, 107, 53, 0.3);
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
}

.btn-primary-custom:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(255, 107, 53, 0.4);
  color: white;
}

.btn-outline-custom {
  border: 2px solid white;
  color: white;
  padding: 15px 30px;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: 50px;
  background: transparent;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
}

.btn-outline-custom:hover {
  background: white;
  color: var(--primary-color);
  transform: translateY(-3px);
}

/* Secciones */
.section {
  padding: 80px 0;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--dark-color);
  text-align: center;
  margin-bottom: 20px;
  position: relative;
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: linear-gradient(
    45deg,
    var(--primary-color),
    var(--secondary-color)
  );
  border-radius: 2px;
}

.section-subtitle {
  font-size: 1.2rem;
  color: #666;
  text-align: center;
  margin-bottom: 50px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Cards de servicios */
.service-card {
  background: white;
  border-radius: 20px;
  padding: 40px 30px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  height: 100%;
  border: 1px solid rgba(46, 139, 87, 0.1);
}

.service-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.service-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(45deg, var(--primary-color), #32cd32);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 25px;
  font-size: 2rem;
  color: white;
  box-shadow: 0 5px 15px rgba(46, 139, 87, 0.3);
}

.service-card h4 {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--dark-color);
  margin-bottom: 15px;
  text-align: center;
}

.service-list {
  list-style: none;
  padding: 0;
}

.service-list li {
  padding: 8px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  font-size: 0.95rem;
  color: #666;
  display: flex;
  align-items: center;
}

.service-list li:last-child {
  border-bottom: none;
}

.service-list li::before {
  content: "✓";
  color: var(--primary-color);
  font-weight: bold;
  margin-right: 10px;
  font-size: 1.1rem;
}

/* Proyectos */
.project-card {
  background: white;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  height: 100%;
}
.project-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.project-image {
  height: 200px;
  background: linear-gradient(45deg, var(--primary-color), #228b22);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: white;
  position: relative;
  overflow: hidden;
}

.project-image::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s;
}

.project-card:hover .project-image::before {
  left: 100%;
}

.project-content {
  padding: 25px;
}

.project-title {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--dark-color);
  margin-bottom: 10px;
}

.project-location {
  color: var(--primary-color);
  font-weight: 500;
  font-size: 0.95rem;
}

/* Calculadora */
.calculator {
  background: linear-gradient(135deg, var(--primary-color), #228b22);
  color: white;
}

.calculator-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 40px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.form-control-custom {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  border-radius: 10px;
  padding: 12px 15px;
}

.form-control-custom::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

.form-control-custom:focus {
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--secondary-color);
  box-shadow: 0 0 0 0.2rem rgba(255, 215, 0, 0.25);
  color: white;
}

.result-card {
  background: rgba(255, 215, 0, 0.1);
  border: 1px solid rgba(255, 215, 0, 0.3);
  border-radius: 15px;
  padding: 25px;
  margin-top: 20px;
}

/* Contacto */
.contact {
  background: var(--light-color);
}

.contact-card {
  background: white;
  border-radius: 20px;
  padding: 40px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  text-align: center;
}

.contact-icon {
  width: 60px;
  height: 60px;
  background: var(--primary-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 1.5rem;
  color: white;
}

/* Footer */
.footer {
  background: var(--dark-color);
  color: white;
  padding: 40px 0 20px;
}

.footer-brand {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--secondary-color);
  margin-bottom: 15px;
}
.footer-brand img {
  height: 72px;
  width: auto;
  margin-right: 10px;
}

/* Animaciones */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 2.5rem;
  }

  .solar-animation {
    display: none;
  }

  .section {
    padding: 60px 0;
  }

  .section-title {
    font-size: 2rem;
  }
}

/* Scroll to top button */
.scroll-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 1000;
}

.scroll-top.visible {
  opacity: 1;
  visibility: visible;
}

.scroll-top:hover {
  background: var(--accent-color);
  transform: translateY(-3px);
}
.col-lg-3 img {
  width: 150px;
  object-fit: cover;
}
.custom-col {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}
