/*
Theme Name: O odpadoch
Theme URI: https://o-odpadoch.sk
Author: O odpadoch
Description: Minimalistická redakčná téma pre články a materiály o odpadoch.
Version: 1.3.7
Requires at least: 6.4
Requires PHP: 8.1
Text Domain: o-odpadoch
*/

:root {
  --ink: #111;
  --paper: #fff;
  --muted: #666;
  --line: #d7d7d7;
  --soft: #f3f3f1;
  --brick: #b24c36;
  --max: 1240px;
  --reading: 760px;
  --pad: clamp(1rem, 3vw, 2.5rem);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 18px;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }
button, input, textarea, select { font: inherit; }

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.screen-reader-text:focus {
  position: fixed;
  z-index: 9999;
  top: 1rem;
  left: 1rem;
  width: auto;
  height: auto;
  padding: .75rem 1rem;
  clip: auto;
  background: var(--paper);
  border: 2px solid var(--ink);
}

.site-shell { width: min(100%, var(--max)); margin-inline: auto; padding-inline: var(--pad); }
.site-header { border-bottom: 1px solid var(--ink); }
.header-inner {
  min-height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}
.brand { display: inline-flex; align-items: flex-end; gap: .48rem; text-decoration: none; }
.brand-mark {
  color: var(--brick);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 3.35rem;
  font-weight: 400;
  line-height: .72;
}
.brand-lockup { display: grid; gap: .34rem; padding-bottom: .08rem; }
.brand-name { font-size: 1.32rem; font-weight: 800; line-height: .78; letter-spacing: -.055em; }
.brand-steps { display: flex; align-items: center; gap: 2px; height: 4px; color: var(--brick); }
.brand-steps i { display: block; height: 4px; background: currentColor; }
.brand-steps i:nth-child(1) { width: 29px; }
.brand-steps i:nth-child(2) { width: 23px; }
.brand-steps i:nth-child(3) { width: 18px; }
.brand-steps i:nth-child(4) { width: 13px; }
.brand-steps i:nth-child(5) { width: 8px; }
.menu-toggle { display: none; border: 1px solid var(--ink); background: transparent; padding: .45rem .7rem; }
.primary-menu { display: flex; gap: 1.5rem; margin: 0; padding: 0; list-style: none; }
.primary-menu a { text-decoration: none; font-size: .95rem; font-weight: 700; }
.primary-menu a:hover, .primary-menu a:focus-visible, .primary-menu .current-menu-item > a { color: var(--brick); text-decoration: underline; }

