/*
Theme Name: Study21
Description: Lehká bloková šablona Study21 podle brand manuálu v1.2.
Version: 0.3.1
Requires at least: 6.6
Requires PHP: 8.2
License: GPL-2.0-or-later
Text Domain: study21
*/
html { scroll-behavior: smooth; }
body { margin: 0; }
.wp-site-blocks > main { padding-inline: clamp(1rem, 3vw, 2rem); }
a { text-underline-offset: .2em; }
a:hover { text-decoration-thickness: .15em; }
:focus-visible { outline: 3px solid #D50413; outline-offset: 4px; }
.study21-header { padding: 1.5rem clamp(1rem,4vw,4rem); border-bottom: 1px solid #e1e3e8; }
.study21-logo { display: block; width: 200px; height: auto; padding: 20px; }
.study21-hero { padding: clamp(3rem, 9vw, 7rem) 1.5rem; position: relative; }
.study21-hero::before { content: ''; display: block; width: 5rem; height: .5rem; background: #D50413; transform: skewX(-18deg); margin-bottom: 2rem; }
.study21-events { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,280px),1fr)); gap: 1.5rem; }
.study21-event { border-top: 4px solid #D50413; background: #fff; padding: 1.5rem; box-shadow: 0 4px 24px #0e244f0a; }
.study21-event h3 { margin-top: 0; }
.study21-pillars { gap: 1.5rem; }
.study21-footer { padding: 3rem 1.5rem; margin-top: 4rem; }
@media(max-width:600px) { .study21-header { padding: .5rem 1rem; } .study21-logo { width: 160px; padding: 16px; } }
@media(max-width:600px) {
  .study21-calendar .study21-calendar-month { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: .5rem 1rem; }
  .study21-calendar-month strong { grid-column: 1 / -1; grid-row: 1; text-align: center; }
  .study21-calendar-month a:last-child { text-align: right; }
}
@media(prefers-reduced-motion:reduce) { html { scroll-behavior: auto; } }


/* Shared editorial layouts. All titles, pictures and links are ordinary editor blocks. */
.study21-header {padding: .6rem clamp(1rem, 3.5vw, 3rem); gap: 1rem;}
.study21-header .study21-logo {width: clamp(130px, 14vw, 178px); padding: .55rem 0;}
.study21-header .wp-block-navigation {font-size: 1rem; font-weight: 700;}
.study21-header .wp-block-navigation__container {gap: clamp(.8rem, 2vw, 1.8rem);}
.study21-header .study21-nav-cta > a {color:#fff; background:#D50413; border-radius:3px; padding:.5rem .85rem;}
.study21-home-lead {display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.08fr);background:#F4EFE5;align-items:stretch;overflow:hidden;}
.wp-site-blocks .study21-home-lead {max-width:1100px;margin:clamp(1rem,3vw,2.4rem) auto;}
.study21-hero-copy {align-self:center;padding:clamp(1.4rem,3vw,3.4rem);}
.study21-hero-copy h1 {font-size:clamp(2.3rem,4vw,4rem);letter-spacing:-.04em;line-height:1.03;margin:0;}
.study21-hero-copy p {margin:1.25rem 0 1.6rem;line-height:1.55;}
.study21-home-lead .wp-block-image {margin:0;min-height:100%;}
.study21-home-lead img {display:block;width:100%;height:100%;object-fit:cover;object-position:53% center;}
.wp-site-blocks main {padding-block:clamp(1rem,2.4vw,2rem);}
.wp-site-blocks main h1 {text-wrap:balance;}
main .wp-block-post-title {font-size:clamp(2rem,4.6vw,3.5rem);letter-spacing:-.035em;}
.wp-block-post-content > h2 {margin-top:2.25em;letter-spacing:-.025em;}
.study21-feature {background:#F4EFE5;border-inline-start:5px solid #D50413;padding:clamp(1.2rem,3vw,2rem);}
.study21-grid,.study21-gallery-row {display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,190px),1fr));gap:1rem;}
.study21-grid > *, .study21-gallery-row > * {margin:0;}
.study21-panel {background:#f7f5f0;padding:1.15rem;min-width:0;}
.study21-panel h2,.study21-panel h3,.study21-feature h3 {margin:0 0 .5rem;}
.study21-panel p:last-child,.study21-feature p:last-child {margin-bottom:0;}
.wp-block-post-content figure img,.study21-event img {max-width:100%;height:auto;}
.wp-block-post-content .study21-home-lead img {height:100%;}
.wp-block-post-content figcaption {font-size:.9rem;color:#455164;}
.wp-block-quote {border-inline-start:3px solid #D50413;padding:.2rem 1.3rem;font-size:1.18rem;}
.wp-block-details {border-bottom:1px solid #d8dce5;padding:.8rem 0;}
.wp-block-details summary {font-weight:bold;color:#0E244F;cursor:pointer;}
.study21-footer {background:#0E244F;color:#fff;padding:clamp(2rem,4vw,4rem);line-height:1.65;}
.study21-footer h2,.study21-footer a {color:#fff;}
@media(max-width:760px){
 .study21-home-lead {grid-template-columns:1fr;}
 .study21-home-lead .wp-block-image {min-height:0;aspect-ratio:16/9;}
 .study21-header .wp-block-navigation__responsive-container:not(.is-menu-open) {display:none;}
 .study21-header .wp-block-navigation__responsive-container-open {display:flex;}
 .study21-header .wp-block-navigation__responsive-container.is-menu-open {padding:1.5rem;}
}


/* Editorial refinement: equal six-card grids and smaller floated family photo. */
.study21-grid.study21-grid-six {grid-template-columns:repeat(3,minmax(0,1fr));align-items:stretch;}
.study21-grid-six > .study21-panel {height:100%;box-sizing:border-box;}
.study21-family {display:flow-root;}
.study21-family > .study21-family-photo, .study21-family > .wp-block-image.study21-family-photo {float:right;width:min(34%,240px);max-width:100%;margin:0 0 .75rem 1.4rem;}
.study21-family-photo img {width:100%;height:auto;}
.study21-family > p {margin-block-start:0;}
.study21-event-cta {margin:.8rem 0 1.4rem;}
.study21-event-cta a {display:inline-block;background:#D50413;color:#fff;text-decoration:none;padding:.75rem 1.3rem;font-weight:700;border-radius:3px;}
.study21-event-cta a:hover {background:#0E244F;}
#prihlaska {scroll-margin-top:1.5rem;}
.study21-event.study21-event-list-only {padding:.75rem 1rem;border-top:0;border-left:3px solid #d8dce5;box-shadow:none;background:#f7f5f0;}
.study21-event.study21-event-list-only h3 {font-size:1.1rem;margin:0;}
.study21-calendar-grid td .study21-archive-name {display:block;font-size:.85rem;overflow-wrap:anywhere;margin-block:.5rem;}
.study21-archive-gallery {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.8rem;}
.study21-archive-gallery > .wp-block-image {margin:0!important;min-width:0;}
.study21-archive-gallery a {display:block;cursor:zoom-in;overflow:hidden;border-radius:3px;aspect-ratio:4/3;background:#F4EFE5;}
.wp-block-post-content .study21-archive-gallery img {display:block;width:100%;height:100%;object-fit:cover;}
.study21-lightbox {box-sizing:border-box;position:fixed;inset:0;margin:auto;background:#0E244F;color:#fff;border:0;border-radius:8px;max-width:min(96vw,1200px);max-height:96vh;max-height:96dvh;padding:1rem;overflow:auto;}
.study21-lightbox::backdrop {background:rgba(0,0,0,.82);}
.study21-lightbox[open] {display:grid;grid-template-rows:auto minmax(0,1fr) auto;gap:.7rem;}
.study21-lightbox img {display:block;max-width:100%;max-height:78vh;max-height:78dvh;object-fit:contain;margin:auto;}
.study21-lightbox-controls {display:flex;align-items:center;justify-content:space-between;gap:.5rem;}
.study21-lightbox button {font:inherit;background:#fff;color:#0E244F;border:0;padding:.5rem .85rem;cursor:pointer;border-radius:3px;}
.study21-lightbox button:disabled {opacity:.55;cursor:default;}
.study21-lightbox .study21-lightbox-close {justify-self:end;}
.study21-lightbox p {margin:0;text-align:center;overflow-wrap:anywhere;}
@media (max-width:960px) { .study21-header .wp-block-navigation__container {gap:.75rem;} .study21-header .wp-block-navigation {font-size:.92rem;} }
@media (max-width:650px) { .study21-grid.study21-grid-six,.study21-archive-gallery {grid-template-columns:repeat(2,minmax(0,1fr));} }
@media (max-width:440px) { .study21-grid.study21-grid-six {grid-template-columns:1fr;} .study21-family > .study21-family-photo,.study21-family > .wp-block-image.study21-family-photo {float:none;width:min(68%,240px);margin:0 auto 1rem;} }

.study21-header .study21-current-section > :first-child,.study21-header .current-menu-item > a,.study21-primary a[aria-current=page] {text-decoration:underline;text-decoration-color:#D50413;text-underline-offset:.35em;}
.study21-primary .wp-block-navigation__submenu-container a {padding:.65rem .9rem;}
.study21-primary .is-menu-open .wp-block-navigation-item.has-child {align-items:stretch;width:100%;}
.study21-primary .is-menu-open .wp-block-navigation__responsive-container-content {align-items:stretch;}
.study21-primary .is-menu-open .wp-block-navigation__container {align-items:stretch;width:100%;}
.study21-primary .is-menu-open .wp-block-navigation-submenu__toggle {display:flex;align-items:center;justify-content:space-between;min-height:44px;width:100%;text-align:left;}
.study21-primary .is-menu-open .wp-block-navigation-submenu__toggle:after {content:'⌄';margin-left:.5em;}
.study21-primary .is-menu-open .wp-block-navigation-submenu__toggle[aria-expanded=false] ~ .wp-block-navigation__submenu-container {display:none;}
.study21-primary .is-menu-open .wp-block-navigation__submenu-container {align-items:flex-start;padding:.2rem 1rem;}
.study21-crumbs {font-size:.9rem;line-height:1.65;margin-bottom:1.25rem;}
.study21-crumbs span[aria-hidden] {margin-inline:.25rem;}
.study21-related {border-top:1px solid #d6d8dc;margin-block:2rem;padding-top:1rem;display:flex;align-items:baseline;flex-wrap:wrap;gap:.6rem 1.25rem;}
.study21-footer-grid {display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:1.5rem;margin-bottom:2rem;}
.study21-footer-column h2 {font-size:1.12rem;margin:0 0 .65rem;}
.study21-footer-column p {margin:.4rem 0;overflow-wrap:anywhere;}
@media(max-width:850px){.study21-footer-grid{grid-template-columns:repeat(2,minmax(0,1fr));}}
@media(max-width:520px){.study21-footer-grid{grid-template-columns:1fr;}}
.study21-mobile-toggle {display:none;}
.study21-primary .is-menu-open.study21-mobile-ready .has-child > .wp-block-navigation-submenu__toggle,.study21-primary .is-menu-open.study21-mobile-ready .has-child > .wp-block-navigation__submenu-icon {display:none;}
.study21-primary .is-menu-open.study21-mobile-ready .study21-mobile-toggle {display:flex;justify-content:space-between;align-items:center;min-height:44px;width:100%;border:0;background:transparent;color:inherit;font:inherit;text-align:left;padding:0;}
.study21-mobile-toggle:after {content:"▾";}
.study21-mobile-toggle[aria-expanded=true]:after {content:"▴";}
.study21-primary .is-menu-open.study21-mobile-ready .has-child:not([data-mobile-open]) > ul {display:none;}
.study21-primary .is-menu-open.study21-mobile-ready .has-child[data-mobile-open] > ul.wp-block-navigation__submenu-container {display:flex;}
.study21-primary .is-menu-open .study21-current-section > .study21-mobile-toggle {text-decoration:underline;text-underline-offset:.3em;}
.study21-header .study21-primary .study21-nav-cta > a.wp-block-navigation-item__content {background:#D50413;color:white;padding:.65rem .95rem;display:inline-flex;align-items:center;min-height:44px;box-sizing:border-box;}
.study21-primary .wp-block-navigation__responsive-container:not(.is-menu-open) .wp-block-navigation__submenu-container {background:#fff;color:#0E244F;z-index:5;}
.study21-footer-grid > .study21-footer-column {margin-block:0;}


/* Team cards keep their frames even when WordPress chooses a smaller source. */
.wp-block-post-content .study21-team-grid {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;}
.study21-team-grid > .study21-team-card {min-width:0;}
.study21-team-card .study21-team-pair {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;width:min(100%,208px);margin-inline:auto;align-items:start;}
.study21-team-pair > figure.wp-block-image {display:block;width:100%;min-width:0;max-width:none;margin:0;}
.study21-team-pair > figure > a {display:block;width:100%;aspect-ratio:3/4;cursor:zoom-in;}
.wp-block-post-content .study21-team-pair > figure > a > img {display:block;width:100%;height:100%;max-width:none;object-fit:cover;}
.study21-team-pair figcaption {margin:.35rem 0 0;text-align:center;}
@media(max-width:900px){.wp-block-post-content .study21-team-grid {grid-template-columns:repeat(2,minmax(0,1fr));}.study21-team-card .study21-team-pair {width:min(100%,270px);}}
@media(max-width:580px){.wp-block-post-content .study21-team-grid {grid-template-columns:minmax(0,1fr);}}
