/* =========================
   inicio.css — Estilos específicos de index.html
   ========================= */

/* =========================
   1. Hero
   ========================= */
.hero { background: var(--color-surface); }
.hero__inner { display: flex; flex-direction: column; gap: var(--space-10); }
.hero__content { max-width: 680px; }
.hero__heading {
  font-size: var(--text-2xl); font-weight: 900;
  line-height: 1.05; margin-bottom: var(--space-5);
}
.hero__sub { font-size: var(--text-base); color: var(--color-text-muted); max-width: 60ch; }

/* Tarjetas de sector */
.sectors { display: grid; grid-template-columns: 1fr; gap: var(--space-6); }

.sector-card {
  overflow: hidden;
  background: var(--color-dark);
  border-bottom: 3px solid var(--color-primary);
  transition: box-shadow var(--transition), transform var(--transition);
}
.sector-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }

/* Modificador por sector */
.sector-card--agricola { border-bottom-color: #9fd455; }

.sector-card__img {
  position: relative;
  height: 16em;
  background-size: cover;
  background-position: center;
  overflow: hidden;
  margin: var(--space-4) var(--space-4) 0 var(--space-4);
}

/* Sin overlay — imagen limpia */
.sector-card__overlay { display: none; }

/* Título debajo de la imagen */
.sector-card__title {
  position: static;
  color: #fff;
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  line-height: 1.1;
}

.sector-card__body {
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.sector-card__tags { display: flex; flex-wrap: wrap; gap: var(--space-2); }

/* Tags pill outline sobre fondo oscuro */
.sector-card .tag--dark {
  background: transparent;
  color: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.02em;
}
.sector-card .tag--dark:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.5);
}

.sector-card__cta { align-self: flex-start; }

/* CTA link — cyan por defecto, verde para agrícola */
.sector-card .btn--link { color: var(--color-primary); font-weight: 700; }
.sector-card .btn--link:hover { color: var(--color-primary-hover); }
.sector-card--agricola .btn--link { color: #9fd455; }
.sector-card--agricola .btn--link:hover { color: #85ba3a; }

/* =========================
   2. Quiénes somos
   ========================= */
.about__grid { display: flex; flex-direction: column; gap: var(--space-10); }
.about__heading { font-size: var(--text-2xl); font-weight: 900; margin-bottom: var(--space-6); line-height: 1.0; }
.about__text { color: var(--color-text-muted); margin-bottom: var(--space-4); }
.about__photo { overflow: hidden; margin-top: var(--space-8); }
.about__photo img { width: 100%; height: 18em; object-fit: cover; }
.about__stats { display: grid; grid-template-columns: repeat(2, 1fr); flex-direction: column; gap: var(--space-4); }
.stat-card {
  background: var(--color-primary); color: #fff;
  padding: var(--space-8);
  display: flex; flex-direction: column; gap: var(--space-1);
}
.stat-card--accent { background: var(--color-primary-dark); }
.stat-card__number { font-family: var(--font-display); font-size: clamp(2.5rem,5vw,4rem); font-weight: 900; line-height: 1; }
.stat-card__label { font-size: var(--text-base); font-weight: 700; }
.stat-card__sub { font-size: var(--text-xs); opacity: .75; letter-spacing: .04em; }
.stat-card__icon {
  display: flex;
  align-items: center;
  margin-bottom: var(--space-1);
}

/* =========================
   3. Galería
   ========================= */
.gallery-section__header { display: flex; flex-direction: column; gap: var(--space-2); margin-bottom: var(--space-8); }
.gallery-section__title { font-size: var(--text-xl); font-weight: 800; }
.gallery-section__sub { max-width: 50ch; }

/* Contenedor principal */
.gallery {
  position: relative;
  overflow: hidden;
  background: var(--color-dark);
  cursor: grab;
}
.gallery:active { cursor: grabbing; }

/* Pista */
.gallery__track {
  display: flex;
  align-items: stretch;
  transition: transform 0.55s cubic-bezier(0.25, 1, 0.5, 1);
  will-change: transform;
  height: 460px;
}

/* Cada ítem */
.gallery__item {
  flex: 0 0 100%;
  width: 100%;
  position: relative;
  overflow: hidden;
  cursor: zoom-in;
}
.gallery__item { flex: 0 0 100%; width: 100%; }
.gallery__item--vertical { flex: 0 0 100%; }
.gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  pointer-events: none;
  transition: transform 0.45s ease;
}
.gallery__item:hover img { transform: scale(1.03); }

/* Overlay hover */
.gallery__item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0);
  transition: background var(--transition);
  pointer-events: none;
}
.gallery__item:hover::after { background: rgba(0,0,0,0.12); }

