/**
 * Home landing page (templates/node/node--page--front.html.twig).
 *
 * Every rule is scoped under .agris-home, the class of the home article, so no
 * other page changes. Colours are the website's own, taken from the variables
 * Belgrade prints on <html>, with the same values as fallback.
 */
.agris-home {
  --agris-home-primary: var(--beo-primary, #3E8C91);
  --agris-home-light: var(--beo-light, #E6F2F2);
  --agris-home-dark: var(--beo-dark, #1F4F52);
  --agris-home-dark-rgb: var(--beo-dark-rgb, 31, 79, 82);
}

/* Hero: the photo as a cover behind a dark teal overlay. Without a photo
 * (--agris-home-hero-image is not set) it is a plain dark teal block. */
.agris-home .agris-home__hero {
  display: flex;
  align-items: flex-end;
  min-height: 260px;
  padding: 1.75rem 1.5rem;
  overflow: hidden;
  color: #fff;
  background-color: var(--agris-home-dark);
  background-image:
    linear-gradient(rgba(var(--agris-home-dark-rgb), 0.8), rgba(var(--agris-home-dark-rgb), 0.8)),
    var(--agris-home-hero-image, none);
  background-position: center;
  background-size: cover;
  border-radius: 1rem;
}

.agris-home .agris-home__hero-body {
  width: 100%;
  max-width: 40rem;
}

.agris-home .agris-home__title {
  margin: 0 0 0.75rem;
  color: #fff;
  font-size: clamp(2rem, 1.4rem + 2.6vw, 3.25rem);
  font-weight: 700;
  line-height: 1.1;
}

.agris-home .agris-home__lead {
  margin: 0;
  font-size: clamp(1rem, 0.95rem + 0.4vw, 1.25rem);
  line-height: 1.5;
}

.agris-home .agris-home__actions {
  margin-top: 1.5rem;
}

.agris-home .agris-home__actions .btn {
  font-weight: 600;
}

.agris-home .agris-home__actions .btn-light {
  color: var(--agris-home-dark);
}

@media (min-width: 768px) {
  .agris-home .agris-home__hero {
    align-items: center;
    min-height: 360px;
    padding: 3rem;
    /* The text sits on the left: let the photo show on the right. */
    background-image:
      linear-gradient(
        90deg,
        rgba(var(--agris-home-dark-rgb), 0.92) 0%,
        rgba(var(--agris-home-dark-rgb), 0.78) 50%,
        rgba(var(--agris-home-dark-rgb), 0.35) 100%
      ),
      var(--agris-home-hero-image, none);
  }
}

/* The node's own content below the hero, in a readable column. */
.agris-home .agris-home__content {
  margin-top: 2.5rem;
}

/* Text of the home (field_content), wherever the display or the layout of
 * the node puts it. */
.agris-home .field--name-field-content h2,
.agris-home .field--name-field-content h3 {
  margin-top: 2rem;
  color: var(--agris-home-dark);
}

.agris-home .field--name-field-content h2:first-child,
.agris-home .field--name-field-content h3:first-child {
  margin-top: 0;
}

/* The benefits list as cards: one column on a phone, two from md. The
 * content keeps its plain <ul>; each item starts with its own emoji. */
.agris-home .field--name-field-content ul {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin: 1.5rem 0;
  padding: 0;
  list-style: none;
}

.agris-home .field--name-field-content ul > li {
  padding: 1rem 1.25rem;
  background-color: var(--agris-home-light);
  border-radius: 0.75rem;
}

@media (min-width: 768px) {
  .agris-home .field--name-field-content ul {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
