/* =========================================================
   AGROMAQ - Hero corporativo
   Archivo: assets/css/hero.css
   Usa variables globales ya declaradas en navbar.css
   ========================================================= */

.ag-hero {
  position: relative;
  overflow: hidden;
  min-height: calc(100vh - 116px);
  padding: 86px 0 96px;
  color: var(--ag-white, #ffffff);
  background:
    linear-gradient(135deg, rgba(17, 19, 21, 0.98), rgba(31, 35, 39, 0.95) 48%, rgba(17, 19, 21, 0.98)),
    radial-gradient(circle at 18% 20%, rgba(227, 27, 35, 0.22), transparent 32%);
}

.ag-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.8), transparent 85%);
  pointer-events: none;
}

.ag-hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 5px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--ag-red-600, #c9161d),
    var(--ag-red-400, #ff3138),
    var(--ag-red-600, #c9161d),
    transparent
  );
  opacity: 0.95;
}

.ag-hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.ag-hero-line {
  position: absolute;
  width: 360px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(227, 27, 35, 0.75), transparent);
  transform: rotate(-28deg);
  opacity: 0.8;
}

.ag-hero-line.line-1 {
  top: 21%;
  left: -90px;
  animation: agHeroLineMove 7s ease-in-out infinite;
}

.ag-hero-line.line-2 {
  right: -90px;
  bottom: 25%;
  animation: agHeroLineMove 8.5s ease-in-out infinite reverse;
}

.ag-hero-glow {
  position: absolute;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  filter: blur(12px);
  opacity: 0.32;
}

.ag-hero-glow.glow-1 {
  top: 12%;
  left: 8%;
  background: radial-gradient(circle, rgba(227, 27, 35, 0.32), transparent 65%);
  animation: agHeroPulse 5s ease-in-out infinite;
}

.ag-hero-glow.glow-2 {
  right: 7%;
  bottom: 8%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.12), transparent 68%);
  animation: agHeroPulse 6.5s ease-in-out infinite reverse;
}

.ag-hero-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 0.94fr) minmax(430px, 1.06fr);
  align-items: center;
  gap: 58px;
}

/* =========================================================
   Texto
   ========================================================= */

.ag-hero-content {
  max-width: 680px;
}

