/* Reset y configuración base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Prevenir scroll horizontal en toda la página */
html, body {
  max-width: 100%;
  overflow-x: hidden;
}

/* Paleta de colores */
:root {
  --primary: #6B8E23; /* Verde olivo */
  --primary-dark: #556B2F; /* Verde olivo oscuro */
  --secondary: #F5DEB3; /* Color trigo */
  --accent: #8FBC8F; /* Verde mar claro */
  --white: #FFFFFF;
  --light-gray: #E5E3D7; /* Color hueso */
  --text: #4A4A4A;
  --text-light: #7D7D7D;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  --transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Estilos base */
html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: 'Open Sans', sans-serif;
  color: var(--text);
  background-color: var(--light-gray); /* Fondo color hueso */
  line-height: 1.6;
  overflow-x: hidden;
  width: 100%;
  position: relative;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: 80px 0;
  width: 100%;
  overflow-x: hidden;
  background-color: var(--light-gray); /* Fondo color hueso */
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-header h2 {
  font-size: 2.5rem;
  position: relative;
  display: inline-block;
  margin-bottom: 15px;
  word-wrap: break-word;
}

.section-header h2 span {
  color: var(--primary);
}

.section-header h2::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: linear-gradient(to right, var(--primary), var(--accent));
  border-radius: 2px;
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background-color: rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow);
  transition: var(--transition);
  backdrop-filter: blur(10px);
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 0; /* Reducimos el padding vertical para compensar el logo más grande */
  min-height: 70px; /* Mantenemos la misma altura total */
}

/* Estilos para el logo con imagen */
.logo-image {
  height: 100px; /* Aumentamos el tamaño del logo */
  width: auto;
  transition: var(--transition);
  object-fit: contain; /* Asegura que la imagen no se distorsione */
}

/* Ajustamos el contenedor del logo para mejor alineación */
.logo {
  display: flex;
  align-items: center;
  height: 70px; /* Igual que min-height de navbar */
}

.logo-image:hover {
  transform: scale(1.05);
}

/* Mantenemos el resto de estilos igual */
.nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
}

.nav-links a {
  color: var(--primary-dark);
  font-weight: 500;
  transition: var(--transition);
  position: relative;
}

.nav-links a:hover {
  color: var(--primary);
}

.nav-links a.highlight {
  background-color: var(--secondary);
  padding: 8px 15px;
  border-radius: 30px;
  color: var(--text);
}

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 25px;
  height: 18px;
  cursor: pointer;
  z-index: 1001;
  position: relative;
}

.menu-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background-color: var(--text);
  border-radius: 2px;
  transition: var(--transition);
}

.menu-toggle.active span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* Hero Section */
.hero {
  padding: 120px 0 80px;
  background: linear-gradient(135deg, #F9FDFF 0%, #E6F7FF 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  width: 100%;
  overflow-x: hidden;
}

.hero-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  width: 100%;
}

.hero-content {
  max-width: 100%;
}

.hero-title {
  font-size: 3.5rem;
  margin-bottom: 20px;
  line-height: 1.2;
  word-wrap: break-word;
}

.hero-title span {
  color: var(--primary);
  position: relative;
}

.hero-title span::after {
  content: '';
  position: absolute;
  bottom: 5px;
  left: 0;
  width: 100%;
  height: 10px;
  background-color: var(--secondary);
  z-index: -1;
  opacity: 0.6;
}

.hero-text {
  font-size: 1.2rem;
  color: var(--text-light);
  margin-bottom: 30px;
}

.hero-buttons {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 12px 30px;
  border-radius: 30px;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  font-size: 1rem;
  white-space: nowrap;
}

.btn-primary {
  background-color: var(--primary);
  color: white;
}

.btn-primary:hover {
  background-color: var(--primary-dark);
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(107, 142, 35, 0.3);
}

.btn-secondary {
  background-color: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-secondary:hover {
  background-color: rgba(107, 142, 35, 0.1);
  transform: translateY(-3px);
}

.hero-image {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  width: 100%;
}

.solar-panel {
  width: 100%;
  max-width: 600px;
  height: 250px;
  background: linear-gradient(135deg, #E6F7FF 0%, #B3E0FF 100%);
  border-radius: 15px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
  margin-left: auto;
}

.sun-ray {
  position: absolute;
  top: -50px;
  right: -50px;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(245, 222, 179, 0.4) 0%, transparent 70%);
  border-radius: 50%;
  z-index: 1;
}

.solar-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
  transform: translateX(-100%);
  animation: shine 3s infinite;
}

/* Beneficios */
.benefits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

.benefit-card {
  background-color: var(--white);
  border-radius: 15px;
  padding: 40px 25px;
  box-shadow: var(--shadow);
  transition: var(--transition);
  text-align: center;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.benefit-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: linear-gradient(to right, var(--primary), var(--accent));
  transition: var(--transition);
}

