/* =========================================================
   AGROMAQ - Bloque Empresa
   Archivo: assets/css/empresa.css
   Usa variables globales ya declaradas en navbar.css
   ========================================================= */

.ag-company {
  position: relative;
  overflow: hidden;
  padding: 104px 0 112px;
  color: var(--ag-dark-950, #111315);
  background:
    linear-gradient(135deg, #f7f7f5 0%, #ffffff 44%, #f1f1ef 100%);
}

.ag-company::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(17, 19, 21, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17, 19, 21, 0.035) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.45), transparent 85%);
  pointer-events: none;
}

.ag-company::after {
  content: "";
  position: absolute;
  top: 0;
  left: 8%;
  width: 220px;
  height: 4px;
  background: linear-gradient(90deg, var(--ag-red-700, #a90f16), var(--ag-red-400, #ff3138));
  box-shadow: 0 14px 35px rgba(227, 27, 35, 0.28);
}

.ag-company-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.ag-company-line {
  position: absolute;
  width: 420px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(227, 27, 35, 0.38), transparent);
  transform: rotate(-29deg);
}

.ag-company-line.line-a {
  top: 20%;
  left: -120px;
}

.ag-company-line.line-b {
  right: -120px;
  bottom: 22%;
}

.ag-company-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.7fr);
  align-items: stretch;
  gap: 42px;
}

.ag-company-content {
  padding: 10px 0;
}

