/* ═══════════════════════════════════════════════════════════
   Materská škola — premenné + sub-nav + hero-jumps + mobile patterns
   Ostatné layout štýly (.zms-*) sú v layouts.css.
   ═══════════════════════════════════════════════════════════ */

/* Smooth scroll s offsetom pre sticky header + sub-nav */
html { scroll-behavior: smooth; }
.page-template-page-materska-skola html,
body.page-materska-skola,
body[class*="page-materska-skola"] {
    scroll-padding-top: 149px; /* main-header 85 + sub-nav 48 + 16 */
}
@media (max-width: 900px) {
    body[class*="page-materska-skola"] { scroll-padding-top: 120px; }
}

/* ═══════════════════════════════════════════════════════════
   SUB-NAV — sticky pás pod headerom (zsmh_render_ms_subnav)
   Zelená MŠ schéma, znovupoužiteľný pattern pre celý web
   ═══════════════════════════════════════════════════════════ */
.zsmh-subnav {
    position: sticky;
    top: 80px;                /* pod main-header default (header-footer.css: height 80px) */
    z-index: 180;             /* pod megamenu (200) */
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(0,0,0,.04);
    transition: top .2s ease; /* plynulý posun pri shrink */
}
/* Keď sa header scroll-shrinkne (header.js pridá .zsmh-header--shrink na #main-header),
   sub-nav sa posunie nahor aby zostal prilepený. Používame :has() pre moderné prehliadače. */
