/*
Theme Name: Kapka lesa
Theme URI: https://kapkalesa.cz
Author: Kapka lesa z. s.
Description: Vlastní motiv pro lesní mateřskou školu a komunitní prostor Kapka lesa. Organický, teplý design (písek, šalvěj, terakota) postavený na písmech Newsreader a Public Sans.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: kapka-lesa
*/

/* ==========================================================================
   Self-hostované fonty
   ========================================================================== */

@font-face {
  font-family: 'Newsreader';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url('assets/fonts/newsreader-normal-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215;
}
@font-face {
  font-family: 'Newsreader';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url('assets/fonts/newsreader-normal-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1EFF;
}
@font-face {
  font-family: 'Newsreader';
  font-style: italic;
  font-weight: 200 800;
  font-display: swap;
  src: url('assets/fonts/newsreader-italic-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215;
}
@font-face {
  font-family: 'Newsreader';
  font-style: italic;
  font-weight: 200 800;
  font-display: swap;
  src: url('assets/fonts/newsreader-italic-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1EFF;
}
@font-face {
  font-family: 'Public Sans';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('assets/fonts/public-sans-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215;
}
@font-face {
  font-family: 'Public Sans';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('assets/fonts/public-sans-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1EFF;
}

/* ==========================================================================
   Design tokeny
   ========================================================================== */

:root {
  --sand: #EDE6D3;
  --ink: #2E2A1E;
  --ink-2: #33301F;
  --text-muted: #4A4638;
  --moss: #4A5C3A;
  --moss-soft: #5C7A52;
  --sage: #DCE3CB;
  --terracotta: #B5502E;
  --terracotta-2: #C7451F;
  --gold: #D9C97A;
  --cream: #F3EFDF;
  --cream-2: #F6F1E4;

  --font-serif: 'Newsreader', Georgia, serif;
  --font-sans: 'Public Sans', -apple-system, sans-serif;

  --wrap-max: 1140px;
  --radius-organic: 40px 10px 40px 10px;
}

/* ==========================================================================
   Reset a základ
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--sand);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  line-height: 1.15;
  color: var(--ink-2);
}

.wrap {
  max-width: var(--wrap-max);
  margin: 0 auto;
  padding: 0 32px;
}

.screen-reader-text {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
}

.skip-link:focus {
  position: fixed;
  top: 10px; left: 10px;
  background: var(--ink-2);
  color: var(--cream);
  padding: 10px 18px;
  border-radius: 8px;
  z-index: 100;
  clip: auto; width: auto; height: auto;
}

/* ==========================================================================
   Tlačítka
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  background: var(--terracotta);
  color: var(--cream-2);
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--radius-organic);
  border: none;
  cursor: pointer;
  transition: background .2s ease, transform .15s ease;
}
.btn:hover { background: var(--terracotta-2); transform: translateY(-1px); }

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--moss);
  color: var(--ink-2);
}
.btn-outline:hover { background: rgba(74,92,58,0.08); }

.btn-light {
  background: var(--sand);
  color: var(--ink-2);
}
.btn-light:hover { background: var(--cream-2); }

.btn-moss { background: var(--moss); color: var(--cream); }
.btn-moss:hover { background: #3d4c2f; }

.btn-gold { background: var(--gold); color: var(--ink-2); }
.btn-gold:hover { background: #cdb95f; }

/* ==========================================================================
   Hlavička a menu
   ========================================================================== */

.site-header {
  padding: 22px 0;
  position: relative;
  z-index: 20;
  background: var(--moss-soft);
}

.site-header .wrap {
  max-width: 1400px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--cream);
}
.site-logo img { height: 52px; width: auto; }
.site-logo-mark { height: 46px; width: auto; }

.site-logo-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  justify-content: center;
}
.site-logo-kicker {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 0.65rem;
  line-height: 1.2;
  letter-spacing: 0.01em;
}
.site-logo-name {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.35rem;
  line-height: 1.05;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.header-cta {
  padding: 10px 22px;
  font-size: 0.9rem;
}

.lang-switch {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 3px;
  font-size: 0.75rem;
  font-weight: 600;
  padding-left: 16px;
  margin-left: 2px;
  border-left: 1px solid rgba(243,239,223,0.35);
}
.lang-switch-link {
  color: var(--cream);
  opacity: 0.75;
  padding: 3px 10px;
  border-radius: 20px;
  text-align: center;
  transition: background .2s ease, opacity .2s ease;
}
.lang-switch-link.is-current {
  opacity: 1;
  background: var(--terracotta);
}
.lang-switch-link:hover { opacity: 1; background: rgba(243,239,223,0.18); }

.primary-nav ul {
  display: flex;
  align-items: center;
  gap: 22px;
  list-style: none;
  flex-wrap: wrap;
}
.primary-nav a {
  font-size: 1.05rem;
  color: var(--cream);
  opacity: 0.85;
  font-weight: 500;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
  transition: border-color .2s ease, opacity .2s ease;
}
.primary-nav a:hover,
.primary-nav .current-menu-item > a {
  opacity: 1;
  border-bottom-color: var(--terracotta);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.6rem;
  color: var(--cream);
  cursor: pointer;
}

@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .site-logo { gap: 8px; }
  .site-logo-mark { height: 28px; }
  .site-logo-kicker { display: none; }
  .site-logo-name { font-size: 1rem; }
  .primary-nav {
    display: none;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--moss-soft);
    box-shadow: 0 12px 24px rgba(46,42,30,0.12);
    padding: 10px 32px 26px;
  }
  .primary-nav.is-open { display: block; }
  .primary-nav ul { flex-direction: column; align-items: flex-start; gap: 16px; }
}

/* ==========================================================================
   Hero (úvodní stránka)
   ========================================================================== */

.hero { position: relative; padding: 20px 0 0; overflow: hidden; }

.hero-bg-panel {
  position: absolute;
  top: -140px; right: -200px;
  width: 760px; height: 760px;
  background: var(--sage);
  border-radius: 42% 58% 61% 39%/45% 39% 61% 55%;
  z-index: 0;
}

.hero-inner {
  position: relative;
  z-index: 2;
  padding: 46px 0 90px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 44px;
  align-items: center;
}

.eyebrow {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--moss);
  font-size: 1.05rem;
  margin-bottom: 14px;
  display: block;
}

.hero-heading {
  font-size: clamp(1.9rem, 4vw, 2.9rem);
  font-weight: 500;
  line-height: 1.2;
}
.hero-heading em { color: var(--terracotta); font-style: italic; }

.hero-lead {
  margin-top: 20px;
  font-size: 1.08rem;
  max-width: 460px;
  color: var(--text-muted);
}

.hero-ctas { display: flex; gap: 14px; margin-top: 30px; flex-wrap: wrap; }

.hero-illus {
  aspect-ratio: 1;
  border-radius: 50% 50% 45% 55%/55% 45% 55% 45%;
  overflow: hidden;
  position: relative;
  box-shadow: 0 20px 50px rgba(46,42,30,0.18);
}
.hero-illus img { width: 100%; height: 100%; object-fit: cover; }

.organic-edge { position: relative; height: 64px; margin-top: -1px; line-height: 0; }
.organic-edge svg { width: 100%; height: 100%; display: block; }

@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; padding-bottom: 60px; }
  .hero-illus { max-width: 380px; margin: 0 auto; }
  .hero-bg-panel { width: 520px; height: 520px; top: -80px; right: -160px; }
  .wrap { padding: 0 40px; }
  .hero-heading { font-size: 1.9rem; }
}

