﻿:root {
  --red: #f73533;
  --red-dark: #c4000b;
  --red-deep: #9f0009;
  --grey: #f0eee7;
  --grey-light: #f7f6f3;
  --grey-mid: #dadada;
  --grey-text: #6d6a62;
  --ink: #000000;
  --white: #ffffff;
  --blue: #337ca3;
  --green: #238528;
  --yellow: #ffc404;
  --shadow: 0 22px 48px rgba(0, 0, 0, 0.1);
  --font-base: Satoshi, Arial, Helvetica, sans-serif;
  --font-title: "PP Formula", Satoshi, Arial, Helvetica, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background: var(--grey) url("assets/pozadie.png") repeat top center;
  background-size: 760px auto;
  font-family: var(--font-base);
  line-height: 1.5;
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 78px;
  padding: 14px clamp(18px, 4vw, 64px);
  background: rgba(247, 246, 243, 0.94);
  border-bottom: 1px solid rgba(109, 106, 98, 0.18);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: var(--ink);
  text-decoration: none;
}

.brand-symbol {
  position: relative;
  display: grid;
  width: 62px;
  height: 70px;
  flex: 0 0 auto;
  place-items: center;
}

.brand-symbol img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand-text strong {
  display: block;
}

.brand-text strong {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.08;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.site-nav a {
  padding: 12px 14px;
  border-radius: 4px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--white);
  background: var(--red);
  outline: none;
}

#obdobia .section-head {
  max-width: none;
}

#obdobia .section-head h2 {
  white-space: nowrap;
}

.hero {
  display: grid;
  width: min(1240px, calc(100% - 36px));
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
  gap: 24px;
  margin: 34px auto 0;
  min-height: 590px;
}

.hero-panel {
  position: relative;
  display: flex;
  min-height: 100%;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  padding: clamp(28px, 5vw, 62px);
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(247, 246, 243, 0.98) 0%, rgba(247, 246, 243, 0.9) 48%, rgba(247, 246, 243, 0.5) 100%),
    url("assets/presov-lineart.png") right bottom / min(72%, 720px) auto no-repeat,
    var(--grey-light);
  border: 1px solid rgba(109, 106, 98, 0.24);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.hero-panel::before {
  content: none;
}

.hero-panel::after {
  position: absolute;
  inset: 18px;
  content: "";
  border: 1px solid rgba(196, 0, 11, 0.18);
  border-radius: 5px;
  pointer-events: none;
}

.kicker {
  margin: 0 0 14px;
  color: var(--red-dark);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.hero-panel .kicker {
  color: var(--red-dark);
}

.project .kicker {
  color: rgba(255, 255, 255, 0.78);
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--font-title);
  letter-spacing: 0;
}

h1 {
  position: relative;
  max-width: 740px;
  font-size: clamp(48px, 7vw, 92px);
  font-weight: 800;
  line-height: 0.96;
}

.lead {
  position: relative;
  max-width: 680px;
  margin: 26px 0 0;
  color: var(--grey-text);
  font-size: clamp(18px, 2.3vw, 24px);
  font-weight: 700;
}

.hero-actions {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.button {
  display: inline-flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  padding: 14px 18px;
  border: 2px solid transparent;
  border-radius: 4px;
  font-weight: 700;
  text-decoration: none;
}

.button-primary {
  color: var(--white);
  background: var(--red);
}

.button-light {
  color: var(--red-dark);
  border-color: rgba(196, 0, 11, 0.32);
}

.service-card {
  display: flex;
  min-height: 100%;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(24px, 4vw, 42px);
  background: var(--grey-light);
  border: 1px solid rgba(109, 106, 98, 0.18);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.service-label {
  width: fit-content;
  margin: 0 0 22px;
  padding: 8px 10px;
  color: var(--white);
  background: var(--red);
  border-radius: 4px;
  font-size: 13px;
  font-weight: 700;
}

.service-card h2 {
  font-size: clamp(34px, 5vw, 60px);
  font-weight: 800;
  line-height: 0.95;
}

.service-card form {
  margin-top: 34px;
  margin-bottom: auto;
}

.service-card label {
  display: block;
  margin-bottom: 10px;
  color: var(--grey-text);
  font-size: 14px;
  font-weight: 700;
}

.search-box {
  display: grid;
  grid-template-columns: 1fr auto;
  border: 2px solid transparent;
  border-radius: 4px;
  background: var(--white);
}

.search-box:focus-within {
  border-color: var(--red);
}

.search-box input {
  min-width: 0;
  height: 56px;
  padding: 0 16px;
  border: 0;
  outline: 0;
  background: transparent;
}

.search-box button {
  min-width: 92px;
  padding: 0 16px;
  color: var(--white);
  background: var(--red);
  border: 0;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.quick-links {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 34px;
}

.previews-section {
  padding-top: 96px;
}

.preview-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 0.8fr;
  grid-auto-rows: 220px;
  gap: 14px;
}

.preview-card {
  position: relative;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  background: var(--white);
  border: 1px solid rgba(109, 106, 98, 0.2);
  border-radius: 8px;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.08);
}

.preview-card-large {
  grid-row: span 2;
}

.preview-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.preview-card::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(180deg, transparent 58%, rgba(0, 0, 0, 0.16));
  pointer-events: none;
}

