/* =========================================================
   ZŠ SRDEČNÁ - GRAFICKÉ NASTAVENÍ
   Barvy byly odečteny z podkladů původního webu.
   ========================================================= */

:root {
  --page-blue: #81b7e1;
  --panel-blue: #dbedf6;
  --panel-light: #ecf4f9;
  --heading-blue: #5d9ce5;
  --border-blue: #1e61aa;
  --shadow-blue: #2a64b4;
  --text: #151515;
  --white: #ffffff;
  --focus: #f54291;
  --content-width: 1160px;
  --panel-radius: 14px;

  /* VELIKOSTI NADPISŮ - běžné obrazovky */
  --heading-page-size: 26px;     /* název stránky v horním světlém rámečku */
  --heading-section-size: 28px;  /* nadpisy uvnitř obsahových rámečků */
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--page-blue);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 18px;
  line-height: 1.62;
}

a {
  color: inherit;
}

a:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
}

/* =========================================================
   HLAVIČKA A MENU
   ========================================================= */

.site-header {
  padding: 22px 22px 0;
}

.header-inner {
  --header-logo-width: 250px;
  position: relative;
  display: flex;
  align-items: center;
  gap: 34px;
  width: min(100%, var(--content-width));
  min-height: 132px;
  margin: 0 auto;
  padding: 16px 24px 16px calc(var(--header-logo-width) + 34px);
  background: var(--panel-blue);
  border: 1px solid var(--border-blue);
  border-radius: var(--panel-radius);
  box-shadow: 8px 8px 0 var(--shadow-blue);
}

.logo-link {
  position: absolute;
  inset: 0 auto 0 0;
  display: block;
  width: var(--header-logo-width);
  overflow: hidden;
  background: var(--white);
  border-radius: calc(var(--panel-radius) - 1px) 0 0 calc(var(--panel-radius) - 1px);
}

.site-logo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.desktop-nav {
  display: flex;
  flex: 1;
  align-items: stretch;
  justify-content: flex-end;
  gap: 4px;
}

.desktop-nav a,
.mobile-menu nav a {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 9px;
  color: var(--border-blue);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  border-radius: 8px;
}

.desktop-nav a:hover,
.mobile-menu nav a:hover {
  background: var(--panel-light);
}

.desktop-nav a[aria-current="page"],
.mobile-menu nav a[aria-current="page"] {
  color: var(--white);
  background: var(--border-blue);
}

.mobile-menu {
  display: none;
}

/* =========================================================
   HLAVNÍ OBSAH A RÁMEČKY
   ========================================================= */

.page-main {
  display: grid;
  gap: 64px;
  width: min(calc(100% - 44px), var(--content-width));
  margin: 66px auto 80px;
}

.content-card {
  padding: clamp(32px, 5vw, 64px);
  background: var(--panel-blue);
  border: 1px solid var(--border-blue);
  border-radius: var(--panel-radius);
  box-shadow: 8px 8px 0 var(--shadow-blue);
}

.content-card h1,
.content-card h2 {
  color: var(--heading-blue);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.16;
}

.content-card h1 {
  margin: 0;
  font-size: var(--heading-page-size);
}

.content-card h2 {
  max-width: 820px;
  margin: 0 0 28px;
  font-size: var(--heading-section-size);
}

.content-card p {
  max-width: 850px;
  margin: 0 0 22px;
  text-align: justify;
  hyphens: auto;
}

.content-card p:last-child {
  margin-bottom: 0;
}

.content-card .registry-highlight {
  max-width: 940px;
  margin: 30px auto;
  color: var(--border-blue);
  font-size: clamp(18px, 2vw, 21px);
  line-height: 1.4;
  text-align: center;
}

.mini-purple-heart {
  display: inline-block;
  color: #8b5bb5;
  font-size: 1.2em;
  line-height: 1;
  vertical-align: 0.08em;
}

.mini-blue-heart {
  display: inline-block;
  color: #5d9ce5;
  font-size: 1.2em;
  line-height: 1;
  vertical-align: 0.08em;
}



.facebook-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  color: #1877f2;
  font-weight: 700;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.facebook-link-inline {
  white-space: nowrap;
}

.facebook-icon {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 1.15em;
  height: 1.15em;
  padding-top: 0.14em;
  color: #ffffff;
  background: #1877f2;
  border-radius: 50%;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.82em;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
}