/* ==========================================================================
   Pilíře (5 karet, tmavě zelená sekce)
   ========================================================================== */

.pillars-section {
  background: var(--moss);
  color: var(--cream);
  padding: 76px 0 84px;
}

.section-badge {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--gold);
  display: block;
  margin-bottom: 10px;
}

.section-heading {
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 600;
  color: var(--cream);
  max-width: 640px;
}

.pillars-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
  margin-top: 42px;
}

.pillar-card {
  background: var(--sand);
  color: var(--ink);
  border-radius: 18px;
  padding: 24px 20px;
  text-align: left;
}
.pillar-card .icn {
  width: 46px; height: 46px;
  border-radius: 50%;
  background: var(--sage);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
}
.pillar-card .icn svg { width: 22px; height: 22px; stroke: var(--moss); fill: none; stroke-width: 1.8; }
.pillar-card h3 { font-size: 1rem; font-weight: 600; margin-bottom: 6px; }
.pillar-card p { font-size: 0.88rem; color: var(--text-muted); }

@media (max-width: 980px) {
  .pillars-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 620px) {
  .pillars-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 420px) {
  .pillars-grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Pruh: angličtina a odborníci
   ========================================================================== */

.promo-strip { background: var(--sand); padding: 78px 0; position: relative; }
.promo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}
.promo-card {
  position: relative;
  padding-left: 26px;
  border-left: 4px solid var(--terracotta-2);
}
.promo-card .promo-eyebrow {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--moss);
  font-size: 0.95rem;
  margin-bottom: 8px;
  display: block;
}
.promo-card h3 { font-size: 1.3rem; font-weight: 600; margin-bottom: 10px; }
.promo-card p { color: var(--text-muted); font-size: 0.98rem; }

