/*
Theme Name: Život po lécích
Author: Codex
Description: Česká informační šablona o zkušenostech s vysazováním psychofarmak a jejich nežádoucími účinky.
Version: 2.6.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: zivot-po-lecich
*/

:root {
  --ink: #18342d;
  --ink-soft: #49635b;
  --cream: #f7f2e7;
  --paper: #fffdf8;
  --line: #d8dfd6;
  --leaf: #2d6955;
  --leaf-dark: #204d3f;
  --canary: #f0c94c;
  --canary-soft: #fff1b7;
  --shadow: 0 20px 55px rgba(24, 52, 45, 0.12);
  --radius: 24px;
  --content: 1180px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: clip;
  background: var(--cream);
  color: var(--ink);
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 18px;
  line-height: 1.72;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 8% 12%, rgba(240, 201, 76, 0.22), transparent 26rem),
    linear-gradient(rgba(45, 105, 85, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(45, 105, 85, 0.035) 1px, transparent 1px);
  background-size: auto, 36px 36px, 36px 36px;
  content: "";
  pointer-events: none;
}

a {
  color: var(--leaf-dark);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

a:hover {
  color: #112c24;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

.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;
}

.skip-link:focus {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 1000;
  width: auto;
  height: auto;
  padding: 10px 16px;
  margin: 0;
  overflow: visible;
  clip: auto;
  background: white;
  border-radius: 8px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 242, 231, 0.94);
  border-bottom: 1px solid rgba(45, 105, 85, 0.14);
  backdrop-filter: blur(14px);
}