.gallery-story {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 34%);
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}

.gallery-story-image {
  display: block;
  width: 65%;
  height: auto;
  border: 1px solid var(--border-blue);
  border-radius: calc(var(--panel-radius) * 0.7);
}

.page-heading {
  padding: clamp(32px, 5vw, 64px);
  background: var(--panel-light);
}

.page-heading-with-image {
  --page-heading-image-width: clamp(118px, 20%, 170px);
  position: relative;
  padding-right: calc(var(--page-heading-image-width) + 24px);
  overflow: hidden;
}

.page-heading-with-square-image {
  --page-heading-image-size: clamp(170px, 18vw, 210px);
  min-height: var(--page-heading-image-size);
  padding: 0 var(--page-heading-image-size) 0 0;
}

.page-heading-with-large-square-image {
  --page-heading-image-size: clamp(220px, 22vw, 250px);
}

.page-heading-with-square-image .page-heading-copy {
  padding: clamp(32px, 5vw, 64px);
}

.page-heading-with-image h1 {
  padding-right: 0;
}

.page-heading-image {
  position: absolute;
  inset: 0 0 0 auto;
  display: block;
  width: var(--page-heading-image-width);
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: none;
  border-radius: 0;
}

.page-heading-image-square {
  inset: 50% 0 auto auto;
  width: var(--page-heading-image-size);
  height: var(--page-heading-image-size);
  object-fit: contain;
  transform: translateY(-50%);
  border-radius: 0 var(--panel-radius) var(--panel-radius) 0;
}

.page-heading p {
  margin-top: 12px;
  color: var(--border-blue);
  font-size: 17px;
  font-weight: 400;
}

.page-heading .page-heading-slogan {
  max-width: 820px;
  margin-top: 18px;
  color: var(--border-blue);
  font-size: clamp(18px, 2vw, 22px);
  font-weight: 700;
}

.content-card ul {
  max-width: 850px;
  margin: 24px 0 0;
  padding-left: 28px;
}

.content-card li {
  margin: 12px 0;
  padding-left: 8px;
  text-align: justify;
  hyphens: auto;
}

.schedule {
  max-width: 720px;
  margin: 0;
}

.schedule div {
  display: grid;
  grid-template-columns: 155px 1fr;
  gap: 24px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(30, 97, 170, 0.25);
}

.schedule div:last-child {
  border-bottom: 0;
}

.schedule dt {
  color: var(--border-blue);
  font-weight: 700;
}

.schedule dd {
  margin: 0;
}

.schedule-school-year {
  max-width: 860px;
}

@media (min-width: 641px) {
  .schedule-school-year div {
    grid-template-columns: 260px minmax(0, 1fr);
  }

  .schedule-school-year dt {
    white-space: nowrap;
  }
}

.section-heading-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 26px;
}

.pdf-download-link {
  display: inline-flex;
  flex: 0 0 auto;
  width: 28px;
  height: 32px;
  color: #c62828;
  text-decoration: none;
  transition: transform 0.15s ease;
}

.pdf-download-link:hover {
  transform: translateY(-2px);
}

.pdf-download-link img {
  display: block;
  width: 28px;
  height: 32px;
}

.contact-details {
  max-width: 720px;
  margin: 0;
}

.contact-details div {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 24px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(30, 97, 170, 0.25);
}

.contact-details div:last-child {
  border-bottom: 0;
}

.contact-details dt {
  color: var(--border-blue);
  font-weight: 700;
}

.contact-details dd {
  min-height: 1.5em;
  margin: 0;
}

.contact-card a,
.text-link {
  color: var(--border-blue);
  font-weight: 700;
  text-underline-offset: 4px;
}

.contact-card .facebook-link {
  color: #1877f2;
}

@media (max-width: 560px) {
  .contact-details div {
    grid-template-columns: 1fr;
    gap: 5px;
  }
}

/* =========================================================
   PATIČKA
   ========================================================= */

.site-footer {
  display: flex;
  justify-content: center;
  gap: clamp(24px, 5vw, 64px);
  width: min(calc(100% - 44px), var(--content-width));
  margin: 0 auto 42px;
  padding: 26px 32px;
  color: var(--border-blue);
  background: var(--panel-light);
  border: 1px solid var(--border-blue);
  border-radius: var(--panel-radius);
  box-shadow: 8px 8px 0 var(--shadow-blue);
  font-size: 15px;
}

