/* ======================== RESET BÁSICO ======================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Nunito', sans-serif;
  background-color: #f4f1ec;
  color: #333;
  line-height: 1.6;
}

/* ======================== CONTAINER GENERAL ======================== */
.container {
  width: 90%;
  max-width: 1100px;
  margin: auto;
}

/* ======================== HEADER ======================== */
.header {
  background-color: #ffffff;
  padding: 0.5rem 0;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: nowrap;
}

.logo-image {
  height: 48px;
}

/* ======================== NAV ======================== */
.nav {
  list-style: none;
  display: flex;
  gap: 1.2rem;
  justify-content: flex-end;
  align-items: center;
  font-size: 1rem;
}

.nav a {
  text-decoration: none;
  color: #4a7856;
  font-weight: bold;
  position: relative;
}

.nav a.active,
.nav a:hover {
  color: #2e4d38;
}

/* Subrayado arcoíris suave en nav */
.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 3px;
  width: 0;
  margin: auto;
  background: linear-gradient(90deg,#4a7856,#7aac7c,#4a7856);
  border-radius: 3px;
  transition: width .25s ease;
}

.nav a:hover::after,
.nav a.active::after,
.nav a[aria-current="page"]::after {
  width: 100%;
}

/* ======================== HERO ======================== */
.hero {
  position: relative;
  height: 90vh;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: #fff;
  background-image: url("imagenes/fondo.jpeg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  overflow: hidden;
}

/* Aurora animada */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(1200px 600px at 12% 20%, rgba(122,172,124,.35), transparent 60%),
    radial-gradient(900px 500px at 85% 35%, rgba(74,120,86,.35), transparent 60%),
    conic-gradient(from 0deg at 50% 50%, rgba(255,255,255,.04), transparent 40%, rgba(255,255,255,.04));
  filter: blur(20px);
  transform: scale(1.2);
  animation: auroraFloat 18s ease-in-out infinite alternate;
  z-index: 0;
}

@keyframes auroraFloat {
  0%   { transform: scale(1.2) translateY(-2%) }
  50%  { transform: scale(1.25) translateY(2%) }
  100% { transform: scale(1.2) translateY(-2%) }
}

/* Overlay del hero */
.overlay {
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1;
}

/* Contenido del hero */
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 700px;
}

.hero h1 {
  font-size: 2.8rem;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
}

/* ======================== BOTONES ======================== */
.btn,
.btn-whatsapp,
.btn-small {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background-color: #4a7856;
  color: #fff;
  text-decoration: none;
  border-radius: 8px;
  transition: background 0.3s ease;
  font-weight: 700;
  position: relative;
  isolation: isolate;
}

.btn:hover,
.btn-whatsapp:hover,
.btn-small:hover {
  background-color: #2e4d38;
}

.btn-small {
  font-size: 0.9rem;
  margin-top: 1rem;
}

/* Bordes animados sin JS */
.btn::before,
.btn-whatsapp::before,
.btn-small::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  z-index: -1;
  background: linear-gradient(120deg, #203d28, #98f09b, #127a33, #05f043);
  background-size: 300% 300%;
  animation: borderFlow 6s linear infinite;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  padding: 2px;
}

@keyframes borderFlow {
  0% { background-position: 0% 50% }
  100% { background-position: 300% 50% }
}

/* ======================== SECCIONES ======================== */
section {
  padding: 4rem 0;
}

h2, h3 {
  color: #2e4d38;
  margin-bottom: 1.5rem;
}

/* Nosotros */
.nosotros p {
  margin-bottom: 1rem;
}

/* Ventajas */
.ventajas ul {
  list-style: none;
  padding-left: 1rem;
}

.ventajas li {
  margin-bottom: 0.75rem;
  font-size: 1.1rem;
}

/* Fertilización */
.fertilizacion {
  background-color: #eef5ed;
}

.fertilizacion-pasos {
  padding-left: 1.2rem;
}

