/* Variables */
:root {
  --brand-green: #5F9F51;
}

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

body {
  font-family: 'Montserrat', sans-serif;
  line-height: 1.6;
  color: #333;
  background: url('images/pattern-hexagons.svg') repeat;
  background-color: #fff; /* fallback */
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--brand-green);
  color: white;
  padding: 8px 16px;
  z-index: 10000;
  transition: top 0.3s ease;
  text-decoration: none;
}

.skip-link:focus {
  top: 0;
}

/* Header */
#header {
  background-color: var(--brand-green);
  color: white;
  box-shadow: none;
  padding: 1rem 2rem;
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.logo-box img {
  max-height: 80px;
  width: auto;
  display: block;
  filter: none;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

nav {
  display: flex;
  gap: 1.5rem;
}

nav a {
  color: white;
  font-weight: 600;
  text-decoration: none;
  padding: 0.5rem 0;
}

nav a:hover,
nav a:focus {
  text-decoration: underline;
  color: #d4f5d4;
}

.header-socials {
  display: flex !important;
  gap: 1rem;
  align-items: center;
  position: relative;
  z-index: 1100;
}

.header-socials a {
  color: white;
  font-size: 1.4rem;
  text-decoration: none;
  transition: color 0.3s ease;
  display: flex;
  align-items: center;
}

.header-socials a svg {
  width: 20px;
  height: 20px;
  fill: white;
  transition: fill 0.3s ease;
  vertical-align: middle;
}

.header-socials a:hover,
.header-socials a:focus {
  color: #d4f5d4;
}

.header-socials a:hover svg,
.header-socials a:focus svg {
  fill: #d4f5d4;
}

#menu-toggle {
  background: none;
  border: none;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  display: block;
}

/* Botón menú hamburguesa: cambia a X cuando abierto */
#menu-toggle.open::before {
  content: "✕";
  font-size: 2rem;
  color: white;
  display: inline-block;
}

#menu-toggle::before {
  content: "☰";
  font-size: 2rem;
  color: white;
  display: inline-block;
}

/* Hero */
.hero {
  position: relative;
  background-image: url('images/hero-background.jpg');
  background-position: center center;
  background-repeat: no-repeat;
  background-size: cover;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  font-family: 'Montserrat', sans-serif;
}

.hero-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(
    rgba(0, 80, 40, 0.25),
    rgba(0, 80, 40, 0.5)
  );
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 700px;
  padding: 0 20px;
}

.hero h1 {
  font-size: 3.5rem;
  font-weight: 700;
  text-shadow: 2px 2px 6px rgba(0,0,0,0.7);
  margin-bottom: 0.5rem;
}

.hero-subtitle {
  font-size: 1.5rem;
  letter-spacing: 0.2em;
  margin-bottom: 1rem;
  text-transform: uppercase;
  font-weight: 600;
  text-shadow: 1px 1px 4px rgba(0,0,0,0.6);
}

.hero-tagline {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  font-weight: 400;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}

/* Botón CTA */
.btn-cta {
  background-color: #28a745;
  color: white;
  padding: 1rem 2.5rem;
  font-size: 1.2rem;
  font-weight: 600;
  border-radius: 30px;
  text-decoration: none;
  box-shadow: 0 6px 12px rgba(40, 167, 69, 0.5);
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  /* Eliminamos transform para evitar efecto molesto */
}

.btn-cta:hover,
.btn-cta:focus {
  background-color: #218838;
  box-shadow: 0 8px 16px rgba(33, 136, 56, 0.7);
  outline: none;
  cursor: pointer;
  /* No hay transform ni animaciones adicionales */
}

/* Scroll down indicator */
.scroll-down {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  z-index: 3;
}

.scroll-down span {
  width: 4px;
  height: 12px;
  background: white;
  border-radius: 2px;
  animation: scrollAnim 1.5s infinite;
}

.scroll-down span:nth-child(2) {
  animation-delay: 0.3s;
}

.scroll-down span:nth-child(3) {
  animation-delay: 0.6s;
}

@keyframes scrollAnim {
  0% {
    opacity: 0.2;
    transform: translateY(0);
  }
  50% {
    opacity: 1;
    transform: translateY(10px);
  }
  100% {
    opacity: 0.2;
    transform: translateY(0);
  }
}

/* Secciones generales */
.section {
  max-width: 1200px;
  margin: 3rem auto;
  padding: 0 1rem;
}

h2 {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  color: #004d26;
  text-align: center;
}
/* Estilos para la sección de Valores */

.valores {
   display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: space-between;
}

.valor-item {
  background-color: #e6f2e6; /* verde muy claro */
  padding: 1rem 1.5rem;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(95, 159, 81, 0.2);
  flex: 1 1 180px;
  min-width: 160px;
  color: #2c4a1f; /* verde oscuro para texto */
}

