/* ====================================
——— HLAVNÍ STRÁNKA: SPOLEČNÉ NASTAVENÍ
===================================== */
.homepage-cms {
  --home-red: #ea7066;
  --home-yellow: #f0c24b;
  --home-green: #78a02e;
  --home-blue: #45a7d8;
  --home-purple: #a864a8;
  --home-pink: #ea77ad;
  --home-ink: #30383d;
  --home-muted: #657078;
  --home-soft: #f7f8f5;
  color: var(--home-ink);
}

.home-section { padding: 82px 0; }
.home-section__action { margin: 34px 0 0; text-align: center; }
.home-heading { max-width: 760px; margin: 0 auto 38px; text-align: center; }
.home-heading > p,
.home-contact p { margin: 0 0 7px; color: var(--home-red); font-size: .82rem; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
.home-heading h2,
.home-contact h2 { margin: 0; color: var(--home-red); font-weight: 800; }
.home-heading > span { display: block; margin-top: 12px; color: var(--home-muted); line-height: 1.7; }
.home-heading--light > p,
.home-heading--light h2 { color: #fff; }

/* ====================================
——— HORNÍ FOTOGRAFIE
===================================== */
.home-hero { position: relative; min-height: clamp(520px, 68vh, 720px); overflow: hidden; background: #39434a; }
.home-hero__image,
.home-hero__overlay { position: absolute; inset: 0; width: 100%; height: 100%; }
.home-hero__image { object-fit: cover; }
.home-hero__overlay { background: linear-gradient(90deg, rgba(28,36,40,.82) 0%, rgba(28,36,40,.58) 48%, rgba(28,36,40,.14) 100%); }
.home-hero__content { position: relative; z-index: 1; display: flex; min-height: clamp(520px, 68vh, 720px); flex-direction: column; justify-content: center; align-items: flex-start; padding-top: 80px; padding-bottom: 80px; color: #fff; }
.home-kicker { margin: 0 0 15px; color: #fff; font-size: .9rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.home-hero h1 { max-width: 760px; margin: 0; color: #fff; font-size: clamp(2.4rem, 6vw, 4.9rem); font-weight: 800; line-height: 1.02; }
.home-hero__lead { max-width: 670px; margin: 23px 0 0; font-size: clamp(1.05rem, 2vw, 1.35rem); line-height: 1.65; }
.home-hero__actions { display: flex; flex-wrap: wrap; gap: 13px; margin-top: 32px; }
.home-button { display: inline-flex; min-height: 48px; align-items: center; justify-content: center; padding: 12px 23px; border: 2px solid transparent; border-radius: 999px; font-weight: 800; transition: background .2s ease, border-color .2s ease, color .2s ease, transform .2s ease; }
.home-button:hover,
.home-button:focus { transform: translateY(-2px); text-decoration: none; }
.home-button--danger { background: var(--home-red); color: #fff; }
.home-button--danger:hover,
.home-button--danger:focus { background: var(--home-yellow); color: #30383d; }
.home-button--light { border-color: #fff; background: #fff; color: var(--home-red); }
.home-button--light:hover,
.home-button--light:focus { border-color: var(--home-yellow); background: var(--home-yellow); color: #30383d; }

/* ====================================
——— RYCHLÉ ODKAZY
===================================== */
.home-quick-links { position: relative; z-index: 2; margin-top: -46px; }
.homepage-cms--no-slider .home-quick-links { margin-top: 0; padding-top: 32px; }
.home-quick-links__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px; }
.home-quick-link { --card-color: var(--home-red); display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 14px; align-items: center; min-height: 112px; padding: 20px; border-radius: 16px; background: #fff; color: var(--home-ink); box-shadow: 0 15px 42px rgba(32,43,49,.15); transition: transform .2s ease, box-shadow .2s ease; }
.home-quick-link:hover,
.home-quick-link:focus { color: var(--home-ink); text-decoration: none; transform: translateY(-4px); box-shadow: 0 18px 44px rgba(32,43,49,.22); }
.home-quick-link > i { display: grid; width: 52px; height: 52px; place-items: center; border-radius: 14px; background: var(--card-color); color: #fff; font-size: 1.35rem; }
.home-quick-link span { display: flex; min-width: 0; flex-direction: column; color: var(--home-muted); font-size: .88rem; line-height: 1.4; }
.home-quick-link strong { margin-bottom: 3px; color: var(--card-color); font-size: 1.08rem; }
.home-quick-link--primary { --card-color: var(--home-yellow); }
.home-quick-link--success { --card-color: var(--home-green); }
.home-quick-link--info { --card-color: var(--home-blue); }
.home-quick-link--purple { --card-color: var(--home-purple); }
.home-quick-link--pink { --card-color: var(--home-pink); }

/* ====================================
——— NOVINKY A AKCE
===================================== */
.home-news { padding-top: 104px; }
.home-loading { padding: 30px; text-align: center; color: var(--home-muted); }
.home-text-link { color: var(--home-red); font-weight: 800; }
.home-text-link:hover,
.home-text-link:focus { color: var(--home-yellow); text-decoration: none; }
.home-events { background: var(--home-blue); }
.home-events__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.home-event { position: relative; overflow: hidden; border-radius: 18px; background: #fff; box-shadow: 0 16px 38px rgba(15,65,88,.18); }
.home-event > time { position: absolute; z-index: 2; top: 16px; left: 16px; display: flex; width: 78px; min-height: 70px; flex-direction: column; align-items: center; justify-content: center; padding: 8px; border-radius: 13px; background: var(--home-red); color: #fff; text-align: center; box-shadow: 0 7px 18px rgba(0,0,0,.16); }
.home-event > time strong { font-size: 1.55rem; line-height: 1; }
.home-event > time span { margin-top: 4px; font-size: .68rem; line-height: 1.2; }
.home-event > img { width: 100%; height: 185px; object-fit: cover; }
.home-event__body { padding: 23px; }
.home-event:not(:has(> img)) .home-event__body { padding-top: 104px; }
.home-event h3 { margin: 0 0 9px; color: var(--home-blue); font-weight: 800; }
.home-event p { margin: 0; color: var(--home-muted); line-height: 1.65; }
.home-event details { margin-top: 14px; border-top: 1px solid #e5ebed; }
.home-event summary { padding-top: 13px; color: var(--home-red); font-weight: 800; cursor: pointer; list-style: none; }
.home-event summary::-webkit-details-marker { display: none; }
.home-event details > div { margin-top: 13px; padding: 14px; border-radius: 10px; background: #f3f8fa; color: var(--home-muted); line-height: 1.7; }
.home-event__less { display: none; }
.home-event details[open] .home-event__more { display: none; }
.home-event details[open] .home-event__less { display: inline; }
.home-text-link--light { color: #fff; }
.home-text-link--light:hover,
.home-text-link--light:focus { color: var(--home-yellow); }

/* ====================================
——— PŘEDNOSTI, GALERIE A STATISTIKY
===================================== */
.home-benefits { background: var(--home-soft); }
.home-benefits__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.home-benefit { --card-color: var(--home-red); display: grid; grid-template-columns: 58px minmax(0, 1fr); gap: 17px; padding: 25px; border: 1px solid rgba(48,56,61,.08); border-radius: 16px; background: #fff; box-shadow: 0 9px 26px rgba(42,52,57,.05); }
.home-benefit > i { display: grid; width: 58px; height: 58px; place-items: center; border-radius: 50%; background: var(--card-color); color: #fff; font-size: 1.35rem; }
.home-benefit h3 { margin: 1px 0 7px; color: var(--card-color); font-weight: 800; }
.home-benefit p { margin: 0; color: var(--home-muted); line-height: 1.65; }
.home-benefit--primary { --card-color: var(--home-yellow); }
.home-benefit--success { --card-color: var(--home-green); }
.home-benefit--info { --card-color: var(--home-blue); }
.home-benefit--purple { --card-color: var(--home-purple); }
.home-benefit--pink { --card-color: var(--home-pink); }
.home-gallery__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
.home-gallery__grid a { position: relative; min-height: 230px; overflow: hidden; border-radius: 15px; background: #eef1f2; }
.home-gallery__grid img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.home-gallery__grid a:hover img { transform: scale(1.035); }
.home-gallery__grid span { position: absolute; right: 0; bottom: 0; left: 0; padding: 35px 16px 14px; background: linear-gradient(transparent, rgba(20,28,32,.8)); color: #fff; font-weight: 700; }
.home-stats { padding: 70px 0; background: #343e44; color: #fff; }
.home-stats h2 { margin: 0 0 35px; color: #fff; text-align: center; font-weight: 800; }
.home-stats__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.home-stats article { display: flex; flex-direction: column; align-items: center; text-align: center; }
.home-stats i { color: var(--home-yellow); font-size: 1.6rem; }
.home-stats strong { margin-top: 8px; color: #fff; font-size: 2.5rem; line-height: 1; }
.home-stats span { margin-top: 9px; color: rgba(255,255,255,.82); }

/* ====================================
——— KONTAKTNÍ VÝZVA
===================================== */
.home-contact { padding: 55px 0; background: var(--home-red); color: #fff; }
.home-contact__inner { display: flex; gap: 30px; align-items: center; justify-content: space-between; }
.home-contact p,
.home-contact h2 { color: #fff; }
.home-contact span { display: block; margin-top: 9px; color: rgba(255,255,255,.9); }

/* ====================================
——— RESPONZIVNÍ ZOBRAZENÍ
===================================== */
@media (max-width: 991px) {
  .home-quick-links__grid,
  .home-benefits__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-events__grid { grid-template-columns: 1fr; }
  .home-event { display: grid; grid-template-columns: 220px minmax(0, 1fr); }
  .home-event > img { height: 100%; min-height: 230px; }
  .home-event:not(:has(> img)) { display: block; }
  .home-gallery__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 767px) {
  .home-section { padding: 62px 0; }
  .home-hero,
  .home-hero__content { min-height: 570px; }
  .home-hero__overlay { background: rgba(26,34,38,.62); }
  .home-quick-links { margin-top: 0; padding-top: 24px; background: #fff; }
  .home-quick-links__grid,
  .home-benefits__grid,
  .home-gallery__grid { grid-template-columns: 1fr; }
  .home-news { padding-top: 62px; }
  .home-event { display: block; }
  .home-event > img { height: 180px; min-height: 0; }
  .home-stats__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 35px; }
  .home-contact__inner { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 420px) {
  .home-hero__actions,
  .home-button { width: 100%; }
  .home-benefit { grid-template-columns: 48px minmax(0, 1fr); padding: 20px; }
  .home-benefit > i { width: 48px; height: 48px; }
}

/* ====================================
——— OBNOVENÝ HORNÍ SLIDER
===================================== */
.home-slider,
.home-slider .rev_slider,
.home-slider .rev_slider > ul,
.home-slider .rev_slider > ul > li {
  min-height: clamp(540px, 70vh, 720px);
}

.home-slider .rev-slidebg {
  filter: brightness(.46);
}

.home-slide-overlay {
  position: absolute;
  z-index: 2;
  inset: 0;
  display: block;
  background: linear-gradient(90deg, rgba(20,27,31,.72), rgba(20,27,31,.38) 58%, rgba(20,27,31,.2));
  pointer-events: none;
}

.home-slide-copy {
  z-index: 10 !important;
  color: #fff;
  white-space: normal !important;
}

.home-slide-copy h1 {
  max-width: 720px;
  margin: 0;
  color: #fff;
  font-size: clamp(2.35rem, 5vw, 4.8rem) !important;
  font-weight: 800;
  line-height: 1.05 !important;
}

.home-slide-copy .home-kicker {
  color: #fff;
}

.home-slide-copy .home-hero__lead {
  max-width: 650px;
  color: #f1f3f4;
  font-size: clamp(1.05rem, 2vw, 1.3rem) !important;
  line-height: 1.65 !important;
  text-shadow: 0 2px 12px rgba(0,0,0,.34);
}

/* ====================================
——— PŮVODNÍ GALERIE V KOMPAKTNÍM VZHLEDU
===================================== */
.home-gallery__filters {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  justify-content: center;
  margin: -9px 0 28px;
}

.home-gallery__filters .button {
  display: inline-flex;
  min-width: 92px;
  align-items: center;
  justify-content: center;
  padding: 9px 17px;
  border: 1px solid rgba(234,112,102,.34);
  border-radius: 999px;
  background: #fff;
  color: var(--home-red);
  font-weight: 800;
  text-align: center;
}

.home-gallery__filters .button:hover,
.home-gallery__filters .button:focus,
.home-gallery__filters .button.is-checked {
  border-color: var(--home-red);
  background: var(--home-red);
  color: #fff;
}

.home-gallery__grid {
  display: flex;
  flex-wrap: wrap;
  position: relative;
}

.home-gallery__grid .element-item {
  width: calc(25% - 12px);
  margin: 6px;
}

.home-gallery__grid .element-item > a {
  position: relative;
  display: block;
  height: 175px;
  overflow: hidden;
  border-radius: 13px;
  background: #eef1f2;
}

.home-gallery__grid .element-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s ease;
}

.home-gallery__grid .element-item a:hover img {
  transform: scale(1.045);
}

.home-gallery__grid .element-item span {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  padding: 35px 13px 11px;
  background: linear-gradient(transparent, rgba(20,28,32,.84));
  color: #fff;
}

.home-gallery__grid .element-item strong {
  color: #fff;
  font-size: .9rem;
}

.home-gallery__grid .element-item small {
  margin-top: 2px;
  color: rgba(255,255,255,.86);
  font-size: .75rem;
}

.home-gallery__empty {
  display: none;
  max-width: 680px;
  margin: 26px auto 0;
  padding: 28px;
  border: 1px dashed rgba(234,112,102,.48);
  border-radius: 14px;
  background: #fff8f6;
  color: var(--home-muted);
  font-weight: 700;
  text-align: center;
}

.home-gallery__empty i {
  display: block;
  margin-bottom: 10px;
  color: var(--home-red);
  font-size: 1.8rem;
}

.home-gallery:has(.home-gallery__filters .button[data-filter=".jazyky"].is-checked) .home-gallery__empty--jazyky,
.home-gallery:has(.home-gallery__filters .button[data-filter=".druzina"].is-checked) .home-gallery__empty--druzina {
  display: block;
}

/* ====================================
——— OBNOVENÉ ANIMOVANÉ POČÍTADLO
===================================== */
.home-stats {
  position: relative;
  isolation: isolate;
  background-position: center;
  background-size: cover;
}

.home-stats::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  content: '';
  background: rgba(28,36,40,.8);
}

.home-stats .counter-value {
  min-width: 2ch;
}

.home-stats article > i {
  margin-bottom: 18px;
}

.home-stats article > i + .counter-value {
  margin-top: 0;
}

@media (max-width: 991px) {
  .home-gallery__grid .element-item { width: calc(33.333% - 12px); }
}

@media (max-width: 767px) {
  .home-slider,
  .home-slider .rev_slider,
  .home-slider .rev_slider > ul,
  .home-slider .rev_slider > ul > li { min-height: 590px; }
  .home-slide-copy { padding-right: 20px !important; }
  .home-gallery__grid .element-item { width: calc(50% - 12px); }
}

@media (max-width: 480px) {
  .home-gallery__grid .element-item { width: calc(100% - 12px); }
  .home-gallery__grid .element-item > a { height: 205px; }
}