/* Ícono zoom */
.gallery__item::before {
  content: '';
  position: absolute;
  bottom: var(--space-3);
  right: var(--space-3);
  width: 36px; height: 36px;
  background: rgba(255,255,255,0.15) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' stroke='white' stroke-width='2' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='M21 21l-4.35-4.35'/%3E%3Cpath d='M11 8v6M8 11h6'/%3E%3C/svg%3E") center/18px no-repeat;
  border: 1px solid rgba(255,255,255,0.25);
  opacity: 0;
  transition: opacity var(--transition);
  z-index: 2;
  backdrop-filter: blur(4px);
}
.gallery__item:hover::before { opacity: 1; }

/* Flechas prev/next */
.gallery__arrow {
  display: none;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px; height: 48px;
  background: rgba(255,255,255,0.9);
  color: var(--color-dark);
  border: none;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  z-index: 10;
  transition: background var(--transition), transform var(--transition), opacity var(--transition);
  opacity: 0.85;
}
.gallery__arrow:hover { background: #fff; transform: translateY(-50%) scale(1.08); opacity: 1; }
.gallery__arrow:active { transform: translateY(-50%) scale(0.95); }
.gallery__arrow--prev { left: var(--space-4); }
.gallery__arrow--next { right: var(--space-4); }

/* Barra de progreso */
.gallery__progress {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: rgba(255,255,255,0.15);
  z-index: 10;
}
.gallery__progress-bar {
  height: 100%;
  background: var(--color-primary);
  width: 0%;
}
.gallery__progress-bar.is-animating {
  transition: width linear;
}

/* Botón pausa/play */
.gallery__pause-btn {
  display: none;
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
  width: 36px; height: 36px;
  background: rgba(0,0,0,0.4);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.2);
  align-items: center;
  justify-content: center;
  z-index: 10;
  backdrop-filter: blur(4px);
  transition: background var(--transition);
}
.gallery__pause-btn:hover { background: rgba(0,0,0,0.65); }

/* Dots */
.gallery__dots {
  display: flex;
  justify-content: center;
  gap: var(--space-2);
  margin-top: var(--space-5);
  flex-wrap: wrap;
}
.gallery__dot {
  width: 8px; height: 8px;
  background: var(--color-border);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition), width var(--transition);
  min-height: unset;
}
.gallery__dot.is-active { background: var(--color-primary); width: 24px; }
.gallery__dot:hover:not(.is-active) { background: var(--color-text-faint); transform: scale(1.2); }

/* =========================
   Lightbox
   ========================= */
.lightbox__backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 200;
  backdrop-filter: blur(6px);
}
.lightbox__backdrop[hidden] { display: none; }

.lightbox {
  position: fixed; inset: 0;
  z-index: 201;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox[hidden] { display: none; }

.lightbox__img-wrap {
  max-width: 90vw;
  max-height: 88vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox__img {
  max-width: 90vw;
  max-height: 88vh;
  box-shadow: 0 24px 80px rgba(0,0,0,0.6);
  object-fit: contain;
  animation: lbFadeIn 0.25s ease;
}
@keyframes lbFadeIn {
  from { opacity: 0; transform: scale(0.96); }
  to   { opacity: 1; transform: scale(1); }
}
.lightbox__close {
  position: fixed;
  top: var(--space-4); right: var(--space-4);
  width: 44px; height: 44px;
  background: rgba(255,255,255,0.12);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.2);
  display: flex; align-items: center; justify-content: center;
  transition: background var(--transition);
  z-index: 202;
}
.lightbox__close:hover { background: rgba(255,255,255,0.22); }

.lightbox__arrow {
  position: fixed;
  top: 50%; transform: translateY(-50%);
  width: 52px; height: 52px;
  background: rgba(255,255,255,0.10);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.18);
  display: flex; align-items: center; justify-content: center;
  transition: background var(--transition), transform var(--transition);
  z-index: 202;
}
.lightbox__arrow:hover { background: rgba(255,255,255,0.22); }
.lightbox__arrow:active { transform: translateY(-50%) scale(0.93); }
.lightbox__arrow--prev { left: var(--space-4); }
.lightbox__arrow--next { right: var(--space-4); }

.lightbox__counter {
  position: fixed;
  bottom: var(--space-5); left: 50%; transform: translateX(-50%);
  background: rgba(0,0,0,0.5);
  color: rgba(255,255,255,0.75);
  font-size: var(--text-xs); font-weight: 700;
  padding: var(--space-2) var(--space-4);
  letter-spacing: 0.08em;
  backdrop-filter: blur(4px);
  z-index: 202;
}