.fertilizacion-pasos li {
  list-style: disc;
  margin-bottom: 1rem;
}

/* ======================== PRODUCTOS GRID ======================== */
.productos h2 {
  text-align: center;
  margin-bottom: 2rem;
}

.productos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
}

.producto {
  background-color: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
  text-align: center;
  transition: transform 0.3s ease;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.producto:hover {
  transform: scale(1.02);
}

.producto img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.producto h3 {
  margin: 1rem 0 0.5rem;
  color: #4a7856;
}

.producto p {
  flex-grow: 1;
  margin-bottom: 1.5rem;
  padding: 0 1rem 1rem;
}

.producto .btn-whatsapp {
  align-self: center;
  margin-top: auto;
  margin-bottom: 0.5rem;
}

/* Card borde iridiscente */
.producto::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 10px;
  pointer-events: none;
  padding: 1px;
  background: linear-gradient(135deg, rgba(122,172,124,0), rgba(74,120,86,.35), rgba(122,172,124,0));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  transition: background .25s ease;
}

.producto:hover::after {
  background: linear-gradient(135deg, rgba(122,172,124,0), rgba(74,120,86,.55), rgba(122,172,124,0));
}

/* ======================== FORMULARIO ======================== */
form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

form input,
form textarea {
  padding: 0.75rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-family: inherit;
}

form textarea {
  resize: vertical;
  min-height: 120px;
}

/* ======================== FOOTER ======================== */
footer {
  background-color: #2e4d38;
  color: #d4e9ce;
  padding: 2rem 1rem;
  text-align: center;
}

footer p {
  margin-bottom: 1rem;
  font-weight: 600;
}

.social-icons {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.social-icons a {
  background-color: #4a7856 !important;
  padding: 0.5rem 1rem;
  border-radius: 12px;
  color: #d4e9ce !important;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: 0 3px 6px rgba(0,0,0,0.15);
  transition: background-color 0.25s ease, box-shadow 0.25s ease;
}

.social-icons a:hover {
  background-color: #7aac7c !important;
  box-shadow: 0 6px 12px rgba(0,0,0,0.25);
  color: #fff !important;
}

/* ======================== BOTONES FLOTANTES ======================== */
.whatsapp-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: #25d366;
  color: white;
  font-size: 1.4rem;
  padding: 0.75rem 1rem;
  border-radius: 50px;
  text-decoration: none;
  z-index: 999;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.btn-subir {
  position: fixed;
  bottom: 80px;
  right: 20px;
  display: none;
  background-color: #4a7856;
  color: white;
  padding: 0.5rem 0.75rem;
  border-radius: 50%;
  font-size: 1.3rem;
  text-align: center;
  z-index: 999;
}

/* ======================== MANTENIMIENTO ======================== */
.mantenimiento-bloque {
  background-color: #ffffff;
  padding: 2rem;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
  margin-bottom: 2rem;
}

.mantenimiento-bloque h3 {
  color: #4a7856;
  margin-bottom: 1rem;
  font-size: 1.4rem;
}

.mantenimiento-bloque p,
.mantenimiento-bloque li {
  font-size: 1.05rem;
  margin-bottom: 0.75rem;
  color: #444;
}

.mantenimiento-bloque ul {
  padding-left: 0;
  list-style: none;
}

/* ======================== RESPONSIVE ======================== */
@media (max-width: 768px) {
  .header .container {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  .logo-image {
    height: 40px;
  }

  .nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: 0.85rem;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .producto img {
    height: 160px;
  }
}

/* ======================== SCROLLBAR PERSONALIZADO ======================== */
*::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

*::-webkit-scrollbar-track {
  background: #e8efe6;
}

*::-webkit-scrollbar-thumb {
  background: #9ec3a4;
  border-radius: 8px;
  border: 3px solid #e8efe6;
}

*::-webkit-scrollbar-thumb:hover {
  background: #7aac7c;
}

/* ======================== ACCESIBILIDAD ======================== */
@media (prefers-reduced-motion: reduce) {
  .hero::before,
  .btn::before,
  .btn-whatsapp::before,
  .btn-small::before {
    animation: none !important;
    transition: none !important;
  }
}

/* ======================== GALERIA ======================== */
.galeria h2 {
  text-align: center;
  margin-bottom: 1rem;
}

.galeria-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.galeria-item {
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  background-color: #fff;
}

.galeria-item img,
.galeria-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
  display: block;
}
.galeria-item img,
.galeria-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
  display: block;
}