@media (max-width: 720px) {
  .promo-grid { grid-template-columns: 1fr; gap: 40px; }
}

/* ==========================================================================
   Dlaždice zázemí (Lesní MŠ / Lesní herna / Komunitní zahrada)
   ========================================================================== */

.teaser-section { padding: 10px 0 90px; background: var(--sand); }
.teaser-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
  margin-top: 40px;
}
.teaser-card {
  background: var(--ink-2);
  color: var(--cream);
  border-radius: 20px 20px 20px 4px;
  overflow: hidden;
  display: block;
  transition: transform .2s ease;
}
.teaser-card:hover { transform: translateY(-4px); }
.teaser-card .teaser-img { aspect-ratio: 4/3; overflow: hidden; }
.teaser-card .teaser-img img { width: 100%; height: 100%; object-fit: cover; }
.teaser-card .teaser-body { padding: 20px 22px 26px; }
.teaser-card h3 { color: var(--cream); font-size: 1.1rem; margin-bottom: 6px; }
.teaser-card p { color: var(--cream); opacity: 0.75; font-size: 0.9rem; }
.teaser-card .teaser-arrow { color: var(--gold); font-size: 0.85rem; margin-top: 10px; display: inline-block; }

@media (max-width: 980px) {
  .teaser-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 620px) {
  .teaser-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 420px) {
  .teaser-grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Nadcházející akce (homepage i stránka Komunitní zahrada)
   ========================================================================== */

.akce-section {
  background: var(--sand);
  padding: 70px 0 90px;
  position: relative;
}
.akce-section::before {
  content: "";
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 140px;
  height: 3px;
  background: var(--terracotta);
  border-radius: 3px;
}
.akce-section .section-heading {
  color: var(--ink-2);
  font-weight: 500;
  font-size: clamp(1.35rem, 2.6vw, 1.9rem);
}
.akce-section .section-badge { color: var(--terracotta); }

.akce-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 40px;
}
.akce-card {
  background: var(--cream-2);
  border-radius: 18px 18px 18px 4px;
  overflow: hidden;
  display: block;
  transition: transform .2s ease;
}
.akce-card:hover { transform: translateY(-4px); }
.akce-card-img { aspect-ratio: 4/3; overflow: hidden; }
.akce-card-img img { width: 100%; height: 100%; object-fit: cover; }
.akce-card-body { padding: 18px 20px 22px; }
.akce-date {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--terracotta);
  font-size: 0.9rem;
  display: block;
  margin-bottom: 6px;
}
.akce-card h3 { font-size: 1.05rem; font-weight: 600; margin-bottom: 6px; color: var(--ink-2); }
.akce-place { font-size: 0.85rem; color: var(--text-muted); }

.section-children .akce-grid { margin-top: 24px; }

@media (max-width: 860px) {
  .akce-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .akce-grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Obsahové stránky (page.php)
   ========================================================================== */

.page-hero {
  padding: 56px 0 40px;
  background: var(--sand);
  position: relative;
}
.page-hero .eyebrow { margin-bottom: 10px; }
.page-title {
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  font-weight: 600;
}
.page-hero .page-lead {
  margin-top: 16px;
  max-width: 640px;
  color: var(--text-muted);
  font-size: 1.05rem;
}

.page-content-wrap { padding: 10px 0 90px; }

.page-content {
  max-width: 760px;
}
.page-content h2 {
  font-size: 1.6rem;
  font-weight: 600;
  margin-top: 46px;
  margin-bottom: 16px;
}
.page-content h2:first-child { margin-top: 0; }
.page-content h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-top: 28px;
  margin-bottom: 10px;
  color: var(--moss);
}
.page-content p { margin-bottom: 16px; color: var(--text-muted); }
.page-content ul, .page-content ol { margin: 0 0 16px 22px; color: var(--text-muted); }
.page-content li { margin-bottom: 6px; }
.page-content a { color: var(--terracotta); border-bottom: 1px solid rgba(181,80,46,0.35); }
.page-content a:hover { border-bottom-color: var(--terracotta); }
.page-content img { border-radius: 18px; margin: 20px 0; }
.page-content blockquote {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.25rem;
  border-left: 4px solid var(--terracotta-2);
  padding-left: 22px;
  margin: 24px 0;
  color: var(--ink-2);
}