.valor-item h3 {
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.valor-item p {
  margin: 0;
  font-size: 1rem;
  line-height: 1.4;
}
/* Servicios */
.servicio-cards-container {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
  max-width: 1000px;
  margin: 0 auto;
}

.servicio-card {
  background: #97bd86;
  padding: 1rem;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  flex: 1 1 180px; /* smaller base width */
  max-width: 220px; /* reduced max width */
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
  font-size: 0.9rem; /* slightly smaller font */
}

.servicio-card:hover {
  transform: translateY(-6px) scale(1.03);
  box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.servicio-card .icono img {
  max-width: 40px; /* smaller icons */
  margin-bottom: 0.8rem;
}

/* Proyectos */
.proyectos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.proyecto-card {
  background: #e6f2e6;
  padding: 1.5rem;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  font-weight: 600;
  text-align: center;
}

.testimonios-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  max-width: 900px;
  margin: 0 auto 3rem auto;
}

.testimonio-card {
  background: #f9f9f9;
  padding: 1rem 1.2rem;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  color: #333;
  font-style: italic;
  font-size: 0.9rem;
  line-height: 1.4;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 140px;
}

.testimonio-card span {
  margin-top: 1rem;
  font-weight: 600;
  font-style: normal;
  color: #5F9F51;
  font-size: 0.85rem;
  text-align: right;
}

/* Swiper navigation buttons */
.swiper-button-prev,
.swiper-button-next {
  color: #28a745;
}

/* Swiper pagination bullets */
.swiper-pagination-bullet {
  background: #28a745;
  opacity: 0.5;
}

.swiper-pagination-bullet-active {
  opacity: 1;
}

/* Marcas */
.marcas-logos {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 2rem;
}

.marca-logo img {
  max-height: 60px;
  filter: grayscale(0.3);
  transition: filter 0.3s ease;
}

.marca-logo img:hover,
.marca-logo img:focus {
  filter: grayscale(0);
}

/* FAQ */
.faq details {
  margin-bottom: 1rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  padding: 0.8rem 1rem;
  background: #f9f9f9;
}

.faq summary {
  font-weight: 600;
  cursor: pointer;
  outline: none;
}

/* CTA final */
.cta-final {
  background-color: #28a745;
  color: white;
  padding: 3rem 1rem;
  border-radius: 10px;
  margin: 3rem auto;
  max-width: 600px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  text-align: center;
}

.cta-final h2 {
  margin-bottom: 0;
  font-size: 2rem;
}

/* Formulario contacto */
#contact-form {
  max-width: 500px;
  margin: 0 auto 2rem auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

#contact-form label {
  font-weight: 600;
}

#contact-form input,
#contact-form textarea {
  padding: 0.8rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1rem;
  font-family: 'Montserrat', sans-serif;
  resize: vertical;
}

#contact-form textarea {
  min-height: 120px;
}

#contact-form button {
  align-self: flex-start;
}

/* Mensaje formulario */
#form-message {
  margin-top: 0.5rem;
  font-weight: 600;
  color: #28a745;
}

/* Footer */
footer {
  background-color: var(--brand-green);
  color: white;
  font-size: 0.9rem;
  padding: 2rem 1rem;
}

/* Ofertas */
.ofertas-container {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  max-width: 1200px;
  margin: 0 auto;
}

.oferta-card {
  background: white;
  border-radius: 10px;
  box-shadow: 0 6px 15px rgba(0,0,0,0.1);
  max-width: 350px;
  overflow: hidden;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.oferta-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.15);
}

.oferta-card img {
  width: 100%;
  height: auto;
  display: block;
  border-bottom: 1px solid #ddd;
}

.oferta-card h3 {
  margin: 1rem 0 0.5rem;
  color: #5F9F51;
}

.oferta-card p {
  padding: 0 1rem 1.5rem;
  color: #555;
  font-size: 1rem;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2rem;
}

.footer-column {
  flex: 1 1 250px;
  min-width: 200px;
}

.footer-column h3 {
  margin-bottom: 1rem;
  color: white;
  font-weight: 700;
}

.footer-column a {
  display: block;
  color: white;
  text-decoration: none;
  margin-bottom: 0.5rem;
  transition: color 0.3s ease;
}

.footer-column a:hover,
.footer-column a:focus {
  color: #d4f5d4;
}

.footer-contact p {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  color: white;
}

.footer-contact svg {
  fill: white;
  width: 20px;
  height: 20px;
}

.footer-logo img {
  max-width: 150px;
  display: block;
  margin: 0 auto;
  filter: none;
}

