/*
Theme Name: Моя душа
Theme URI: https://www.moya-dusha.ru/
Author: OpenAI
Description: Лёгкая современная адаптивная тема WordPress для личного сайта, блога, литературного проекта или журнала.
Version: 1.0.6
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
Text Domain: moya-dusha
Tags: blog, news, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready, wide-blocks
*/

:root {
  --paper: #fbf8f3;
  --surface: #fffdf9;
  --surface-2: #f2ece5;
  --ink: #292521;
  --muted: #746d66;
  --line: #e7ddd3;
  --accent: #b86f52;
  --accent-dark: #8d4f38;
  --accent-soft: #f1dfd4;
  --serif: Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --radius: 22px;
  --shadow: 0 14px 42px rgba(64, 44, 31, .07);
  --content: 1160px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 100px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--accent-dark); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent); }
button, input, textarea { font: inherit; }
button, a, input { outline-offset: 4px; }
::selection { background: var(--accent-soft); color: var(--ink); }

.skip-link {
  position: absolute; left: 16px; top: -100px; z-index: 999;
  padding: 10px 14px; background: var(--ink); color: #fff; border-radius: 10px;
}
.skip-link:focus { top: 12px; }
.site-shell { overflow: clip; }
.wrap { width: min(var(--content), calc(100% - 48px)); margin-inline: auto; }

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251, 248, 243, .92);
  border-bottom: 1px solid rgba(231, 221, 211, .82);
  backdrop-filter: blur(16px);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 28px; min-height: 84px; }