/* Blok "Soubor" - stylizace pro stránku Dokumenty */
.page-content .wp-block-file {
  background: var(--cream-2);
  border-radius: 14px;
  padding: 16px 20px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.page-content .wp-block-file a:first-child {
  font-weight: 600;
  border-bottom: none;
  color: var(--ink-2);
}
.page-content .wp-block-file__button {
  background: var(--terracotta) !important;
  color: var(--cream-2) !important;
  padding: 8px 18px !important;
  border-radius: 30px 8px 30px 8px !important;
  font-size: 0.85rem !important;
  font-weight: 600 !important;
  border-bottom: none !important;
}
.page-content .wp-block-file__button:hover { background: var(--terracotta-2) !important; }

/* ==========================================================================
   Rodič/podstránky (Lesní MŠ) - dlaždice a pilulková navigace
   ========================================================================== */

.section-children {
  margin-top: 50px;
  padding-top: 46px;
  border-top: 1px solid rgba(46,42,30,0.12);
}
.section-children h2 { margin-top: 0; }
.children-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 24px;
}
.child-tile {
  background: var(--cream-2);
  border-radius: 16px 16px 16px 4px;
  padding: 22px 20px;
  display: block;
  transition: background .2s ease, transform .15s ease;
}
.child-tile:hover { background: var(--sage); transform: translateY(-2px); }
.child-tile h3 { font-size: 1.02rem; font-weight: 600; margin-bottom: 6px; color: var(--ink-2); }
.child-tile span { font-size: 0.85rem; color: var(--moss); }

@media (max-width: 780px) {
  .children-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 500px) {
  .children-grid { grid-template-columns: 1fr; }
}

.sibling-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 40px;
}
.sibling-pill {
  padding: 9px 20px;
  border-radius: 30px;
  background: var(--cream-2);
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 500;
}
.sibling-pill.is-current,
.sibling-pill:hover {
  background: var(--moss);
  color: var(--cream);
}

/* Na mobilu jedna řada, kterou jde posouvat do strany - zabere stejně
   místa bez ohledu na počet podstránek. Přechod na pravém okraji
   naznačuje, že řada pokračuje. */
@media (max-width: 640px) {
  .sibling-pills {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-right: 28px;
    margin-bottom: 28px;
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent);
    mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent);
  }
  .sibling-pills::-webkit-scrollbar { display: none; }
  .sibling-pill { flex-shrink: 0; white-space: nowrap; }
}

/* ==========================================================================
   Náš tým (page-team.php)
   ========================================================================== */

.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-top: 44px;
}
.team-card { text-align: left; }
.team-photo {
  aspect-ratio: 1;
  border-radius: 50% 50% 45% 55%/55% 45% 55% 45%;
  overflow: hidden;
  background: var(--sage);
  margin-bottom: 16px;
}
.team-photo img { width: 100%; height: 100%; object-fit: cover; }
.team-card h3 { font-size: 1.1rem; font-weight: 600; margin-bottom: 2px; }
.team-card .team-role {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--moss);
  font-size: 0.92rem;
  margin-bottom: 10px;
  display: block;
}
.team-card .team-bio { color: var(--text-muted); font-size: 0.92rem; }
.team-card .team-bio p { margin-bottom: 10px; }
.team-card .team-bio p:last-child { margin-bottom: 0; }
.team-empty { color: var(--text-muted); font-size: 0.95rem; }

@media (max-width: 780px) {
  .team-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  .team-grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Patička
   ========================================================================== */

.site-footer {
  background: var(--ink-2);
  color: var(--sand);
  padding: 70px 0 34px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.8fr 0.8fr;
  gap: 50px;
}
.site-footer h3 {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
  font-size: 1.1rem;
  color: var(--gold);
  margin-bottom: 16px;
}
.footer-address {
  font-style: normal;
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--sand);
  opacity: 0.9;
}
.footer-contact p { font-size: 0.95rem; margin-bottom: 10px; opacity: 0.9; }
.footer-contact a { border-bottom: 1px solid rgba(237,230,211,0.35); }

.footer-social { display: flex; gap: 12px; margin-top: 6px; }
.footer-social a {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--moss);
  display: flex; align-items: center; justify-content: center;
  transition: background .2s ease;
}
.footer-social a:hover { background: var(--terracotta); }
.footer-social svg { width: 18px; height: 18px; stroke: var(--sand); fill: none; }

.footer-bottom {
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid rgba(237,230,211,0.15);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.82rem;
  opacity: 0.65;
}