.ag-hero-kicker {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 22px;
  padding: 10px 14px;
  border-radius: 8px;
  color: var(--ag-white, #ffffff);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(227, 27, 35, 0.42);
  box-shadow: inset 4px 0 0 var(--ag-red-500, #e31b23);
  font-size: 13px;
  font-weight: 850;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.ag-hero-kicker i {
  color: var(--ag-red-400, #ff3138);
}

.ag-hero h1 {
  margin: 0;
  max-width: 760px;
  color: var(--ag-white, #ffffff);
  font-size: clamp(42px, 5vw, 76px);
  line-height: 0.94;
  font-weight: 950;
  letter-spacing: -0.065em;
  text-wrap: balance;
}

.ag-hero h1::after {
  content: "";
  display: block;
  width: 92px;
  height: 5px;
  margin-top: 28px;
  background: linear-gradient(90deg, var(--ag-red-600, #c9161d), var(--ag-red-400, #ff3138));
  box-shadow: 0 10px 25px rgba(227, 27, 35, 0.32);
}

.ag-hero-lead {
  max-width: 620px;
  margin: 24px 0 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 17px;
  line-height: 1.75;
}

.ag-hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.ag-hero-points div {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 13px;
  border-radius: 7px;
  color: rgba(255, 255, 255, 0.88);
  background: rgba(255, 255, 255, 0.065);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 13px;
  font-weight: 850;
}

.ag-hero-points i {
  color: var(--ag-red-400, #ff3138);
}

.ag-hero-slogan {
  width: fit-content;
  margin: 26px 0 0;
  padding: 11px 15px;
  color: var(--ag-white, #ffffff);
  background: linear-gradient(135deg, rgba(227, 27, 35, 0.22), rgba(255, 255, 255, 0.06));
  border: 1px solid rgba(227, 27, 35, 0.46);
  border-left: 4px solid var(--ag-red-500, #e31b23);
  border-radius: 6px;
  font-size: 13px;
  font-weight: 950;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.ag-hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 13px;
  margin-top: 28px;
}

.ag-hero-actions .btn {
  min-height: 48px;
  border-radius: 8px !important;
  font-weight: 950;
}

.ag-hero-main-btn {
  position: relative;
  overflow: hidden;
  color: var(--ag-white, #ffffff) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  background: linear-gradient(135deg, var(--ag-red-700, #a90f16), var(--ag-red-500, #e31b23)) !important;
  box-shadow: 0 18px 36px rgba(227, 27, 35, 0.28);
}

.ag-hero-main-btn::before {
  content: "";
  position: absolute;
  top: -70%;
  left: -45%;
  width: 38%;
  height: 240%;
  background: rgba(255, 255, 255, 0.28);
  transform: rotate(24deg);
  transition: left 0.6s ease;
}

.ag-hero-main-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 24px 42px rgba(227, 27, 35, 0.36);
}

.ag-hero-main-btn:hover::before {
  left: 130%;
}

.ag-hero-secondary-btn {
  color: var(--ag-white, #ffffff) !important;
  background: rgba(255, 255, 255, 0.07) !important;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
}

.ag-hero-secondary-btn:hover {
  transform: translateY(-2px);
  border-color: rgba(227, 27, 35, 0.55) !important;
  background: rgba(227, 27, 35, 0.14) !important;
}

/* =========================================================
   Visual derecho
   ========================================================= */

.ag-hero-visual {
  position: relative;
  min-height: 560px;
}

.ag-hero-image-panel {
  position: relative;
  min-height: 540px;
  padding: 18px;
  border-radius: 16px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.035)),
    linear-gradient(135deg, rgba(227, 27, 35, 0.14), transparent 45%);
  border: 1px solid rgba(255, 255, 255, 0.13);
  box-shadow:
    0 28px 70px rgba(0, 0, 0, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.ag-hero-image-panel::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 16px;
  padding: 1px;
  background: linear-gradient(
    135deg,
    rgba(227, 27, 35, 0.75),
    transparent 28%,
    rgba(255, 255, 255, 0.22),
    transparent 72%,
    rgba(227, 27, 35, 0.55)
  );
  mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  mask-composite: exclude;
  pointer-events: none;
}

.ag-hero-image-wrap {
  position: relative;
  overflow: hidden;
  height: 505px;
  border-radius: 12px;
  background: #101214;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.ag-hero-image-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(17, 19, 21, 0.58), transparent 42%, rgba(17, 19, 21, 0.28)),
    linear-gradient(180deg, transparent 48%, rgba(17, 19, 21, 0.72));
  pointer-events: none;
}

.ag-hero-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.03);
  filter: saturate(1.02) contrast(1.05);
  animation: agHeroImageFloat 7s ease-in-out infinite;
}

/* Cards flotantes */
.ag-hero-badge {
  position: absolute;
  z-index: 3;
  display: grid;
  grid-template-columns: 42px 1fr;
  align-items: center;
  gap: 12px;
  width: min(275px, 48%);
  padding: 13px 14px;
  border-radius: 9px;
  color: var(--ag-white, #ffffff);
  background: rgba(17, 19, 21, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-left: 4px solid var(--ag-red-500, #e31b23);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.ag-hero-badge i {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--ag-white, #ffffff);
  background: linear-gradient(135deg, var(--ag-red-700, #a90f16), var(--ag-red-500, #e31b23));
  font-size: 19px;
}

.ag-hero-badge strong {
  display: block;
  margin-bottom: 3px;
  color: var(--ag-white, #ffffff);
  font-size: 14px;
  font-weight: 950;
}

.ag-hero-badge span {
  display: block;
  color: rgba(255, 255, 255, 0.68);
  font-size: 12px;
  line-height: 1.35;
  font-weight: 700;
}

.ag-badge-top {
  top: 46px;
  left: -22px;
  animation: agHeroCardFloat 4.8s ease-in-out infinite;
}

.ag-badge-middle {
  top: 212px;
  right: -24px;
  animation: agHeroCardFloat 5.5s ease-in-out infinite reverse;
}

.ag-badge-bottom {
  left: 38px;
  bottom: 52px;
  animation: agHeroCardFloat 5.2s ease-in-out infinite;
}

/* Tarjeta inferior */
.ag-hero-status-card {
  position: absolute;
  right: 26px;
  bottom: -28px;
  z-index: 4;
  display: grid;
  grid-template-columns: 13px 1fr;
  gap: 12px;
  width: min(370px, 72%);
  padding: 17px 18px;
  color: var(--ag-white, #ffffff);
  background:
    linear-gradient(135deg, rgba(227, 27, 35, 0.94), rgba(169, 15, 22, 0.96));
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 10px;
  box-shadow: 0 22px 48px rgba(227, 27, 35, 0.28);
}

.ag-status-dot {
  width: 11px;
  height: 11px;
  margin-top: 5px;
  border-radius: 50%;
  background: var(--ag-white, #ffffff);
  box-shadow: 0 0 0 7px rgba(255, 255, 255, 0.14);
  animation: agHeroDotPulse 1.7s ease-in-out infinite;
}

.ag-hero-status-card strong {
  display: block;
  font-size: 15px;
  font-weight: 950;
}

.ag-hero-status-card span {
  display: block;
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 12.5px;
  line-height: 1.45;
  font-weight: 700;
}

/* =========================================================
   Animaciones
   ========================================================= */

@keyframes agHeroLineMove {
  0%,
  100% {
    transform: translateX(0) rotate(-28deg);
    opacity: 0.45;
  }

  50% {
    transform: translateX(70px) rotate(-28deg);
    opacity: 1;
  }
}

@keyframes agHeroPulse {
  0%,
  100% {
    transform: scale(0.95);
    opacity: 0.22;
  }

  50% {
    transform: scale(1.08);
    opacity: 0.42;
  }
}

@keyframes agHeroImageFloat {
  0%,
  100% {
    transform: scale(1.03) translateY(0);
  }

  50% {
    transform: scale(1.06) translateY(-8px);
  }
}

@keyframes agHeroCardFloat {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

@keyframes agHeroDotPulse {
  0%,
  100% {
    box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.12);
  }

  50% {
    box-shadow: 0 0 0 11px rgba(255, 255, 255, 0.03);
  }
}

/* =========================================================
   Responsive
   ========================================================= */

@media (max-width: 1100px) {
  .ag-hero {
    padding: 74px 0 86px;
  }

  .ag-hero-grid {
    grid-template-columns: 1fr;
    gap: 46px;
  }

  .ag-hero-content {
    max-width: 820px;
  }

  .ag-hero-visual {
    min-height: 520px;
  }

  .ag-hero-image-panel {
    min-height: 500px;
  }

  .ag-hero-image-wrap {
    height: 465px;
  }
}

@media (max-width: 760px) {
  .ag-hero {
    min-height: auto;
    padding: 56px 0 72px;
  }

  .ag-hero h1 {
    font-size: clamp(38px, 12vw, 54px);
  }

  .ag-hero-lead {
    font-size: 15.5px;
    line-height: 1.68;
  }

  .ag-hero-actions {
    align-items: stretch;
  }

  .ag-hero-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .ag-hero-visual {
    min-height: auto;
  }

  .ag-hero-image-panel {
    min-height: auto;
    padding: 12px;
  }

  .ag-hero-image-wrap {
    height: 390px;
  }

  .ag-hero-badge {
    position: relative;
    left: auto;
    right: auto;
    top: auto;
    bottom: auto;
    width: 100%;
    margin-top: 10px;
    animation: none;
  }

  .ag-hero-status-card {
    position: relative;
    right: auto;
    bottom: auto;
    width: 100%;
    margin-top: 12px;
  }
}

@media (max-width: 520px) {
  .ag-hero {
    padding: 44px 0 58px;
  }

  .ag-hero-kicker {
    font-size: 11.5px;
    line-height: 1.4;
    align-items: flex-start;
  }

  .ag-hero h1 {
    letter-spacing: -0.055em;
  }

  .ag-hero-points {
    display: grid;
    grid-template-columns: 1fr;
  }

  .ag-hero-image-wrap {
    height: 315px;
  }
}

/* Accesibilidad */
@media (prefers-reduced-motion: reduce) {
  .ag-hero-line,
  .ag-hero-glow,
  .ag-hero-image-wrap img,
  .ag-hero-badge,
  .ag-status-dot,
  .ag-hero-main-btn::before {
    animation: none !important;
    transition: none !important;
  }
}