/* =====================================================
   ZÁKLADNÍ LAYOUT – JEDNOTNÝ MODEL STRÁNKY
===================================================== */

.site-header,
.site-main,
.site-footer {
  max-width: var(--layout-width);
  margin: 0 auto;
  padding: 1rem;
}

.layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 2rem;
  align-items: stretch;
}

/* SIDEBAR – vždy stejný */
.sidebar {
  background: var(--paper-2);
  padding: 1.25rem;
  box-shadow:
    0 4px 12px rgba(0,0,0,.08),
    inset 0 0 0 1px rgba(0,0,0,.04);
}

/* CONTENT – vždy čitelný papír */
.content {
  background: var(--paper);
  padding: 2.5rem;

  width: 100%;
  max-width: none;
  box-sizing: border-box;

  box-shadow:
    0 4px 12px rgba(0,0,0,.08),
    inset 0 0 0 1px rgba(0,0,0,.04);
}

/* =====================================================
   ROOT / PROMĚNNÉ
===================================================== */

:root {
  --layout-width: 1280px;

  --ink-blue: #3b73d8;
  --ink-red:  #d41a1a;
  --paper:   #fbf9f4;   /* NOVÝ: velmi světlý, skoro bílý */
  --paper-2: #efe7d8;   /* zůstává – sidebar / header */
  --ink-dark: #2b2b2b;
  --line-faint: rgba(0,0,0,.06);

  --sekce-barva: #666;

  --font-mono: "IBM Plex Mono", monospace;

}

/* =====================================================
   GLOBÁLNÍ TYPOGRAFIE A POZADÍ
===================================================== */

body {
  background:
    linear-gradient(to bottom, rgba(0,0,0,.03), rgba(0,0,0,0)),
    var(--paper);
  color: var(--ink-dark);
  font-family: "Literata", "Georgia", serif;
  line-height: 1.55;
}

h1, h2, h3 {
  font-family: "Literata", "Georgia", serif;
  font-weight: 500;
  color: var(--ink-blue);
  letter-spacing: .02em;
}

p, li {
  font-family: "Literata", "Georgia", serif;
}

a {
  color: var(--ink-red);
  text-decoration: none;
  border-bottom: 1px dotted rgba(212,26,26,.4);
}

a:hover {
  border-bottom-style: solid;
}

/* =====================================================
   HLAVIČKA – OSVALD CHLUBNA
===================================================== */

.site-header {
  background: var(--paper-2);
  border-bottom: 1px solid var(--line-faint);
  padding: 2rem 1rem;
}

/* vnitřní layout hlavičky */
.header-inner {
  max-width: var(--layout-width);
  margin: 0 auto;

  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 2.5rem;
  align-items: center;
}

/* =====================================================
   FOTOGRAFIE
===================================================== */

.header-portrait img {
  display: block;
  width: 100%;
  height: auto;

  filter:
    grayscale(100%)
    contrast(1.05)
    brightness(1.05)
    sepia(12%);

  background: var(--paper);
  padding: .5rem;
  border: 1px solid rgba(0,0,0,.15);
  box-shadow: 0 6px 16px rgba(0,0,0,.25);
}

/* =====================================================
   PODPIS + LETOPOČTY – TYPOGRAFICKÉ ŘEŠENÍ
===================================================== */

.header-title {
  position: relative;
  display: inline-block;
}

/* podpis */
.header-signature {
  display: block;
  max-width: 460px;
  width: 100%;
  opacity: .9;
}

/* letopočty – pod smyčkou jména */
.header-years {
  position: absolute;

  /* HRAJEME SI TADY */
  left: 22%;            /* posun pod jméno */
  bottom: 36%;          /* výška pod smyčkou */

  transform: translateX(-50%);

  font-family: "IBM Plex Mono", monospace;
  font-size: .85rem;
  letter-spacing: .25em;
  color: rgba(0,0,0,.65);
  white-space: nowrap;
}


/* =====================================================
   HLAVNÍ NAVIGACE
===================================================== */

.site-nav {
  max-width: var(--layout-width);
  margin: 0 auto 2.5rem;
  padding: .75rem 1rem 0;

  border-bottom: 1px solid var(--line-faint);

  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
}

/* seznam */
.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;

  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

/* položka */
.nav-list li {
  margin: 0;
}

/* odkaz */
.nav-list a {
  font-family: "IBM Plex Mono", monospace;
  font-size: .9rem;
  letter-spacing: .12em;
  text-transform: uppercase;

  color: var(--ink-blue);
  border-bottom: none;
  padding-bottom: .15rem;
}

/* hover */
.nav-list a:hover {
  color: var(--ink-red);
  border-bottom: 1px solid var(--ink-red);
}

/* aktivní položka */
.nav-list .current-menu-item > a,
.nav-list .current_page_item > a {
  color: var(--ink-red);
  border-bottom: 1px solid var(--ink-red);
}

/* =====================================================
   DROPDOWN MENU
===================================================== */

.nav-list li {
  position: relative;
}

.nav-list .sub-menu {
  display: none;

  position: absolute;
  top: 100%;
  left: 0;
  z-index: 1000;

  min-width: 220px;

  list-style: none;
  margin: 0;
  padding: .75rem 0;

  background: #fff;
  border: 1px solid var(--line-faint);

  box-shadow: 0 4px 12px rgba(0,0,0,.08);
}

.nav-list .sub-menu li {
  display: block;
}

.nav-list .sub-menu a {
  display: block;
  padding: .4rem 1rem;

  white-space: nowrap;

  border: none;
}

.nav-list li:hover > .sub-menu {
  display: block;
}

/* =====================================================
   SEARCH
===================================================== */

.header-search {
  display: flex;
  align-items: center;
  gap: .4rem;
}

.header-search input[type="search"] {
  width: 220px;

  padding: .35rem .6rem;

  border: 1px solid var(--line-faint);

  font-size: .9rem;
}

.header-search button {
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 1rem;
}

/* =====================================================
   PAGINACE
===================================================== */

.pagination {

    margin-top: 2rem;

    text-align: center;
}

.pagination .page-numbers {

    margin: 0 .25rem;
}

.pagination .current {

    color: var(--ink-red);

    font-weight: 600;
}

.mista-pagination {

    margin-top: 1rem;
    padding-top: 1rem;

    border-top: 1px solid var(--line-faint);

    text-align: center;

}

/* =====================================================
   FOOTER
===================================================== */

.site-footer {
  margin-top: 1.5rem;
  padding: 2rem 1rem;
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  background: var(--paper-2);
  padding: 1rem 2rem;
  text-align: center;

  box-shadow:
    0 -1px 0 var(--line-faint),
    0 -6px 18px rgba(0,0,0,.08);
}

/* =====================================================
   FOOTER – OPTICKÉ NAPOJENÍ NA OBSAH
===================================================== */

.site-main {
  padding-bottom: 2rem; /* místo velké mezery */
}

@media (max-width: 768px) {

  .layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    order: 1;
  }

  .content {
    order: 2;
    max-width: none;
    padding: 1.5rem;
  }

  .header-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .header-portrait {
    max-width: 220px;
    margin: 0 auto 1.5rem;
  }

  .header-signature {
    margin-left: auto;
    margin-right: auto;
  }

  .header-years {
    left: 50%;
    bottom: 18%;
  }
}