/* =========================================================
   (largura do conteúdo igual à do original: 1140px; 1320px acima de 1600px)
   PRODUTOS E SERVIÇOS · AGRONEGÓCIO
   Réplica da página oficial yeb.com.br/new/nossos-negocios/agronegocio
   (cores, fonte Poppins, cards que giram, números e contato).
========================================================= */

.ag {
  --ag-primary: #282780;
  --ag-light: #ececec;
  --ag-texto: #212529;
  font-family: "Poppins", Arial, Helvetica, sans-serif;
  color: var(--ag-texto);
  line-height: 1.5;
  overflow-x: clip;
}

.ag *,
.ag *::before,
.ag *::after {
  box-sizing: border-box;
}

.ag h1,
.ag h2,
.ag p {
  margin-top: 0;
}

.ag img {
  display: block;
}

.ag-container {
  width: calc(100% - 48px);
  max-width: 1140px;
  margin: 0 auto;
}

.ag-titulo h2 {
  margin-bottom: 8px;
  color: var(--ag-primary);
  font-size: 35px;
  font-weight: 500;
  line-height: 1.2;
  max-width: 645px;
  text-wrap: balance;
}

.ag-titulo h2 strong {
  font-weight: 800;
}

.ag-titulo p {
  margin-bottom: 0;
  font-size: 16px;
}

.ag-titulo hr {
  width: 100%;
  max-width: 224px;
  margin: 16px 0 0;
  border: 0;
  border-top: 4px solid var(--ag-primary);
  opacity: 1;
}

/* ---------- Hero: texto à esquerda, foto até a borda direita ---------- */
/* Texto à esquerda e foto à direita, ambos dentro da margem do conteúdo */
.ag-hero {
  display: grid;
  grid-template-columns: 480px minmax(0, 1fr);
  column-gap: 72px;
  width: calc(100% - 48px);
  max-width: 1140px;
  margin: 32px auto 64px;
  align-items: center;
}

.ag-hero-texto {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 30px;
  padding: 36px 0;
}

.ag-hero h1 {
  margin: 0;
  color: var(--ag-primary);
  font-size: 36px;
  font-weight: 800;
  line-height: 1.2;
  text-transform: uppercase;
  text-wrap: balance;
}

.ag-hero p {
  margin: 0;
  font-size: 16px;
  line-height: 1.6;
}

.ag-hero img {
  width: 100%;
  height: 500px;
  object-fit: cover;
}

@media (min-width: 1600px) {
  .ag-container,
  .ag-divisor {
    max-width: 1320px;
  }

  .ag-hero {
    grid-template-columns: 560px minmax(0, 1fr);
    max-width: 1320px;
  }

  .ag-hero img {
    height: 560px;
  }
}

/* ---------- Segmentos ---------- */
.ag-segmentos {
  padding: 80px 0;
  background: var(--ag-light);
}

.ag-segmentos .ag-titulo {
  margin-bottom: 36px;
}

.ag-segmentos-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
}

