/* ============================================================
   Mast z měsíčku lékařského — zásadní redesign (override Twenty Seventeen)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:wght@500;600;700&family=Inter:wght@400;500;600&display=swap');

:root {
  --c-bg:        #fbf6ee;
  --c-paper:     #ffffff;
  --c-line:      #ead9b8;
  --c-soft:      #fff7e7;
  --c-ink:       #2a2014;
  --c-ink-soft:  #6b5a3e;
  --c-accent:    #d98a1a;
  --c-accent-2:  #b9701f;
  --c-accent-bg: #fde9c6;
  --c-link:      #b9701f;

  --radius:      14px;
  --radius-sm:   8px;
  --shadow:      0 8px 28px rgba(80, 50, 20, .08);
  --shadow-lg:   0 20px 50px rgba(80, 50, 20, .12);

  --content:        min(980px, calc(100% - 2.5rem));
  --content-narrow: min(740px, calc(100% - 2.5rem));

  --font-serif:  'Fraunces', Georgia, serif;
  --font-sans:   'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body, body.twentyseventeen-front-page, body.page, body.single-post, body.archive {
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--c-ink);
  background: var(--c-bg);
  margin: 0;
}

img { max-width: 100%; height: auto; display: block; border-radius: var(--radius-sm); }
picture { display: contents; }
figure { margin: 1.75em 0; }
figure img { box-shadow: var(--shadow); border-radius: var(--radius); }
figcaption, .entry-content figcaption, .wp-element-caption {
  color: var(--c-ink-soft);
  font-size: .9rem;
  text-align: center;
  margin-top: .5em;
}

h1, h2, h3, .entry-title, .wp-block-heading {
  font-family: var(--font-serif);
  font-weight: 600;
  color: var(--c-ink);
  letter-spacing: -.015em;
  line-height: 1.25;
  margin: 1.8em 0 .5em;
}
h1, .entry-title { font-size: clamp(1.9rem, 3.6vw, 2.6rem); margin-top: .1em; }
h2 { font-size: clamp(1.35rem, 2.2vw, 1.7rem); }
h3 { font-size: 1.15rem; margin: 1.4em 0 .35em; }
p { margin: 0 0 1.05em; }
.entry-content > *:first-child { margin-top: 0; }

a { color: var(--c-link); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--c-accent); }

blockquote, .wp-block-quote {
  border-left: 4px solid var(--c-accent);
  background: var(--c-soft);
  margin: 1.75em 0;
  padding: 1.2em 1.4em;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: normal;
}
blockquote p, .wp-block-quote p { margin: 0; font-size: 1.05rem; }

ul, ol { padding-left: 1.2em; }
li + li { margin-top: .25em; }

.entry-content p:empty { display: none; }

p.lead-paragraph,
.entry-content > p.lead-paragraph {
  font-size: 1.12rem;
  line-height: 1.55;
  color: var(--c-ink-soft);
  font-family: var(--font-serif);
  font-weight: 500;
  margin-bottom: 1.6em;
}

/* ---------- skip + utility ---------- */
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 1rem; top: 1rem; background: var(--c-ink); color: #fff; padding: .5em 1em; z-index: 99; border-radius: 6px; }
.screen-reader-text { position: absolute !important; clip: rect(1px,1px,1px,1px); width: 1px; height: 1px; overflow: hidden; }