.timeline-section {
  padding-top: 96px;
}

.timeline-track {
  display: grid;
  grid-auto-columns: minmax(132px, 160px);
  grid-auto-flow: column;
  gap: 12px;
  overflow-x: auto;
  padding: 18px 2px 28px;
  border-top: 2px solid rgba(196, 0, 11, 0.2);
  border-bottom: 2px solid rgba(196, 0, 11, 0.2);
  scrollbar-color: var(--red) rgba(196, 0, 11, 0.12);
}

.timeline-item {
  display: grid;
  min-height: 160px;
  align-content: start;
  justify-items: center;
  gap: 9px;
  padding: 16px 12px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(109, 106, 98, 0.2);
  border-radius: 8px;
  text-align: center;
  text-decoration: none;
}

.timeline-item:hover {
  border-color: rgba(196, 0, 11, 0.46);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.08);
}

.timeline-item.is-disabled {
  color: var(--grey-text);
  pointer-events: none;
}

.book-icon {
  display: block;
  width: 52px;
  height: 52px;
  background: url("assets/ikona-kniha.png") center / contain no-repeat;
}

.timeline-item strong {
  color: var(--red-dark);
  font-weight: 700;
}

.timeline-item span:last-child {
  color: var(--grey-text);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
}

.quick-links a {
  min-height: 48px;
  padding: 12px;
  color: var(--ink);
  background: var(--white);
  border-left: 6px solid var(--red);
  border-radius: 4px;
  font-weight: 700;
  text-decoration: none;
}

.quick-links a:hover {
  color: var(--white);
  background: var(--red);
}

.stats {
  display: grid;
  width: min(1240px, calc(100% - 36px));
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin: 24px auto 0;
}

.stats article {
  padding: 24px;
  background: var(--white);
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.06);
}

.stats strong,
.stats span {
  display: block;
}

.stats strong {
  color: var(--red);
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 700;
  line-height: 1;
}

.stats span {
  margin-top: 10px;
  color: var(--grey-text);
  font-weight: 700;
}

.section {
  width: min(1240px, calc(100% - 36px));
  margin: 0 auto;
  padding-top: 92px;
  scroll-margin-top: 96px;
}

.section-head {
  max-width: 780px;
  margin-bottom: 28px;
}

.section-head h2,
.project h2 {
  font-size: clamp(34px, 5vw, 64px);
  font-weight: 800;
  line-height: 0.96;
}

.section-head p:not(.kicker) {
  margin: 18px 0 0;
  color: var(--grey-text);
  font-size: 18px;
  font-weight: 400;
}