body:has(.zsmh-header--shrink) .zsmh-subnav { top: 56px; }
@media (max-width: 980px) {
    body:has(.zsmh-header--shrink) .zsmh-subnav { top: 52px; }
}
.zsmh-subnav__inner {
    width: min(80%, 1080px);
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 4px;
    height: 48px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.zsmh-subnav__inner::-webkit-scrollbar { display: none; }
.zsmh-subnav__section-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--ms-green-dark, #1e8449);
    white-space: nowrap;
    padding-right: 16px;
    border-right: 1px solid #e2e8f0;
    margin-right: 6px;
    flex-shrink: 0;
}
.zsmh-subnav__section-label::before {
    content: '🌳';
    font-size: 14px;
}
.zsmh-subnav__link {
    padding: 7px 14px;
    border-radius: 999px;
    color: #6b7280;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background .2s, color .2s;
}
.zsmh-subnav__link:hover,
.zsmh-subnav__link:focus-visible {
    color: var(--ms-green-dark, #1e8449);
    background: #edf7f0;
    outline: none;
}
.zsmh-subnav__link.is-active {
    background: var(--ms-green-dark, #1e8449);
    color: #fff;
}
.zsmh-subnav__emoji { font-size: 14px; line-height: 1; }

@media (max-width: 900px) {
    .zsmh-subnav { top: 64px; }
    .zsmh-subnav__inner {
        width: 92%;
        scroll-snap-type: x mandatory;
        scroll-padding-left: 0;
    }
    .zsmh-subnav__section-label { font-size: 9px; padding-right: 10px; margin-right: 4px; }
    .zsmh-subnav__link { font-size: 12.5px; padding: 7px 12px; scroll-snap-align: start; }
}

/* ═══════════════════════════════════════════════════════════
   HERO JUMPS — chip-link TOC pod hero popisom
   ═══════════════════════════════════════════════════════════ */
.zsmh-ds-hero__jumps {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}
.zsmh-ds-hero__jumps a {
    padding: 6px 14px;
    background: #fff;
    border: 1px solid rgba(30,132,73,.35);
    border-radius: 999px;
    font-size: 12.5px;
    color: var(--ms-green-dark, #1e8449);
    text-decoration: none;
    font-weight: 700;
    transition: background .15s, border-color .15s, transform .15s;
    line-height: 1.2;
    box-shadow: 0 1px 3px rgba(30,132,73,.08);
}
.zsmh-ds-hero__jumps a:hover,
.zsmh-ds-hero__jumps a:focus-visible {
    background: var(--ms-green-dark, #1e8449);
    color: #fff;
    border-color: var(--ms-green-dark, #1e8449);
    outline: none;
    transform: translateY(-1px);
}

/* Override pre TMAVÉ heroes (navy variant) — invertný kontrast */
.zsmh-ds-hero[data-variant="compact-navy"] .zsmh-ds-hero__jumps a {
    background: rgba(255,255,255,.95);
    border-color: rgba(255,255,255,.5);
    color: #1a1d3e;
    box-shadow: 0 1px 3px rgba(0,0,0,.15);
}
.zsmh-ds-hero[data-variant="compact-navy"] .zsmh-ds-hero__jumps a:hover {
    background: #fff;
    color: var(--orange-dark, #d68b00);
}

@media (max-width: 768px) {
    .zsmh-ds-hero__jumps a { font-size: 11.5px; padding: 4px 10px; }
}

/* ═══════════════════════════════════════════════════════════
   AKTUALITY FEED — Variant 4 (HERO + mesačná timeline)
   Použité na /materska-skola/akcie/ (page-materska-skola-akcie.php)
   ═══════════════════════════════════════════════════════════ */

.aktuality-feed {
    background: var(--ms-green-pale, #f0faf3);
    padding: 64px 0;
}

.aktuality-feed > .zsmh-ds-container {
    width: min(80%, 1080px);
    margin: 0 auto;
}

.aktuality-header {
    text-align: center;
    margin-bottom: 40px;
}
.aktuality-header__label {
    display: inline-block;
    font-size: 11px; font-weight: 700; letter-spacing: .14em;
    text-transform: uppercase; color: var(--ms-green-dark, #1e8449);
    background: #fff; padding: 5px 14px; border-radius: 999px;
    margin-bottom: 12px;
    border: 1px solid var(--ms-green-light, #d4edda);
}
.aktuality-header h2 {
    font-size: 1.8rem; font-weight: 700;
    margin-bottom: 8px; color: var(--ms-text, #1a1a2e);
}
.aktuality-header p {
    color: var(--ms-text-muted, #6b7280);
    font-size: 15px; max-width: 540px; margin: 0 auto;
}

/* HERO karta — najnovšia aktualita */
.aktuality-hero {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 0;
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(30,132,73,.12);
    margin-bottom: 56px;
    border: 2px solid var(--ms-green, #27ae60);
    text-decoration: none; color: inherit;
    transition: transform .3s, box-shadow .3s;
}
.aktuality-hero:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(30,132,73,.18);
}
.aktuality-hero__photo {
    background-size: cover; background-position: center;
    background-color: var(--ms-green-light, #d4edda);
    min-height: 320px;
    position: relative;
}
.aktuality-hero__badge {
    position: absolute; top: 16px; left: 16px;
    background: var(--ms-green-dark, #1e8449); color: #fff;
    padding: 6px 14px; border-radius: 999px;
    font-size: 11px; font-weight: 700; letter-spacing: .08em;
    display: inline-flex; align-items: center; gap: 6px;
}
.aktuality-hero__badge::before {
    content: '';
    width: 8px; height: 8px; border-radius: 50%;
    background: #ff6b6b;
    box-shadow: 0 0 0 0 rgba(255,107,107,.7);
    animation: aktuality-pulse 2s ease-in-out infinite;
}
@keyframes aktuality-pulse {
    0% { box-shadow: 0 0 0 0 rgba(255,107,107,.7); }
    50% { box-shadow: 0 0 0 10px rgba(255,107,107,0); }
    100% { box-shadow: 0 0 0 0 rgba(255,107,107,0); }
}
.aktuality-hero__body {
    padding: 36px 32px;
    display: flex; flex-direction: column; justify-content: center;
}
.aktuality-hero__date {
    font-size: 11px; font-weight: 700; letter-spacing: .14em;
    text-transform: uppercase; color: var(--ms-green-dark, #1e8449);
    margin-bottom: 10px;
}
.aktuality-hero__title {
    font-size: 1.7rem; font-weight: 700; line-height: 1.2;
    margin-bottom: 14px; color: var(--ms-text, #1a1a2e);
}
.aktuality-hero__excerpt {
    color: #555; font-size: 14.5px; line-height: 1.55;
    margin-bottom: 18px;
}
.aktuality-hero__cta {
    display: inline-flex; align-items: center; gap: 8px;
    color: var(--ms-green-dark, #1e8449); font-weight: 700; font-size: 14px;
    align-self: flex-start;
}
.aktuality-hero__cta::after {
    content: '→'; transition: transform .2s;
}
.aktuality-hero:hover .aktuality-hero__cta::after { transform: translateX(4px); }

/* Mesačné sekcie — chronická timeline */
.aktuality-month {
    margin-bottom: 48px;
}
.aktuality-month:last-child { margin-bottom: 0; }
.aktuality-month__header {
    display: flex; align-items: center; gap: 14px;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 2px solid var(--ms-green-light, #d4edda);
}
.aktuality-month__title {
    font-size: 1.25rem; font-weight: 700;
    color: var(--ms-green-dark, #1e8449);
    display: flex; align-items: center; gap: 10px;
    margin: 0;
}
.aktuality-month__title::before {
    content: '';
    width: 10px; height: 10px; border-radius: 50%;
    background: var(--ms-green, #27ae60);
}
.aktuality-month__count {
    font-size: 12px; color: var(--ms-text-muted, #6b7280); font-weight: 600;
    background: #fff; padding: 3px 10px; border-radius: 999px;
    border: 1px solid var(--ms-border, #e2e8f0);
}

/* 4-col SQUARE grid */
.aktuality-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}
.aktuality-card {
    background: #fff; border-radius: 14px;
    overflow: hidden; text-decoration: none; color: inherit;
    display: block;
    border: 1px solid var(--ms-border, #e2e8f0);
    transition: transform .25s, box-shadow .25s, border-color .25s;
}
.aktuality-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(30,132,73,.15);
    border-color: var(--ms-green, #27ae60);
}
.aktuality-card__photo {
    aspect-ratio: 1 / 1;
    background-size: cover; background-position: center;
    background-color: var(--ms-green-light, #d4edda);
    position: relative;
    transition: background-image .35s ease;
}
.aktuality-card__photo::after {
    content: '';
    position: absolute; bottom: 0; left: 0; right: 0;
    height: 60%;
    background: linear-gradient(to top, rgba(0,0,0,.55) 0%, rgba(0,0,0,0) 100%);
    transition: opacity .25s;
    z-index: 1;
}
.aktuality-card__date-overlay {
    position: absolute; top: 10px; left: 10px;
    background: rgba(255,255,255,.95); color: var(--ms-green-dark, #1e8449);
    padding: 4px 10px; border-radius: 999px;
    font-size: 10px; font-weight: 700; letter-spacing: .04em;
    z-index: 1;
}
.aktuality-card__title-overlay {
    position: absolute; bottom: 12px; left: 12px; right: 12px;
    color: #fff; font-weight: 700; font-size: 13px; line-height: 1.3;
    z-index: 2;
    text-shadow: 0 1px 4px rgba(0,0,0,.5);
}

/* ─── HOVER HYBRID — peek thumbs (zhora) + auto-fade cyklus (background) ─── */

.aktuality-card--has-gallery {
    cursor: pointer;
}

/* Indikátor že je galéria (camera ikona vpravo hore) */
.aktuality-card--has-gallery .aktuality-card__photo::before {
    content: '📷';
    position: absolute;
    top: 10px; right: 10px;
    z-index: 2;
    background: rgba(255,255,255,.95);
    color: var(--ms-green-dark, #1e8449);
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px; font-weight: 700;
    opacity: 1;
    transition: opacity .2s;
}
.aktuality-card--has-gallery:hover .aktuality-card__photo::before {
    opacity: 0;
}

/* Peek thumbs container — slide down zhora pri hover.
   GRID s 5 fixnými slotmi (4 thumbs + 1 "+N" indikátor) — pri menej thumbs
   zostanú prázdne sloty vpravo, thumbs majú vždy rovnakú malú veľkosť. */
.aktuality-card__thumbs {
    position: absolute;
    top: 0; left: 0; right: 0;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 4px;
    padding: 8px;
    background: linear-gradient(to bottom, rgba(0,0,0,.5) 0%, rgba(0,0,0,0) 100%);
    transform: translateY(-100%);
    opacity: 0;
    transition: transform .35s cubic-bezier(.4,0,.2,1), opacity .25s;
    z-index: 3;
    pointer-events: none;
}
.aktuality-card:hover .aktuality-card__thumbs,
.aktuality-card.is-touched .aktuality-card__thumbs {
    transform: translateY(0);
    opacity: 1;
}

.aktuality-card__thumb {
    aspect-ratio: 1 / 1;
    background-size: cover;
    background-position: center;
    border-radius: 6px;
    border: 1.5px solid rgba(255,255,255,.85);
    box-shadow: 0 2px 6px rgba(0,0,0,.3);
    background-color: rgba(0,0,0,.2);
    min-width: 0;
}
.aktuality-card__thumb--more {
    background: rgba(0,0,0,.6);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 11px;
    border-color: rgba(255,255,255,.5);
    line-height: 1;
}

/* Pri auto-fade cykluse stmavíme overlay slabšie aby foto vynikla */
.aktuality-card.is-cycling .aktuality-card__photo::after {
    opacity: .6;
}

/* Indikátor cyklusu (mini progress bar dole) */
.aktuality-card.is-cycling .aktuality-card__photo::after {
    background: linear-gradient(to top, rgba(0,0,0,.7) 0%, rgba(0,0,0,0) 100%);
}

@media (prefers-reduced-motion: reduce) {
    .aktuality-card__thumbs,
    .aktuality-card__photo { transition: none; }
}

/* CTA na konci */
.aktuality-cta {
    text-align: center; margin-top: 40px;
}
.aktuality-cta a {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--ms-green-dark, #1e8449); color: #fff;
    padding: 14px 28px; border-radius: 999px;
    text-decoration: none; font-weight: 700; font-size: 14px;
    transition: background .2s, transform .2s;
}
.aktuality-cta a:hover {
    background: var(--ms-green, #27ae60);
    transform: translateY(-1px);
}
.aktuality-cta__hint {
    display: block; margin-top: 10px;
    font-size: 12px; color: var(--ms-text-muted, #6b7280);
}

/* Mobile responzív */
@media (max-width: 900px) {
    .aktuality-feed { padding: 36px 0; }
    .aktuality-feed > .zsmh-ds-container { width: 92%; }
    .aktuality-hero { grid-template-columns: 1fr; }
    .aktuality-hero__photo { min-height: 200px; }
    .aktuality-hero__body { padding: 24px 20px; }
    .aktuality-hero__title { font-size: 1.3rem; }
    .aktuality-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .aktuality-month__title { font-size: 1.1rem; }
    .aktuality-card__title-overlay { font-size: 12px; }
}

@media (max-width: 480px) {
    .aktuality-grid { grid-template-columns: 1fr; }
    .aktuality-card__photo { aspect-ratio: 16/10; }
}

@media (prefers-reduced-motion: reduce) {
    .aktuality-hero__badge::before { animation: none; }
    .aktuality-hero, .aktuality-card { transition: none; }
}