/* ---------- header / hero ---------- */
.site-header { background: transparent; position: relative; }
.custom-header { position: relative; overflow: hidden; }
.custom-header-media { position: relative; height: clamp(280px, 55vw, 560px); }
.wp-custom-header { position: absolute; inset: 0; height: 100%; }
.wp-custom-header img {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: 0;
  filter: saturate(.92);
}
.custom-header::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(30,20,8,.25) 0%, rgba(30,20,8,.55) 100%);
  pointer-events: none;
}
.site-branding {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  z-index: 2;
  padding: 1rem;
}
.site-branding .wrap { width: var(--content); }
.site-branding-text { color: #fff; max-width: 820px; margin: 0 auto; }
.site-title {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  margin: 0;
  line-height: 1.1;
  letter-spacing: -.02em;
  text-shadow: 0 2px 18px rgba(0,0,0,.35);
}
.site-title a { color: #fff; text-decoration: none; }
.site-description {
  margin: .8em auto 0;
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  line-height: 1.5;
  color: rgba(255, 255, 255, .92);
  max-width: 640px;
  text-shadow: 0 1px 10px rgba(0,0,0,.3);
}

body:not(.home) .custom-header-media { height: clamp(120px, 22vw, 220px); }
body:not(.home) .site-branding { padding-top: 2rem; }
body:not(.home) .site-description { display: none; }
body:not(.home) .site-title { font-size: clamp(1.4rem, 2.4vw, 2rem); }

/* ---------- navigace ---------- */
.navigation-top {
  background: var(--c-paper);
  border-bottom: 1px solid var(--c-line);
  position: sticky; top: 0; z-index: 50;
  box-shadow: 0 2px 14px rgba(80, 50, 20, .04);
}
.navigation-top .wrap {
  width: var(--content);
  margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  min-height: 56px;
}
.main-navigation { width: 100%; }
.menu-hlavni-menu-container { width: 100%; }
#top-menu, .main-navigation ul {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: .25rem 1.2rem;
  justify-content: center;
}
.main-navigation li { margin: 0; }
.main-navigation a {
  display: block;
  padding: 1rem .25rem;
  font-weight: 500;
  font-size: .98rem;
  color: var(--c-ink);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: color .2s, border-color .2s;
}
.main-navigation a:hover { color: var(--c-accent-2); }
.main-navigation .current-menu-item > a,
.main-navigation .current_page_item > a {
  color: var(--c-accent-2);
  border-bottom-color: var(--c-accent);
}
.menu-toggle {
  display: none;
  background: transparent; border: 0;
  font: inherit; color: var(--c-ink);
  padding: .8rem .4rem;
  cursor: pointer;
}
.menu-scroll-down { display: none; }

@media (max-width: 720px) {
  .menu-toggle { display: inline-flex; align-items: center; gap: .4rem; }
  #top-menu { display: none; }
  .main-navigation.toggled-on #top-menu {
    display: flex; flex-direction: column; width: 100%; padding: .5rem 0 1rem;
  }
  .main-navigation a { padding: .65rem 0; text-align: center; }
}

/* ---------- main content layout ---------- */
.site-content, .site-content-contain, #content { background: var(--c-bg); }
#primary, .content-area, .site-main { width: 100%; margin: 0 auto; }

/* one-page homepage panels = karty */
.twentyseventeen-panel {
  background: var(--c-paper);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin: 2.5rem auto;
  padding: 2.4rem clamp(1.2rem, 3vw, 2.8rem);
  width: var(--content);
  overflow: hidden;
}
.twentyseventeen-panel .wrap { width: 100%; max-width: none; padding: 0; }
.twentyseventeen-panel.has-post-thumbnail { padding-top: 0; }
.twentyseventeen-panel .panel-image {
  margin: -2.4rem clamp(-2.8rem, -3vw, -1.2rem) 2rem;
  height: clamp(180px, 30vw, 340px);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  border-radius: var(--radius) var(--radius) 0 0;
}
.twentyseventeen-panel .panel-image-prop { display: none; }
.twentyseventeen-panel .entry-header { margin-bottom: 1.2em; }
.twentyseventeen-panel .entry-title { font-size: clamp(1.7rem, 3vw, 2.4rem); margin: 0; }
.twentyseventeen-panel .entry-content { font-size: 1rem; }

article#post-9 .entry-title { display: none; }
article#post-9 { background: transparent; box-shadow: none; padding-bottom: 0; padding-top: 0; }
article#post-9 .entry-content {
  text-align: center;
  font-size: 1.15rem;
  max-width: 720px;
  margin: 0 auto;
}

/* ---------- single-page wrappers ---------- */
body:not(.home) #primary { width: var(--content-narrow); margin: 2rem auto; }
body.blog #primary,
body.archive #primary { width: var(--content); }

/* karta pro single page i single blog post */
body:not(.home) article.page,
body:not(.home) article.post,
body.single-post article {
  background: var(--c-paper);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(1.8rem, 3.2vw, 2.8rem) clamp(1.6rem, 3.4vw, 2.8rem);
  margin-bottom: 1.5rem;
}
body:not(.home) .entry-header { margin: 0 0 1.4rem; padding-bottom: 1.1rem; border-bottom: 1px solid var(--c-line); }
body:not(.home) .entry-title { font-size: clamp(1.7rem, 2.6vw, 2.2rem); margin: 0 0 .15em; }
body:not(.home) .entry-content { line-height: 1.7; }
body:not(.home) .entry-content > p,
body:not(.home) .entry-content > ul,
body:not(.home) .entry-content > ol { margin-bottom: 1.1em; }
body:not(.home) .entry-content > p:last-child { margin-bottom: 0; }