.site-branding { display: flex; align-items: center; gap: 12px; min-width: 190px; text-decoration: none; color: var(--ink); }
.custom-logo-link { display: inline-flex; align-items: center; }
.custom-logo { max-height: 48px; width: auto; }
.brand-mark {
  width: 42px; height: 42px; display: grid; place-items: center; flex: 0 0 auto;
  border-radius: 50%; background: var(--accent-soft); color: var(--accent-dark);
  font-family: var(--serif); font-size: 25px; font-style: italic;
}
.brand-copy { display: flex; flex-direction: column; line-height: 1.18; }
.site-title { font-family: var(--serif); font-size: 25px; font-weight: 600; letter-spacing: -.04em; }
.site-description { margin-top: 5px; font-size: 11px; color: var(--muted); letter-spacing: .11em; text-transform: uppercase; }
.primary-navigation { display: flex; align-items: center; gap: 28px; }
.primary-navigation ul { display: flex; align-items: center; gap: 25px; list-style: none; margin: 0; padding: 0; }
.primary-navigation li { margin: 0; }
.primary-navigation a { color: var(--ink); font-size: 13px; font-weight: 600; text-decoration: none; transition: color .2s ease; }
.primary-navigation a:hover, .primary-navigation .current-menu-item > a { color: var(--accent-dark); }
.header-actions { display: flex; align-items: center; gap: 12px; }
.search-toggle, .menu-toggle {
  min-width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 50%;
  display: inline-grid; place-items: center; background: var(--surface); color: var(--ink); cursor: pointer;
}
.search-toggle svg, .menu-toggle svg { width: 18px; height: 18px; }
.menu-toggle { display: none; }
.header-search { display: none; border-top: 1px solid var(--line); padding: 14px 0 18px; }
.header-search.is-open { display: block; }
.search-form { display: flex; gap: 10px; width: 100%; max-width: 540px; }
.search-field { width: 100%; min-width: 0; padding: 12px 16px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink); }
.search-submit { border: 0; border-radius: 999px; padding: 12px 21px; background: var(--ink); color: #fff; cursor: pointer; }
.search-submit:hover { background: var(--accent-dark); }

.hero { padding: 62px 0 46px; }
.hero-grid { display: grid; grid-template-columns: 1.12fr .88fr; gap: 46px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 9px; margin: 0 0 17px; color: var(--accent-dark); font-size: 11px; font-weight: 750; letter-spacing: .15em; text-transform: uppercase; }
.eyebrow::before { content: ""; width: 27px; height: 1px; background: var(--accent); }
.hero h1, .page-heading, .entry-title { margin: 0; font-family: var(--serif); font-weight: 500; letter-spacing: -.045em; line-height: 1.08; }
.hero h1 { max-width: 670px; font-size: clamp(42px, 5.6vw, 75px); }
.hero h1 em { color: var(--accent); font-weight: 400; }
.hero-copy { max-width: 560px; margin: 23px 0 0; color: var(--muted); font-size: 17px; line-height: 1.8; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-top: 29px; }
.button-primary, .button-secondary { display: inline-flex; justify-content: center; align-items: center; gap: 10px; min-height: 48px; padding: 0 21px; border-radius: 999px; font-size: 13px; font-weight: 700; text-decoration: none; transition: transform .2s ease, background .2s ease; }
.button-primary { color: #fff; background: var(--ink); }
.button-primary:hover { color: #fff; background: var(--accent-dark); transform: translateY(-2px); }
.button-secondary { color: var(--ink); border: 1px solid var(--line); background: transparent; }
.button-secondary:hover { background: var(--surface); color: var(--accent-dark); }
.hero-note { position: relative; min-height: 330px; display: flex; align-items: flex-end; padding: 30px; overflow: hidden; border-radius: 38% 38% 26px 26px; background: linear-gradient(150deg, #ead4c6 0%, #f3e7dc 42%, #d6b9a3 100%); }
.hero-note::before, .hero-note::after { content: ""; position: absolute; border: 1px solid rgba(141,79,56,.23); border-radius: 50%; }
.hero-note::before { width: 330px; height: 330px; right: -70px; top: -112px; }
.hero-note::after { width: 245px; height: 245px; right: -28px; top: -68px; }
.hero-note-shape { position: absolute; width: 190px; height: 280px; top: 15px; left: 18%; border-radius: 50% 50% 8px 8px; background: linear-gradient(150deg, rgba(255,255,255,.5), rgba(184,111,82,.23)); transform: rotate(19deg); }
.hero-note-content { position: relative; z-index: 1; width: 100%; padding: 25px 24px 22px; border: 1px solid rgba(255,255,255,.72); border-radius: 19px; background: rgba(255,253,249,.7); backdrop-filter: blur(8px); }
.quote-mark { color: var(--accent); font-family: var(--serif); font-size: 53px; line-height: .8; }
.hero-note blockquote { margin: 8px 0 14px; color: #514039; font-family: var(--serif); font-size: clamp(20px, 2vw, 27px); line-height: 1.32; }
.hero-note small { color: #79665b; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; }

.section { padding: 43px 0 65px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 25px; }
.section-kicker { margin: 0 0 5px; color: var(--accent-dark); font-size: 11px; font-weight: 750; letter-spacing: .14em; text-transform: uppercase; }
.section-title { margin: 0; font-family: var(--serif); font-size: clamp(30px, 3.5vw, 44px); line-height: 1.15; font-weight: 500; letter-spacing: -.04em; }
.text-link { white-space: nowrap; font-size: 13px; font-weight: 700; text-decoration: none; }
.post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.post-card { min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: transform .22s ease, box-shadow .22s ease; }
.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.post-card-media { position: relative; display: block; aspect-ratio: 1.42 / 1; overflow: hidden; background: var(--surface-2); }
.post-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.post-card:hover .post-card-media img { transform: scale(1.035); }
.image-placeholder { height: 100%; min-height: 150px; display: grid; place-items: center; background: radial-gradient(circle at 30% 20%, #f9eee6, transparent 35%), linear-gradient(135deg, #e6d1c2, #f2e6dc 54%, #d7b6a2); color: rgba(141,79,56,.75); font-family: var(--serif); font-size: 58px; font-style: italic; }
.post-card-body { padding: 22px 22px 24px; }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; color: var(--muted); font-size: 11px; letter-spacing: .04em; }
.post-meta .meta-dot { width: 3px; height: 3px; border-radius: 50%; background: var(--accent); }
.post-category { color: var(--accent-dark); font-weight: 750; text-transform: uppercase; letter-spacing: .09em; text-decoration: none; }
.post-card h3 { margin: 10px 0 9px; font-family: var(--serif); font-size: 25px; font-weight: 500; line-height: 1.22; letter-spacing: -.025em; }
.post-card h3 a { color: var(--ink); text-decoration: none; }
.post-card h3 a:hover { color: var(--accent-dark); }
.post-excerpt { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.75; }
.read-more { display: inline-flex; gap: 8px; align-items: center; margin-top: 18px; color: var(--accent-dark); font-size: 12px; font-weight: 750; text-decoration: none; }

.topic-band { padding: 0 0 76px; }
.topic-panel { display: grid; grid-template-columns: .9fr 1.1fr; gap: 36px; align-items: center; padding: 34px; border-radius: 30px; background: #eee2d8; }
.topic-panel h2 { margin: 0; font-family: var(--serif); font-weight: 500; font-size: clamp(26px, 3vw, 37px); line-height: 1.2; letter-spacing: -.04em; }
.topic-panel p { margin: 12px 0 0; color: #6f5f53; font-size: 14px; }
.category-cloud { display: flex; flex-wrap: wrap; gap: 10px; }
.category-cloud a { padding: 10px 15px; border: 1px solid rgba(141,79,56,.2); border-radius: 999px; background: rgba(255,253,249,.58); color: #5e493d; font-size: 12px; font-weight: 650; text-decoration: none; }
.category-cloud a:hover { background: #fffdf9; border-color: var(--accent); }

.content-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 44px; align-items: start; padding: 48px 0 75px; }
.page-heading { font-size: clamp(36px, 4.5vw, 58px); }
.archive-intro { margin: 13px 0 28px; max-width: 690px; color: var(--muted); }
.archive-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.sidebar { padding: 25px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.widget + .widget { padding-top: 24px; margin-top: 24px; border-top: 1px solid var(--line); }
.widget-title { margin: 0 0 15px; font-family: var(--serif); font-size: 23px; font-weight: 500; line-height: 1.2; }
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget li { padding: 9px 0; border-bottom: 1px solid #f0e8e0; font-size: 13px; }
.widget li:last-child { border-bottom: 0; }
.widget a { text-decoration: none; }
.widget .tagcloud { display: flex; flex-wrap: wrap; gap: 8px; }
.widget .tag-cloud-link { margin: 0 !important; padding: 5px 9px; border-radius: 99px; background: var(--surface-2); font-size: 12px !important; }

.single-layout { max-width: 850px; margin: 0 auto; padding: 55px 0 80px; }
.single-header { margin-bottom: 30px; }
.single-title { margin: 13px 0 17px; font-family: var(--serif); font-size: clamp(38px, 6vw, 68px); line-height: 1.08; font-weight: 500; letter-spacing: -.05em; }
.single-deck { max-width: 710px; color: var(--muted); font-size: 18px; }
.featured-image { margin: 28px 0 34px; overflow: hidden; border-radius: 26px; background: var(--surface-2); }
.featured-image img { width: 100%; max-height: 600px; object-fit: cover; }
.entry-content { font-size: 18px; line-height: 1.9; overflow-wrap: anywhere; }
.entry-content > * { max-width: 100%; }
.entry-content p, .entry-content ul, .entry-content ol, .entry-content blockquote { margin-block: 0 1.35em; }
.entry-content h2, .entry-content h3, .entry-content h4 { margin-top: 1.8em; margin-bottom: .6em; font-family: var(--serif); font-weight: 500; line-height: 1.2; letter-spacing: -.03em; }
.entry-content h2 { font-size: 36px; }
.entry-content h3 { font-size: 29px; }
.entry-content blockquote { margin-inline: 0; padding: 10px 0 10px 24px; border-left: 3px solid var(--accent); color: #6b5347; font-family: var(--serif); font-size: 25px; line-height: 1.45; }
.entry-content a { text-decoration-thickness: 1px; }
.entry-content img { border-radius: 14px; }
.entry-content .wp-block-button__link { border-radius: 999px; background: var(--ink); }
.entry-content .alignwide { max-width: 1100px; width: calc(100% + 130px); margin-left: -65px; }
.entry-content .alignfull { width: 100vw; max-width: 100vw; margin-left: calc(50% - 50vw); }
.entry-footer { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 35px; padding-top: 22px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.entry-footer a { text-decoration: none; }
.post-navigation { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; gap: 16px; margin-top: 35px; }
.post-navigation-item { min-width: 0; }
.post-navigation-item a { display: flex; flex-direction: column; justify-content: center; box-sizing: border-box; width: 100%; min-height: 88px; height: 100%; padding: 17px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--ink); text-decoration: none; overflow-wrap: anywhere; transition: border-color .18s ease, background-color .18s ease, transform .18s ease; }
.post-navigation-item a:hover { border-color: var(--accent); background: #fffaf5; }
.post-navigation-item a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.post-navigation.has-only-next .post-navigation-next { grid-column: 2; }
.post-navigation.has-only-previous .post-navigation-previous { grid-column: 1; }
.post-navigation .nav-label { display: block; margin-bottom: 7px; color: var(--muted); font-size: 11px; line-height: 1.4; letter-spacing: .08em; text-transform: uppercase; }
.post-navigation .nav-title { display: block; font-family: var(--serif); font-size: 18px; line-height: 1.35; }
.pagination, .nav-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 32px; }
.page-numbers { display: inline-grid; place-items: center; min-width: 40px; height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: 50px; text-decoration: none; background: var(--surface); }
.page-numbers.current { border-color: var(--ink); background: var(--ink); color: #fff; }
.no-results { padding: 34px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.no-results h2 { font-family: var(--serif); font-weight: 500; }

.comments-area { margin-top: 50px; padding-top: 30px; border-top: 1px solid var(--line); }
.comments-title { font-family: var(--serif); font-weight: 500; font-size: 29px; }
.comment-list { padding-left: 22px; }
.comment-body { margin-bottom: 20px; padding: 18px; border-radius: 16px; background: var(--surface); }
.comment-meta { font-size: 13px; }
.comment-content { font-size: 15px; }
.comment-respond input:not([type="submit"]), .comment-respond textarea { width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.comment-respond input[type="submit"] { padding: 12px 20px; border: 0; border-radius: 999px; background: var(--ink); color: #fff; cursor: pointer; }

.site-footer { padding: 50px 0 22px; border-top: 1px solid var(--line); background: #f4eee7; }
.footer-main { display: grid; grid-template-columns: 1.2fr .8fr; gap: 40px; padding-bottom: 35px; }
.footer-about p { max-width: 440px; margin: 14px 0 0; color: var(--muted); font-size: 14px; }
.footer-title { display: block; margin-bottom: 12px; font-family: var(--serif); font-size: 24px; }
.footer-menu ul { display: flex; flex-wrap: wrap; gap: 12px 23px; margin: 0; padding: 0; list-style: none; }
.footer-menu a { color: var(--ink); font-size: 13px; text-decoration: none; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.footer-bottom a { color: var(--muted); }

.alignleft { float: left; margin: 0 24px 18px 0; }
.alignright { float: right; margin: 0 0 18px 24px; }
.aligncenter { display: block; margin-inline: auto; }
.wp-caption { max-width: 100%; }
.wp-caption-text, .gallery-caption { color: var(--muted); font-size: 13px; }
.sticky { position: relative; }
.bypostauthor { display: block; }
.screen-reader-text { clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%); height: 1px; overflow: hidden; position: absolute !important; width: 1px; white-space: nowrap; }
.screen-reader-text:focus { clip: auto !important; clip-path: none; height: auto; width: auto; top: 10px; left: 10px; padding: 14px; background: #fff; color: #000; z-index: 100000; }

@media (max-width: 980px) {
  .primary-navigation { gap: 15px; }
  .primary-navigation ul { gap: 16px; }
  .site-branding { min-width: auto; }
  .hero-grid { gap: 28px; }
  .hero-note { min-height: 300px; }
  .content-layout { grid-template-columns: minmax(0, 1fr) 250px; gap: 26px; }
  .entry-content .alignwide { width: 100%; margin-left: 0; }
}
@media (max-width: 760px) {
  .wrap { width: min(var(--content), calc(100% - 32px)); }
  .header-inner { min-height: 72px; gap: 10px; }
  .site-title { font-size: 23px; }
  .site-description { font-size: 9px; }
  .brand-mark { width: 38px; height: 38px; font-size: 22px; }
  .menu-toggle { display: inline-grid; }
  .primary-navigation {
    display: none; position: absolute; left: 16px; right: 16px; top: calc(100% + 8px);
    align-items: stretch; padding: 18px; border: 1px solid var(--line); border-radius: 18px;
    background: var(--surface); box-shadow: var(--shadow);
  }
  .primary-navigation.is-open { display: block; }
  .primary-navigation ul { display: flex; flex-direction: column; align-items: stretch; gap: 0; }
  .primary-navigation li { border-bottom: 1px solid #f0e8e0; }
  .primary-navigation li:last-child { border-bottom: 0; }
  .primary-navigation a { display: block; padding: 12px 4px; font-size: 14px; }
  .hero { padding: 42px 0 28px; }
  .hero-grid { grid-template-columns: 1fr; gap: 28px; }
  .hero h1 { font-size: clamp(42px, 12vw, 63px); }
  .hero-copy { font-size: 16px; }
  .hero-note { min-height: 290px; border-radius: 31% 31% 23px 23px; }
  .section { padding: 32px 0 45px; }
  .section-head { align-items: flex-start; }
  .section-head .text-link { margin-top: 7px; }
  .post-grid { grid-template-columns: 1fr; gap: 16px; }
  .post-card { display: grid; grid-template-columns: 115px minmax(0, 1fr); border-radius: 17px; }
  .post-card-media { aspect-ratio: auto; min-height: 100%; }
  .post-card-body { padding: 15px; }
  .post-card h3 { margin: 7px 0; font-size: 21px; }
  .post-excerpt { display: none; }
  .read-more { margin-top: 10px; }
  .topic-band { padding-bottom: 48px; }
  .topic-panel { grid-template-columns: 1fr; gap: 20px; padding: 24px; border-radius: 22px; }
  .content-layout { grid-template-columns: 1fr; padding: 36px 0 56px; }
  .sidebar { order: 2; }
  .archive-grid { grid-template-columns: 1fr; }
  .single-layout { padding: 38px 0 58px; }
  .single-title { font-size: clamp(37px, 10vw, 54px); }
  .single-deck { font-size: 16px; }
  .entry-content { font-size: 17px; }
  .entry-content h2 { font-size: 31px; }
  .entry-content h3 { font-size: 25px; }
  .entry-content blockquote { font-size: 22px; }
  .footer-main { grid-template-columns: 1fr; gap: 24px; }
}
@media (max-width: 420px) {
  .brand-copy .site-description { display: none; }
  .header-actions { gap: 7px; }
  .search-toggle, .menu-toggle { min-width: 38px; height: 38px; }
  .hero-actions { align-items: stretch; flex-direction: column; }
  .button-primary, .button-secondary { width: 100%; }
  .section-head { flex-direction: column; gap: 8px; }
  .post-card { grid-template-columns: 96px minmax(0, 1fr); }
  .post-card-body { padding: 12px; }
  .post-card h3 { font-size: 19px; }
  .post-meta { gap: 6px; font-size: 10px; }
  .post-navigation { grid-template-columns: minmax(0, 1fr); }
  .post-navigation.has-only-next .post-navigation-next, .post-navigation.has-only-previous .post-navigation-previous { grid-column: 1; }
  .footer-bottom { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