.site-footer a {
  font-weight: 700;
}

/* =========================================================
   TABLET A MOBIL
   ========================================================= */

@media (max-width: 1120px) {
  .header-inner {
    --header-logo-width: 205px;
    min-height: 112px;
  }

  .desktop-nav {
    display: none;
  }

  .mobile-menu {
    display: block;
    margin-left: auto;
  }

  .mobile-menu summary {
    display: grid;
    grid-template-columns: 26px auto;
    grid-template-rows: repeat(3, 5px);
    align-items: center;
    column-gap: 10px;
    row-gap: 4px;
    min-width: 96px;
    padding: 12px 14px;
    color: var(--white);
    background: var(--border-blue);
    border-radius: 8px;
    cursor: pointer;
    list-style: none;
  }

  .mobile-menu summary::-webkit-details-marker {
    display: none;
  }

  .mobile-menu summary span {
    display: block;
    width: 26px;
    height: 3px;
    background: var(--white);
    border-radius: 4px;
  }

  .mobile-menu summary b {
    grid-column: 2;
    grid-row: 1 / 4;
    font-size: 15px;
  }

  .mobile-menu nav {
    position: absolute;
    z-index: 10;
    top: calc(100% + 10px);
    right: 0;
    display: grid;
    width: min(300px, calc(100vw - 44px));
    padding: 12px;
    background: var(--panel-light);
    border: 1px solid var(--border-blue);
    border-radius: 10px;
    box-shadow: 7px 7px 0 var(--shadow-blue);
  }

  .mobile-menu nav a {
    justify-content: flex-start;
    min-height: 47px;
    padding: 12px 13px;
    font-size: 15px;
  }
}

@media (max-width: 800px) {
  .page-heading-with-image {
    --page-heading-image-width: 118px;
    padding-right: calc(var(--page-heading-image-width) + 18px);
  }

  .page-heading-with-image.page-heading-with-square-image {
    --page-heading-image-size: 170px;
    padding: 0 var(--page-heading-image-size) 0 0;
  }

  .page-heading-with-image.page-heading-with-large-square-image {
    --page-heading-image-size: 220px;
  }
}

@media (max-width: 640px) {
  :root {
    /* VELIKOSTI NADPISŮ - mobil */
    --heading-page-size: 22px;
    --heading-section-size: 24px;
  }

  body {
    font-size: 17px;
  }

  .site-header {
    padding: 12px 12px 0;
  }

  .header-inner {
    --header-logo-width: min(55vw, 190px);
    min-height: 92px;
    padding: 10px 12px 10px calc(var(--header-logo-width) + 16px);
    box-shadow: 5px 5px 0 var(--shadow-blue);
  }

  .mobile-menu summary {
    min-width: 50px;
    grid-template-columns: 26px;
  }

  .mobile-menu summary b {
    display: none;
  }

  .page-main {
    width: calc(100% - 24px);
    gap: 34px;
    margin: 38px auto 48px;
  }

  .content-card {
    padding: 28px 22px;
    border-radius: 11px;
    box-shadow: 5px 5px 0 var(--shadow-blue);
  }

  .page-heading-with-image {
    --page-heading-image-width: 100px;
    padding: 28px calc(var(--page-heading-image-width) + 14px) 28px 22px;
  }

  .page-heading-with-image.page-heading-with-square-image {
    --page-heading-image-size: 145px;
    padding: 0 var(--page-heading-image-size) 0 0;
  }

  .page-heading-with-image.page-heading-with-large-square-image {
    --page-heading-image-size: 145px;
  }

  .page-heading-with-square-image .page-heading-copy {
    padding: 28px 22px;
  }

  .content-card h2 {
    margin-bottom: 22px;
  }

  .gallery-story {
    grid-template-columns: 1fr;
  }

  .gallery-story-image {
    width: min(100%, 420px);
    margin-inline: auto;
  }

  .schedule div {
    grid-template-columns: 1fr;
    gap: 2px;
    padding: 12px 0;
  }

  .site-footer {
    width: calc(100% - 24px);
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
    padding: 24px 22px;
    box-shadow: 5px 5px 0 var(--shadow-blue);
  }

}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

/* Statický export: další vlastní úpravy lze přidávat pod tento komentář. */
