/* =========================================================
   FRUIT GLOBAL S.A.S — Hoja de estilos
   Los colores principales están aquí arriba: cámbialos y
   se actualiza toda la página.
   ========================================================= */
:root {
  --verde: #1f6b2e;          /* verde principal del logo */
  --verde-oscuro: #123f1c;
  --verde-claro: #7cb342;
  --amarillo: #f5b700;
  --naranja: #e0791f;
  --crema: #faf7ef;
  --blanco: #ffffff;
  --texto: #1c2a1e;
  --texto-suave: #55645a;
  --borde: #e6e1d3;
  --radio: 18px;
  --sombra: 0 10px 30px rgba(18, 63, 28, .10);
  --ancho: 1180px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: "Inter", system-ui, sans-serif;
  color: var(--texto);
  background: var(--crema);
  line-height: 1.65;
  font-size: 17px;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: "Outfit", sans-serif; line-height: 1.15; }

.contenedor { width: min(var(--ancho), 100% - 32px); margin-inline: auto; }
.seccion { padding: 96px 0; }
.etiqueta {
  display: inline-block; font-size: .8rem; font-weight: 600; letter-spacing: .14em;
  text-transform: uppercase; color: var(--naranja); margin-bottom: 12px;
}
.titulo { font-size: clamp(2rem, 4vw, 2.9rem); color: var(--verde-oscuro); margin-bottom: 16px; }
.subtitulo { color: var(--texto-suave); max-width: 620px; }
.centrado { text-align: center; }
.centrado .subtitulo { margin-inline: auto; }