.ag-segmento {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ag-segmento img {
  width: 100%;
  height: 280px;
  object-fit: cover;
}

.ag-segmento strong {
  display: block;
  max-width: 241px;
  margin: 0 auto;
  font-weight: 800;
  text-align: center;
  text-transform: uppercase;
  text-wrap: balance;
}

/* ---------- Marcas e Soluções: cards que giram ---------- */
.ag-marcas {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin: 80px auto;
}

.ag-cards {
  display: flex;
  gap: 12px;
}

.ag-card {
  flex: 1 1 0;
  min-width: 0;
  height: 415px;
  perspective: 1000px;
  cursor: pointer;
  outline: none;
}

.ag-card-giro {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform .8s;
  transform-style: preserve-3d;
}

.ag-card:hover .ag-card-giro,
.ag-card:focus-within .ag-card-giro,
.ag-card.is-virado .ag-card-giro {
  transform: rotateY(180deg);
}

.ag-card-frente,
.ag-card-verso {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.ag-card-frente {
  background: var(--ag-light);
}

.ag-card-frente img {
  width: 100%;
  max-width: 200px;
  height: 100%;
  object-fit: contain;
}

.ag-card-verso {
  align-items: flex-start;
  padding: 36px;
  color: #ffffff;
  font-size: 13px;
  transform: rotateY(180deg);
}

.ag-card-verso p {
  margin-bottom: 16px;
}

.ag-card-verso a {
  color: #ffffff;
  text-decoration: underline;
}

.ag-card:focus-visible {
  outline: 3px solid #8fb4ff;
  outline-offset: 3px;
}

/* Cores de cada marca (iguais ao site oficial) */
.ag-verde { background: #1fa55d; }
.ag-verde-mata { background: #2ea137; }
.ag-laranja { background: #dc5918; }
.ag-roxo { background: #763089; }
.ag-preto { background: #000000; }
.ag-azul { background: #1d1e52; }
.ag-azul-600 { background: #1e2a50; }
.ag-amarelo { background: #fecf00; color: #000000 !important; }
.ag-amarelo a { color: #000000 !important; }

.ag-divisor {
  width: calc(100% - 48px);
  max-width: 1140px;
  margin: 72px auto;
  border: 0;
  border-top: 1px solid rgba(0, 0, 0, .25);
}

.ag-marcas-solucoes {
  margin-top: 0;
}

/* ---------- Yeb AG (Estados Unidos) ---------- */
.ag-yebag {
  padding: 52px 0;
  background:
    linear-gradient(120deg, rgba(5, 14, 58, .97) 0%, rgba(20, 22, 90, .94) 55%, rgba(40, 39, 128, .88) 100%),
    url("../assets/images/yebag/lavoura-eua.jpg") center / cover no-repeat;
  color: #ffffff;
}

.ag-yebag-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 40px;
  align-items: center;
}

.ag-yebag-marca {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.ag-yebag-marca img {
  width: 130px;
  height: auto;
}

.ag-yebag h2 {
  margin-bottom: 12px;
  font-size: 26px;
  font-weight: 500;
  line-height: 1.2;
}

.ag-yebag h2 strong {
  font-weight: 800;
  color: #a8d2ee;
}

.ag-yebag-texto > p {
  color: rgba(255, 255, 255, .85);
  font-size: 15px;
  line-height: 1.7;
}

.ag-yebag-beneficios {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px 18px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  font-size: 13.5px;
}

.ag-yebag-beneficios li {
  position: relative;
  padding-left: 22px;
  color: rgba(255, 255, 255, .82);
  line-height: 1.45;
}

.ag-yebag-beneficios li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: #a8d2ee;
  font-weight: 800;
}

.ag-yebag-beneficios strong {
  color: #ffffff;
}

.ag-yebag-botoes {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  margin-top: 20px;
}

.ag-yebag-btn {
  padding: 12px 22px;
  border-radius: 999px;
  background: #a8d2ee;
  color: #071c54;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: background .2s, transform .2s;
}

.ag-yebag-btn:hover {
  transform: translateY(-2px);
  background: #ffffff;
}

.ag-yebag-btn-linha {
  border: 1px solid rgba(255, 255, 255, .45);
  background: transparent;
  color: #ffffff;
}

.ag-yebag-btn-linha:hover {
  background: rgba(255, 255, 255, .12);
}

.ag-yebag-link {
  color: #a8d2ee;
  font-size: 14px;
  font-weight: 600;
}

.ag-yebag-visual img {
  width: 100%;
  max-width: 470px;
  height: auto;
  margin: 0 auto;
}

.ag-yebag-numeros {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 8px;
}

.ag-yebag-numeros div {
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, .15);
  border-radius: 12px;
  background: rgba(255, 255, 255, .07);
  text-align: center;
}

.ag-yebag-numeros strong {
  display: block;
  color: #a8d2ee;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.1;
}

.ag-yebag-numeros span {
  font-size: 12px;
  color: rgba(255, 255, 255, .8);
}

.ag-yebag-produtos {
  margin: 24px 0 0 !important;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, .14);
  color: rgba(255, 255, 255, .72);
  font-size: 12.5px;
  line-height: 1.6;
}

.ag-yebag-produtos strong {
  margin-right: 4px;
  color: #a8d2ee;
  letter-spacing: .06em;
  text-transform: uppercase;
}

@media (max-width: 1023px) {
  .ag-yebag-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767px) {
  .ag-yebag {
    padding: 56px 0;
  }

  .ag-yebag h2 {
    font-size: 26px;
  }

  .ag-yebag-beneficios {
    grid-template-columns: 1fr;
  }
}

/* ---------- Nossos clientes (números) ---------- */
.ag-numeros {
  padding: 80px 0;
  background: var(--ag-primary);
}

.ag-numeros .ag-container {
  display: flex;
  flex-direction: column;
  row-gap: 45px;
}

.ag-numeros h2 {
  margin: 0;
  color: #ffffff;
  font-size: 28px;
  font-weight: 800;
  text-align: center;
  text-transform: uppercase;
}

.ag-contadores {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}

.ag-contadores strong {
  display: block;
  color: #ffffff;
  font-size: 48px;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
}

.ag-contadores p {
  margin: 8px 0 0;
  color: #ffffff;
  font-size: 14px;
  text-align: center;
  text-wrap: balance;
}

@media (min-width: 1600px) {
  .ag-numeros h2 { font-size: 35px; }
  .ag-contadores strong { font-size: 67px; }
  .ag-contadores p { font-size: 18px; }
}

/* ---------- Dúvidas (contato) ---------- */
.ag-duvidas {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 150px;
  row-gap: 24px;
  padding: 48px 0;
}

.ag-duvidas-info {
  display: flex;
  flex-direction: column;
  gap: 24px;
  color: var(--ag-primary);
}

.ag-duvidas-info h2 {
  margin: 0;
  color: var(--ag-primary);
  font-size: 32px;
  font-weight: 700;
}

.ag-duvidas-info ul {
  display: flex;
  flex-direction: column;
  row-gap: 20px;
  max-width: 686px;
  margin: 0;
  padding: 0;
  color: #000000;
  list-style: none;
}

.ag-duvidas-info li {
  letter-spacing: 1px;
  text-wrap: balance;
}

.ag-duvidas-info li a {
  color: var(--ag-primary);
  font-weight: 700;
}

.ag-mapa {
  width: 100%;
  height: 320px;
  border: 0;
}

.ag-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ag-form-privacidade {
  margin: 0;
  color: var(--ag-primary);
  font-size: 12px;
  text-wrap: balance;
}

.ag-form-privacidade a {
  color: var(--ag-primary);
}

/* ---------- Responsivo (mesmos pontos de quebra do original) ---------- */
@media (max-width: 1139px) {
  .ag-hero {
    grid-template-columns: 1fr;
    row-gap: 28px;
  }

  .ag-hero-texto {
    padding-bottom: 0;
  }

  .ag-hero img {
    height: 420px;
  }
}

@media (max-width: 1023px) {
  .ag-contadores {
    grid-template-columns: repeat(3, 1fr);
    row-gap: 32px;
  }
}

@media (max-width: 767px) {
  .ag-container,
  .ag-divisor,
  .ag-hero {
    width: calc(100% - 32px);
  }

  .ag-hero-texto {
    gap: 14px;
  }

  .ag-hero h1 {
    font-size: 28px;
  }

  .ag-hero img {
    height: 300px;
  }

  .ag-titulo h2 {
    font-size: 28px;
  }

  .ag-segmentos {
    padding: 48px 0;
  }

  .ag-segmentos-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .ag-segmento {
    gap: 12px;
  }

  .ag-segmento strong {
    font-size: 14px;
  }

  .ag-marcas {
    margin: 48px auto;
  }

  .ag-cards {
    flex-direction: column;
  }

  .ag-card {
    flex: none;
    height: 300px;
  }

  .ag-card-verso {
    padding: 16px;
  }

  .ag-contadores {
    grid-template-columns: 1fr;
  }

  .ag-contadores strong {
    font-size: 32px;
  }

  .ag-duvidas {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .ag-segmento img {
    height: 160px;
  }

  .ag-form-privacidade {
    font-size: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ag-card-giro {
    transition: none;
  }
}