/* =========================
   4. Proceso
   ========================= */
.process { background: var(--color-surface); }
.process__title { font-size: var(--text-xl); font-weight: 800; margin-top: var(--space-2); margin-bottom: var(--space-12); }
.process__steps { display: flex; flex-direction: column; gap: var(--space-4); align-items: stretch; }
.process__connector { display: none; }

.process__step {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  transition: box-shadow var(--transition), border-color var(--transition);
}
.process__step:hover { box-shadow: var(--shadow-md); border-color: var(--color-primary); }

/* Fila superior: número + ícono */
.process__step-header {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

/* Número grande */
.process__step-num {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 900;
  line-height: 1;
  color: var(--color-text-muted);
  letter-spacing: -0.02em;
  flex-shrink: 0;
}

/* Círculo del ícono */
.process__step-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--color-surface);
}
.process__step-icon.icon--primary { background: var(--color-primary); }
.process__step-icon.icon--cta     { background: var(--color-cta); }
.process__step-icon.icon--green   { background: #9fd455; }

.process__step-title {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 800;
}
.process__step-desc {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  max-width: 30ch;
}

/* Paso destacado (último) */
.process__step--highlight {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}
.process__step--highlight .process__step-num   { color: rgba(255,255,255,0.5); }
.process__step--highlight .process__step-desc  { color: rgba(255,255,255,0.8); }
.process__step--highlight .process__step-title { color: #fff; }
.process__step--highlight .process__step-icon  { background: #9fd455; color: #fff; }

.process__badge {
  display: inline-block;
  margin-top: var(--space-2);
  background: rgba(255,255,255,.2);
  border: 1px solid rgba(255,255,255,.35);
  padding: var(--space-1) var(--space-3);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: .04em;
}

/* =========================
   5. Red de origen
   ========================= */
.network__grid { display: flex; flex-direction: column; gap: var(--space-10); }
.network__title { font-size: var(--text-2xl); font-weight: 900; line-height: 1.05; margin-top: var(--space-2); }
.network__title-accent { color: var(--color-cta); }
.network__countries { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-4); }
.country-card {
  display: flex; flex-direction: column; align-items: center; gap:  var(--space-4);
  background: var(--color-dark-surface); border: 1px solid rgba(255,255,255,.08);
  padding: var(--space-5) var(--space-4);
  transition: background var(--transition), border-color var(--transition);
}
.country-card:hover { background: rgba(0,180,216,.15); border-color: rgba(0,180,216,.3); }
.country-card__flag { font-size: 2.2rem; line-height: 1; }
.country-card__name { font-size: var(--text-sm); font-weight: 700; color: rgba(255,255,255,.85); letter-spacing: .04em;}

/* =========================
   6. Contacto
   ========================= */
.contact { background: var(--color-dark); color: #fff; }
.contact__grid { display: flex; flex-direction: column; gap: var(--space-12); }
.contact__heading { font-size: var(--text-2xl); font-weight: 900; line-height: 1.05; margin-bottom: var(--space-5); }
.contact__heading-accent { color: var(--color-primary); }
.contact__desc { color: rgba(255,255,255,.65); max-width: 42ch; margin-bottom: var(--space-8); }
.contact__info { display: flex; flex-direction: column; gap: var(--space-4); }
.contact__info-item { display: flex; align-items: flex-start; gap: var(--space-3); font-size: var(--text-sm); color: rgba(255,255,255,.7); }
.contact__info-item a { color: rgba(255,255,255,.85); text-decoration: none; }
.contact__info-item a:hover { color: var(--color-primary); }
.contact__info-icon { flex-shrink: 0; margin-top: 2px; color: var(--color-primary); }
.contact__form-wrap { background: var(--color-surface); padding: var(--space-8); box-shadow: var(--shadow-lg); }
.contact__form-title { font-family: var(--font-display); font-size: var(--text-lg); font-weight: 800; color: var(--color-text); margin-bottom: var(--space-6); text-transform: uppercase; letter-spacing: .06em; }
.contact__form { display: flex; flex-direction: column; gap: var(--space-5); }
.form-group { display: flex; flex-direction: column; gap: var(--space-2); }
.form-label { font-size: var(--text-xs); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--color-text-muted); }
.form-input {
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--color-border); background: var(--color-bg);
  font-size: var(--text-sm); color: var(--color-text);
  transition: border-color var(--transition), box-shadow var(--transition);
  min-height: 44px;
}
.form-input:focus { outline: none; border-color: var(--color-primary); box-shadow: 0 0 0 3px rgba(0,180,216,.18); }
.form-input::placeholder { color: var(--color-text-faint); }
.form-select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23556070' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right var(--space-4) center; }
.form-textarea { min-height: 110px; resize: vertical; }
.contact__form-note { font-size: var(--text-xs); color: var(--color-text-muted); text-align: center; margin-top: calc(-1 * var(--space-2)); }

/* =========================
   Media Queries
   ========================= */
@media only screen and (min-width: 481px) and (max-width: 768px) {
  .sectors { grid-template-columns: 1fr; }
  .videos__grid { grid-template-columns: 1fr; }
  .network__countries { grid-template-columns: repeat(3, 1fr); }
  .gallery__track { height: 380px; }
  .gallery__item  { flex: 0 0 80%; }
}

@media only screen and (min-width: 769px) and (max-width: 1279px) and (orientation: portrait) {
  .sectors { grid-template-columns: repeat(2, 1fr); }
  .about__grid { flex-direction: row; align-items: flex-start; }
  .about__content { flex: 1.4; }
  .about__stats { flex: 1; }
  .videos__grid { grid-template-columns: repeat(2, 1fr); }
  .network__countries { grid-template-columns: repeat(3, 1fr); }
  .contact__grid { flex-direction: row; align-items: flex-start; }
  .contact__lead { flex: 1; }
  .contact__form-wrap { flex: 1; }
  .gallery__arrow     { display: flex; }
  .gallery__pause-btn { display: flex; }
  .gallery__track     { height: 420px; }
  .gallery__item { flex: 0 0 50%; }
  .gallery__item--vertical { flex: 0 0 50%; }
}

@media only screen and (min-width: 769px) and (max-width: 1279px) and (orientation: landscape) {
  .sectors { grid-template-columns: repeat(2, 1fr); }
  .about__grid { flex-direction: row; align-items: flex-start; gap: var(--space-12); }
  .about__content { flex: 1.6; }
  .about__stats { flex: 1; }
  .process__steps { flex-direction: row; align-items: flex-start; }
  .process__connector { display: flex; align-items: center; color: var(--color-primary); font-size: var(--text-xl); font-weight: 700; margin-top: var(--space-16); opacity: .4; flex-shrink: 0; }
  .process__step { flex: 1; }
  .videos__grid { grid-template-columns: repeat(2, 1fr); }
  .network__grid { flex-direction: row; align-items: center; gap: var(--space-12); }
  .network__content { flex: 1; }
  .network__countries { flex: 2; grid-template-columns: repeat(3, 1fr); }
  .contact__grid { flex-direction: row; align-items: flex-start; gap: var(--space-12); }
  .contact__lead { flex: 1; }
  .contact__form-wrap { flex: 1.2; }
  .gallery__arrow     { display: flex; }
  .gallery__pause-btn { display: flex; }
  .gallery__track     { height: 440px; }
  .gallery__item { flex: 0 0 calc(33.333%); }
  .gallery__item--vertical { flex: 0 0 calc(33.333%); }
}

@media only screen and (min-width: 1280px) {
  .hero__inner { flex-direction: column; }
  .sectors { grid-template-columns: repeat(2, 1fr); }
  .about__grid { flex-direction: row; align-items: flex-start; gap: var(--space-16); }
  .about__content { flex: 1.6; }
  .about__stats { flex: 1; min-width: 280px; }
  .process__steps { flex-direction: row; align-items: flex-start; gap: 0; }
  .process__connector { display: flex; align-items: center; justify-content: center; color: var(--color-primary); font-size: var(--text-xl); font-weight: 700; margin-top: var(--space-16); opacity: .35; flex-shrink: 0; padding-inline: var(--space-2); }
  .process__step { flex: 1; height: 16em;}
  .videos__grid { grid-template-columns: repeat(2, 1fr); }
  .network__grid { flex-direction: row; align-items: center; gap: var(--space-16); }
  .network__content { flex: 1; }
  .network__countries { flex: 2.5; grid-template-columns: repeat(5, 1fr); gap: var(--space-4); }
  .contact__grid { flex-direction: row; align-items: flex-start; gap: var(--space-16); }
  .contact__lead { flex: 1; }
  .contact__form-wrap { flex: 1.2; }
  .gallery__arrow     { display: flex; }
  .gallery__pause-btn { display: flex; }
  .gallery__track     { height: 500px; }
  .gallery__item { flex: 0 0 calc(33.333%); }
  .gallery__item--vertical { flex: 0 0 calc(33.333%); }
}