/* ---------- Botones ---------- */
.boton {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 26px; border-radius: 999px; font-weight: 600;
  text-decoration: none; border: 2px solid transparent; cursor: pointer;
  font-size: 1rem; font-family: inherit; transition: transform .2s, background .2s, color .2s;
}
.boton:hover { transform: translateY(-2px); }
.boton-principal { background: var(--amarillo); color: var(--verde-oscuro); }
.boton-principal:hover { background: #ffc61a; }
.boton-verde { background: var(--verde); color: var(--blanco); }
.boton-verde:hover { background: var(--verde-oscuro); }
.boton-borde { border-color: var(--blanco); color: var(--blanco); }
.boton-borde:hover { background: var(--blanco); color: var(--verde-oscuro); }

/* ---------- Encabezado ---------- */
/* Alto del encabezado: se achica al bajar (ver js/main.js) */
:root { --alto-enc: 78px; }
html.desplazado { --alto-enc: 62px; }
.encabezado {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .94); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--borde); transition: box-shadow .3s, background .3s;
}
html.desplazado .encabezado { box-shadow: 0 6px 24px rgba(18, 63, 28, .10); background: rgba(255, 255, 255, .98); }
.encabezado .contenedor { display: flex; align-items: center; justify-content: space-between; height: var(--alto-enc); transition: height .3s; }
.marca { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.marca img { height: 54px; width: auto; transition: height .3s, transform .3s; }
.marca:hover img { transform: rotate(-4deg) scale(1.05); }
html.desplazado .marca img { height: 42px; }
.menu { display: flex; align-items: center; gap: 30px; list-style: none; }
.menu a { text-decoration: none; font-weight: 500; font-size: .97rem; transition: color .2s; }
.menu a:not(.boton) { position: relative; padding: 4px 0; }
/* Línea que crece debajo del enlace */
.menu a:not(.boton)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; border-radius: 2px;
  background: var(--amarillo); transform: scaleX(0); transform-origin: left; transition: transform .3s;
}
.menu a:not(.boton):hover::after, .menu a.activo:not(.boton)::after { transform: scaleX(1); }
.menu a:not(.boton):hover, .menu a.activo:not(.boton) { color: var(--verde); }
.menu a.activo:not(.boton) { font-weight: 600; }
.menu .boton { padding: 10px 20px; }
.boton-menu { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.boton-menu span { display: block; width: 26px; height: 2px; background: var(--texto); margin: 6px 0; transition: transform .3s, opacity .3s; }
/* El ícono ☰ se convierte en ✕ al abrir */
.boton-menu[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.boton-menu[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.boton-menu[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ---------- Portada (hero) ---------- */
.portada {
  /* Un poco menos alta que la pantalla, para que se asome la tienda debajo */
  position: relative; min-height: calc(88vh - 78px); display: grid; place-items: center;
  text-align: center; color: var(--blanco); overflow: hidden;
  background: linear-gradient(180deg, rgba(18,63,28,.55), rgba(18,63,28,.75)), url("../img/hero.jpg") center/cover;
  padding: 80px 0;
}
.portada h1 { font-size: clamp(3rem, 9vw, 6.5rem); letter-spacing: .02em; font-weight: 800; }
.portada .lema { font-size: clamp(1.25rem, 2.6vw, 1.8rem); margin: 8px 0 40px; color: #fff3c4; font-family: "Outfit", sans-serif; }
.portada-acciones { display: flex; gap: 28px; justify-content: center; flex-wrap: wrap; }
.portada-acciones div { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.portada-acciones small { font-size: .95rem; opacity: .9; }

/* ---------- Servicios ---------- */
.servicios { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin-top: 48px; }
.servicio {
  background: var(--blanco); border-radius: var(--radio); overflow: hidden; box-shadow: var(--sombra);
  display: flex; flex-direction: column;
}
.servicio img { height: 230px; width: 100%; object-fit: cover; }
.servicio div { padding: 28px; }
.servicio h3 { color: var(--verde); font-size: 1.35rem; letter-spacing: .06em; margin-bottom: 10px; }
.servicio p { color: var(--texto-suave); font-size: .97rem; }

/* ---------- Productos ---------- */
.fondo-blanco { background: var(--blanco); }
.productos { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin-top: 48px; }
.producto {
  position: relative; border-radius: var(--radio); overflow: hidden; aspect-ratio: 3 / 4;
  text-decoration: none; color: var(--blanco);
}
.producto img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.producto:hover img { transform: scale(1.06); }
.producto span {
  position: absolute; inset: auto 0 0 0; padding: 60px 24px 24px;
  background: linear-gradient(transparent, rgba(18,63,28,.9));
  font-family: "Outfit", sans-serif; font-size: 1.5rem; font-weight: 600;
}
/* "Ver en la tienda →" aparece al pasar el mouse */
.producto span::after {
  content: "Ver en la tienda →"; display: block; font-family: "Inter", sans-serif; font-size: .85rem; font-weight: 600;
  color: var(--amarillo); margin-top: 4px; opacity: .85; transition: transform .3s, opacity .3s;
}
.producto:hover span::after { opacity: 1; transform: translateX(6px); }
#productos { scroll-margin-top: 70px; }

/* Botón grande para entrar a la tienda */
.boton-grande { padding: 18px 38px; font-size: 1.1rem; box-shadow: 0 10px 24px rgba(31, 107, 46, .28); }
.boton-grande .flecha { display: inline-block; transition: transform .25s; }
.boton-grande:hover .flecha { transform: translateX(6px); }

/* Flecha animada al pie de la portada que invita a bajar */
.ver-tienda {
  position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  color: var(--blanco); text-decoration: none; font-size: .85rem; font-weight: 600; letter-spacing: .06em; opacity: .9;
}
.ver-tienda span { font-size: 1.4rem; animation: rebote 1.6s ease-in-out infinite; }
.ver-tienda:hover { opacity: 1; color: var(--amarillo); }
@keyframes rebote { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(7px); } }
@media (prefers-reduced-motion: reduce) { .ver-tienda span { animation: none; } }

/* ---------- Franja "Pide ya" ---------- */
.pide-ya {
  background: linear-gradient(90deg, rgba(18,63,28,.92), rgba(31,107,46,.7)), url("../img/limones.jpg") center/cover;
  color: var(--blanco); border-radius: 28px; padding: 64px; display: grid;
  grid-template-columns: 1.4fr 1fr; gap: 32px; align-items: center;
}
.pide-ya h2 { font-size: clamp(2.2rem, 5vw, 3.4rem); color: var(--amarillo); }
.pide-ya p { font-size: 1.2rem; margin-top: 8px; max-width: 480px; }
.pide-ya .derecha { text-align: right; }
.pide-ya .derecha strong { display: block; font-family: "Outfit", sans-serif; font-size: 1.5rem; margin-bottom: 18px; }

/* ---------- Clientes ---------- */
.clientes { display: flex; justify-content: center; align-items: center; gap: 48px; flex-wrap: wrap; margin-top: 36px; }
.clientes img { height: 96px; width: auto; border-radius: 16px; box-shadow: var(--sombra); }

/* ---------- Nosotros ---------- */
.nosotros { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.nosotros p { color: var(--texto-suave); margin-bottom: 18px; }
.nosotros-fotos { display: grid; grid-template-columns: 1.2fr 1fr; gap: 16px; }
.nosotros-fotos img { border-radius: var(--radio); width: 100%; height: 100%; object-fit: cover; }
.nosotros-fotos img:first-child { grid-row: span 2; min-height: 460px; }

/* ---------- Diferencias ---------- */
.diferencias { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; margin-top: 48px; }
.diferencia {
  background: var(--blanco); border: 1px solid var(--borde); border-radius: var(--radio);
  padding: 32px 26px; transition: transform .25s, box-shadow .25s;
}
.diferencia:hover { transform: translateY(-4px); box-shadow: var(--sombra); }
.icono {
  width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center;
  background: #eef5e4; color: var(--verde); margin-bottom: 18px;
}
.icono svg { width: 28px; height: 28px; }
.diferencia h3 { font-size: 1.3rem; color: var(--verde-oscuro); margin-bottom: 8px; }
.diferencia p { color: var(--texto-suave); font-size: .95rem; }

/* ---------- Formularios ---------- */
.formulario { display: grid; gap: 18px; }
.formulario .dos { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.campo label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: 6px; }
.campo small { display: block; color: var(--texto-suave); font-size: .85rem; margin-top: 4px; }
.campo input, .campo textarea {
  width: 100%; padding: 13px 16px; border: 1.5px solid var(--borde); border-radius: 12px;
  font: inherit; background: var(--blanco); color: var(--texto);
}
.campo input:focus, .campo textarea:focus { outline: none; border-color: var(--verde-claro); box-shadow: 0 0 0 4px rgba(124,179,66,.2); }
.campo textarea { min-height: 130px; resize: vertical; }
.campo input[type="file"] { padding: 11px; background: var(--crema); }
.oculto { display: none; }

/* ---------- Páginas internas ---------- */
.cabecera-pagina {
  background: linear-gradient(180deg, rgba(18,63,28,.75), rgba(18,63,28,.85)), url("../img/verduras.jpg") center/cover;
  color: var(--blanco); text-align: center; padding: 90px 0 80px;
}
.cabecera-pagina h1 { font-size: clamp(2.4rem, 6vw, 4rem); }
.cabecera-pagina p { margin-top: 10px; font-size: 1.15rem; opacity: .92; }
.tarjeta { background: var(--blanco); border-radius: 24px; box-shadow: var(--sombra); padding: 48px; }
.pagina-pedido { max-width: 780px; margin: -56px auto 0; position: relative; }
.contacto-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 32px; margin-top: -56px; position: relative; }
.datos-contacto { display: grid; gap: 22px; align-content: start; }
.dato { display: flex; gap: 14px; align-items: flex-start; }
.dato .icono { margin: 0; flex-shrink: 0; width: 46px; height: 46px; }
.dato .icono svg { width: 22px; height: 22px; }
.dato strong { display: block; }
.dato a { color: var(--verde); }
.mapa { border: 0; width: 100%; height: 260px; border-radius: 16px; }

/* ---------- Pie de página ---------- */
.pie { background: var(--verde-oscuro); color: #d7e4d6; padding: 72px 0 28px; font-size: .95rem; }
.pie-grid { display: grid; grid-template-columns: 1.3fr .8fr .8fr 1.3fr; gap: 40px; }
.pie h4 { font-family: "Outfit", sans-serif; color: var(--blanco); font-size: 1.1rem; margin-bottom: 16px; }
.pie ul { list-style: none; display: grid; gap: 8px; }
.pie a { text-decoration: none; }
.pie a:hover { color: var(--amarillo); }
.pie .logo-pie { background: var(--blanco); border-radius: 16px; padding: 10px; width: 110px; margin-bottom: 16px; }
.pie p { margin-bottom: 8px; }
.pie .formulario input { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.2); color: var(--blanco); padding: 11px 14px; }
.pie .formulario input::placeholder { color: #a9bfa8; }
.pie .formulario { gap: 10px; }
.pie .formulario .boton { justify-content: center; }
.pie-final { border-top: 1px solid rgba(255,255,255,.12); margin-top: 48px; padding-top: 22px; text-align: center; font-size: .85rem; color: #a9bfa8; }

/* ---------- Botón de WhatsApp ---------- */
.whatsapp {
  position: fixed; right: 20px; bottom: 20px; z-index: 60; width: 60px; height: 60px; border-radius: 50%;
  background: #25d366; display: grid; place-items: center; box-shadow: 0 8px 24px rgba(0,0,0,.25);
  transition: transform .2s;
}
.whatsapp:hover { transform: scale(1.08); }
.whatsapp svg { width: 32px; height: 32px; fill: #fff; }

/* ---------- Celular y tablet ---------- */
@media (max-width: 980px) {
  .servicios, .productos { grid-template-columns: 1fr 1fr; }
  .diferencias { grid-template-columns: 1fr 1fr; }
  .nosotros, .contacto-grid { grid-template-columns: 1fr; }
  .pie-grid { grid-template-columns: 1fr 1fr; }
  .pide-ya { grid-template-columns: 1fr; padding: 48px 32px; }
  .pide-ya .derecha { text-align: left; }
}
@media (max-width: 820px) {
  .boton-menu { display: block; }
  .menu {
    position: absolute; top: var(--alto-enc); left: 0; right: 0; flex-direction: column; gap: 0;
    background: var(--blanco); border-bottom: 1px solid var(--borde); padding: 8px 16px 20px;
    box-shadow: 0 16px 30px rgba(18, 63, 28, .12);
    /* Se despliega con una animación en lugar de aparecer de golpe */
    opacity: 0; visibility: hidden; transform: translateY(-12px); pointer-events: none;
    transition: opacity .25s, transform .25s, visibility .25s, top .3s;
  }
  .menu.abierto { opacity: 1; visibility: visible; transform: none; pointer-events: auto; }
  .menu li { width: 100%; opacity: 0; transform: translateX(-10px); transition: opacity .3s, transform .3s; }
  .menu.abierto li { opacity: 1; transform: none; }
  .menu.abierto li:nth-child(2) { transition-delay: .04s; }
  .menu.abierto li:nth-child(3) { transition-delay: .08s; }
  .menu.abierto li:nth-child(4) { transition-delay: .12s; }
  .menu.abierto li:nth-child(5) { transition-delay: .16s; }
  .menu a { display: block; padding: 14px 4px; }
  .menu a:not(.boton)::after { display: none; }
  .menu .boton { justify-content: center; margin-top: 8px; }
}
@media (max-width: 620px) {
  body { font-size: 16px; }
  .seccion { padding: 64px 0; }
  .servicios, .productos, .diferencias, .pie-grid, .formulario .dos { grid-template-columns: 1fr; }
  .producto { aspect-ratio: 4 / 3; }
  .tarjeta { padding: 28px 20px; }
  .nosotros-fotos img:first-child { min-height: 300px; }
  .clientes { gap: 24px; }
  .clientes img { height: 72px; }
}

/* =========================================================
   PÁGINA DE INICIO: secciones más juntas, movimiento e interacción
   ========================================================= */

/* ---------- 1. Secciones más juntas ---------- */
.inicio .seccion { padding: 60px 0; }
.inicio .titulo { margin-bottom: 10px; }
.inicio .servicios, .inicio .productos, .inicio .diferencias { margin-top: 32px; }
.inicio .clientes { margin-top: 24px; }
.inicio .nosotros { gap: 48px; }
@media (max-width: 620px) {
  .inicio .seccion { padding: 44px 0; }
}

/* ---------- 2. Animación al pasar el cursor ---------- */
/* Tarjetas de servicios (Comercialización, Exportación, Transformación) */
.inicio .servicio {
  transition: transform .35s cubic-bezier(.34, 1.56, .64, 1), box-shadow .35s;
  cursor: default;
}
.inicio .servicio img { transition: transform .6s; }
.inicio .servicio h3 { position: relative; display: inline-block; transition: color .3s; }
.inicio .servicio h3::after {
  content: ""; position: absolute; left: 0; bottom: -4px; width: 100%; height: 3px; border-radius: 3px;
  background: var(--amarillo); transform: scaleX(0); transform-origin: left; transition: transform .35s;
}
.inicio .servicio:hover {
  transform: translateY(-10px) scale(1.03);
  box-shadow: 0 24px 50px rgba(18, 63, 28, .22);
}
.inicio .servicio:hover img { transform: scale(1.08); }
.inicio .servicio:hover h3 { color: var(--verde-oscuro); }
.inicio .servicio:hover h3::after { transform: scaleX(1); }
.inicio .servicio p { transition: color .3s; }
.inicio .servicio:hover p { color: var(--texto); }

/* Categorías de la tienda */
.inicio .producto { transition: transform .35s cubic-bezier(.34, 1.56, .64, 1), box-shadow .35s; }
.inicio .producto:hover { transform: translateY(-8px) scale(1.02); box-shadow: 0 22px 44px rgba(18, 63, 28, .28); }

/* "¡Pide ya!" */
.inicio .pide-ya { transition: transform .35s ease, box-shadow .35s; }
.inicio .pide-ya:hover { transform: scale(1.015); box-shadow: 0 20px 44px rgba(18, 63, 28, .25); }
.inicio .pide-ya .boton { animation: latido 2.4s ease-in-out infinite; }
@keyframes latido { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }

/* Logos de clientes */
.inicio .clientes img { transition: transform .35s cubic-bezier(.34, 1.56, .64, 1), box-shadow .35s; }
.inicio .clientes img:hover { transform: translateY(-6px) scale(1.08) rotate(-2deg); box-shadow: 0 18px 36px rgba(0, 0, 0, .18); }

/* Fotos de "Acerca de nosotros" */
.inicio .nosotros-fotos img { transition: transform .45s ease, box-shadow .45s; }
.inicio .nosotros-fotos img:hover { transform: scale(1.04); box-shadow: 0 18px 40px rgba(18, 63, 28, .25); }

/* "¿Qué nos diferencia?" */
.inicio .diferencia { transition: transform .35s cubic-bezier(.34, 1.56, .64, 1), box-shadow .35s, border-color .35s; }
.inicio .diferencia:hover { transform: translateY(-10px) scale(1.03); box-shadow: 0 22px 44px rgba(18, 63, 28, .18); border-color: var(--verde-claro); }
.inicio .diferencia .icono { transition: transform .4s cubic-bezier(.34, 1.56, .64, 1), background .3s, color .3s; }
.inicio .diferencia:hover .icono { transform: rotate(-10deg) scale(1.15); background: var(--verde); color: var(--blanco); }

/* ---------- 3. Movimiento al desplazar la página ---------- */
/* Los elementos aparecen subiendo suavemente cuando entran en pantalla (ver js/main.js) */
.inicio .revelar:not(.visible) { opacity: 0; }
.inicio .revelar.visible { animation: aparecer .8s cubic-bezier(.2, .7, .2, 1) backwards; }
@keyframes aparecer { from { opacity: 0; transform: translateY(40px) scale(.97); } }

/* Mientras bajas o subes, algunos elementos "flotan" un poco (js/main.js cambia --flotar).
   Se usa la propiedad "translate" para no chocar con las animaciones del cursor (que usan "transform"). */
.inicio .flota { translate: 0 var(--flotar, 0px); will-change: translate; }

/* Si la persona pidió menos movimiento en su sistema, se desactiva todo */
@media (prefers-reduced-motion: reduce) {
  .inicio .revelar:not(.visible) { opacity: 1; }
  .inicio .revelar.visible, .inicio .pide-ya .boton { animation: none; }
  .inicio .flota { translate: none; }
}

/* ===== Autorización de datos en formularios ===== */
.acepto { display: flex; gap: 10px; align-items: flex-start; font-size: .86rem; line-height: 1.45; color: var(--texto-suave); cursor: pointer; }
.acepto input { width: 18px; height: 18px; margin-top: 2px; flex-shrink: 0; accent-color: var(--verde); }
.acepto a { color: var(--verde); font-weight: 600; }
.pie .acepto { color: #c4d3c3; font-size: .8rem; }
.pie .acepto a { color: var(--amarillo); }

/* ===== Enlaces legales del pie ===== */
.enlaces-legales { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; margin-top: 10px; font-size: .85rem; }
.enlaces-legales a { opacity: .85; }
.enlaces-legales a:hover { opacity: 1; }

/* ===== Página legal ===== */
.legal-grid { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 40px; align-items: start; }
.legal-indice { position: sticky; top: calc(var(--alto-enc) + 24px); background: var(--blanco); border-radius: var(--radio); box-shadow: var(--sombra); padding: 22px; }
.legal-indice strong { display: block; font-family: "Outfit", sans-serif; margin-bottom: 10px; color: var(--verde-oscuro); }
.legal-indice ol { margin-left: 18px; display: grid; gap: 8px; font-size: .95rem; }
.legal-indice a { color: var(--verde); text-decoration: none; font-weight: 500; }
.legal-indice a:hover { text-decoration: underline; }
.legal-texto { max-width: 780px; }
.legal-texto section { background: var(--blanco); border-radius: 24px; box-shadow: var(--sombra); padding: 40px 44px; margin-bottom: 28px; scroll-margin-top: calc(var(--alto-enc) + 20px); }
.legal-texto h2 { font-size: 1.8rem; color: var(--verde-oscuro); margin-bottom: 6px; }
.legal-texto .vigencia { color: var(--texto-suave); font-size: .88rem; margin-bottom: 18px; }
.legal-texto h3 { font-size: 1.12rem; color: var(--verde); margin: 24px 0 8px; }
.legal-texto p, .legal-texto li { line-height: 1.7; color: var(--texto); }
.legal-texto p + p { margin-top: 10px; }
.legal-texto ul { margin: 8px 0 0 22px; display: grid; gap: 6px; }
.legal-texto a { color: var(--verde); font-weight: 600; }
.legal-texto .recuadro { background: var(--crema); border-left: 4px solid var(--verde-claro); border-radius: 12px; padding: 16px 20px; margin-top: 12px; }
@media (max-width: 860px) {
  .legal-grid { grid-template-columns: 1fr; gap: 20px; }
  .legal-indice { position: static; }
  .legal-texto section { padding: 26px 20px; }
}
.pie .formulario .acepto input { padding: 0; }
