:root {
  --agro-forest: #173f35;
  --agro-leaf: #2f6b4f;
  --agro-moss: #789249;
  --agro-sun: #d7a840;
  --agro-soil: #74513a;
  --agro-cream: #f6f3e9;
  --agro-ink: #1f2925;
  --agro-line: #d9ded4;
  --agro-shadow: 0 16px 42px rgba(23, 63, 53, 0.1);
}

body {
  color: var(--agro-ink);
  background: #fbfcf9;
}

a {
  color: var(--agro-leaf);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

a:hover,
a:focus {
  color: var(--agro-forest);
}

.site-header {
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--agro-line);
  box-shadow: 0 4px 24px rgba(23, 63, 53, 0.06);
}

.site-branding__name {
  color: var(--agro-forest);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.site-branding__slogan {
  color: #526159;
  max-width: 46rem;
}

.primary-nav__menu-link-inner::after {
  border-top-color: var(--agro-sun);
}

.agro-hero {
  position: relative;
  overflow: hidden;
  margin: 0 0 3rem;
  padding: clamp(2.25rem, 6vw, 5.5rem);
  color: #fff;
  border-radius: 1.2rem;
  background:
    radial-gradient(circle at 90% 10%, rgba(215, 168, 64, 0.38), transparent 32%),
    linear-gradient(135deg, var(--agro-forest), var(--agro-leaf));
  box-shadow: var(--agro-shadow);
}

.agro-hero::after {
  position: absolute;
  right: -5rem;
  bottom: -7rem;
  width: 20rem;
  height: 20rem;
  content: '';
  opacity: 0.14;
  border: 2px solid #fff;
  border-radius: 50%;
}

.agro-hero h1 {
  position: relative;
  z-index: 1;
  max-width: 17ch;
  margin: 0 0 1rem;
  color: #fff;
  font-size: clamp(2.15rem, 5.2vw, 4.7rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.agro-hero > p:last-child {
  position: relative;
  z-index: 1;
  max-width: 46rem;
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(1.05rem, 1.8vw, 1.3rem);
}

.agro-hero__eyebrow {
  position: relative;
  z-index: 1;
  margin: 0 0 1.2rem;
  color: #f4d88b;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.agro-section-title {
  margin: 0 0 1.5rem;
  color: var(--agro-forest);
  font-size: clamp(1.7rem, 3vw, 2.55rem);
  letter-spacing: -0.025em;
}

.agro-publications .node--view-mode-teaser {
  margin-bottom: 1.25rem;
  padding: clamp(1.35rem, 3vw, 2.2rem);
  border: 1px solid var(--agro-line);
  border-left: 0.35rem solid var(--agro-moss);
  border-radius: 0.8rem;
  background: #fff;
  box-shadow: 0 8px 26px rgba(23, 63, 53, 0.055);
}

.agro-publications .node--view-mode-teaser h2 {
  margin-top: 0;
  font-size: clamp(1.3rem, 2.4vw, 1.9rem);
}

.text-content img {
  max-width: 100%;
  height: auto;
  border-radius: 0.55rem;
}

.text-content iframe {
  width: 100%;
  max-width: 52rem;
  aspect-ratio: 16 / 9;
  height: auto;
  border: 0;
  border-radius: 0.55rem;
}

.site-footer {
  margin-top: 4rem;
  background: var(--agro-forest);
}

.pager__link.is-active,
.button--primary {
  color: #fff;
  background: var(--agro-leaf);
}

@media (max-width: 43rem) {
  .agro-hero {
    border-radius: 0.75rem;
  }

  .agro-publications .node--view-mode-teaser {
    border-left-width: 0.25rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}


/* AGRO HOME REDESIGN 2026 */

.agro-home {
  --home-forest: #174c3c;
  --home-deep: #103a30;
  --home-leaf: #3f7454;
  --home-pale: #dce8d7;
  --home-soil: #9a673a;
  --home-ochre: #d2a43b;
  --home-ivory: #f6f3ea;
  --home-ink: #26312c;
  --home-muted: #5e6b64;
  --home-line: #d8ded7;
  display: grid;
  gap: clamp(4rem, 8vw, 7rem);
  margin-top: 1rem;
  color: var(--home-ink);
}

.agro-home h2 {
  max-width: 20ch;
  margin: 0 0 1.25rem;
  color: var(--home-forest);
  font-size: clamp(2rem, 4.2vw, 3.5rem);
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.agro-home h3 {
  margin: 0 0 0.85rem;
  color: var(--home-forest);
  font-size: clamp(1.25rem, 2vw, 1.55rem);
  line-height: 1.25;
}

.agro-home p {
  color: var(--home-muted);
  line-height: 1.7;
}

.agro-eyebrow {
  margin: 0 0 1rem !important;
  color: var(--home-soil) !important;
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.agro-home-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(15rem, 0.65fr);
  min-height: 34rem;
  overflow: hidden;
  border-radius: 1.35rem;
  background:
    radial-gradient(circle at 82% 12%, rgba(210, 164, 59, 0.3), transparent 25rem),
    linear-gradient(135deg, var(--home-deep), var(--home-leaf));
  box-shadow: 0 24px 65px rgba(23, 76, 60, 0.16);
}

.agro-home-hero__content {
  position: relative;
  z-index: 2;
  align-self: center;
  padding: clamp(2.2rem, 6vw, 5rem);
}

.agro-home-hero .agro-eyebrow {
  color: #f1d681 !important;
}

.agro-home-hero h2 {
  max-width: 13ch;
  margin-bottom: 1.4rem;
  color: #fff;
  font-size: clamp(2.4rem, 5vw, 4.7rem);
  line-height: 1;
}

.agro-home-hero__lead {
  max-width: 43rem;
  margin: 0;
  color: rgba(255, 255, 255, 0.88) !important;
  font-size: clamp(1.05rem, 1.7vw, 1.28rem);
}

.agro-home-hero__visual {
  position: relative;
  min-height: 22rem;
}

.agro-home-hero__visual::before,
.agro-home-hero__visual::after {
  position: absolute;
  content: "";
  border-radius: 50% 50% 48% 52%;
  background: rgba(246, 243, 234, 0.08);
  transform: rotate(-18deg);
}

.agro-home-hero__visual::before {
  right: -4rem;
  bottom: -7rem;
  width: 24rem;
  height: 32rem;
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.agro-home-hero__visual::after {
  right: 5rem;
  bottom: 5rem;
  width: 9rem;
  height: 13rem;
  border: 1px solid rgba(241, 214, 129, 0.38);
}

.agro-orbit {
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
}

.agro-orbit--one {
  top: 20%;
  right: 8%;
  width: 12rem;
  height: 12rem;
}

.agro-orbit--two {
  top: 36%;
  right: 23%;
  width: 5rem;
  height: 5rem;
}

.agro-seed {
  position: absolute;
  z-index: 2;
  right: 20%;
  bottom: 20%;
  display: grid;
  width: 7rem;
  height: 7rem;
  place-items: center;
  color: var(--home-forest);
  border-radius: 62% 38% 60% 40%;
  background: var(--home-ivory);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.16);
  font-size: 2.6rem;
  font-weight: 800;
  transform: rotate(-12deg);
}

.agro-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 2rem;
}

.agro-button {
  display: inline-flex;
  min-height: 3rem;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.25rem;
  border: 2px solid transparent;
  border-radius: 999px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
}

.agro-button--primary {
  color: var(--home-forest) !important;
  background: var(--home-ivory);
}

.agro-button--secondary {
  color: #fff !important;
  border-color: rgba(255, 255, 255, 0.55);
  background: transparent;
}

.agro-button:hover,
.agro-button:focus-visible {
  transform: translateY(-2px);
}

.agro-button--primary:hover,
.agro-button--primary:focus-visible {
  background: #fff;
}

.agro-button--secondary:hover,
.agro-button--secondary:focus-visible {
  color: var(--home-forest) !important;
  background: #fff;
}

.agro-section {
  padding-inline: clamp(0rem, 2vw, 1.5rem);
}

.agro-section__intro {
  max-width: 48rem;
  margin: 0 0 2.5rem;
  font-size: 1.08rem;
}

.agro-area-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

.agro-area-card {
  position: relative;
  min-height: 16rem;
  padding: clamp(1.5rem, 3vw, 2.25rem);
  overflow: hidden;
  border: 1px solid var(--home-line);
  border-radius: 1rem;
  background: #fff;
  box-shadow: 0 10px 32px rgba(23, 76, 60, 0.06);
}

.agro-area-card::after {
  position: absolute;
  right: -3rem;
  bottom: -4rem;
  width: 9rem;
  height: 9rem;
  content: "";
  border: 1px solid var(--home-pale);
  border-radius: 50%;
}

.agro-area-card__number {
  display: block;
  margin-bottom: 2.2rem;
  color: var(--home-ochre);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.agro-area-card p {
  max-width: 38rem;
  margin-bottom: 0;
}

.agro-section--tinted {
  margin-inline: calc(50% - 50vw);
  padding: clamp(3rem, 7vw, 6rem) max(calc((100vw - 1180px) / 2), 1.5rem);
  background:
    linear-gradient(rgba(246, 243, 234, 0.94), rgba(246, 243, 234, 0.94)),
    repeating-linear-gradient(
      90deg,
      transparent 0,
      transparent 4rem,
      rgba(23, 76, 60, 0.05) 4rem,
      rgba(23, 76, 60, 0.05) calc(4rem + 1px)
    );
}

.agro-path-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 2.5rem;
}

.agro-path-card {
  display: flex;
  min-height: 13rem;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.6rem;
  color: var(--home-ink) !important;
  border: 1px solid rgba(23, 76, 60, 0.16);
  border-radius: 0.85rem;
  background: rgba(255, 255, 255, 0.82);
  text-decoration: none;
}

.agro-path-card strong {
  display: block;
  color: var(--home-forest);
  font-size: 1.35rem;
  line-height: 1.25;
}

.agro-path-card__label {
  color: var(--home-soil);
  font-size: 0.75rem;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.agro-path-card > span:last-child {
  color: var(--home-leaf);
  font-weight: 700;
}

.agro-path-card:hover,
.agro-path-card:focus-visible {
  border-color: var(--home-leaf);
  background: #fff;
  box-shadow: 0 14px 36px rgba(23, 76, 60, 0.1);
  transform: translateY(-3px);
}

.agro-contact-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2rem;
  align-items: center;
  padding: clamp(2.2rem, 5vw, 4rem);
  color: #fff;
  border-radius: 1.2rem;
  background:
    radial-gradient(circle at 90% 20%, rgba(210, 164, 59, 0.25), transparent 18rem),
    var(--home-forest);
}

.agro-contact-band h2 {
  max-width: 22ch;
  margin-bottom: 0.75rem;
  color: #fff;
  font-size: clamp(1.7rem, 3.2vw, 2.7rem);
}

.agro-contact-band p:not(.agro-eyebrow) {
  max-width: 48rem;
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.82);
}

.agro-contact-band .agro-eyebrow {
  color: #f1d681 !important;
}

.agro-button--light {
  color: var(--home-forest) !important;
  background: var(--home-ivory);
  white-space: nowrap;
}

.agro-home a,
.agro-home .agro-button,
.agro-path-card {
  transition:
    color 160ms ease,
    background-color 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.agro-home a:focus-visible {
  outline: 3px solid var(--home-ochre);
  outline-offset: 4px;
}

@media (max-width: 62rem) {
  .agro-home-hero {
    grid-template-columns: 1fr;
  }

  .agro-home-hero__visual {
    position: absolute;
    inset: 0 0 0 auto;
    width: 38%;
    opacity: 0.55;
  }

  .agro-home-hero__content {
    padding-right: max(2.2rem, 22%);
  }

  .agro-path-grid {
    grid-template-columns: 1fr;
  }

  .agro-path-card {
    min-height: 10rem;
  }
}

@media (max-width: 43rem) {
  .agro-home {
    gap: 3.5rem;
  }

  .agro-home-hero {
    min-height: auto;
    border-radius: 0.85rem;
  }

  .agro-home-hero__content {
    padding: 2rem 1.35rem 2.4rem;
  }

  .agro-home-hero__visual {
    display: none;
  }

  .agro-home-hero h2 {
    font-size: clamp(2.15rem, 11vw, 3.1rem);
  }

  .agro-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .agro-area-grid {
    grid-template-columns: 1fr;
  }

  .agro-area-card {
    min-height: auto;
  }

  .agro-contact-band {
    grid-template-columns: 1fr;
    padding: 2rem 1.35rem;
  }

  .agro-button--light {
    white-space: normal;
  }
}

@media (prefers-reduced-motion: reduce) {
  .agro-home a,
  .agro-home .agro-button,
  .agro-path-card {
    transition: none;
  }
}

/* AGRO HOME COMPATIBILITY FIX */

.page-node-type-page .node--unpublished {
  background-color: transparent;
}

.agro-home-hero {
  min-height: 30rem;
}

.agro-home-hero h2 {
  max-width: 15ch;
  font-size: clamp(2.4rem, 4.4vw, 4rem);
}

.agro-home .agro-home-hero__lead {
  color: rgba(255, 255, 255, 0.9) !important;
}

.agro-home .agro-eyebrow {
  color: var(--home-soil) !important;
}

.agro-home .agro-home-hero .agro-eyebrow,
.agro-home .agro-contact-band .agro-eyebrow {
  color: #f1d681 !important;
}

.agro-actions a,
.agro-contact-band > a {
  display: inline-flex;
  min-height: 3rem;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.25rem;
  border: 2px solid transparent;
  border-radius: 999px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  transition:
    color 160ms ease,
    background-color 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.agro-actions a:first-child {
  color: var(--home-forest) !important;
  background: var(--home-ivory);
}

.agro-actions a:last-child {
  color: #fff !important;
  border-color: rgba(255, 255, 255, 0.55);
  background: transparent;
}

.agro-actions a:hover,
.agro-actions a:focus-visible,
.agro-contact-band > a:hover,
.agro-contact-band > a:focus-visible {
  transform: translateY(-2px);
}

.agro-actions a:first-child:hover,
.agro-actions a:first-child:focus-visible {
  background: #fff;
}

.agro-actions a:last-child:hover,
.agro-actions a:last-child:focus-visible {
  color: var(--home-forest) !important;
  background: #fff;
}

.agro-path-grid > a {
  display: flex;
  min-height: 13rem;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.6rem;
  color: var(--home-ink) !important;
  border: 1px solid rgba(23, 76, 60, 0.16);
  border-radius: 0.85rem;
  background: rgba(255, 255, 255, 0.86);
  text-decoration: none;
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.agro-path-grid > a strong {
  display: block;
  color: var(--home-forest);
  font-size: 1.35rem;
  line-height: 1.25;
}

.agro-path-grid > a > span:last-child {
  color: var(--home-leaf);
  font-weight: 700;
}

.agro-path-grid > a:hover,
.agro-path-grid > a:focus-visible {
  border-color: var(--home-leaf);
  background: #fff;
  box-shadow: 0 14px 36px rgba(23, 76, 60, 0.1);
  transform: translateY(-3px);
}

.agro-contact-band > a {
  color: var(--home-forest) !important;
  background: var(--home-ivory);
  white-space: nowrap;
}

.agro-contact-band > a:hover,
.agro-contact-band > a:focus-visible {
  background: #fff;
}

@media (max-width: 62rem) {
  .agro-path-grid > a {
    min-height: 10rem;
  }
}

@media (max-width: 43rem) {
  .agro-actions a {
    width: 100%;
  }

  .agro-contact-band > a {
    white-space: normal;
  }
}

/* AGRO FILTER STRUCTURAL FIX */

.agro-home-hero__content > p:first-child,
.agro-section > p:first-child,
.agro-contact-band > div > p:first-child {
  margin: 0 0 1rem;
  color: var(--home-soil) !important;
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.agro-home-hero__content > p:first-child,
.agro-contact-band > div > p:first-child {
  color: #f1d681 !important;
}

.agro-home-hero__content > h2 + p {
  max-width: 43rem;
  margin: 0;
  color: rgba(255, 255, 255, 0.9) !important;
  font-size: clamp(1.05rem, 1.7vw, 1.28rem);
  line-height: 1.7;
}

.agro-contact-band > div > h2 + p {
  color: rgba(255, 255, 255, 0.84) !important;
}


/* AGRO HOME FULL-WIDTH FIX */
body:has(.agro-home) #block-agro-page-title {
  display: none;
}

body:has(.agro-home) #block-agro-main-content {
  grid-column: 1 / -1;
}

body:has(.agro-home) article.node--type-page > .node__meta {
  display: none;
}

body:has(.agro-home) article.node--type-page {
  margin-top: 0;
}

body:has(.agro-home) .agro-home {
  width: 100%;
  max-width: none;
}


/* AGRO HOME HERO PHOTOGRAPH */
.agro-home-hero {
  background:
    linear-gradient(
      90deg,
      rgba(10, 45, 35, 0.94) 0%,
      rgba(18, 65, 48, 0.86) 42%,
      rgba(24, 78, 55, 0.58) 72%,
      rgba(25, 73, 52, 0.42) 100%
    ),
    url("../images/agroecosistemas-hero.webp") center 54% / cover no-repeat;
}

@media (max-width: 43rem) {
  .agro-home-hero {
    background:
      linear-gradient(
        180deg,
        rgba(10, 45, 35, 0.90) 0%,
        rgba(18, 65, 48, 0.78) 65%,
        rgba(20, 69, 50, 0.66) 100%
      ),
      url("../images/agroecosistemas-hero.webp") 46% center / cover no-repeat;
  }
}


/* AGRO OFFICIAL HEADER LOGO */
.site-branding__name,
.site-branding__slogan {
  display: none;
}

.site-branding__logo {
  flex-shrink: 1;
  max-width: min(34rem, 100%);
}

.site-branding__logo img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 5.625rem;
  object-fit: contain;
  object-position: left center;
}

@media (max-width: 43rem) {
  .site-branding__logo {
    width: min(19rem, 100%);
  }

  .site-branding__logo img {
    max-height: 4rem;
  }
}
