/* css/home2.css (11.10.2026) — etusivu v2. Ladataan vain kun body.fm-home2 (index.php).
   Tavoite (impeccable critique 25/40): lyhyempi mobiilissa, yksi selkeä toiminto per lohko,
   44 px kosketuskohteet. Otsikot, linkit ja teksti ennallaan (SEO). */

/* Yläotsikot (KARTTA / KATEGORIAT / POIMINTOJA) toistivat H2:n: pois */
.fm-home2 .section-header .eyebrow,
.fm-home2 .hev .eyebrow { display: none; }

/* Juuri nyt + kuntarivi: kosketuskohteet 44 px */
.fm-home2 .fm-now-list { row-gap: 0; }
.fm-home2 .fm-now-list a { display: inline-block; padding-block: 12px; line-height: 1.25; }  /* ei flex: se söi välilyönnin <strong>-luvun jälkeen */
.fm-home2 .fm-cityline { padding: 2px 0; }
.fm-home2 .fm-cityline .container-fluid-xl { align-items: center; gap: 0 2px; }
.fm-home2 .fm-cityline-title { margin-right: 10px; }
.fm-home2 .fm-cityline a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 8px; border-radius: 8px; touch-action: manipulation; }
@media (max-width: 640px) {
  .fm-home2 .fm-cityline .container-fluid-xl {
    flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-inline: 16px;
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 32px), transparent);
            mask-image: linear-gradient(90deg, #000 calc(100% - 32px), transparent);
  }
  .fm-home2 .fm-cityline .container-fluid-xl::-webkit-scrollbar { display: none; }
  .fm-home2 .fm-cityline a, .fm-home2 .fm-cityline-title { flex: none; white-space: nowrap; }
}

/* Karttanauha: korvaa 600 px fasadin (iso luku + tyhjä tumma pinta). Desktop: teksti vasemmalla,
   painike oikealla samalla rivillä; mobiili: allekkain, painike täysleveä. */
