/*
Theme Name: SPWŠ Semily
Author: SPWŠ
Description: Lehká vlastní šablona pro Spolek přátel waldorfské školy v Semilech.
Version: 1.2.0
Text Domain: spws
*/

:root {
  --ink: #26342e;
  --muted: #64736b;
  --paper: #fffdf7;
  --cream: #f4efe2;
  --forest: #315c4b;
  --forest-dark: #214538;
  --gold: #d49842;
  --terracotta: #b95f48;
  --line: #ded8ca;
  --radius: 18px;
  --shadow: 0 12px 36px rgba(35, 55, 45, .10);
  --content: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 17px;
  line-height: 1.68;
}
a { color: var(--forest); text-decoration-thickness: .08em; text-underline-offset: .18em; }
a:hover { color: var(--terracotta); }
img { max-width: 100%; height: auto; border-radius: 12px; }
.wrap { width: min(calc(100% - 40px), var(--content)); margin-inline: auto; }
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 20px; top: 20px; z-index: 100; background: white; padding: 10px 14px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  color: white;
  background: rgba(33, 69, 56, .97);
  box-shadow: 0 4px 18px rgba(20, 45, 35, .18);
}
.header-inner { min-height: 76px; display: flex; align-items: center; gap: 32px; }
.brand { display: flex; align-items: center; gap: 12px; color: white; text-decoration: none; font-weight: 750; line-height: 1.15; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 43px;
  aspect-ratio: 1;
  border-radius: 50% 45% 55% 44%;
  background: var(--gold);
  color: var(--forest-dark);
  font-family: Georgia, serif;
  font-size: 24px;
}
.brand-text { max-width: 340px; }
.primary-nav { margin-left: auto; }
.primary-nav ul { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; margin: 0; padding: 0; list-style: none; }
.primary-nav a { display: block; padding: 10px 11px; color: white; border-radius: 9px; text-decoration: none; font-size: 15px; }
.primary-nav a:hover, .primary-nav .current-menu-item > a, .primary-nav .current_page_item > a { background: rgba(255,255,255,.12); }

.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(64px, 10vw, 126px) 0;
  color: white;
  background:
    radial-gradient(circle at 84% 15%, rgba(212,152,66,.40), transparent 24%),
    radial-gradient(circle at 15% 95%, rgba(185,95,72,.30), transparent 28%),
    linear-gradient(125deg, #214538 0%, #315c4b 65%, #3d6c57 100%);
}
.hero::after {
  content: "";
  position: absolute;
  right: -6vw;
  bottom: -160px;
  width: 420px;
  height: 420px;
  border: 2px solid rgba(255,255,255,.12);
  border-radius: 46% 54% 62% 38%;
  transform: rotate(18deg);
}
.hero-copy { position: relative; z-index: 1; max-width: 760px; }
.eyebrow { margin: 0 0 12px; color: #f1c886; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; font-size: 14px; }
.hero h1 { margin: 0 0 20px; max-width: 760px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(40px, 6vw, 72px); line-height: 1.04; font-weight: 500; }
.hero p { max-width: 650px; margin: 0 0 28px; font-size: clamp(18px, 2vw, 22px); color: rgba(255,255,255,.88); }
.button {
  display: inline-block;
  padding: 12px 19px;
  border-radius: 999px;
  color: var(--forest-dark);
  background: #f1c886;
  font-weight: 750;
  text-decoration: none;
}
.button:hover { color: var(--forest-dark); background: white; }

.section { padding: clamp(54px, 7vw, 92px) 0; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 30px; }
.section-head h2, .page-title { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(34px, 4.5vw, 52px); line-height: 1.1; font-weight: 500; }
.section-head a { font-weight: 700; white-space: nowrap; }
.posts-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.post-card { overflow: hidden; background: white; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 6px 18px rgba(40,55,45,.06); }
.post-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); transition: .2s ease; }
.post-card-media { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--cream); }
.post-card-media img { width: 100%; height: 100%; object-fit: cover; border-radius: 0; transition: transform .3s ease; }
.post-card:hover img { transform: scale(1.025); }
.post-card-placeholder { display: grid; place-items: center; height: 100%; color: var(--forest); font-family: Georgia, serif; font-size: 38px; }
.post-card-body { padding: 23px; }
.post-card time { color: var(--muted); font-size: 14px; }
.post-card h2 { margin: 7px 0 12px; font-family: Georgia, serif; font-size: 25px; line-height: 1.2; font-weight: 550; }
.post-card h2 a { color: var(--ink); text-decoration: none; }
.post-card h2 a:hover { color: var(--forest); }
.post-card p { margin: 0; color: var(--muted); font-size: 15px; }
.post-card-full .post-card-body { padding: clamp(24px, 4vw, 38px); }
.post-card-full { grid-column: 1 / -1; }
.post-card-full .post-card-media { aspect-ratio: 21 / 8; }
.post-card-full .post-card-body > .entry-content { color: var(--ink); font-size: 17px; }
.post-card-full .post-card-body > .entry-content p { margin: 0 0 1.25em; color: var(--ink); font-size: 17px; }
.post-card-full .post-card-body > .entry-content > *:last-child { margin-bottom: 0; }
.pagination { margin-top: 38px; }
.nav-links { display: flex; gap: 8px; flex-wrap: wrap; }
.page-numbers { display: grid; place-items: center; min-width: 42px; height: 42px; padding: 0 10px; border: 1px solid var(--line); border-radius: 10px; text-decoration: none; }
.page-numbers.current { color: white; background: var(--forest); border-color: var(--forest); }