.ag-section-kicker {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 20px;
  padding: 10px 14px;
  color: var(--ag-dark-950, #111315);
  background: #ffffff;
  border: 1px solid rgba(17, 19, 21, 0.1);
  border-left: 4px solid var(--ag-red-500, #e31b23);
  border-radius: 7px;
  box-shadow: 0 12px 30px rgba(17, 19, 21, 0.07);
  font-size: 13px;
  font-weight: 950;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.ag-section-kicker i {
  color: var(--ag-red-500, #e31b23);
}

.ag-section-title {
  max-width: 760px;
  margin: 0;
  color: var(--ag-dark-950, #111315);
  font-size: clamp(38px, 4.3vw, 64px);
  line-height: 0.98;
  font-weight: 950;
  letter-spacing: -0.06em;
  text-wrap: balance;
}

.ag-section-title::after {
  content: "";
  display: block;
  width: 86px;
  height: 5px;
  margin-top: 24px;
  background: linear-gradient(90deg, var(--ag-red-700, #a90f16), var(--ag-red-400, #ff3138));
}

.ag-section-sub {
  max-width: 700px;
  margin: 24px 0 0;
  color: rgba(17, 19, 21, 0.68);
  font-size: 17px;
  line-height: 1.75;
}

.ag-company-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  max-width: 720px;
  margin-top: 34px;
}

.ag-company-stats div {
  position: relative;
  overflow: hidden;
  padding: 22px 18px;
  background: #ffffff;
  border: 1px solid rgba(17, 19, 21, 0.09);
  border-radius: 10px;
  box-shadow: 0 18px 38px rgba(17, 19, 21, 0.07);
}

.ag-company-stats div::before {
  content: "";
  position: absolute;
  left: 0;
  top: 18px;
  bottom: 18px;
  width: 4px;
  background: var(--ag-red-500, #e31b23);
}

.ag-company-stats strong {
  display: block;
  color: var(--ag-red-600, #c9161d);
  font-size: 28px;
  line-height: 1;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.ag-company-stats span {
  display: block;
  margin-top: 8px;
  color: rgba(17, 19, 21, 0.62);
  font-size: 12.5px;
  line-height: 1.35;
  font-weight: 850;
}

/* Panel lateral */
.ag-company-panel {
  position: relative;
}

.ag-company-panel-inner {
  position: sticky;
  top: 138px;
  overflow: hidden;
  height: 100%;
  min-height: 390px;
  padding: 28px;
  color: var(--ag-white, #ffffff);
  background:
    linear-gradient(145deg, rgba(17, 19, 21, 0.98), rgba(40, 45, 50, 0.96)),
    radial-gradient(circle at 20% 0%, rgba(227, 27, 35, 0.28), transparent 35%);
  border: 1px solid rgba(227, 27, 35, 0.35);
  border-radius: 16px;
  box-shadow: 0 26px 60px rgba(17, 19, 21, 0.24);
}

.ag-company-panel-inner::before {
  content: "";
  position: absolute;
  right: -90px;
  top: -90px;
  width: 220px;
  height: 220px;
  border: 28px solid rgba(227, 27, 35, 0.18);
  border-radius: 50%;
}

.ag-company-panel-inner::after {
  content: "";
  position: absolute;
  left: -40px;
  bottom: 42px;
  width: 180px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(227, 27, 35, 0.75), transparent);
  transform: rotate(-28deg);
}

.ag-panel-label {
  position: relative;
  z-index: 2;
  display: inline-flex;
  padding: 8px 11px;
  color: rgba(255, 255, 255, 0.82);
  background: rgba(255, 255, 255, 0.06);
  border-left: 4px solid var(--ag-red-500, #e31b23);
  border-radius: 6px;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ag-company-logo-card {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  min-height: 145px;
  margin-top: 26px;
  padding: 22px;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 12px;
}

.ag-company-logo-card img {
  max-width: 260px;
  width: 100%;
  max-height: 110px;
  object-fit: contain;
  filter: drop-shadow(0 16px 32px rgba(0, 0, 0, 0.32));
}

.ag-company-panel-inner p {
  position: relative;
  z-index: 2;
  margin: 24px 0 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 15px;
  line-height: 1.68;
}

.ag-company-mini-list {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 10px;
  margin-top: 22px;
}

.ag-company-mini-list span {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 0 12px;
  color: rgba(255, 255, 255, 0.86);
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 850;
}

.ag-company-mini-list i {
  color: var(--ag-red-400, #ff3138);
}

/* Cards inferiores */
.ag-company-cards {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 48px;
}

.ag-company-card {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 16px;
  padding: 26px 24px;
  background: #ffffff;
  border: 1px solid rgba(17, 19, 21, 0.1);
  border-radius: 14px;
  box-shadow: 0 18px 42px rgba(17, 19, 21, 0.08);
  transition:
    transform 0.28s ease,
    box-shadow 0.28s ease,
    border-color 0.28s ease;
}

.ag-company-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(227, 27, 35, 0.075), transparent 44%);
  opacity: 0;
  transition: opacity 0.28s ease;
}

.ag-company-card::after {
  content: "";
  position: absolute;
  left: 0;
  top: 24px;
  bottom: 24px;
  width: 4px;
  background: var(--ag-red-500, #e31b23);
  transform: scaleY(0.25);
  opacity: 0;
  transition: transform 0.28s ease, opacity 0.28s ease;
}

.ag-company-card:hover {
  transform: translateY(-8px);
  border-color: rgba(227, 27, 35, 0.34);
  box-shadow: 0 26px 54px rgba(17, 19, 21, 0.13);
}

.ag-company-card:hover::before {
  opacity: 1;
}

.ag-company-card:hover::after {
  opacity: 1;
  transform: scaleY(1);
}

.ag-company-icon {
  position: relative;
  z-index: 2;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  color: var(--ag-white, #ffffff);
  background: linear-gradient(135deg, var(--ag-red-700, #a90f16), var(--ag-red-500, #e31b23));
  border-radius: 10px;
  box-shadow: 0 16px 30px rgba(227, 27, 35, 0.24);
}

.ag-company-icon i {
  font-size: 23px;
}

.ag-company-card h3 {
  position: relative;
  z-index: 2;
  margin: 0;
  color: var(--ag-dark-950, #111315);
  font-size: 19px;
  line-height: 1.18;
  font-weight: 950;
  letter-spacing: -0.02em;
}

.ag-company-card p {
  position: relative;
  z-index: 2;
  margin: 10px 0 0;
  color: rgba(17, 19, 21, 0.62);
  font-size: 14px;
  line-height: 1.62;
}

/* Responsive */
@media (max-width: 1050px) {
  .ag-company {
    padding: 84px 0 92px;
  }

  .ag-company-grid {
    grid-template-columns: 1fr;
  }

  .ag-company-panel-inner {
    position: relative;
    top: auto;
  }

  .ag-company-cards {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .ag-company {
    padding: 68px 0 76px;
  }

  .ag-section-title {
    font-size: clamp(34px, 10vw, 48px);
  }

  .ag-section-sub {
    font-size: 15.5px;
  }

  .ag-company-stats {
    grid-template-columns: 1fr;
  }

  .ag-company-panel-inner {
    padding: 22px;
    border-radius: 14px;
  }

  .ag-company-logo-card {
    min-height: 120px;
  }

  .ag-company-card {
    grid-template-columns: 1fr;
    padding: 24px 22px;
  }
}

@media (max-width: 480px) {
  .ag-section-kicker {
    font-size: 11.5px;
    line-height: 1.35;
  }

  .ag-company-logo-card img {
    max-width: 210px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ag-company-card,
  .ag-company-card::before,
  .ag-company-card::after {
    transition: none !important;
  }
}