.fm-mapstrip { background: var(--color-forest, #1d3a2a); color: #eef3ef; }
.fm-mapstrip-in > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 40px; align-items: center; padding-block: 36px; }
.fm-mapstrip h2 { grid-column: 1; color: #fff; margin: 0 0 6px; text-wrap: balance; }
.fm-mapstrip p { grid-column: 1; margin: 0; max-width: 62ch; color: rgba(238, 243, 239, .86); line-height: 1.55; }
.fm-mapstrip-btn {
  grid-column: 2; grid-row: 1 / span 2;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 26px;
  border-radius: 999px; background: #fff; color: var(--color-forest, #1d3a2a); font-weight: 700; text-decoration: none; white-space: nowrap;
  touch-action: manipulation; transition: transform 160ms cubic-bezier(.23, 1, .32, 1);
}
.fm-mapstrip-btn:hover { text-decoration: none; color: var(--color-forest, #1d3a2a); }
.fm-mapstrip-btn:active { transform: scale(.97); }
.fm-mapstrip-btn:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
@media (max-width: 640px) {
  .fm-mapstrip-in { padding-inline: 16px; }
  .fm-mapstrip-in > div { grid-template-columns: minmax(0, 1fr); padding-block: 28px; }
  .fm-mapstrip-btn { grid-column: 1; grid-row: auto; margin-top: 16px; }
}

/* Kategoriat mobiilissa: kompaktit 2-sarakelaatat (kaikki H3:t ja linkit säilyvät) */
@media (max-width: 640px) {
  .fm-home2 .category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .fm-home2 .cat-card.cat-card-img { min-height: 84px; padding: 12px; border-radius: 12px; display: flex; flex-direction: column; justify-content: flex-end; }
  .fm-home2 .category-grid--clipped .cat-card--extra { display: none; }  /* flex yllä ohittaisi rajauksen */
  .fm-home2 .cat-card .cat-icon { display: none; }
  .fm-home2 .cat-card h3 { font-size: .95rem; line-height: 1.2; margin: 0 0 2px; overflow-wrap: anywhere; }
  .fm-home2 .cat-card .cat-count { font-size: .78rem; }
  .fm-home2 .fm-catgrid-toggle { min-height: 44px; }
}

/* Kauden poiminnat: 6 kiinteää kuukaudessa, mobiilissa vaakaselaus */
.fm-home2 .featured-grid--v2 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.fm-home2 .featured-grid--v2 .featured-card-desc { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.fm-home2 .featured-grid--v2 .featured-card-image { aspect-ratio: 16 / 9; overflow: hidden; }
.fm-home2 .featured-grid--v2 .featured-card-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fm-home2 .featured-grid--v2 .featured-card-body { padding: 14px 16px 16px; }
.fm-home2 .featured-grid--v2 .featured-card-meta { margin-bottom: 6px; }
@media (max-width: 900px) { .fm-home2 .featured-grid--v2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .fm-home2 .fm-picks { overflow-x: clip; }
  .fm-home2 .fm-picks > .container-fluid-xl { padding-inline: 16px; }
  .fm-home2 .featured-grid--v2 {
    display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
    margin: 0 -16px; padding: 2px 16px; scroll-padding-inline: 16px;
  }
  .fm-home2 .featured-grid--v2::-webkit-scrollbar { display: none; }
  .fm-home2 .featured-grid--v2 .featured-card { flex: 0 0 78%; scroll-snap-align: start; }
}
@media (hover: none) { .fm-home2 .featured-grid--v2 .featured-card:hover { transform: none; box-shadow: none; } }
@media (prefers-reduced-motion: reduce) { .fm-mapstrip-btn { transition: none; } }

/* Peräkkäiset valkoiset osiot (kategoriat -> kauden kohteet): sisennykset 64+64 px näyttivät
   tyhjältä mainospaikalta. Mobiilissa osiot 44 px, valkoisen perässä valkoinen ilman yläsisennystä. */
.fm-home2 #main-content > .section:not(.hev) + .section:not(.hev) { padding-top: 0; }
@media (max-width: 640px) { .fm-home2 #main-content > .section { padding-block: 44px; } .fm-home2 #main-content > .section:not(.hev) + .section:not(.hev) { padding-top: 0; } }

/* Otsikot vasemmalle kaikissa osioissa (ennen osa keskitetty, osa vasemmalla) */
.fm-home2 .section-header { text-align: left; margin-left: 0; margin-right: 0; max-width: none; margin-bottom: 24px; }
.fm-home2 .section-header p { max-width: 62ch; margin-left: 0; }

/* Kausilohko: kausinauhan linkit siruina korttien yllä */
.fm-kausi-chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: -8px 0 20px; padding: 0; }
.fm-kausi-chips a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border: 1px solid var(--color-border-strong, #cfd6d1);
  border-radius: 999px; background: var(--color-bg, #fff); color: var(--color-text, #1f2937); font-weight: 600; font-size: .93rem;
  text-decoration: none; touch-action: manipulation; transition: border-color 150ms ease, transform 140ms cubic-bezier(.23, 1, .32, 1);
}
.fm-kausi-chips a:active { transform: scale(.97); }
.fm-kausi-chips a:focus-visible { outline: 2px solid var(--color-forest, #1d3a2a); outline-offset: 2px; }
@media (hover: hover) { .fm-kausi-chips a:hover { border-color: var(--color-forest, #1d3a2a); color: var(--color-forest, #1d3a2a); text-decoration: none; } }
@media (max-width: 640px) {
  .fm-kausi-chips {
    flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: -8px -16px 16px; padding: 2px 16px;
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 32px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 32px), transparent);
  }
  .fm-kausi-chips::-webkit-scrollbar { display: none; }
  .fm-kausi-chips li { flex: none; }
}

/* Hero mobiilissa matalampi: lyhyt ingressi + vähemmän tyhjää, Juuri nyt nousee ensimmäiseen ruutuun */
@media (max-width: 640px) {
  .fm-home2 .hero.hero-home { min-height: 0; padding: 40px 0 32px; }
  .fm-home2 .hero.hero-home .lead { margin-bottom: 20px; }
}

/* Juuri nyt mobiilissa: lyhyet tekstit (now-band 'short') samassa virrassa otsikon kanssa,
   kaikki näkyvissä ilman vieritystä tai automaattista liikettä (Jere 11.10.: ei liikkuvaa nauhaa) */
@media (max-width: 640px) {
  .fm-home2 .fm-now .container-fluid-xl { display: flex; flex-wrap: wrap; align-items: center; column-gap: 16px; padding-inline: 16px; }
  .fm-home2 .fm-now-title { flex: none; }
  .fm-home2 .fm-now-list { display: contents; }
  .fm-home2 .fm-now-list li { white-space: nowrap; }
  .fm-home2 .fm-now .container-fluid-xl { row-gap: 0; }
  .fm-home2 .fm-now-list a { padding-block: 8px; }   /* 2 riviä tiiviisti, kohde ~38 px (WCAG 2.5.8 min 24) */
}

/* Reitti-nappi mobiilissa: pelkkä ikoni kun reitti on tyhjä (ei peitä kortteja). Kun reitillä on
   kohteita, teksti "Reitti" + määrä näkyvät kuten ennen (31.8. päätös: nappi on paluureitti). */
@media (max-width: 640px) {
  .fm-home2 .fm-route-toggle:has(.fm-route-count[style*="none"]) { width: 52px; min-width: 52px; padding: 0; justify-content: center; gap: 0; }
  .fm-home2 .fm-route-toggle:has(.fm-route-count[style*="none"])::after { content: none; }
}

/* Juuri nyt: täydet tekstit desktopilla, lyhyet mobiilissa (Jere 11.10.) */
.fm-home2 .fm-now-s { display: none; }
@media (max-width: 640px) { .fm-home2 .fm-now-l { display: none; } .fm-home2 .fm-now-s { display: inline; } }
