/* components__HomePage */
/* ---------- 1 · Hero ---------- */

  /* Hero mieszka w HomeHero.astro. Tu zostają tylko style listy faktów,
     której używa też sekcja „O nas" niżej. */

  /* Fakty jako lista definicji: adres i godziny to najkonkretniejsza rzecz na stronie,
     więc dostają strukturę, a nie szary dopisek pod przyciskami. */
  .hero-facts:not(.mc-s) {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2xs) var(--space-l);
    margin: 0;
    padding-top: var(--space-m);
    border-top: 1px solid var(--line);
  }

  .hero-facts:not(.mc-s) > div:not(.mc-s) {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
  }

  .hero-facts:not(.mc-s) dt:not(.mc-s) {
    color: var(--muted);
    font-size: var(--type-micro);
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
  }

  .hero-facts:not(.mc-s) dd:not(.mc-s) {
    margin: 0;
    font-size: var(--type-meta);
    font-weight: 600;
  }

  /* ---------- 3 · Pomoc ---------- */

  .home-help-heading:not(.mc-s) {
    max-width: 46rem;
    margin-bottom: var(--space-l);
  }

  .home-help-grid:not(.mc-s) {
    display: grid;
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
    gap: var(--space-m);
    align-items: stretch;
  }

  .home-help-panel:not(.mc-s) {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: clamp(1.25rem, 3vw, 2rem);
    border: 1px solid var(--card-line);
    border-radius: var(--radius);
    background: var(--paper);
  }

  .home-help-consult:not(.mc-s) {
    background: var(--paper-light);
  }

  .home-help-panel-heading:not(.mc-s) h3:not(.mc-s) {
    margin: 0.8rem 0 0.4rem;
    font-size: clamp(1.35rem, 2.5vw, 1.9rem);
  }

  .home-help-panel-heading:not(.mc-s) p:not(.mc-s) {
    margin: 0;
    color: var(--card-muted, var(--muted));
    font-size: var(--type-meta);
    line-height: 1.55;
  }

  .home-help-links:not(.mc-s) {
    display: grid;
    gap: 0;
    margin: var(--space-m) 0;
    padding: 0;
    list-style: none;
  }

  .home-help-links:not(.mc-s) li:not(.mc-s) {
    border-bottom: 1px solid var(--line);
  }

  .home-help-links:not(.mc-s) a:not(.mc-s) {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.75rem 0;
    color: var(--ink);
    font-weight: 700;
    text-decoration: none;
  }

  .home-help-links:not(.mc-s) a:hover:not(.mc-s),
  .home-help-links:not(.mc-s) a:focus-visible:not(.mc-s) {
    color: var(--teal);
  }

  .home-help-links:not(.mc-s) a:not(.mc-s) span:not(.mc-s) {
    color: var(--teal);
  }

  .home-help-panel:not(.mc-s) > .card-link:not(.mc-s) {
    margin-top: auto;
  }

  .home-specialists:not(.mc-s) {
    display: grid;
    gap: 0;
    margin: var(--space-m) 0;
  }

  .home-specialist:not(.mc-s) {
    display: grid;
    grid-template-columns: 3.6rem minmax(0, 1fr) auto;
    gap: 0.8rem;
    align-items: center;
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--line);
  }

  .home-specialist-photo:not(.mc-s) {
    overflow: hidden;
    width: 3.6rem;
    height: 3.6rem;
    border-radius: 50%;
    background: var(--paper);
  }

  .home-specialist-photo:not(.mc-s) img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
  }

  .home-specialist-body:not(.mc-s) {
    min-width: 0;
  }

  .home-specialist-body:not(.mc-s) h4:not(.mc-s) {
    margin: 0 0 0.15rem;
    font-size: 1rem;
  }

  .home-specialist-body:not(.mc-s) h4:not(.mc-s) a:not(.mc-s) {
    color: var(--ink);
    text-decoration: none;
  }

  .home-specialist-body:not(.mc-s) h4:not(.mc-s) a:hover:not(.mc-s) {
    color: var(--teal);
  }

  .home-specialist-langs:not(.mc-s),
  .home-specialist-role:not(.mc-s) {
    margin: 0;
    font-size: 0.82rem;
    line-height: 1.35;
  }

  .home-specialist-langs:not(.mc-s) {
    color: var(--teal);
    font-weight: 700;
  }

  .home-specialist-role:not(.mc-s) {
    color: var(--muted);
  }

  .home-specialist-action:not(.mc-s) {
    color: var(--ink);
    font-size: 0.82rem;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
  }

  .home-specialist-action:hover:not(.mc-s),
  .home-specialist-action:focus-visible:not(.mc-s) {
    color: var(--teal);
  }


  /* ---------- 2 · Najbliższe wydarzenie ---------- */

  /* Jedyne miejsce w portalu z wyrównaniem do prawej. Mocny akcent
     kompozycyjny raz na stronie — dalej wszystko wraca do lewej krawędzi. */
  /* Nagłówek na tej samej osi co treść pod nim. Wcześniej tekst był wyrównany
     do prawej, a przycisk stał po lewej — sekcja miała trzy różne lewe krawędzie
     (przycisk, zdjęcie, tekst) i przez to nie miała osi. */
  .nearest-heading:not(.mc-s) h2:not(.mc-s) {
    font-size: clamp(2rem, 5vw, 3.6rem);
    line-height: 1.05;
  }

  .nearest-pills:not(.mc-s) {
    margin-bottom: var(--space-xs);
  }

  .nearest-next:not(.mc-s) {
    margin-top: var(--space-xl);
    padding-top: var(--space-m);
    border-top: 1px solid color-mix(in srgb, var(--paper-light) 22%, transparent);
  }

  .nearest-next-title:not(.mc-s) {
    margin-bottom: var(--space-s);
    color: var(--yellow);
    font-size: var(--type-micro);
    font-weight: 800;
    letter-spacing: 0.13em;
    text-transform: uppercase;
  }

  .nearest-rows:not(.mc-s) {
    display: grid;
    gap: var(--space-2xs);
  }

  .nearest-all:not(.mc-s) {
    margin: var(--space-l) 0 0;
  }

  .nearest-event:not(.mc-s) {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: clamp(1.5rem, 4vw, 3rem);
    align-items: start;
  }

  .nearest-media:not(.mc-s) img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: var(--radius);
  }

  /* Data celowo nie jest żółta: w tej sekcji żółty należy do przycisku akcji.
     Dwa użycia tego samego akcentu w różnych rolach osłabiały oba. */
  .nearest-date:not(.mc-s) {
    margin-bottom: var(--space-2xs);
    color: color-mix(in srgb, var(--paper-light) 78%, transparent);
    font-size: var(--type-meta);
    font-weight: 800;
    letter-spacing: 0.04em;
  }

  .nearest-title:not(.mc-s) {
    margin-bottom: var(--space-s);
    font-size: clamp(1.6rem, 3vw, 2.35rem);
  }

  .nearest-title:not(.mc-s) a:not(.mc-s) {
    color: var(--white);
    text-decoration: none;
  }

  .nearest-title:not(.mc-s) a:hover:not(.mc-s) {
    color: var(--yellow);
  }

  .nearest-lead:not(.mc-s) {
    max-width: var(--measure);
    margin-bottom: var(--space-m);
  }

  /* Sześć pól obowiązkowych wydarzenia jako tabela faktów, nie jako rząd pigułek */
  .event-facts:not(.mc-s) {
    display: grid;
    /* 8.5rem, nie 13rem: pięć faktów układało się w dwie kolumny i „Zapisy"
       zostawały samotnym wierszem na dole, co czytało się jak błąd składu. */
    grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr));
    gap: var(--space-xs) var(--space-m);
    margin: 0 0 var(--space-l);
    padding-top: var(--space-s);
    border-top: 1px solid color-mix(in srgb, var(--paper-light) 18%, transparent);
  }

  .event-facts:not(.mc-s) > div:not(.mc-s) {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
  }

  .event-facts:not(.mc-s) dt:not(.mc-s) {
    color: color-mix(in srgb, var(--paper-light) 62%, transparent);
    font-size: var(--type-micro);
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
  }

  .event-facts:not(.mc-s) dd:not(.mc-s) {
    margin: 0;
    color: var(--paper-light);
    font-size: var(--type-meta);
    font-weight: 600;
  }

  /* ---------- 7 · Historie ---------- */

  /* Jeden rytm między panelem wyróżnionym i kartami, także po złożeniu
     do jednej kolumny. Sam gap wewnętrznej siatki nie oddzielał obu rzędów. */
  .stories-layout:not(.mc-s) {
    display: grid;
    gap: var(--space-m);
  }

  .stories-secondary:not(.mc-s) {
    gap: var(--space-m);
  }

  .card-lead:not(.mc-s) {
    margin-bottom: 0;
    color: var(--muted);
    font-size: 0.95rem;
  }

  /* ---------- 8 · O nas ---------- */

  .about-grid:not(.mc-s) {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(2rem, 5vw, 4rem);
    align-items: start;
  }

  .about-grid:not(.mc-s) .hero-facts:not(.mc-s) {
    margin-bottom: var(--space-l);
  }

  /* ---------- Załamanie ---------- */

  @media (max-width: 900px) {
    .nearest-event:not(.mc-s),
    .about-grid:not(.mc-s),
    .home-help-grid:not(.mc-s) {
      grid-template-columns: minmax(0, 1fr);
    }

    /* Na telefonie termin, tytuł i język wyprzedzają zdjęcie. Zdjęcie zachęca,
       ale nie odpowiada na pytanie „czy to jest dla mnie i kiedy". */
    .nearest-media:not(.mc-s) {
      order: 2;
    }
  }

  @media (max-width: 560px) {
    .home-specialist:not(.mc-s) {
      grid-template-columns: 3rem minmax(0, 1fr);
    }

    .home-specialist-photo:not(.mc-s) {
      width: 3rem;
      height: 3rem;
    }

    .home-specialist-action:not(.mc-s) {
      grid-column: 2;
      justify-self: start;
      margin-top: 0.25rem;
    }
  }

  /* ---------- Zdjęcie na pełną szerokość strony ---------- */

  .home-photo-strip:not(.mc-s) {
    position: relative;
    width: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background: var(--paper);
    line-height: 0;
    border-top: 1px solid var(--line);
  }

  .home-photo-strip__figure:not(.mc-s) {
    margin: 0;
    padding: 0;
    width: 100%;
    height: clamp(280px, 38vw, 560px);
    overflow: hidden;
    position: relative;
  }

  .home-photo-strip__figure:not(.mc-s) img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 40%;
    display: block;
  }

  /* Na małym ekranie pokazujemy cały szeroki kadr zamiast pionowego
     wycinka, który usuwał osoby stojące po bokach stołu. */
  @media (max-width: 680px) {
    .home-photo-strip__figure:not(.mc-s) {
      height: auto;
      aspect-ratio: 16 / 9;
    }
  }

  /* Na szerokich ekranach pas nie może być tak płaski, by uciąć twarze. */
  @media (min-width: 1920px) {
    .home-photo-strip__figure:not(.mc-s) {
      height: auto;
      aspect-ratio: 24 / 7;
    }
  }