/* blog listing: container ovládá max-width pro celý content area */
body.blog #content > .wrap,
body.archive #content > .wrap {
  width: var(--content);
  margin: 0 auto;
}
body.blog .page-header,
body.archive .page-header {
  margin: 2rem 0 1.5rem;
}
body.blog .page-title,
body.archive .page-title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 3.5vw, 2.8rem);
  margin: 0;
}

/* Grid karet s miniaturou */
.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.6rem;
  margin: 0 0 2rem;
}
.post-card {
  background: var(--c-paper);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .2s, box-shadow .2s;
}
.post-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }

.post-card-thumb {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--c-soft);
}
.post-card-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center;
  border-radius: 0;
  display: block;
  transition: transform .4s;
}
.post-card:hover .post-card-thumb img { transform: scale(1.03); }

.post-card-body {
  padding: 1.2rem 1.4rem 1.4rem;
  display: flex; flex-direction: column;
  flex: 1;
}
.post-card-meta {
  display: flex; gap: .8rem; align-items: center;
  font-size: .82rem;
  color: var(--c-ink-soft);
  margin-bottom: .4em;
}
.post-card-meta time::before { content: ""; }
.post-card-author::before {
  content: "·";
  margin-right: .5em;
  color: var(--c-line);
}
.post-card-title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  line-height: 1.25;
  margin: 0 0 .5em;
  letter-spacing: -.01em;
}
.post-card-title a {
  color: var(--c-ink);
  text-decoration: none;
}
.post-card-title a:hover { color: var(--c-accent-2); }
.post-card-excerpt {
  color: var(--c-ink-soft);
  font-size: .95rem;
  line-height: 1.55;
  margin: 0;
}
/* nav-links (předchozí/další) na single postu */
.nav-links {
  display: flex; justify-content: space-between; gap: 1rem;
  margin: 2rem 0;
  font-size: .95rem;
}
.nav-links a {
  display: inline-block;
  padding: .8rem 1.2rem;
  background: var(--c-paper);
  border: 1px solid var(--c-line);
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--c-ink);
  box-shadow: var(--shadow);
}
.nav-links a:hover { border-color: var(--c-accent); color: var(--c-accent-2); }
.nav-subtitle { display: block; font-size: .8rem; color: var(--c-ink-soft); }

.entry-meta { color: var(--c-ink-soft); font-size: .92rem; margin-bottom: .3em; }
.entry-meta a { color: inherit; text-decoration: none; }
.entry-meta .updated { display: none; }

/* ---------- WP block columns → modern grid ---------- */
.wp-block-columns {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.8rem !important;
  margin: 2rem 0;
  flex-wrap: wrap;
}
.wp-block-column { padding: 0 !important; }
.wp-block-group { margin: 0; }
.wp-block-group__inner-container { max-width: 100%; }
.wp-block-spacer { display: none !important; }

.wp-block-columns .wp-block-heading {
  margin-top: .5em;
  font-size: 1.4rem !important;
}

/* ---------- nadpisy s podtržkou ---------- */
.entry-content > h1::after,
.entry-content > h2::after,
.entry-content .wp-block-column > h2.wp-block-heading::after,
.entry-content > .wp-block-heading::after {
  content: '';
  display: block;
  width: 56px; height: 3px;
  background: var(--c-accent);
  margin-top: .45em;
  border-radius: 2px;
}

/* ---------- CTA ---------- */
.cta-order, .wp-block-button__link {
  display: inline-block;
  padding: .9em 1.7em;
  background: var(--c-accent);
  color: #fff !important;
  border: 0; border-radius: 999px;
  font-weight: 600; font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(217, 138, 26, .35);
  transition: transform .15s, box-shadow .15s, background .15s;
}
.cta-order:hover, .wp-block-button__link:hover {
  background: var(--c-accent-2);
  color: #fff !important;
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(185, 112, 31, .45);
}

/* ---------- featured image v blog postu ---------- */
.entry-content > .featured-image {
  margin: -.5rem clamp(-1.6rem, -3vw, -2.6rem) 1.8rem;
}
.entry-content > .featured-image img {
  width: 100%;
  aspect-ratio: 16 / 10;
  max-height: 420px;
  object-fit: cover;
  border-radius: 0;
  box-shadow: none;
  display: block;
}

/* ---------- blog listing (blog.html) ---------- */
.post .entry-header { padding: 0; }
.post .entry-title a { color: var(--c-ink); text-decoration: none; }
.post .entry-title a:hover { color: var(--c-accent-2); }