.benefit-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.benefit-card:hover::before {
  height: 100%;
  opacity: 0.05;
}

.card-icon {
  width: 80px;
  height: 80px;
  background-color: rgba(107, 142, 35, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 1.8rem;
  color: var(--primary);
  transition: var(--transition);
}

.benefit-card:hover .card-icon {
  background-color: var(--primary);
  color: white;
  transform: rotateY(180deg);
}

/* Servicios */
.services {
  background-color: var(--light-gray);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

.service-card {
  background-color: var(--white);
  border-radius: 15px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.service-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.service-image {
  height: 200px;
  overflow: hidden;
}

.service-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.service-card:hover .service-image img {
  transform: scale(1.1);
}

.service-content {
  padding: 25px;
}

.service-content h3 {
  margin-bottom: 10px;
  color: var(--primary);
}

.service-link {
  display: inline-flex;
  align-items: center;
  color: var(--primary);
  font-weight: 600;
  margin-top: 15px;
  transition: var(--transition);
}

.service-link i {
  margin-left: 5px;
  transition: var(--transition);
}

.service-link:hover {
  color: var(--primary-dark);
}

.service-link:hover i {
  transform: translateX(5px);
}

/* Proyectos */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

.project-card {
  position: relative;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.project-card:hover {
  transform: translateY(-5px);
}

.project-image {
  position: relative;
  height: 250px;
  overflow: hidden;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.project-card:hover .project-image img {
  transform: scale(1.05);
}

.project-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
  color: white;
  padding: 20px;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.project-card:hover .project-overlay {
  transform: translateY(0);
}

.btn-view {
  display: inline-block;
  padding: 8px 15px;
  background-color: var(--primary);
  color: white;
  border-radius: 20px;
  margin-top: 10px;
  font-size: 0.9rem;
  transition: var(--transition);
}

.btn-view:hover {
  background-color: var(--primary-dark);
}

/* Contacto */
.contact {
  background-color: var(--light-gray);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
}

.contact-info {
  background-color: var(--white);
  padding: 40px;
  border-radius: 15px;
  box-shadow: var(--shadow);
}

.info-item {
  display: flex;
  align-items: center;
  margin-bottom: 30px;
}

.info-item i {
  font-size: 1.5rem;
  color: var(--primary);
  margin-right: 20px;
  width: 30px;
  text-align: center;
  flex-shrink: 0;
}

.info-item h3 {
  font-size: 1.1rem;
  margin-bottom: 5px;
  color: var(--primary-dark);
}

.info-item p {
  color: var(--text-light);
  margin: 0;
}

.contact-form {
  background-color: var(--white);
  padding: 40px;
  border-radius: 15px;
  box-shadow: var(--shadow);
}

.form-group {
  margin-bottom: 20px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 15px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-family: 'Open Sans', sans-serif;
  transition: var(--transition);
  font-size: 16px;
  box-sizing: border-box;
}

.form-group textarea {
  min-height: 120px;
  resize: vertical;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(107, 142, 35, 0.2);
}

.form-group select {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23556B2F'%3e%3cpath d='M7 10l5 5 5-5z'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 15px center;
  background-size: 15px;
}

/* Footer */
.footer {
  background-color: var(--primary-dark);
  color: var(--white);
  padding: 60px 0 30px;
  width: 100%;
  overflow-x: hidden;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}

.footer-logo img {
  height: 100px; /* Tamaño consistente con el header */
  margin-bottom: 15px;
}

.footer-logo p {
  color: rgba(255, 255, 255, 0.8);
}

.footer-links h3,
.footer-contact h3 {
  font-size: 1.3rem;
  margin-bottom: 20px;
  position: relative;
  padding-bottom: 10px;
}

.footer-links h3::after,
.footer-contact h3::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 50px;
  height: 3px;
  background-color: var(--secondary);
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.8);
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--secondary);
  padding-left: 5px;
}

.footer-contact p {
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 15px;
  display: flex;
  align-items: center;
}

.footer-contact i {
  margin-right: 10px;
  color: var(--secondary);
  width: 20px;
}

.social-links {
  display: flex;
  gap: 15px;
  margin-top: 20px;
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: var(--white);
  transition: var(--transition);
}

.social-links a:hover {
  background-color: var(--secondary);
  color: var(--primary-dark);
  transform: translateY(-3px);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 20px;
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
}

/* Animaciones */
@keyframes shine {
  100% {
    transform: translateX(100%);
  }
}

.animate-pop {
  animation: popIn 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  opacity: 0;
  transform: scale(0.8);
}

@keyframes popIn {
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.animate-fade {
  animation: fadeIn 1s ease 0.3s forwards;
  opacity: 0;
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

.animate-slide-up {
  animation: slideUp 0.8s ease 0.6s forwards;
  opacity: 0;
  transform: translateY(30px);
}

@keyframes slideUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-float {
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-20px);
  }
}

.animate-card {
  animation: fadeInUp 0.8s ease forwards;
  opacity: 0;
  transform: translateY(30px);
}

.delay-1 {
  animation-delay: 0.3s;
}

.delay-2 {
  animation-delay: 0.6s;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Media Queries Responsive */
@media (max-width: 1024px) {
  .hero-wrapper {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }
  
  .hero-image {
    order: -1;
  }
  
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
}

@media (max-width: 768px) {
  .container {
    padding: 0 15px;
    width: 100%;
    max-width: 100%;
  }
  
  .section {
    padding: 60px 0;
    overflow-x: hidden;
  }
  
  .hero {
    padding: 100px 0 60px;
    min-height: auto;
    overflow-x: hidden;
  }
  
  .hero-title {
    font-size: 2.5rem;
    word-break: break-word;
    hyphens: auto;
  }
  
  .section-header h2 {
    font-size: 2rem;
    word-break: break-word;
  }
  
  .nav-links {
    position: fixed;
    top: 70px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 70px);
    background-color: var(--white);
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 40px;
    transition: var(--transition);
    overflow-y: auto;
    gap: 20px;
    z-index: 999;
  }
  
  .nav-links.active {
    left: 0;
  }
  
  .nav-links a {
    font-size: 1.2rem;
    padding: 10px 20px;
    width: auto;
  }
  
  .menu-toggle {
    display: flex;
  }
  
  body.menu-open {
    overflow: hidden;
  }
  
  .hero-buttons {
    flex-direction: column;
    align-items: center;
    width: 100%;
  }
  
  .btn {
    width: 100%;
    max-width: 280px;
    box-sizing: border-box;
  }
  
  .benefits-grid,
  .services-grid,
  .projects-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .contact-info,
  .contact-form {
    padding: 30px 20px;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 30px;
  }
  
  .footer-links h3::after,
  .footer-contact h3::after {
    left: 50%;
    transform: translateX(-50%);
  }
  
  .footer-contact p {
    justify-content: center;
  }
  
  .social-links {
    justify-content: center;
  }
  
  /* Ajuste específico para el solar panel en móviles */
  .solar-panel {
    max-width: 100%;
    margin: 0;
  }
  
  .sun-ray {
    width: 150px;
    height: 150px;
    top: -30px;
    right: -30px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 10px;
  }
  
  .hero-title {
    font-size: 1.8rem;
    line-height: 1.3;
  }
  
  .section-header h2 {
    font-size: 1.6rem;
  }
  
  .hero-text {
    font-size: 1rem;
  }
  
  .benefit-card,
  .contact-info,
  .contact-form {
    padding: 20px 15px;
  }
  
  .solar-panel {
    height: 180px;
    max-width: 100%;
    margin-top: 30px; /* Añade espacio superior */
  }
  
  .info-item {
    flex-direction: column;
    text-align: center;
    gap: 10px;
  }
  
  .info-item i {
    margin-right: 0;
    margin-bottom: 10px;
  }
  
  .navbar {
    padding: 10px 0;
  }
  
  .logo-image {
    height: 80px; /* Logo aún más pequeño en móviles */
  }
  
  .section {
    padding: 40px 0;
  }
  
  .hero {
    padding: 80px 0 40px;
  }
  
  .footer {
    padding: 40px 0 20px;
  }
  
  /* Prevenir cualquier desbordamiento horizontal */
  * {
    max-width: 100%;
  }
  
  .hero-wrapper,
  .benefits-grid,
  .services-grid,
  .projects-grid,
  .contact-grid,
  .footer-content {
    width: 100%;
    max-width: 100%;
  }
}

@media (max-width: 320px) {
  .container {
    padding: 0 8px;
  }
  
  .hero-title {
    font-size: 1.6rem;
  }
  
  .section-header h2 {
    font-size: 1.4rem;
  }
  
  .solar-panel {
    height: 150px;
  }
}

/* Mejoras específicas para dispositivos táctiles */
@media (hover: none) and (pointer: coarse) {
  .benefit-card:hover,
  .service-card:hover,
  .project-card:hover {
    transform: none;
  }
  
  .btn:hover {
    transform: none;
  }
  
  .benefit-card:hover .card-icon {
    transform: none;
  }
  
  /* Eliminar efectos hover en móviles */
  .btn-primary:hover {
    transform: none;
    box-shadow: var(--shadow);
  }
  
  .btn-secondary:hover {
    transform: none;
  }
}

/* Prevención de zoom en iOS */
@media screen and (-webkit-min-device-pixel-ratio: 0) {
  select,
  textarea,
  input[type="text"],
  input[type="email"],
  input[type="tel"] {
    font-size: 16px;
  }
}

/* Asegurar que ningún elemento cause scroll horizontal */
.hero-wrapper,
.section,
.container,
.benefits-grid,
.services-grid,
.projects-grid,
.contact-grid,
.footer-content {
  box-sizing: border-box;
  max-width: 100%;
}