.galeria-item:hover img {
  transform: scale(1.08);
}

@media (max-width: 600px) {
  .galeria-item {
    height: 200px;
  }
}

/* ======================== LIGHTBOX ======================== */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 2000;
  padding: 2rem;
}

.lightbox.active {
  display: flex;
}

.lightbox-content img,
.lightbox-content video {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.lightbox-content video {
  background: #000;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 2.5rem;
  color: #fff;
  cursor: pointer;
  font-weight: bold;
}

/* Flechas del lightbox */
.lightbox-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 3rem;
  color: #fff;
  cursor: pointer;
  user-select: none;
  padding: 0 15px;
  z-index: 2100;
  transition: opacity 0.2s ease;
}

.lightbox-arrow:hover {
  opacity: 0.7;
}

.lightbox-arrow.left {
  left: 20px;
}

.lightbox-arrow.right {
  right: 20px;
}


/* ================= CONTACTO ================= */

.contacto {
  background-color: #f4f1ec;
}

/* Título */
.contacto h2 {
  text-align: center;
  font-size: 2.4rem;
  font-weight: 700;
  color: #2e4d38;
  margin-bottom: 0.5rem;
}

/* Subtítulo */
.contacto > .container > p {
  text-align: center;
  font-size: 1.05rem;
  color: #4a7856;
  margin-bottom: 3rem;
  line-height: 1.6;
}

/* Grid principal */
.contacto-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

/* ================= MAPA ================= */

.contacto-mapa {
  display: flex;
  justify-content: center;
}

.mapa-wrapper {
  width: 100%;
  max-width: 520px;
  height: 450px;
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 6px 16px rgba(0,0,0,0.1);
}

.mapa-wrapper iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* Overlay clickeable */
.mapa-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: background 0.3s ease;
}

.mapa-overlay:hover {
  background: rgba(0,0,0,0.28);
}

.mapa-overlay span {
  background: #ffffff;
  color: #2e4d38;
  padding: 0.6rem 1.2rem;
  border-radius: 30px;
  font-weight: 700;
  box-shadow: 0 4px 10px rgba(0,0,0,0.25);
}

/* ================= FORMULARIO ================= */

.contacto-form {
  background-color: #ffffff;
  padding: 2.5rem;
  border-radius: 16px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.08);
  position: relative;
}

/* Borde suave */
.contacto-form::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 16px;
  pointer-events: none;
  padding: 1px;
  background: linear-gradient(
    135deg,
    rgba(122,172,124,0),
    rgba(74,120,86,.35),
    rgba(122,172,124,0)
  );
  -webkit-mask: linear-gradient(#000 0 0) content-box,
                linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}

/* Inputs */
.contacto-form label {
  font-weight: 700;
  color: #4a7856;
  margin-bottom: 0.2rem;
}

.contacto-form input,
.contacto-form select,
.contacto-form textarea {
  padding: 0.75rem;
  border-radius: 10px;
  border: 1px solid #d8d8d8;
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.contacto-form input:focus,
.contacto-form select:focus,
.contacto-form textarea:focus {
  outline: none;
  border-color: #7aac7c;
  box-shadow: 0 0 0 3px rgba(122,172,124,0.25);
}

.contacto-form textarea {
  min-height: 140px;
  resize: vertical;
}

.contacto-form button {
  margin-top: 0.5rem;
}