.social-icons {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.social-icons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  color: white;
  transition: color 0.3s ease;
}

.social-icons a svg {
  fill: currentColor;
  width: 20px;
  height: 20px;
}

.social-icons a:hover,
.social-icons a:focus {
  color: #d4f5d4;
}

.footer-bottom {
  text-align: center;
  margin-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.3);
  padding-top: 1rem;
  color: rgba(255,255,255,0.8);
  font-size: 0.85rem;
}

/* Botón WhatsApp flotante */
.whatsapp-float {
  position: fixed;
  bottom: 25px;
  right: 25px;
  background-color: #25d366;
  color: white;
  font-size: 2rem;
  border-radius: 50%;
  padding: 0.5rem 0.6rem;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  z-index: 1000;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s ease;
}

.whatsapp-float:hover,
.whatsapp-float:focus {
  background-color: #1ebe57;
  outline: none;
}

/* Responsive */
@media (max-width: 768px) {
  #contact-form {
    width: 90%;
  }
  .footer-container {
    flex-direction: column;
    text-align: center;
  }
  .footer-column {
    margin-bottom: 1rem;
  }
  .hero h1 {
    font-size: 2.5rem;
  }
  .hero-subtitle {
    font-size: 1.2rem;
  }
  .hero-tagline {
    font-size: 1rem;
  }
  .btn-cta {
    font-size: 1rem;
    padding: 0.8rem 2rem;
  }
}
article {
  max-width: 800px;
  margin: 3rem auto;
  padding: 2rem;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
  font-family: 'Montserrat', sans-serif;
  color: #333;
  line-height: 1.7;
}

article h1 {
  font-size: 2.8rem;
  color: #5F9F51;
  margin-bottom: 1rem;
  font-weight: 700;
}

article h2 {
  font-size: 2rem;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  color: #4a7c3a;
}

article h3 {
  font-size: 1.5rem;
  margin-top: 2rem;
  margin-bottom: 0.8rem;
  color: #4a7c3a;
}

article p {
  font-size: 1.1rem;
  margin-bottom: 1.2rem;
}

article ul, article ol {
  margin-left: 1.5rem;
  margin-bottom: 1.5rem;
}

article strong {
  color: #5F9F51;
}

article blockquote {
  border-left: 4px solid #5F9F51;
  padding-left: 1rem;
  color: #666;
  font-style: italic;
  margin: 1.5rem 0;
  background: #f9f9f9;
  border-radius: 6px;
}

article a {
  color: #5F9F51;
  text-decoration: underline;
  transition: color 0.3s ease;
}

article a:hover,
article a:focus {
  color: #3e6b2f;
  outline: none;
}
/* Estilos para sección blog en index */
.blog-posts-container {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: center;
  max-width: 1000px;
  margin: 0 auto;
}

.blog-post {
  background: #e6f2e6;
  padding: 1.5rem;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  flex: 1 1 280px;
  max-width: 320px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.blog-post h3 {
  color: #2c4a1f;
  margin-bottom: 1rem;
  font-weight: 700;
}

.blog-post p {
  flex-grow: 1;
  margin-bottom: 1.5rem;
  color: #333;
  font-size: 1rem;
  line-height: 1.4;
}

.blog-post .btn-cta {
  align-self: flex-start;
  padding: 0.5rem 1.5rem;
  font-size: 1rem;
}
/* Formato uniforme para imágenes en artículos */
article img {
  display: block;
  max-width: 100%;
  width: 320px;       /* ancho fijo para uniformidad */
  height: 180px;      /* altura fija para mantener proporción */
  object-fit: cover;  /* recorta la imagen para llenar el área sin distorsión */
  margin: 1rem auto 1.5rem auto; /* centrado horizontal y separación vertical */
  border-radius: 8px; /* bordes ligeramente redondeados para estética */
  box-shadow: 0 4px 8px rgba(0,0,0,0.1); /* sombra sutil para destacar */
}
/* Bloques para Secciones de Calculadora */
.dv-calc-section h2 {
  color: #5F9F51;
}
.dv-calc-section button {
  background-color: #5F9F51;
}
.dv-calc-section button:hover {
  background-color: #4a7c3a;
}
.dv-calc-resultado {
  background-color: #e6f2e6;
  border-color: #97bd86;
}


/* Lista de checks horizontal para domótica y artefactos */
.dv-calc-section .checklist-horizontal {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2em;
  margin-top: 0.5em;
  margin-bottom: 12px;
}
.dv-calc-section .checklist-horizontal label {
  font-weight: 400;
  margin: 0;
}

@media (max-width: 650px) {
  .dv-calc-section { padding: 12px; }
  .dv-calc-section .checklist-horizontal { flex-direction: column; gap: 0.5em;}
}