/* ---------- footer ---------- */
.site-footer {
  background: var(--c-paper);
  border-top: 1px solid var(--c-line);
  margin-top: 4rem;
  padding: 2.5rem 0 1.5rem;
}
.site-footer .wrap { width: var(--content); margin: 0 auto; }
.widget-area { padding: 0; margin: 0; }
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2.5rem;
  align-items: start;
}
.footer-col { min-width: 0; }
.footer-col h2.widget-title {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  margin: 0 0 .6em;
  letter-spacing: 0;
  color: var(--c-ink);
}
.footer-col p, .footer-col ul { font-size: .95rem; color: var(--c-ink-soft); margin: 0; line-height: 1.55; }
.footer-col strong { color: var(--c-ink); }
.company-note { display: inline-block; margin-top: .5em; font-size: .88em; color: var(--c-ink-soft); font-style: italic; line-height: 1.5; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li + li { margin-top: .35em; }
.footer-links a { color: var(--c-ink); text-decoration: none; }
.footer-links a:hover { color: var(--c-accent-2); }
@media (max-width: 820px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 1.8rem; }
  .footer-col:first-child { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
  .footer-grid { grid-template-columns: 1fr; gap: 1.6rem; }
  .footer-col:first-child { grid-column: auto; }
}

.site-info {
  border-top: 1px solid var(--c-line);
  margin-top: 1.8rem;
  padding-top: 1rem;
  font-size: .85rem;
  color: var(--c-ink-soft);
  text-align: center;
}
.site-info a { color: var(--c-ink-soft); }

/* ---------- indikační karty (homepage rozcestník) ---------- */
.indications {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.2rem;
  margin: 2rem 0 1rem;
  list-style: none;
  padding: 0;
}
.indications li { margin: 0; }
.indication-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 1.4rem 1.3rem 1.3rem;
  background: var(--c-paper);
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-decoration: none;
  color: var(--c-ink);
  transition: transform .18s, box-shadow .18s, border-color .18s;
}
.indication-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--c-accent);
  color: var(--c-ink);
}
.indication-card .icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  margin-bottom: .85rem;
  border-radius: 14px;
  background: var(--c-accent-bg);
  color: var(--c-accent-2);
  transition: background .18s, color .18s;
}
.indication-card .icon svg {
  width: 28px;
  height: 28px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  display: block;
}
.indication-card:hover .icon {
  background: var(--c-accent);
  color: #fff;
}
.indication-card h3 {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  margin: 0 0 .4em;
}
.indication-card p {
  margin: 0 0 1em;
  color: var(--c-ink-soft);
  font-size: .95rem;
  flex: 1;
}
.indication-card .more {
  color: var(--c-accent-2);
  font-weight: 600;
  font-size: .95rem;
}
.indication-card:hover .more { color: var(--c-accent); }

/* indikační stránka — hero + sekce */
.indication-hero {
  background: linear-gradient(135deg, var(--c-soft) 0%, var(--c-accent-bg) 100%);
  border-radius: var(--radius);
  margin-bottom: 2rem;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.indication-hero .hero-image {
  width: 100%;
  height: clamp(200px, 32vw, 360px);
  object-fit: cover;
  display: block;
  margin: 0;
  border-radius: 0;
  box-shadow: none;
}
.indication-hero .hero-body { padding: 2rem clamp(1.2rem, 3vw, 2.2rem); }
.indication-hero .eyebrow {
  display: inline-block;
  font-size: .8rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--c-accent-2);
  font-weight: 600;
  margin-bottom: .6rem;
}
.indication-hero h1 { margin: 0 0 .4em; }
.indication-hero .lead { font-size: 1.1rem; color: var(--c-ink-soft); margin: 0; }

/* blog featured image — protáhnout do okraje karty */
.entry-content > figure.featured-image {
  margin: -.5rem clamp(-2.8rem, -3vw, -1.2rem) 1.8rem;
  border-radius: 0;
}
.entry-content > figure.featured-image img {
  width: 100%;
  aspect-ratio: 16 / 10;
  max-height: 460px;
  object-fit: cover;
  border-radius: 0;
  box-shadow: none;
  display: block;
}

/* ---------- skrýt zbytky ---------- */
.widget_search, #search-form-1, .search-form { display: none !important; }
.comments-area, #respond { display: none; }
.wp-block-image { margin: 1.75em 0; }
.wp-block-image img { display: block; margin-inline: auto; }

hr { border: 0; border-top: 1px solid var(--c-line); margin: 2.5em auto; max-width: 200px; }