.hero { padding-block: clamp(4rem, 10vw, 8.5rem) clamp(3rem, 7vw, 6rem); border-bottom: 1px solid var(--ink); }
.eyebrow { margin: 0 0 1rem; font-size: .78rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.hero h1 {
  max-width: 980px;
  margin: 0;
  font-size: clamp(3.2rem, 10vw, 8.8rem);
  line-height: .88;
  letter-spacing: -.075em;
}
.hero-copy { max-width: 760px; margin: 2.4rem 0 0 auto; font-size: clamp(1.25rem, 2.4vw, 2rem); line-height: 1.25; }
.hero-links { display: flex; flex-wrap: wrap; gap: .8rem; margin: 2rem 0 0 auto; max-width: 760px; }
.button {
  display: inline-block;
  padding: .78rem 1rem;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  font-weight: 700;
}
.button:hover { background: var(--paper); color: var(--ink); }
.button-ghost { background: var(--paper); color: var(--ink); }
.button-ghost:hover { background: var(--ink); color: var(--paper); }

.section { padding-block: clamp(3rem, 7vw, 6rem); border-bottom: 1px solid var(--ink); }
.latest-section { padding-top: clamp(1.5rem, 3vw, 2.5rem); }
.section-head { display: grid; grid-template-columns: minmax(160px, .6fr) 2fr; gap: 2rem; align-items: end; margin-bottom: 2.5rem; }
.section-head h2 { margin: 0; font-size: clamp(2rem, 5vw, 4.8rem); line-height: .95; letter-spacing: -.055em; }
.section-link { justify-self: end; font-weight: 700; }

.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--ink); }
.post-card { position: relative; min-width: 0; padding: 1.3rem; border-right: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.post-card::before { content: ""; position: absolute; top: 1.35rem; left: 0; width: 3px; height: 1.5rem; background: var(--brick); }
.post-card:nth-child(3n) { border-right: 0; }
.post-card h3 { margin: .8rem 0 .7rem; font-size: clamp(1.35rem, 2.2vw, 2rem); line-height: 1.06; letter-spacing: -.035em; }
.post-card h3 a { text-decoration: none; }
.post-card h3 a:hover, .post-card h3 a:focus-visible { color: var(--brick); text-decoration: underline; }
.meta { display: flex; flex-wrap: wrap; gap: .45rem .8rem; color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; }
.meta time { color: var(--brick); font-weight: 700; }
.excerpt { margin: 0; color: #333; font-size: .95rem; }

.material-list { border-top: 1px solid var(--ink); }
.material-row {
  display: grid;
  grid-template-columns: 130px 1fr auto;
  gap: 1rem;
  align-items: baseline;
  padding-block: 1.2rem;
  border-bottom: 1px solid var(--ink);
}
.material-row h3 { margin: 0; font-size: clamp(1.2rem, 2.5vw, 2rem); line-height: 1.1; }
.material-row h3 a { text-decoration: none; }
.material-row h3 a:hover { text-decoration: underline; }
.material-type { color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; }

.page-head { padding-block: clamp(2.25rem, 5vw, 4.5rem); border-bottom: 1px solid var(--ink); }
.page-head h1 { max-width: 1000px; margin: 0; font-size: clamp(2.15rem, 5vw, 4.5rem); line-height: .98; letter-spacing: -.05em; }
.single .page-head h1 { font-size: clamp(1.9rem, 4.2vw, 3.75rem); line-height: 1.04; }
.page-head h1::after { content: ""; display: block; width: 3.25rem; height: 3px; margin-top: 1rem; background: var(--brick); }
.page-head .archive-description { max-width: var(--reading); margin-top: 1.5rem; font-size: 1.2rem; }
.content-wrap { width: min(100%, var(--reading)); margin-inline: auto; padding: clamp(2.5rem, 7vw, 5.5rem) var(--pad); }
.about-layout { display: grid; grid-template-columns: minmax(240px, 330px) minmax(0, var(--reading)); gap: clamp(2rem, 5vw, 5rem); align-items: start; padding-block: clamp(2.5rem, 7vw, 5.5rem); }
.about-portrait { margin: 0; }
.about-portrait img { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: center; filter: grayscale(1); }
.about-portrait figcaption { margin-top: .65rem; color: var(--muted); font-size: .82rem; }
.entry-content > * { margin-block: 0 1.35rem; }
.page .entry-content li + li { margin-top: .75rem; }
.entry-content h2 { margin-top: 2.5rem; font-size: clamp(1.7rem, 4vw, 2.7rem); line-height: 1.1; }
.single .entry-content h2 { padding-left: .75rem; border-left: 3px solid var(--brick); font-size: clamp(1.45rem, 3.4vw, 2.25rem); }
.entry-content .legislation-section { padding-left: .75rem; border-left: 3px solid var(--brick); }
.entry-content .legislation-list li::marker { color: var(--brick); }
.entry-content h3 { margin-top: 2rem; line-height: 1.2; }
.entry-content blockquote { margin-inline: 0; padding: 1.3rem 0 1.3rem 1.4rem; border-left: 4px solid var(--ink); font-size: 1.25rem; }
.entry-content a { overflow-wrap: anywhere; }
.entry-content a:hover, .entry-content a:focus-visible { color: var(--brick); }
.entry-content table { width: 100%; border-collapse: collapse; }
.entry-content th, .entry-content td { padding: .7rem; border: 1px solid var(--line); text-align: left; }
.entry-footer { margin-top: 3rem; padding-top: 1.2rem; border-top: 1px solid var(--ink); color: var(--muted); font-size: .85rem; }

.archive-grid { padding-block: 3rem 5rem; }
.pagination { margin-top: 2rem; }
.nav-links { display: flex; gap: .5rem; flex-wrap: wrap; }
.page-numbers { padding: .4rem .7rem; border: 1px solid var(--ink); text-decoration: none; }
.page-numbers.current { background: var(--ink); color: var(--paper); }
.empty-state { padding: 2rem; border: 1px solid var(--ink); background: var(--soft); }

.search-form { display: flex; gap: .5rem; max-width: 620px; margin-top: 1.5rem; }
.search-field { min-width: 0; flex: 1; padding: .75rem; border: 1px solid var(--ink); border-radius: 0; }
.search-submit { padding: .75rem 1rem; border: 1px solid var(--ink); background: var(--ink); color: var(--paper); font-weight: 700; }

.site-footer { background: var(--ink); color: var(--paper); }
.footer-inner { padding-block: 1.5rem; }
.footer-menu { margin: 0; padding: 0; list-style: none; columns: 2; }
.footer-menu li { margin-bottom: .5rem; }
.footer-menu a { color: var(--paper); }
.footer-bottom { padding-block: 1rem; color: #bbb; font-size: .78rem; }

@media (max-width: 820px) {
  body { font-size: 17px; }
  .header-inner { min-height: 72px; }
  .brand-mark { font-size: 2.9rem; }
  .brand-name { font-size: 1.12rem; }
  .brand-lockup { gap: .28rem; }
  .brand-steps i { height: 3px; }
  .brand-steps i:nth-child(1) { width: 24px; }
  .brand-steps i:nth-child(2) { width: 19px; }
  .brand-steps i:nth-child(3) { width: 15px; }
  .brand-steps i:nth-child(4) { width: 11px; }
  .brand-steps i:nth-child(5) { width: 7px; }
  .menu-toggle { display: block; }
  .site-nav { display: none; position: absolute; z-index: 10; top: 72px; left: 0; right: 0; padding: 1rem var(--pad); background: var(--paper); border-bottom: 1px solid var(--ink); }
  .site-nav.is-open { display: block; }
  .primary-menu { display: grid; gap: .3rem; }
  .primary-menu a { display: block; padding: .65rem 0; }
  .section-head { grid-template-columns: 1fr; }
  .about-layout { grid-template-columns: 1fr; }
  .about-portrait { max-width: 340px; }
  .section-link { justify-self: start; }
  .post-grid { grid-template-columns: 1fr; }
  .post-card, .post-card:nth-child(3n) { border-right: 0; }
  .material-row { grid-template-columns: 1fr auto; }
  .material-row .material-type { grid-column: 1 / -1; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