.page-hero { padding: 58px 0 42px; background: var(--cream); border-bottom: 1px solid var(--line); }
.content-layout { display: grid; grid-template-columns: minmax(0, 790px) minmax(220px, 1fr); gap: clamp(36px, 7vw, 80px); align-items: start; }
.entry-content { font-size: 18px; }
.entry-content > *:first-child { margin-top: 0; }
.entry-content h2, .entry-content h3 { margin-top: 1.8em; color: var(--forest-dark); font-family: Georgia, serif; line-height: 1.2; }
.entry-content a { overflow-wrap: anywhere; }
.entry-content figure { margin: 28px 0; }
.entry-content .card, .entry-content > .main-bottom { margin: 24px 0; padding: 22px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.entry-content .card-header { margin-top: 0; }
.entry-content ul { padding-left: 1.2em; }
.entry-content li { margin: .55em 0; }
.entry-meta { color: var(--muted); margin-bottom: 22px; }
.featured-large { margin: 0 0 34px; width: 100%; max-height: 620px; object-fit: cover; }
.sidebar-box { position: sticky; top: 105px; padding: 24px; border-radius: var(--radius); background: var(--cream); }
.sidebar-box h2 { margin-top: 0; font-family: Georgia, serif; font-weight: 500; }
.sidebar-box ul { margin: 0; padding: 0; list-style: none; }
.sidebar-box li + li { margin-top: 10px; }

.site-footer { padding: 48px 0; color: rgba(255,255,255,.78); background: var(--forest-dark); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 40px; }
.site-footer h2 { margin: 0 0 10px; color: white; font-family: Georgia, serif; font-weight: 500; }
.site-footer p { margin: 5px 0; }
.site-footer a { color: #f1c886; }
.footer-copy { margin-top: 28px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.13); font-size: 14px; }

@media (max-width: 900px) {
  .header-inner { align-items: flex-start; flex-direction: column; padding: 16px 0; gap: 12px; }
  .primary-nav { margin-left: 0; }
  .primary-nav a { padding: 7px 9px; }
  .posts-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .content-layout { grid-template-columns: 1fr; }
  .sidebar-box { position: static; }
}
@media (max-width: 620px) {
  .wrap { width: min(calc(100% - 28px), var(--content)); }
  .site-header { position: static; }
  .brand-text { font-size: 15px; }
  .primary-nav ul { gap: 0; }
  .primary-nav a { font-size: 14px; }
  .posts-grid, .footer-grid { grid-template-columns: 1fr; }
  .section-head { align-items: flex-start; flex-direction: column; }
}