.header-inner {
  width: min(calc(100% - 40px), var(--content));
  min-height: 82px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.site-branding {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  font-size: 17px;
  font-weight: 750;
  line-height: 1.15;
  text-decoration: none;
}

.brand-mark {
  position: relative;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  background: var(--canary);
  border: 2px solid var(--ink);
  border-radius: 50% 50% 46% 54%;
  box-shadow: 5px 5px 0 var(--ink);
}

.brand-mark::after {
  position: absolute;
  right: -7px;
  top: 16px;
  width: 0;
  height: 0;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 8px solid var(--ink);
  content: "";
}

.site-nav ul {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.site-nav a {
  display: block;
  padding: 10px 11px;
  border-radius: 9px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav .current-menu-item > a,
.site-nav .current_page_item > a {
  background: var(--canary-soft);
}

.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  padding: 0;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 50%;
  font: inherit;
  font-size: 22px;
  cursor: pointer;
}

.hero {
  width: min(calc(100% - 40px), var(--content));
  margin: 48px auto 76px;
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(380px, 0.98fr);
  align-items: center;
  gap: clamp(38px, 7vw, 96px);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 20px;
  color: var(--leaf);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.eyebrow::before {
  width: 28px;
  height: 3px;
  background: var(--canary);
  border-radius: 9px;
  content: "";
}

.hero h1,
.page-hero h1 {
  max-width: 820px;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(46px, 6vw, 82px);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 0.98;
}

.hero-lead {
  max-width: 660px;
  margin: 26px 0 0;
  color: var(--ink-soft);
  font-size: clamp(19px, 2vw, 23px);
  line-height: 1.55;
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 11px 21px;
  color: white;
  background: var(--leaf);
  border: 2px solid var(--leaf);
  border-radius: 999px;
  font-size: 15px;
  font-weight: 750;
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.button:hover {
  color: white;
  box-shadow: 0 10px 22px rgba(45, 105, 85, 0.22);
  transform: translateY(-2px);
}

.button-secondary {
  color: var(--leaf-dark);
  background: transparent;
  border-color: rgba(45, 105, 85, 0.35);
}

.button-secondary:hover {
  color: var(--leaf-dark);
  background: var(--paper);
}

.hero-visual {
  position: relative;
}

.hero-visual::before {
  position: absolute;
  inset: 20px -18px -22px 30px;
  z-index: -1;
  background: var(--canary);
  border-radius: 46% 54% 42% 58%;
  content: "";
  transform: rotate(3deg);
}

.hero-image {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border: 9px solid var(--paper);
  border-radius: 44% 56% 48% 52% / 50% 45% 55% 50%;
  box-shadow: var(--shadow);
}

.content-section,
.page-content,
.site-footer-inner,
.page-hero-inner {
  width: min(calc(100% - 40px), 900px);
  margin-inline: auto;
}

.content-section {
  margin-bottom: 76px;
}

.intro-panel {
  position: relative;
  padding: clamp(28px, 6vw, 66px);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 18px 50px rgba(24, 52, 45, 0.07);
}

.intro-panel::before {
  position: absolute;
  top: -14px;
  left: 42px;
  width: 74px;
  height: 28px;
  background: var(--canary);
  border-radius: 4px;
  content: "";
  opacity: 0.86;
  transform: rotate(-2deg);
}

.intro-panel h2,
.content-section h2,
.page-content h2 {
  margin: 0 0 25px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.08;
}

.intro-panel p,
.page-content p {
  margin: 0 0 1.35em;
}

.intro-panel p:first-of-type::first-letter {
  float: left;
  margin: 8px 8px 0 0;
  color: var(--leaf);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 70px;
  line-height: 0.7;
}

.topic-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.topic-card {
  min-height: 250px;
  padding: 28px;
  color: var(--ink);
  background: rgba(255, 253, 248, 0.72);
  border: 1px solid var(--line);
  border-radius: 18px;
  text-decoration: none;
  transition: transform 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.topic-card:hover {
  color: var(--ink);
  background: var(--paper);
  box-shadow: 0 14px 35px rgba(24, 52, 45, 0.09);
  transform: translateY(-4px);
}

.topic-number {
  color: var(--leaf);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 44px;
  line-height: 1;
}

.topic-card h3 {
  margin: 44px 0 8px;
  font-size: 21px;
  line-height: 1.2;
}

.topic-card p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.55;
}

.page-hero {
  padding: 72px 0 62px;
  background: linear-gradient(135deg, var(--canary-soft), transparent 62%);
  border-bottom: 1px solid var(--line);
}

.page-hero h1 {
  font-size: clamp(45px, 7vw, 76px);
}

.page-content {
  padding-block: 62px 82px;
}

.page-content > *:first-child {
  margin-top: 0;
}

.page-content ul,
.page-content ol {
  padding-left: 1.35em;
}

.page-content li {
  margin-bottom: 0.55em;
}

.page-content blockquote {
  padding: 20px 24px;
  margin: 32px 0;
  background: var(--canary-soft);
  border-left: 5px solid var(--canary);
  border-radius: 0 14px 14px 0;
}

.stories-intro {
  padding-bottom: 34px;
}

.approved-stories h2,
.story-form-section h2 {
  margin-bottom: 24px;
}

.stories-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.story-card {
  padding: 28px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
}

.story-card h3 {
  margin: 8px 0 16px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 28px;
  font-weight: 500;
  line-height: 1.16;
}

.story-type {
  margin: 0;
  color: var(--leaf);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.story-text {
  color: var(--ink-soft);
  font-size: 16px;
}

.story-text p:last-child {
  margin-bottom: 0;
}

.story-author {
  padding-top: 16px;
  margin: 22px 0 0;
  border-top: 1px solid var(--line);
  font-size: 14px;
  font-weight: 750;
}

.story-form-section {
  padding: clamp(28px, 6vw, 60px);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 18px 50px rgba(24, 52, 45, 0.07);
}

.story-form-copy {
  max-width: 690px;
  margin-bottom: 32px;
}

.story-form-copy p:last-child {
  color: var(--ink-soft);
}

.privacy-notice {
  padding: 18px 20px;
  margin: 0 0 28px;
  color: #563f08;
  background: var(--canary-soft);
  border: 1px solid #e1c359;
  border-radius: 12px;
  font-size: 15px;
  line-height: 1.55;
}

.privacy-notice strong {
  display: block;
  margin-bottom: 4px;
  color: var(--ink);
}

.privacy-notice p {
  margin: 0;
}

.story-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.story-form fieldset,
.form-row-wide,
.consent-row,
.submit-button {
  grid-column: 1 / -1;
}

.story-form fieldset {
  padding: 0;
  margin: 0;
  border: 0;
}

.story-form legend,
.form-row > label {
  display: block;
  margin-bottom: 8px;
  font-size: 15px;
  font-weight: 750;
}

.radio-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.radio-grid label {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 15px;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.4;
  cursor: pointer;
}

.story-form input[type="text"],
.story-form input[type="email"],
.story-form textarea {
  width: 100%;
  padding: 13px 14px;
  color: var(--ink);
  background: #fff;
  border: 1px solid #aebdb6;
  border-radius: 10px;
  font: inherit;
  font-size: 16px;
}

.story-form textarea {
  min-height: 210px;
  resize: vertical;
}

.story-form input:focus,
.story-form textarea:focus {
  border-color: var(--leaf);
  outline: 3px solid rgba(45, 105, 85, 0.16);
}

.optional {
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 500;
}

.consent-row {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.5;
}

.consent-row input,
.radio-grid input {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  margin-top: 2px;
  accent-color: var(--leaf);
}

.submit-button {
  width: fit-content;
  cursor: pointer;
}

.form-message {
  padding: 14px 17px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
}

.form-success {
  color: #153f30;
  background: #dff1e8;
  border: 1px solid #9fcbb7;
}

.form-error {
  color: #6b2323;
  background: #f9e1df;
  border: 1px solid #e5aaa5;
}

.form-honeypot {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.blog-hero .page-hero-inner,
.single-post-hero .page-hero-inner {
  width: min(calc(100% - 40px), 1000px);
}

.blog-intro {
  max-width: 700px;
  margin: 24px 0 0;
  color: var(--ink-soft);
  font-size: clamp(18px, 2vw, 22px);
}

.blog-section {
  width: min(calc(100% - 40px), 1100px);
  padding-top: 64px;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.post-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 12px 34px rgba(24, 52, 45, 0.06);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.post-card:hover {
  box-shadow: 0 18px 42px rgba(24, 52, 45, 0.11);
  transform: translateY(-4px);
}

.post-card-media {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--canary-soft);
  text-decoration: none;
}

.post-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 280ms ease;
}

.post-card:hover .post-card-media img {
  transform: scale(1.025);
}

.post-card-placeholder {
  display: flex;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  padding: 22px;
  color: var(--ink);
  background:
    radial-gradient(circle at 75% 25%, rgba(240, 201, 76, 0.8), transparent 34%),
    linear-gradient(135deg, var(--canary-soft), #e6eee8);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 26px;
  text-align: center;
}

.post-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 24px;
}

.post-meta {
  margin: 0 0 10px;
  color: var(--leaf);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.post-card h2 {
  margin: 0 0 12px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 28px;
  font-weight: 500;
  line-height: 1.15;
}

.post-card h2 a {
  color: var(--ink);
  text-decoration: none;
}

.post-card h2 a:hover {
  color: var(--leaf);
}

.post-card-body > p:not(.post-meta) {
  margin: 0 0 22px;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.6;
}

.read-more {
  margin-top: auto;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}

.navigation.pagination {
  margin-top: 42px;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.nav-links .page-numbers {
  display: inline-flex;
  min-width: 42px;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 7px 12px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 750;
  text-decoration: none;
}

.nav-links .current,
.nav-links a:hover {
  color: var(--ink);
  background: var(--canary);
  border-color: var(--canary);
}

.empty-blog {
  padding: 42px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  text-align: center;
}

.empty-blog h2 {
  margin-top: 0;
}

.single-post-hero h1 {
  max-width: 930px;
  font-size: clamp(42px, 6vw, 72px);
  line-height: 1.04;
}

.single-post-hero .post-meta {
  margin-top: 22px;
}

.single-featured-image {
  margin: 0 0 40px;
}

.single-featured-image img {
  width: 100%;
  max-height: 560px;
  object-fit: cover;
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.single-post-content h2,
.single-post-content h3 {
  margin-top: 1.55em;
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.18;
}

.post-navigation {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 18px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  font-weight: 750;
}

.post-navigation > div:last-child {
  text-align: right;
}

.post-navigation a {
  text-decoration: none;
}

.back-to-blog {
  padding: 9px 15px;
  background: var(--canary-soft);
  border-radius: 999px;
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 43px;
  height: 43px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid rgba(24, 52, 45, 0.28);
  border-radius: 50%;
  font-size: 18px;
  font-weight: 850;
  line-height: 1;
  text-decoration: none;
  transition: transform 180ms ease, background 180ms ease;
}

.social-link .fa-brands {
  width: 1em;
  line-height: 1;
  text-align: center;
}

.social-link:hover {
  color: var(--ink);
  background: var(--canary);
  transform: translateY(-3px) rotate(-3deg);
}

.site-footer {
  color: #eef5f1;
  background: var(--ink);
}

.site-footer-inner {
  padding-block: 52px 28px;
}

.footer-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 40px;
  padding-bottom: 42px;
}

.footer-title {
  margin: 0 0 8px;
  color: white;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 31px;
  font-weight: 500;
}

.footer-copy {
  max-width: 540px;
  margin: 0;
  color: #b9cbc3;
  font-size: 15px;
}

.site-footer .social-link {
  color: white;
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.28);
}

.site-footer .social-link:hover {
  color: var(--ink);
  background: var(--canary);
}

.footer-bottom {
  padding-top: 22px;
  color: #90a79e;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 13px;
}

.alignwide {
  width: min(1080px, calc(100vw - 40px));
  max-width: none;
  margin-left: 50%;
  transform: translateX(-50%);
}

.alignfull {
  width: 100vw;
  max-width: none;
  margin-left: 50%;
  transform: translateX(-50%);
}

@media (max-width: 1060px) {

  .blog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .menu-toggle {
    display: inline-flex;
  }

  .site-nav {
    position: absolute;
    top: calc(100% + 1px);
    left: 0;
    right: 0;
    display: none;
    padding: 14px 20px 20px;
    background: var(--cream);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 16px 25px rgba(24, 52, 45, 0.08);
  }

  .site-nav.is-open {
    display: block;
  }

  .site-nav ul {
    width: min(100%, var(--content));
    margin-inline: auto;
    display: grid;
    gap: 4px;
  }

  .site-nav a {
    padding: 12px 14px;
  }

  .hero {
    grid-template-columns: 1fr 0.8fr;
    gap: 42px;
  }

  .hero-visual::before {
    right: 0;
  }

}

@media (max-width: 780px) {
  body {
    font-size: 17px;
  }

  .hero {
    margin-top: 32px;
    grid-template-columns: 1fr;
  }

  .hero-copy {
    order: 1;
  }

  .hero-visual {
    order: 2;
    width: min(100%, 560px);
  }

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

  .stories-grid,
  .story-form,
  .radio-grid,
  .blog-grid {
    grid-template-columns: 1fr;
  }

  .post-navigation {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .post-navigation > div:last-child {
    text-align: center;
  }

  .topic-card {
    min-height: auto;
  }

  .topic-card h3 {
    margin-top: 24px;
  }

  .footer-main {
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  .header-inner,
  .hero,
  .content-section,
  .page-content,
  .site-footer-inner,
  .page-hero-inner {
    width: min(calc(100% - 28px), var(--content));
  }

  .site-name {
    max-width: 150px;
  }

  .hero h1 {
    font-size: 46px;
  }

  .hero-visual::before {
    inset: 15px 0 -12px 18px;
  }

  .intro-panel {
    padding: 34px 23px 26px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
