/* ============================================================
   MŠ Sobotka — Website UI Kit component styles
   Loads AFTER colors_and_type.css
   ============================================================ */

.wrap { max-width: 1140px; margin: 0 auto; padding: 0 24px; }
section { position: relative; }

/* ---------- Buttons ---------- */
/* Chunky, pressable, candy-like buttons */
.btn {
  font-family: var(--font-display); font-weight: 700; font-size: 1.08rem;
  border: none; cursor: pointer; text-decoration: none;
  padding: 16px 30px; border-radius: var(--r-pill);
  display: inline-flex; align-items: center; gap: 9px; line-height: 1; white-space: nowrap;
  transition: transform var(--dur-fast) var(--ease-bounce), box-shadow var(--dur-fast), background var(--dur), color var(--dur);
}
.btn .ic { width: 20px; height: 20px; }
.btn-primary { background: var(--green-500); color: #fff; box-shadow: 0 6px 0 var(--green-700); }
.btn-primary:hover { background: var(--green-500); transform: translateY(-3px); box-shadow: 0 9px 0 var(--green-700); color:#fff; }
.btn-primary:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--green-700); }
.btn-secondary { background: var(--bee); color: var(--ink-900); box-shadow: 0 6px 0 var(--bee-deep); }
.btn-secondary:hover { transform: translateY(-3px); box-shadow: 0 9px 0 var(--bee-deep); }
.btn-secondary:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--bee-deep); }
.btn-ghost { background: #fff; color: var(--green-900); box-shadow: 0 6px 0 var(--green-300), inset 0 0 0 2px var(--green-300); }
.btn-ghost:hover { background: var(--green-100); color: var(--green-900); transform: translateY(-3px); box-shadow: 0 9px 0 var(--green-300), inset 0 0 0 2px var(--green-300); }
.btn-ghost:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--green-300), inset 0 0 0 2px var(--green-300); }
.btn-white { background:#fff; color: var(--green-900); box-shadow: 0 6px 0 rgba(120,90,40,.22); }
.btn-white:hover { transform: translateY(-3px); box-shadow: 0 9px 0 rgba(120,90,40,.22); }
.btn-white:active { transform: translateY(3px); box-shadow: 0 2px 0 rgba(120,90,40,.22); }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; }
.header-top {
  background: var(--green-900); color: #fff; font-size: .9rem;
}
.header-top .wrap { display: flex; align-items: center; justify-content: space-between; padding-top: 8px; padding-bottom: 8px; gap: 16px; }
.header-top a { color: #fff; text-decoration: none; display: inline-flex; align-items: center; gap: 7px; font-weight: 600; }
.header-top a:hover { color: var(--bee); }
.header-top .ic { width: 16px; height: 16px; }
.header-top .quick { display: flex; gap: 20px; }
.header-bar {
  background: rgba(255,248,238,0.92); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--cream-300);
}
.header-bar .wrap { display: flex; align-items: center; justify-content: space-between; padding-top: 12px; padding-bottom: 12px; }
.nav-links { display: flex; gap: 4px; align-items: center; }
.nav-links a {
  font-family: var(--font-display); font-weight: 500; font-size: 1rem; color: var(--ink-900);
  text-decoration: none; padding: 9px 14px; border-radius: var(--r-pill); white-space: nowrap;
  transition: background var(--dur), color var(--dur);
}
.nav-links a:hover { background: var(--green-100); color: var(--green-900); }
.nav-links a.active { background: var(--green-700); color: #fff; }
.menu-btn { display: none; background: var(--green-100); border: none; color: var(--green-900); width: 46px; height: 46px; border-radius: 14px; cursor: pointer; align-items: center; justify-content: center; }
.menu-btn .ic { width: 24px; height: 24px; }
.mobile-nav { display: none; background: var(--cream-50); border-bottom: 1px solid var(--cream-300); padding: 12px 24px 18px; }
.mobile-nav a { display: block; font-family: var(--font-display); font-weight: 500; font-size: 1.1rem; color: var(--ink-900); text-decoration: none; padding: 13px 14px; border-radius: var(--r-md); }
.mobile-nav a:hover { background: var(--green-100); }

/* ---------- Brand lockup ---------- */
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand .mark { width: 48px; height: 48px; border-radius: 16px; background: var(--green-700); display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-weight: 700; color: #fff; font-size: 1.2rem; box-shadow: var(--shadow-sm); flex: 0 0 auto; }
.brand .name { font-family: var(--font-display); font-weight: 600; font-size: 1.25rem; color: var(--ink-900); line-height: 1.05; }
.brand .sub { font-family: var(--font-text); font-weight: 700; font-size: .68rem; letter-spacing: .05em; color: var(--green-900); }

/* ---------- Hero ---------- */
.hero { background: var(--cream-100); padding-top: var(--sp-7); overflow: hidden; }
.hero-inner { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 40px; align-items: center; }
.hero-copy h1 { font-size: var(--fs-display); margin-bottom: 18px; }
.hero-copy .lead { margin-bottom: 28px; max-width: 34ch; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-art { position: relative; aspect-ratio: 5/4.4; }
.hero-art .photo { position: absolute; inset: 0; border-radius: var(--r-blob); overflow: hidden; box-shadow: var(--shadow-lg); }
.hero-art .photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-art .mascot { position: absolute; width: 118px; bottom: -14px; left: -18px; filter: drop-shadow(var(--shadow-md)); }
.hero-art .sticker { position: absolute; top: 14px; right: -10px; background: #fff; border-radius: var(--r-pill); padding: 10px 16px; box-shadow: var(--shadow-md); font-family: var(--font-display); font-weight: 600; color: var(--green-900); display:flex; gap:8px; align-items:center; }
.hero-art .sticker .ic { width: 18px; height: 18px; color: var(--green-700); }
.blob-deco { position: absolute; border-radius: var(--r-blob); opacity: .5; z-index: 0; }

/* ---------- Wave divider ---------- */
.wave { display: block; width: 100%; height: 56px; }

/* ---------- Parent tiles ---------- */
.tiles-section { background: var(--cream-50); padding: var(--sp-7) 0 var(--sp-8); }
.section-head { text-align: center; margin-bottom: var(--sp-6); }
.section-head .eyebrow { display: block; margin-bottom: 8px; }
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.tile { background: #fff; border-radius: var(--r-lg); padding: 24px 22px; box-shadow: var(--shadow-sm); text-decoration: none; display: block; transition: transform var(--dur) var(--ease-soft), box-shadow var(--dur); }
.tile:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.tile:hover .tile-ic { transform: scale(1.08) rotate(-4deg); }
.tile-ic { width: 60px; height: 60px; border-radius: 18px; display: flex; align-items: center; justify-content: center; margin-bottom: 16px; transition: transform var(--dur) var(--ease-bounce); }
.tile-ic .ic { width: 30px; height: 30px; }
.tile h3 { margin: 0 0 4px; font-size: 1.2rem; }
.tile p { margin: 0; font-size: .92rem; color: var(--ink-500); }

/* ---------- About strip ---------- */
.about { background: var(--green-100); padding: var(--sp-8) 0; }
.about-inner { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 44px; align-items: center; }
.about .photo { border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-md); aspect-ratio: 4/3; }
.about .photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.about .stats { display: flex; gap: 28px; margin-top: 22px; flex-wrap: wrap; }
.about .stat .n { font-family: var(--font-display); font-weight: 700; font-size: 2rem; color: var(--green-900); line-height: 1; }
.about .stat .l { font-size: .9rem; color: var(--ink-700); }

/* ---------- Class cards ---------- */
.classes { background: var(--cream-50); padding: var(--sp-8) 0; }
.classes-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.class-card { background: #fff; border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-sm); text-decoration: none; display: flex; flex-direction: column; transition: transform var(--dur) var(--ease-soft), box-shadow var(--dur); }
.class-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.class-card .top { height: 128px; display: flex; align-items: center; justify-content: center; position: relative; }
.class-card .top img { width: 110px; height: 110px; transition: transform var(--dur) var(--ease-bounce); }
.class-card:hover .top img { transform: translateY(-4px) rotate(3deg); }
.class-card .chip { position: absolute; top: 12px; left: 12px; font-family: var(--font-display); font-weight: 600; font-size: .76rem; padding: 5px 11px; border-radius: var(--r-pill); background: #fff; }
.class-card .body { padding: 16px 18px 20px; flex: 1; display: flex; flex-direction: column; }
.class-card h3 { margin: 0 0 3px; }
.class-card .meta { font-size: .85rem; color: var(--ink-500); margin-bottom: 8px; }
.class-card p { font-size: .9rem; color: var(--ink-700); margin: 0 0 14px; }
.class-card .more { margin-top: auto; display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-display); font-weight: 600; font-size: .9rem; }
.class-card .more .ic { width: 16px; height: 16px; }

/* ---------- Why us ---------- */
.why { background: var(--bee-soft); padding: var(--sp-8) 0; }
.why-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.why-item { text-align: center; }
.why-ic { width: 76px; height: 76px; border-radius: var(--r-blob); background: #fff; display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; box-shadow: var(--shadow-sm); }
.why-ic .ic { width: 36px; height: 36px; color: var(--green-700); }
.why-item h3 { font-size: 1.2rem; margin: 0 0 6px; }
.why-item p { font-size: .92rem; color: var(--ink-700); margin: 0; }

/* ---------- News ---------- */
.news { background: var(--cream-50); padding: var(--sp-8) 0; }
.news-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: var(--sp-6); gap: 20px; flex-wrap: wrap; }
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.news-card { background: #fff; border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-sm); text-decoration: none; display: flex; flex-direction: column; transition: transform var(--dur) var(--ease-soft), box-shadow var(--dur); }
.news-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.news-card .thumb { aspect-ratio: 16/10; overflow: hidden; }
.news-card .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.news-card .body { padding: 18px 20px 22px; }
.date-pill { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-display); font-weight: 600; font-size: .78rem; color: var(--green-900); background: var(--green-100); padding: 5px 11px; border-radius: var(--r-pill); margin-bottom: 10px; }
.date-pill .ic { width: 14px; height: 14px; }
.date-pill { white-space: nowrap; }
.news-card h3 { margin: 0 0 6px; font-size: 1.18rem; }
.news-card p { font-size: .9rem; color: var(--ink-700); margin: 0; }

/* ---------- CTA band ---------- */
.cta-band { background: var(--green-700); color: #fff; padding: var(--sp-8) 0; text-align: center; position: relative; overflow: hidden; }
.cta-band h2 { color: #fff; }
.cta-band p { color: var(--green-100); max-width: 52ch; margin: 0 auto 26px; }
.cta-band .actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ---------- Footer ---------- */
.footer { background: var(--ink-900); color: #fff; padding: var(--sp-8) 0 var(--sp-6); }
.footer a { color: var(--cream-200); text-decoration: none; }
.footer a:hover { color: var(--bee); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.footer .brand .name, .footer .brand .sub { color: #fff; }
.footer .brand .sub { color: var(--bee); }
.footer h4 { font-family: var(--font-display); font-size: 1.05rem; color: #fff; margin: 0 0 14px; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer .contact-line { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 12px; color: var(--cream-200); }
.footer .contact-line .ic { width: 18px; height: 18px; color: var(--bee); flex: 0 0 auto; margin-top: 2px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.14); margin-top: var(--sp-6); padding-top: 20px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: .85rem; color: var(--ink-300); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .menu-btn { display: flex; }
  .hero-inner { grid-template-columns: 1fr; gap: 28px; }
  .hero-art { max-width: 460px; }
  .about-inner { grid-template-columns: 1fr; gap: 28px; }
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .classes-grid { grid-template-columns: repeat(2, 1fr); }
  .why-grid { grid-template-columns: repeat(2, 1fr); }
  .news-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .header-top .quick { display: none; }
}
@media (max-width: 560px) {
  .tiles { grid-template-columns: 1fr; }
  .classes-grid { grid-template-columns: 1fr; }
  .why-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   PLAYFUL LAYER — animation, decoration, colorful bands
   ============================================================ */

/* ---- Keyframes ---- */
@keyframes bob       { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-12px)} }
@keyframes float-y   { 0%,100%{transform:translateY(0) rotate(var(--rot,0deg))} 50%{transform:translateY(-18px) rotate(var(--rot,0deg))} }
@keyframes wiggle    { 0%,100%{transform:rotate(-7deg)} 50%{transform:rotate(7deg)} }
@keyframes spin-slow { to { transform: rotate(360deg) } }
@keyframes pop-in    { 0%{transform:scale(0)} 70%{transform:scale(1.12)} 100%{transform:scale(1)} }

/* ---- Sections become colorful, decor-clipping stages ---- */
.tiles-section, .classes, .why, .news, .cta-band, .hero, .about { overflow: clip; }
.tiles-section .wrap, .classes .wrap, .why .wrap, .news .wrap,
.cta-band .wrap, .about .wrap, .hero .wrap { position: relative; z-index: 2; }

.tiles-section {
  background:
    radial-gradient(var(--bee) 2.2px, transparent 2.4px) 0 0 / 30px 30px,
    var(--sky-soft);
  background-blend-mode: soft-light, normal;
}
.classes { background: var(--cream-50); }
.news { background: var(--mole-soft); }

/* ---- Floating decoration primitives ---- */
.deco { position: absolute; z-index: 1; pointer-events: none; }
.deco.float { animation: float-y 7s ease-in-out infinite; }
.deco svg { display: block; }
.deco-blob { border-radius: var(--r-blob); }

/* ---- Bobbing mascots ---- */
.hero-art .mascot { animation: bob 3.4s ease-in-out infinite; }
.class-card .top img { animation: bob 4s ease-in-out infinite; }
.class-card:nth-child(2) .top img { animation-delay: .5s; }
.class-card:nth-child(3) .top img { animation-delay: 1s; }
.class-card:nth-child(4) .top img { animation-delay: 1.5s; }

/* ---- Sticker tilt + hover straighten / wiggle ---- */
.tilt-l { transform: rotate(-2.4deg); }
.tilt-r { transform: rotate(2.4deg); }
.class-card { transform: rotate(var(--tilt, 0deg)); }
.class-card:nth-child(odd)  { --tilt: -1.8deg; }
.class-card:nth-child(even) { --tilt: 1.8deg; }
.class-card:hover { transform: translateY(-8px) rotate(0deg) scale(1.02); }
.tile:hover { transform: translateY(-6px) rotate(-1.5deg); }
.tile:hover .tile-ic { animation: wiggle .5s ease-in-out; }
.news-card:nth-child(odd)  { transform: rotate(-1.2deg); }
.news-card:nth-child(even) { transform: rotate(1.2deg); }
.news-card:hover { transform: translateY(-6px) rotate(0deg); }

/* ---- Chunkier, rounder tiles & icons ---- */
.tile { border-radius: var(--r-xl); border: 3px solid #fff; }
.tile-ic { width: 68px; height: 68px; border-radius: 22px; }
.tile-ic .ic { width: 34px; height: 34px; }
.tile h3 { font-size: 1.32rem; }

/* ---- Why-us icon blobs spin gently on hover ---- */
.why { background: var(--bee-soft); }
.why-ic { width: 88px; height: 88px; border: 3px dashed var(--bee); }
.why-item:hover .why-ic { animation: spin-slow 6s linear infinite; }

/* ---- Marker highlight behind hero keyword (classic highlighter) ---- */
.hl {
  background: linear-gradient(transparent 56%, var(--bee) 56%);
  border-radius: 6px; padding: 0 4px;
}

/* ---- Wavy hand-drawn underline under section titles ---- */
.section-head h2, .news-head h2 { position: relative; display: inline-block; }
.section-head h2::after, .news-head h2::after {
  content:""; display:block; height:10px; margin: 6px auto 0; width: 72%;
  background: var(--green-300);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='10' viewBox='0 0 120 10'%3E%3Cpath d='M2 6 C 20 1, 40 1, 60 6 S 100 11, 118 5' fill='none' stroke='black' stroke-width='4' stroke-linecap='round'/%3E%3C/svg%3E") center/120px 10px repeat-x;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='10' viewBox='0 0 120 10'%3E%3Cpath d='M2 6 C 20 1, 40 1, 60 6 S 100 11, 118 5' fill='none' stroke='black' stroke-width='4' stroke-linecap='round'/%3E%3C/svg%3E") center/120px 10px repeat-x;
}
.news-head h2::after { margin-left: 0; }

/* ---- Bigger, rounder class card tops ---- */
.class-card { border: 3px solid #fff; border-radius: var(--r-xl); }
.class-card .top { height: 150px; }
.class-card .top img { width: 124px; height: 124px; }

/* ---- CTA band gets a playful dotted sky + bottom scallop room ---- */
.cta-band { background:
    radial-gradient(rgba(255,255,255,.18) 2.4px, transparent 2.6px) 0 0 / 34px 34px,
    var(--green-700); }
.cta-band h2 { font-size: clamp(2rem, 4vw, 3rem); }

/* ---- Entrance pop for stickers ---- */
.pop-in { animation: pop-in .5s var(--ease-bounce) both; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, .deco.float, .hero-art .mascot, .class-card .top img { animation: none !important; transition: none !important; }
  .class-card, .news-card, .tilt-l, .tilt-r { transform: none !important; }
}
