/* ---------------------------------------------------------------------------
 * CoreMushroom - portada amable y botanica
 *
 * La ilustracion es decorativa. El contenido nombra siempre las especies que
 * realmente se ofrecen para no confundir la identidad visual con el catalogo.
 * Los selectores por posicion mantienen bonita la portada que ya esta guardada
 * en WordPress; las clases cm-home-* quedan para nuevas inserciones del pattern.
 * ------------------------------------------------------------------------- */

.home .hero-section {
  display: none;
}

.home .entry-content > p:empty:first-child {
  display: none;
}

.home .site-header {
  border-bottom: var(--wp--custom--borde--fino);
  background-color: var(--wp--preset--color--crema);
}

.home .site-title,
.home [data-id="logo"] {
  font-family: var(--wp--preset--font-family--display);
  font-variation-settings: "opsz" 72, "SOFT" 60, "WONK" 1;
}

.home .entry-content > .wp-block-group:nth-of-type(1) {
  border-radius: 0 0 var(--wp--custom--radio--lg) var(--wp--custom--radio--lg);
}

.cm-home-hero,
.home .entry-content > .wp-block-group:nth-of-type(2) {
  position: relative;
  isolation: isolate;
  min-height: 42rem;
  overflow: hidden;
  border-radius: 0 0 var(--wp--custom--radio--xl) var(--wp--custom--radio--xl);
}

.cm-home-hero::after,
.home .entry-content > .wp-block-group:nth-of-type(2)::after {
  position: absolute;
  z-index: -1;
  right: max(var(--wp--preset--spacing--50), calc((100% - var(--wp--custom--contenido--ancho)) / 2));
  bottom: calc(-1 * var(--wp--preset--spacing--55));
  width: min(39%, 29rem);
  aspect-ratio: 2 / 3;
  background: url("../images/amanita-hero-v1.webp") center bottom / contain no-repeat;
  content: "";
  animation: cm-aparecer-hongo var(--wp--custom--transicion--media) both;
}

.cm-home-hero > *,
.home .entry-content > .wp-block-group:nth-of-type(2) > * {
  position: relative;
  z-index: 1;
  max-width: 58%;
}

.cm-home-hero h1,
.home .entry-content > .wp-block-group:nth-of-type(2) h1 {
  max-width: 12ch;
  margin-top: var(--wp--preset--spacing--40);
}

.cm-home-hero > p,
.home .entry-content > .wp-block-group:nth-of-type(2) > p {
  max-width: 48ch;
}

.home .entry-content > .wp-block-group:nth-of-type(3) {
  padding-inline: var(--wp--preset--spacing--50);
}

.home .entry-content > .wp-block-group:nth-of-type(3) .wp-block-columns {
  align-items: stretch;
}

.home .entry-content > .wp-block-group:nth-of-type(3) .wp-block-column > .wp-block-group {
  position: relative;
  min-height: 15rem;
  overflow: hidden;
  border: var(--wp--custom--borde--fino);
  box-shadow: none;
  transition: transform var(--wp--custom--transicion--media);
}

.home .entry-content > .wp-block-group:nth-of-type(3) .wp-block-column:nth-child(2) > .wp-block-group {
  transform: translateY(var(--wp--preset--spacing--45));
}

.home .entry-content > .wp-block-group:nth-of-type(3) .wp-block-column > .wp-block-group::after {
  position: absolute;
  right: var(--wp--preset--spacing--45);
  bottom: var(--wp--preset--spacing--40);
  font-family: var(--wp--preset--font-family--display);
  font-size: var(--wp--preset--font-size--xl);
  line-height: 1;
  content: "✦";
  opacity: 0.45;
}

.home .entry-content > .wp-block-group:nth-of-type(3) .wp-block-column > .wp-block-group:hover {
  transform: translateY(calc(-1 * var(--wp--preset--spacing--35)));
}

.home .entry-content > .wp-block-group:nth-of-type(4) {
  border: 0 !important;
  border-radius: var(--wp--custom--radio--xl);
  background-color: var(--wp--preset--color--hueso) !important;
}

.home .entry-content > .wp-block-group:nth-of-type(4) .wp-block-column {
  padding: var(--wp--preset--spacing--45);
}

.home .entry-content > .wp-block-group:nth-of-type(4) h3::before {
  display: block;
  margin-bottom: var(--wp--preset--spacing--40);
  color: var(--wp--preset--color--cordyceps);
  font-family: var(--wp--preset--font-family--texto);
  font-size: var(--wp--preset--font-size--md);
  content: "●";
}

.home .entry-content > .wp-block-group:last-of-type {
  position: relative;
  overflow: hidden;
  border-radius: var(--wp--custom--radio--xl) var(--wp--custom--radio--xl) 0 0;
}

.home #footer .ct-footer-copyright {
  display: none;
}

@keyframes cm-aparecer-hongo {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@media (max-width: 899px) {
  .cm-home-hero,
  .home .entry-content > .wp-block-group:nth-of-type(2) {
    min-height: 0;
    padding-bottom: clamp(24rem, 88vw, 34rem) !important;
  }

  .cm-home-hero::after,
  .home .entry-content > .wp-block-group:nth-of-type(2)::after {
    right: 50%;
    bottom: calc(-1 * var(--wp--preset--spacing--55));
    width: min(82%, 26rem);
    transform: translateX(50%);
  }

  .cm-home-hero > *,
  .home .entry-content > .wp-block-group:nth-of-type(2) > * {
    max-width: 100%;
  }

  .home .entry-content > .wp-block-group:nth-of-type(3) .wp-block-column:nth-child(2) > .wp-block-group {
    transform: none;
  }

  .home .entry-content > .wp-block-group:nth-of-type(3) .wp-block-column > .wp-block-group:hover {
    transform: translateY(calc(-1 * var(--wp--preset--spacing--35)));
  }
}

@media (max-width: 520px) {
  .cm-home-hero,
  .home .entry-content > .wp-block-group:nth-of-type(2) {
    padding-bottom: 25rem !important;
  }

  .cm-home-hero h1,
  .home .entry-content > .wp-block-group:nth-of-type(2) h1 {
    font-size: var(--wp--preset--font-size--xxl) !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cm-home-hero::after,
  .home .entry-content > .wp-block-group:nth-of-type(2)::after {
    animation: none;
  }
}
