/* Section layout shared by the home page (templates/home.html) and the
   English page (templates/page-en.html). Enqueued only on those two. */

/* <main> wraps the page content, so give its children the same flow
   spacing WordPress applies to direct children of .wp-site-blocks
   (zero-specificity :where, so component margins like .pod_text win). */
:where(.ea-home) > * {
  margin-block-start: 0;
  margin-block-end: 0;
}

:where(.ea-home) > * + * {
  margin-block-start: var(--wp--style--block-gap, 1.2rem);
}

.pod_text {
  display: block;
  margin: 5px auto 0;
  width: fit-content;
  max-width: 100%;
  box-sizing: border-box;
  padding-inline: 10px;

  color: #242423;
  font-weight: 800;
}

.ea-home > .header {
  background-color: #cfdbd5e3;
}

.podtitulok {
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin-inline: auto;
  padding-inline: 50px;
  max-width: 800px;

  background-color: #cfdbd582;
  transition: background-color 4s cubic-bezier(0.22, 1, 0.36, 1);
}

.dole {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 10px;
}

.podtitulok:hover {
  background-color: #cae2e7;
  transition-duration: 2s;
}

@media (max-width: 920px) {
  .podtitulok {
    padding-inline: 16px;
    margin-inline: 12px;
  }
}


a {
  transition: 0.5s;
}

a:hover {
  background-color: #dcf3fc;
}

/* Keep flex children from growing past the column on narrow screens */
.podtitulok > * {
  min-width: 0;
}

.podtitulok h2[id],
.podtitulok > .growni {
  scroll-margin-top: 20px;
}


/* ------------------------------------------------------------------
   Spacing: one scale for every section on both pages.
   --ea-section  between sections, and hero → first section
   --ea-pad      inside a section, top and bottom
   --ea-flow     between paragraphs, lists and other content
   --ea-head     under a section heading (h2)
   --ea-sub      before a sub-block (calendar, sign-up form)
   ------------------------------------------------------------------ */
.ea-home {
  --ea-section: clamp(48px, 7vw, 88px);
  --ea-pad: clamp(32px, 5vw, 56px);
  --ea-flow: 1.1rem;
  --ea-head: 1.75rem;
  --ea-sub: 3rem;
}

.ea-home > .header {
  margin-block-start: var(--ea-section);
}

/* The sections' flex column doesn't collapse margins, so drive the
   rhythm with gap and zero the children's own margins. */
.podtitulok {
  gap: var(--ea-flow);
  padding-block: var(--ea-pad);
}

.podtitulok > * {
  margin-block: 0;
}

.podtitulok > h2 {
  margin-block-end: calc(var(--ea-head) - var(--ea-flow));
}

.podtitulok > .kalendar,
.podtitulok > .growni,
.podtitulok > .prihlaska {
  margin-block-start: calc(var(--ea-sub) - var(--ea-flow));
}

.podtitulok > .kalendar > h3,
.podtitulok > .growni > h3,
.podtitulok > .prihlaska > h3 {
  margin: 0 0 12px;
}

.podtitulok > .prihlaska > p {
  margin: 0 0 16px;
}

/* Empty spacer from the old layout; the footer has its own padding. */
.ea-home > .footer {
  display: none;
}
