/* Desktop layout from the preview approved on 24. 10. 2026.
   Only min-width media queries (1024 px and 1280 px), so the phone layout is untouched.
   Portability: every selector starts with .mh- (no IDs, no bare elements) and every value comes from
   tokens.css (var(--mh-*) only, no raw colours). Guarded by tests/unit/desktop-css.test.cjs. */

@media (min-width: 1024px) {
  /* ---- hero: text left, the Do Not Disturb door right ---- */
  .mh-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
    column-gap: var(--mh-space-12);
    align-items: center;
    max-width: 1200px;
    padding: calc(var(--mh-space-12) * 1.5) var(--mh-space-4) var(--mh-space-12);
    text-align: left;
  }

  .mh-hero > * {
    grid-column: 1;
  }

  .mh-hero .mh-sign {
    text-align: left;
  }

  .mh-hero .mh-sign__word {
    font-size: 3.4rem;
  }

  .mh-hero__kicker {
    font-size: 0.9375rem;
  }

  .mh-hero__title {
    font-size: 3rem;
    margin-bottom: var(--mh-space-4);
  }

  .mh-hero__sub {
    font-size: 1.1875rem;
  }

  .mh-hero__slogan {
    font-size: 1.375rem;
  }

  .mh-hero__ctas {
    grid-template-columns: max-content max-content;
    justify-content: start;
  }

  .mh-door {
    grid-column: 2;
    grid-row: 1 / span 6;
    width: min(100%, 360px);
    margin: 0 auto;
  }

  /* ---- home page: reading column left, the quiz as a sticky side panel right.
     Nothing else lives in the right column, so nothing can scroll over the quiz.
     The wrapper holds the reading column and the quiz, so the sticky quiz stops
     where the wrapper ends, right above the reviews. ---- */
  .mh-home-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 440px;
    grid-template-areas:
      "rating  quiz"
      "serious quiz"
      "contact quiz"
      "steps   quiz"
      "why     quiz";
    column-gap: var(--mh-space-12);
    row-gap: var(--mh-space-8);
    align-items: start;
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--mh-space-4) 0 0;
  }

  .mh-home-grid > .mh-section,
  .mh-home-grid ~ .mh-section {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 0 var(--mh-space-4);
  }

  /* card sections (their own background and border): inset to the column edge, keep inner padding */
  .mh-home-grid > .mh-rating,
  .mh-home-grid > .mh-serious,
  .mh-home-grid > .mh-contact {
    width: auto;
    margin: 0 var(--mh-space-4);
    padding: var(--mh-space-8);
  }

  .mh-home-grid > .mh-rating { grid-area: rating; }
  .mh-home-grid > .mh-serious { grid-area: serious; }
  .mh-home-grid > .mh-contact { grid-area: contact; }
  .mh-home-grid > .mh-steps { grid-area: steps; }
  .mh-home-grid > .mh-why { grid-area: why; }
  .mh-home-grid ~ .mh-reviews { padding-top: var(--mh-space-16); padding-bottom: var(--mh-space-12); }
  .mh-home-grid ~ .mh-suite { padding-top: var(--mh-space-12); }

  /* the suite from "Jestli ti to stačit nebude" down to "Spočítej si, kolik našetříš": centred */
  .mh-suite > .mh-suite__text:not(:has(.mh-fact)),
  .mh-suite > .mh-suite__risk,
  .mh-suite > .mh-cta-row,
  .mh-suite > .mh-soon {
    max-width: 52rem;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
  }

  .mh-home-grid > .mh-quiz {
    grid-area: quiz;
    position: sticky;
    top: var(--mh-space-6);
    z-index: 3;
    width: auto;
    margin: 0 var(--mh-space-4) 0 0;
    padding: var(--mh-space-6);
    max-height: calc(100vh - 2 * var(--mh-space-6));
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  /* reviews: three cards per row, equal height per row, the "Name · Google 5/5" line pinned to the bottom */
  .mh-reviews {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--mh-space-4);
    align-items: stretch;
  }

  .mh-reviews > :not(.mh-review) {
    grid-column: 1 / -1;
  }

  .mh-reviews > .mh-reviews__note {
    margin-bottom: var(--mh-space-2);
  }

  /* "Všech 25 recenzí" fills the free cell next to the last review, level with its name line
     (5 reviews in rows of 3 leave that cell free; with a full last row it simply wraps below) */
  .mh-reviews > .mh-reviews__more {
    grid-column: auto / span 1;
    align-self: end;
    align-items: flex-end;
    margin: 0;
    padding-bottom: calc(var(--mh-space-4) - 12px);
  }

  .mh-review {
    display: flex;
    flex-direction: column;
    margin: 0;
  }

  .mh-review__who {
    margin-top: auto;
    padding-top: var(--mh-space-3);
  }

  /* pension facts: two per row */
  .mh-suite__facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  /* every source pill sits at the bottom right of its card, so pills in a row line up */
  .mh-suite__fact {
    display: flex;
    flex-direction: column;
  }

  .mh-suite__fact > .mh-source {
    margin-top: auto;
    padding-top: var(--mh-space-3);
  }

  .mh-suite > :not(.mh-suite__facts) {
    max-width: 52rem;
  }

  /* ---- calculator pages: inputs left, result right, contact form beside its intro ---- */
  .mh-calc-head,
  .mh-calc,
  .mh-calc ~ .mh-contact {
    max-width: 1200px;
    padding-left: var(--mh-space-8);
    padding-right: var(--mh-space-8);
  }

  .mh-calc-head__title {
    font-size: 2.75rem;
  }

  /* two newspaper columns: inputs first, then a forced break before whichever result is showing
     (the prompt and the three results are never visible together, so exactly one break applies) */
  .mh-calc__body {
    display: block;
    columns: 2;
    column-gap: var(--mh-space-12);
  }

  .mh-calc__body > * {
    margin: 0 0 var(--mh-space-6);
    break-inside: avoid;
  }

  .mh-calc__body > .mh-calc__prompt,
  .mh-calc__body > .mh-calc__result,
  .mh-calc__body > [data-mh-calc-growth-wrap] {
    break-before: column;
  }

  .mh-calc ~ .mh-contact {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    column-gap: var(--mh-space-12);
    align-items: start;
  }

  .mh-calc ~ .mh-contact > * {
    grid-column: 1;
  }

  .mh-calc ~ .mh-contact > .mh-lead,
  .mh-calc ~ .mh-contact > .mh-thanks {
    grid-column: 2;
    grid-row: 1 / span 4;
  }

  /* ---- shared: crossroads and footer ---- */
  .mh-crossroads {
    max-width: 1200px;
    padding-left: var(--mh-space-4);
    padding-right: var(--mh-space-4);
  }

  .mh-footer {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    column-gap: var(--mh-space-12);
    max-width: 1200px;
    padding-left: var(--mh-space-4);
    padding-right: var(--mh-space-4);
  }

  .mh-footer > * {
    grid-column: 1 / -1;
  }

  .mh-footer > .mh-footer__identity {
    grid-column: 1;
  }

  /* the reception desk (e-mail / call) sits beside the identity block */
  .mh-footer > .mh-desk {
    grid-column: 2;
    grid-row: span 1;
    align-self: start;
  }

  .mh-footer__legal {
    justify-content: center;
    margin-top: var(--mh-space-8);
  }

  .mh-footer__signature {
    font-size: 2.75rem;
  }
}

@media (min-width: 1280px) {
  .mh-hero__title {
    font-size: 3.4rem;
  }
}