@media (max-width: 800px) {
  .footer-grid { grid-template-columns: 1fr; gap: 40px; }
}

/* ==========================================================================
   Přístupnost / focus
   ========================================================================== */

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--terracotta);
  outline-offset: 3px;
}

/* ==========================================================================
   Důležité oznámení pod záhlavím
   ========================================================================== */

.site-notice {
  background: var(--gold);
  color: var(--ink-2);
  text-align: center;
  font-weight: 600;
  font-size: 0.95rem;
}
.site-notice .wrap { padding-top: 11px; padding-bottom: 11px; }
.site-notice a { display: block; }
.site-notice a:hover { text-decoration: underline; }

/* ==========================================================================
   Tajný kód u akcí
   ========================================================================== */

.kod-cta {
  margin-top: 40px;
  margin-bottom: 24px;
  padding: 28px;
  background: var(--moss);
  border-radius: 24px 24px 24px 4px;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.kod-cta-icon { font-size: 2rem; line-height: 1; }
.kod-cta-body { flex: 1 1 220px; }
.kod-cta-body h3 { color: var(--cream); font-size: 1.15rem; font-weight: 600; margin-bottom: 4px; }
.kod-cta-body p { color: var(--sage); font-size: 0.92rem; }

.kod-wrap { max-width: 900px; }

.kod-mode { margin-bottom: 32px; }
.kod-mode h2 { font-size: 1.15rem; font-weight: 600; margin-bottom: 16px; color: var(--ink-2); }

.kod-or {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: -12px 0 28px;
}

.kod-text-form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.kod-text-input {
  flex: 1 1 220px;
  padding: 13px 20px;
  border: 1.5px solid rgba(46,42,30,0.2);
  border-radius: var(--radius-organic);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  background: var(--cream-2);
}
.kod-text-input:focus { outline: 2px solid var(--moss); outline-offset: 2px; }

.kod-obrazky-slots {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
  min-height: 56px;
}
.kod-obrazky-slot {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  border: 1.5px dashed rgba(46,42,30,0.25);
  background: var(--cream-2);
  overflow: hidden;
}
.kod-obrazky-slot.is-filled { border-style: solid; border-color: var(--moss); }
.kod-obrazky-slot img { width: 100%; height: 100%; object-fit: cover; display: block; }

.kod-obrazky-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.kod-obrazek {
  padding: 0;
  border: 2px solid transparent;
  border-radius: 16px;
  background: var(--cream-2);
  cursor: pointer;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  transition: transform .15s ease, border-color .15s ease;
}
.kod-obrazek img { width: 100%; height: 100%; object-fit: cover; display: block; }
.kod-obrazek:hover:not(:disabled) { transform: translateY(-2px); border-color: var(--gold); }
.kod-obrazek.is-used { opacity: 0.3; cursor: default; }
.kod-obrazek:disabled { cursor: default; }

.kod-error {
  color: var(--terracotta-2);
  font-weight: 600;
  background: rgba(181,80,46,0.1);
  border-radius: 12px;
  padding: 12px 18px;
  margin-bottom: 24px;
}

.kod-poklad {
  text-align: center;
  padding: 48px 32px;
  background: var(--cream-2);
  border-radius: 32px 32px 32px 6px;
  margin-bottom: 32px;
}
.kod-poklad-icon { font-size: 2.6rem; display: block; margin-bottom: 10px; }
.kod-poklad h2 { font-family: var(--font-serif); font-size: 1.7rem; font-weight: 600; margin-bottom: 14px; }

.kod-poklad-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 22px;
  text-align: left;
}
.kod-poklad-text {
  flex: 1 1 auto;
  order: 1;
  color: var(--text-muted);
}
.kod-poklad-text p { margin-bottom: 10px; }
.kod-poklad-photo {
  order: 2;
  width: 260px;
  height: 220px;
  object-fit: cover;
  border-radius: 24px 24px 24px 4px;
  flex-shrink: 0;
}
/* Bez tohohle by obecné pravidlo "img { display: block }" přebilo
   skryté [hidden] chování a i bez fotky by zůstal viditelný rozbitý rámeček. */
.kod-poklad-photo[hidden] { display: none; }

@media (max-width: 640px) {
  .kod-poklad-content { flex-direction: column; text-align: center; }
  .kod-poklad-photo { order: -1; width: 60%; max-width: 190px; height: 150px; margin: 0 auto; }
}

@media (max-width: 420px) {
  .kod-poklad-photo { width: 75%; max-width: 160px; height: 130px; }
}

.kod-poklad-soubory {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