.periods {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.period {
  min-height: 138px;
  padding: 20px;
  text-align: left;
  background: var(--white);
  border: 2px solid transparent;
  border-radius: 8px;
  cursor: pointer;
}

.period:hover,
.period:focus-visible,
.period.is-active {
  border-color: var(--red);
  outline: 0;
}

.period.is-active {
  color: var(--white);
  background: var(--red);
}

.period strong,
.period span {
  display: block;
}

.period strong {
  font-size: 23px;
  font-weight: 700;
}

.period span {
  margin-top: 8px;
  color: var(--grey-text);
  font-size: 14px;
  font-weight: 700;
}

.period.is-active span {
  color: rgba(255, 255, 255, 0.82);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.feature-grid article {
  display: flex;
  min-height: 300px;
  flex-direction: column;
  padding: 24px;
  color: var(--ink);
  background: #fff1f1;
  border: 1px solid rgba(196, 0, 11, 0.16);
  border-radius: 8px;
}

.feature-grid article:nth-child(2) {
  background: #eef6fa;
  border-color: rgba(51, 124, 163, 0.22);
}

.feature-grid article:nth-child(3) {
  background: #eff8ef;
  border-color: rgba(35, 133, 40, 0.2);
}

.feature-grid article:nth-child(4) {
  color: var(--ink);
  background: #fff8dd;
  border-color: rgba(255, 196, 4, 0.28);
}

.feature-grid span {
  font-weight: 700;
}

.feature-grid h3 {
  margin-top: 18px;
  font-size: 31px;
  font-weight: 700;
  line-height: 0.98;
}

.feature-grid p {
  margin: 14px 0 0;
  font-weight: 400;
}

.feature-grid a {
  width: fit-content;
  margin-top: auto;
  padding-top: 24px;
  color: var(--red-dark);
  font-weight: 700;
}

.catalog-top {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}

.catalog-tools {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
  margin-bottom: 34px;
}

.result-count {
  margin: 0;
  color: var(--grey-text);
  font-weight: 700;
}

.reset-catalog {
  min-height: 42px;
  padding: 10px 14px;
  color: var(--red-dark);
  background: var(--white);
  border: 1px solid rgba(196, 0, 11, 0.42);
  border-radius: 4px;
  font-weight: 700;
  cursor: pointer;
}

.reset-catalog:hover {
  color: var(--white);
  background: var(--red-dark);
}

.no-results {
  margin-top: 16px;
  padding: 34px;
  background: var(--white);
  border: 1px solid rgba(109, 106, 98, 0.2);
  border-radius: 8px;
  text-align: center;
}

.no-results h3 {
  font-size: 32px;
}

.no-results p {
  margin: 10px 0 20px;
  color: var(--grey-text);
  font-weight: 700;
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.catalog-card {
  display: grid;
  position: relative;
  min-height: 252px;
  grid-template-rows: 78px auto minmax(58px, auto) 42px;
  justify-items: center;
  align-items: start;
  gap: 12px;
  padding: 20px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(240, 238, 231, 0.84)),
    var(--white);
  border: 1px solid rgba(109, 106, 98, 0.2);
  border-radius: 8px;
}

.catalog-card::after {
  position: absolute;
  right: 14px;
  bottom: 12px;
  left: 14px;
  height: 1px;
  content: "";
  background: rgba(196, 0, 11, 0.16);
}

.catalog-icon {
  width: 88px;
  height: 88px;
  margin: 0;
}

.catalog-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.catalog-year {
  width: fit-content;
  padding: 6px 9px;
  color: var(--red-dark);
  background: transparent;
  border: 1px solid rgba(196, 0, 11, 0.28);
  border-radius: 4px;
  font-size: 13px;
  font-weight: 700;
}

.catalog-card h3 {
  align-self: center;
  min-height: 58px;
  margin: 0;
  font-size: 25px;
  font-weight: 700;
  line-height: 1.06;
  text-align: center;
}

.catalog-action {
  display: inline-flex;
  width: fit-content;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  margin-top: 0;
  padding: 9px 12px;
  color: var(--red-dark);
  background: transparent;
  border: 1px solid rgba(196, 0, 11, 0.42);
  border-radius: 4px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.catalog-action:hover {
  color: var(--white);
  background: var(--red-dark);
}

.catalog-action.is-disabled {
  color: var(--grey-text);
  background: var(--grey-mid);
}

.project {
  display: grid;
  width: min(1240px, calc(100% - 36px));
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(26px, 5vw, 74px);
  margin: 96px auto 0;
  padding: clamp(30px, 6vw, 70px);
  color: var(--white);
  background: var(--red-dark);
  border-radius: 8px;
}

.project p:last-child {
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 19px;
  font-weight: 400;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-top: 96px;
  padding: 28px clamp(18px, 4vw, 64px);
  color: var(--white);
  background: var(--ink);
}

.site-footer p {
  margin: 0;
  font-weight: 700;
}

@media (max-width: 1080px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .stats,
  .periods,
  .feature-grid,
  .preview-grid,
  .catalog-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .preview-card-large {
    grid-row: span 1;
  }

  .project {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .site-header,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-nav {
    flex-wrap: wrap;
  }

  .hero {
    width: min(100% - 24px, 1240px);
    margin-top: 18px;
  }

  .hero-panel,
  .service-card {
    padding: 24px;
  }

  .quick-links,
  .stats,
  .periods,
  .feature-grid,
  .preview-grid,
  .catalog-grid {
    grid-template-columns: 1fr;
  }

  .preview-grid {
    grid-auto-rows: 210px;
  }

  .catalog-top {
    align-items: flex-start;
    flex-direction: column;
  }

  .catalog-tools {
    align-items: flex-start;
    justify-content: flex-start;
    margin: -12px 0 10px;
  }

  #obdobia .section-head h2 {
    white-space: normal;
  }
}

/* Nahlad modal */

.preview-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.preview-modal-overlay.is-open {
  display: flex;
}

.preview-modal {
  position: relative;
  width: min(960px, 100%);
  background: var(--grey-light);
  border-radius: 10px;
  padding: 32px 28px 28px;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.38);
}

.preview-modal-title {
  margin: 0 0 20px;
  font-family: var(--font-title);
  font-size: 22px;
  font-weight: 700;
}

.preview-modal-pages {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.preview-modal-pages img {
  width: 100%;
  aspect-ratio: 402 / 650;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid rgba(109, 106, 98, 0.22);
  background: var(--grey-mid);
  display: block;
}

.preview-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--white);
  border: 1px solid rgba(109, 106, 98, 0.28);
  border-radius: 4px;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  color: var(--ink);
}

.preview-modal-close:hover {
  background: var(--red);
  color: var(--white);
  border-color: var(--red);
}

.preview-modal-footer {
  margin-top: 20px;
  display: flex;
  justify-content: flex-end;
}

.catalog-action-preview {
  display: inline-flex;
  width: fit-content;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  padding: 9px 12px;
  color: var(--grey-text);
  background: transparent;
  border: 1px solid rgba(109, 106, 98, 0.32);
  border-radius: 4px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  font-family: inherit;
}

.catalog-action-preview:hover {
  color: var(--ink);
  border-color: var(--grey-text);
  background: var(--grey);
}

@media (max-width: 720px) {
  .catalog-action-preview {
    display: none;
  }
}


