/* mod_jardiname_portada — portada de jardina.me
   Usa las variables de la plantilla (--jm-*) con valores de reserva. */

.jm-home {
  --h-green: var(--jm-green, #375543);
  --h-green-2: var(--jm-green-2, #4d6947);
  --h-rose: var(--jm-rose, #9c4f60);
  --h-rose-pale: var(--jm-rose-pale, #f3e6e6);
  --h-stone: var(--jm-stone, #e8e5dc);
  --h-stone-2: var(--jm-stone-2, #efede7);
  --h-line: var(--jm-line, #e0ddd5);
  --h-ink: var(--jm-ink, #2b3a31);
  --h-muted: var(--jm-muted, #6b5d4f);
  --h-serif: var(--jm-serif, "Cormorant Garamond", Georgia, serif);
  --h-radius: var(--jm-radius, 8px);
  display: grid;
  gap: 3rem;
  margin: 0 0 2rem;
}

/* Cabecera de sección: título con serifa y filete con hoja */
.jm-home__head {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin: 0 0 1.25rem;
}
.jm-home__head h2 {
  margin: 0;
  font-size: clamp(1.8rem, 1.4rem + 1.2vw, 2.4rem);
}
.jm-home__head::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--h-rose) 0 48px, var(--h-line) 48px);
  align-self: center;
}
.jm-home__all {
  order: 2;
  font-size: .8125rem;
  white-space: nowrap;
  color: var(--h-green);
}

/* ---------- Guía práctica ------------------------------------------------ */
/* Cabecera con la franja de plantas y la mariposa del sitio ASP */
.jm-home__head--guide {
  position: relative;
  min-height: 3.1rem;
  padding-bottom: .35rem;
  border-bottom: 2px solid #c9d3bd;
  background: url("../images/guia_hojas.png") no-repeat right bottom / 530px 31px;
  background-image: image-set(url("../images/guia_hojas.png") 1x, url("../images/guia_hojas@2x.png") 2x);
}
.jm-home__head--guide::after { display: none; }
@media (max-width: 767.98px) {
  .jm-home__head--guide { background-size: 72% auto; }
}

.jm-guide {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 0;
  background: #fff;
  border: 1px solid var(--h-line);
  border-radius: var(--h-radius);
  overflow: hidden;
}
.jm-guide__item {
  display: grid;
  grid-template-columns: 3.25rem 1fr;
  gap: 1rem;
  align-items: start;
  padding: 1.35rem 1.4rem;
  background: #fff;
  box-shadow: 1px 0 0 var(--h-line), 0 1px 0 var(--h-line);
  transition: background .2s;
}
.jm-guide__item:hover { background: var(--h-stone-2); }
.jm-guide__icon {
  display: grid;
  place-items: center;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 50%;
  background: var(--h-stone);
  color: var(--h-green);
  transition: background .2s, color .2s;
}
.jm-guide__item:hover .jm-guide__icon { background: var(--h-green); color: #fff; }
.jm-ico { width: 1.6rem; height: 1.6rem; }
.jm-guide__title {
  margin: .1rem 0 .4rem;
  font-size: 1.55rem;
  line-height: 1.15;
}
.jm-guide__title a { color: var(--h-green); text-decoration: none; }
.jm-guide__title a:hover { color: var(--h-rose); }
.jm-guide__links {
  display: flex;
  flex-wrap: wrap;
  gap: .15rem 0;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: .875rem;
  line-height: 1.6;
}
.jm-guide__links li:not(:last-child)::after {
  content: "·";
  margin: 0 .45rem;
  color: var(--h-muted);
}
.jm-guide__links a { color: var(--h-ink); text-decoration: none; }
.jm-guide__links a:hover { color: var(--h-green); text-decoration: underline; }

/* ---------- Columna única (desde la 2.0.0 el lateral son módulos aparte) ---------- */
.jm-home__cols { display: grid; gap: 2.5rem; align-items: start; }
.jm-home__main { display: grid; gap: 3rem; min-width: 0; }

.jm-tag {
  display: inline-block;
  padding: .12rem .6rem;
  border-radius: 999px;
  background: var(--h-rose-pale);
  color: var(--h-rose);
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .02em;
  line-height: 1.5;
  vertical-align: middle;
}
.jm-eyebrow {
  margin: 0 0 .75rem;
  color: var(--h-rose);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.jm-more {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  color: var(--h-green);
  font-size: .875rem;
  font-weight: 500;
  text-decoration: none;
}
.jm-more::after { content: "→"; transition: transform .2s; }
.jm-more:hover { color: var(--h-rose); }
.jm-more:hover::after { transform: translateX(3px); }

/* Documentos recientes */
.jm-docs { display: grid; gap: 1rem; }
.jm-doc {
  display: grid;
  grid-template-columns: 9.5rem 1fr;
  gap: 1.25rem;
  align-items: start;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--h-line);
}
.jm-doc:last-child { border-bottom: 0; }
.jm-doc__img {
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
  border-radius: var(--h-radius);
  overflow: hidden;
  background: var(--h-stone);
  color: var(--h-green);
}
.jm-doc__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.jm-doc:hover .jm-doc__img img { transform: scale(1.04); }
.jm-doc__img .jm-ico { width: 2.4rem; height: 2.4rem; opacity: .7; }
.jm-doc__title { margin: .35rem 0 .3rem; font-size: 1.45rem; line-height: 1.2; }
.jm-doc__title a { color: var(--h-green); text-decoration: none; }
.jm-doc__title a:hover { color: var(--h-rose); }
.jm-doc p { margin: 0; font-size: .9rem; color: var(--h-muted); }
@media (max-width: 575.98px) {
  .jm-doc { grid-template-columns: 6rem 1fr; gap: .9rem; }
  .jm-doc p { display: none; }
}

/* Foros */
.jm-topics { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--h-line); }
.jm-topic {
  display: grid;
  gap: .2rem;
  padding: .8rem 0;
  border-bottom: 1px solid var(--h-line);
}
.jm-topic__subject { color: var(--h-ink); font-weight: 500; text-decoration: none; }
.jm-topic__subject:hover { color: var(--h-green); text-decoration: underline; }
.jm-topic__meta { font-size: .8rem; color: var(--h-muted); }
.jm-topic__meta .jm-tag { margin-right: .35rem; }

/* Cifras */
.jm-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  margin: 0;
  padding: 1.75rem 1rem;
  list-style: none;
  border-radius: var(--h-radius);
  background: var(--h-green);
  color: var(--jm-ivory, #f6f5f1);
  text-align: center;
}
.jm-stats li + li { border-left: 1px solid rgba(246, 245, 241, .18); }
.jm-stats a, .jm-stats a:hover, .jm-stats a:focus { color: inherit; text-decoration: none; display: block; }
.jm-stats a:hover strong { color: #f0d6db; }
.jm-stats strong {
  display: block;
  font-family: var(--h-serif);
  font-size: clamp(2rem, 1.6rem + 1.4vw, 2.8rem);
  font-weight: 500;
  line-height: 1.1;
  transition: color .2s;
}
.jm-stats span { font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; opacity: .85; }
@media (max-width: 575.98px) {
  .jm-stats li + li { border-left: 0; }
  .jm-stats li { padding: .5rem 0; }
}

@media (prefers-reduced-motion: reduce) {
  .jm-home * { transition: none !important; }
}
