/*
Theme Name: MyJewels Journal
Description: Ювелирный журнал MyJewels в стилистике магазина.
Version: 1.3.1
Requires at least: 6.2
Requires PHP: 7.4
Text Domain: myjewels-journal
*/
:root {
  --mj-ink: #1e1c19;
  --mj-muted: #68625a;
  --mj-gold: #a47c3b;
  --mj-dark-gold: #785923;
  --mj-line: #e9e4da;
  --mj-paper: #f8f6f2;
  --mj-radius: 10px;
  --mj-serif: Georgia, 'Times New Roman', serif;
}
*, *::before, *::after { box-sizing: border-box; }
body.mj-site { margin: 0; background: #fff; color: var(--mj-ink); font: 16px/1.5 Arial, sans-serif; }
.mj-site a { color: inherit; }
.mj-site a:focus-visible, .mj-site :is(button,input,textarea):focus-visible { outline: 2px solid var(--mj-gold); outline-offset: 4px; }
.mj-wrap { width: min(1280px, calc(100% - 64px)); margin-inline: auto; }
.mj-skip { position: absolute; top: -8rem; z-index: 10; background: white; padding: 10px; }
.mj-skip:focus { top: 8px; }
.mj-top { background: #181818; height: 41px; }
.mj-brand, .mj-nav a { text-decoration: none; }
.mj-brandrow { min-height: 103px; display: flex; align-items: center; justify-content: space-between; gap: 22px; }
.mj-brand { display: flex; align-items: center; gap: 20px; }
.mj-brand img { display: block; width: clamp(145px, 17vw, 224px); height: auto; }
.mj-brand span { max-width: 145px; color: var(--mj-muted); font-size: 13px; line-height: 1.35; }
.mj-actions { display: flex; align-items: center; gap: 12px; }
.mj-button { display: inline-flex; align-items: center; gap: 15px; padding: 10px 17px; border-radius: 6px; font-weight: 700; font-size: 14px; text-decoration: none; white-space: nowrap; }
.mj-site .mj-button { color: #fff; background: #876228; }
.mj-button:hover { filter: brightness(.9); }
.mj-search { display: flex; align-items: center; width: clamp(160px, 22vw, 255px); background: #f6f5f3; border: 1px solid var(--mj-line); border-radius: 6px; }
.mj-search input, .mj-search button { border: 0; background: transparent; color: var(--mj-ink); }
.mj-search input { width: 100%; min-width: 0; padding: 10px 0 10px 13px; font: inherit; font-size: 14px; }
.mj-search button { cursor: pointer; width: 42px; height: 40px; flex: none; }
.mj-glass { display: inline-block; width: 13px; height: 13px; border: 1.7px solid currentColor; border-radius: 50%; position: relative; }
.mj-glass::after { content: ''; position: absolute; width: 6px; height: 1.7px; top: 10px; left: 9px; background: currentColor; transform: rotate(45deg); }
.mj-header { border-bottom: 1px solid var(--mj-line); }
.mj-navrow { border-top: 1px solid var(--mj-line); }
.mj-nav ul { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 2px 28px; }
.mj-nav li { position: relative; }
.mj-nav a { display: block; padding: 12px 0; font-size: 14px; }
.mj-nav :is(a:hover,[aria-current],.current-cat > a) { color: var(--mj-dark-gold); box-shadow: inset 0 -2px var(--mj-gold); }
.mj-nav ul ul { padding-left: 12px; }
.mj-main { padding-block: 25px 58px; }
.mj-heading, .mj-main > h1, .mj-article h1 { font: 400 clamp(37px,5vw,66px)/1.04 var(--mj-serif); letter-spacing: -.04em; margin: 0 0 22px; overflow-wrap: anywhere; }
.mj-section-title { font: 400 clamp(29px,3vw,41px)/1.1 var(--mj-serif); margin: 36px 0 16px; }
.mj-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; }
.mj-card { border: 1px solid var(--mj-line); border-radius: var(--mj-radius); background: #fff; overflow: hidden; }
.mj-cover { display: block; background: var(--mj-paper); overflow: hidden; aspect-ratio: 1.9; }
.mj-cover img { width: 100%; height: 100%; display: block; object-fit: cover; }
.mj-cover:focus-visible { outline-offset: -4px; }
.mj-placeholder { display: grid; width: 100%; height: 100%; place-items: center; background: linear-gradient(125deg,#342a1c,#a57b41); color: #fff5df; letter-spacing: .14em; }
.mj-card-body { padding: 17px 20px 20px; }
.mj-meta { display: flex; flex-wrap: wrap; gap: 5px 10px; align-items: baseline; color: var(--mj-dark-gold); font-size: 12px; font-weight: 700; }
.mj-meta time, .mj-author { font-weight: 400; color: var(--mj-muted); }
.mj-card h2 { margin: 9px 0 6px; font: 400 25px/1.13 var(--mj-serif); overflow-wrap: anywhere; }
.mj-card h2 a { text-decoration: none; }
.mj-card h2 a:hover { text-decoration: underline; }
.mj-card p, .mj-description { margin: 0; color: var(--mj-muted); font-size: 14px; }
.mj-description { margin-bottom: 20px; }
.mj-main .nav-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; align-items: center; }
.mj-main .page-numbers { padding: 6px 10px; border: 1px solid var(--mj-line); border-radius: 4px; }
.mj-main .page-numbers.current { background: var(--mj-paper); }
.mj-shop { background: var(--mj-paper); border-radius: var(--mj-radius); display: flex; gap: 14px 24px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 22px 26px; margin-bottom: 35px; }
.mj-shop h2 { font: 400 26px/1.2 var(--mj-serif); margin: 0; }
.mj-shop-menu { display: flex; gap: 10px 18px; flex-wrap: wrap; list-style: none; padding: 0; margin: 0; }
.mj-shop a { color: var(--mj-dark-gold); }
.mj-footer { background: #181818; color: #f3eee5; padding: 22px 0; font-size: 14px; }
.mj-article-header, .mj-prose { max-width: 750px; margin-inline: auto; }
.mj-article h1 { font-size: clamp(36px,4.8vw,64px); margin: 0 0 12px; }
.mj-back { display: inline-block; margin-bottom: 16px; }
.mj-author { font-size: 14px; margin: 0; }
.mj-article-header .mj-meta { margin-bottom: 12px; }
.mj-article-cover { max-width: 960px; margin: 26px auto; }
.mj-article-cover img { display: block; width: 100%; height: auto; border-radius: var(--mj-radius); }
.mj-prose { font: 18px/1.73 Arial,sans-serif; overflow-wrap: anywhere; }
.mj-prose :is(img,video,iframe) { max-width: 100%; }
.mj-prose :is(img,video) { height: auto; }
.mj-prose figure { max-width: 100%; margin-inline: 0; }
.mj-prose figure.aligncenter { margin-inline: auto; text-align: center; }
.mj-prose .alignleft { float: left; margin: 0 1rem 1rem 0; }
.mj-prose .alignright { float: right; margin: 0 0 1rem 1rem; }
.mj-prose::after { content: ''; display: block; clear: both; }
.mj-prose :is(h2,h3) { font-family: var(--mj-serif); line-height: 1.2; }
.mj-prose a, .mj-back { color: var(--mj-dark-gold); text-underline-offset: .2em; }
.mj-prose pre, .mj-prose .wp-block-table { overflow: auto; }
.mj-comments :is(textarea,input) { max-width: 100%; }
.mj-site .screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
@media (max-width: 850px) {
  .mj-wrap { width: calc(100% - 40px); }
  .mj-brand { gap: 12px; }
  .mj-brand span { display: none; }
  .mj-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 600px) {
  .mj-wrap { width: calc(100% - 28px); }
  .mj-top { height: 36px; }
  .mj-brandrow { display: grid; grid-template-columns: minmax(0,1fr); padding-block: 14px; gap: 10px; }
  .mj-brand span { display: block; }
  .mj-search { width: 100%; }
  .mj-nav ul { gap: 0 14px; }
  .mj-nav a { padding-block: 8px; font-size: 13px; }
  .mj-main { padding-block: 20px 32px; }
  .mj-grid { grid-template-columns: 1fr; }
  .mj-card h2 { font-size: 24px; }
  .mj-shop { padding: 16px; }
}

.mj-crumbs { max-width: 960px; margin: 0 auto 22px; display: flex; flex-wrap: wrap; gap: 8px; color: var(--mj-muted); font-size: 14px; }
.mj-article-header { max-width: 960px; margin-bottom: 28px; }
.mj-article-header .mj-meta { margin: 16px 0 0; gap: 12px; font-size: 14px; }
.mj-article-header .mj-meta a { font-weight: 400; text-underline-offset: .2em; }
.mj-article-layout { max-width: 960px; margin-inline: auto; }
.mj-article-layout.mj-with-toc { display: grid; grid-template-columns: minmax(160px,210px) minmax(0,1fr); gap: 36px; align-items: start; }
.mj-with-toc .mj-prose { grid-area: 1 / 2; width: 100%; }
.mj-toc { grid-area: 1 / 1; position: sticky; top: 24px; max-height: calc(100vh - 48px); overflow: auto; border-left: 2px solid var(--mj-line); padding: 4px 0 4px 17px; }
.mj-toc summary { cursor: pointer; font-size: 14px; font-weight: 700; }
.mj-toc li { margin-bottom: 8px; font-size: 13px; line-height: 1.35; }
.mj-toc-level-3 { padding-left: 13px; }
.mj-toc a { text-decoration: none; color: var(--mj-muted); overflow-wrap: anywhere; }
.mj-toc a:hover { text-decoration: underline; }
.mj-prose :is(h2,h3)[id], .mj-author-card { scroll-margin-top: 40px; }
.mj-prose > :first-child { margin-top: 0; }
.mj-prose :is(figure, .wp-caption) img { border-radius: 8px; vertical-align: middle; }
.mj-prose :is(figcaption, .wp-caption-text) { color: var(--mj-muted); font-size: 13px; line-height: 1.5; margin-top: 8px; }
.mj-author-card { max-width: 750px; margin: 38px auto 0; padding: 22px; display: grid; grid-template-columns: 72px minmax(0,1fr); gap: 18px; background: var(--mj-paper); border-radius: var(--mj-radius); }
.mj-author-photo { width: 72px; height: 72px; overflow: hidden; border-radius: 50%; background: #eee5d6; }
.mj-author-photo img { width: 100%; height: 100%; object-fit: cover; }
.mj-author-initial { display: grid; place-items: center; color: var(--mj-dark-gold); font: 30px var(--mj-serif); }
.mj-author-card h2 { font: 400 27px/1.13 var(--mj-serif); margin: 0; overflow-wrap: anywhere; }
.mj-author-card h2 a { text-decoration: none; }
.mj-author-card h2 a:hover { text-decoration: underline; }
.mj-author-card h3 { margin: 10px 0 0; font-size: 13px; }
.mj-author-bio p { margin: 5px 0 0; color: var(--mj-muted); font-size: 15px; overflow-wrap: anywhere; }
.mj-popular { max-width: 960px; margin-inline: auto; }
.mj-popular h3 { font: 400 22px/1.14 var(--mj-serif); margin: 0; overflow-wrap: anywhere; }
.mj-popular h3 a { text-decoration: none; }
.mj-popular h3 a:hover { text-decoration: underline; }
@media (max-width: 800px) {
  .mj-article-layout.mj-with-toc { display: block; }
  .mj-toc { position: static; max-height: none; margin: 0 auto 24px; max-width: 750px; }
}
@media (max-width: 600px) {
  .mj-article h1 { font-size: clamp(30px,8.5vw,43px); }
  .mj-prose { font-size: 17px; }
  .mj-author-card { padding: 16px; grid-template-columns: 54px minmax(0,1fr); gap: 12px; }
  .mj-author-photo { width: 54px; height: 54px; }
}

.mj-home { max-width: 1184px; }
.mj-home .mj-heading { font-size: clamp(33px,4.1vw,52px); margin-bottom: 24px; }
.mj-home-section + .mj-home-section { margin-top: 32px; }
.mj-section-heading { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 6px 14px; margin-bottom: 13px; border-bottom: 1px solid var(--mj-line); padding-bottom: 9px; }
.mj-section-heading h2 { margin: 0; font: 400 clamp(23px,2.7vw,33px)/1.15 var(--mj-serif); }
.mj-section-heading a { font-size: 13px; color: var(--mj-dark-gold); text-decoration: none; }
.mj-section-heading a:hover { text-decoration: underline; }
.mj-home .mj-grid { gap: 14px; }
.mj-home .mj-card { min-width: 0; }
.mj-home .mj-cover { aspect-ratio: 2.05; }
.mj-home-card-link { display: block; height: 100%; text-decoration: none; }
.mj-home-card-link:focus-visible { outline-offset: -4px; }
.mj-home-card-link:hover h3 { color: var(--mj-dark-gold); text-decoration: underline; text-underline-offset: .14em; }
.mj-home .mj-card-body { padding: 12px 14px 16px; }
.mj-home h3 { margin: 6px 0 0; font: 400 clamp(17px,1.75vw,22px)/1.2 var(--mj-serif); overflow-wrap: anywhere; }
.mj-article h1 { font-size: clamp(30px,4.1vw,51px); }
.mj-prose { font-size: 17px; }
.mj-article-layout.mj-with-toc { grid-template-columns: minmax(185px,230px) minmax(0,1fr); gap: 30px; }
.mj-toc { border: 1px solid var(--mj-line); border-top: 2px solid var(--mj-gold); border-radius: 8px; background: var(--mj-paper); padding: 12px 14px 8px; }
.mj-toc summary { display: flex; justify-content: space-between; align-items: center; gap: 10px; color: var(--mj-dark-gold); font-size: 11px; letter-spacing: .085em; text-transform: uppercase; list-style: none; padding: 3px 0 8px; }
.mj-toc summary::-webkit-details-marker { display: none; }
.mj-toc-chevron { width: 7px; height: 7px; border: solid currentColor; border-width: 0 1px 1px 0; transform: rotate(45deg); margin-right: 2px; }
.mj-toc details[open] .mj-toc-chevron { transform: rotate(225deg); }
.mj-toc ol { margin: 0; padding: 0; list-style: none; counter-reset: mj-sections; }
.mj-toc li { margin: 0; border-top: 1px solid var(--mj-line); counter-increment: mj-sections; }
.mj-toc a { display: grid; grid-template-columns: 1.7em minmax(0,1fr); gap: 7px; padding: 10px 0; color: var(--mj-ink); font-size: 13px; line-height: 1.36; }
.mj-toc a::before { content: counter(mj-sections, decimal-leading-zero); color: var(--mj-dark-gold); font-size: 11px; font-variant-numeric: tabular-nums; }
.mj-toc .mj-toc-level-3 { padding-left: 12px; }
.mj-toc .mj-toc-level-3 a { font-size: 12px; }
.mj-toc a:hover { color: var(--mj-dark-gold); }
@media (min-width: 601px) and (max-width: 850px) {
  .mj-home .mj-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@media (max-width: 600px) {
  .mj-home-section + .mj-home-section { margin-top: 23px; }
  .mj-home .mj-grid { gap: 10px; }
  .mj-home-card-link { display: grid; grid-template-columns: minmax(100px,33%) minmax(0,1fr); }
  .mj-home .mj-cover { aspect-ratio: auto; min-height: 90px; }
  .mj-home .mj-card-body { padding: 8px 10px; }
  .mj-home h3 { font-size: 17px; }
}

.mj-editorial-title {
  margin: 0 0 12px;
  color: var(--mj-dark-gold);
  font: 700 12px/1.3 Arial, sans-serif;
  letter-spacing: .11em;
  text-transform: uppercase;
}
.mj-editorial-grid {
  display: grid;
  grid-template-columns: minmax(0,1.5fr) repeat(2,minmax(0,1fr));
  gap: 16px;
}
.mj-editorial-count-2 { grid-template-columns: minmax(0,1.5fr) minmax(0,1fr); }
.mj-editorial-count-1 { grid-template-columns: minmax(0,1fr); }
.mj-editorial-card {
  min-width: 0;
  border: 1px solid var(--mj-line);
  border-radius: 12px;
  overflow: hidden;
  background: #fbf9f5;
}
.mj-editorial-card > a { display: block; height: 100%; text-decoration: none; }
.mj-editorial-card > a:focus-visible { outline-offset: -4px; }
.mj-editorial-cover { height: clamp(145px,17vw,220px); background: var(--mj-paper); }
.mj-editorial-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.mj-editorial-caption { display: flex; align-items: flex-start; gap: 10px; justify-content: space-between; padding: 15px 16px 17px; }
.mj-editorial-copy { min-width: 0; }
.mj-editorial-category {
  display: block;
  margin-bottom: 5px;
  color: var(--mj-dark-gold);
  font: 700 10px/1.35 Arial, sans-serif;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.mj-home .mj-editorial-card h3 { margin: 0; font-size: clamp(18px,1.75vw,23px); }
.mj-home .mj-editorial-lead h3 { font-size: clamp(21px,2vw,28px); }
.mj-editorial-arrow {
  display: grid;
  flex: 0 0 28px;
  height: 28px;
  place-items: center;
  border: 1px solid #e3d6bf;
  border-radius: 50%;
  color: var(--mj-dark-gold);
}
.mj-editorial-card a:hover .mj-editorial-arrow { background: #eee5d6; }
.mj-editorial-card a:hover h3 { text-decoration: underline; text-underline-offset: .12em; }

@media (max-width: 720px) {
  .mj-editorial-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
  .mj-editorial-lead { grid-column: 1 / -1; }
  .mj-editorial-count-2 .mj-editorial-card { grid-column: 1 / -1; }
  .mj-editorial-cover { height: auto; aspect-ratio: 1.65; }
  .mj-editorial-lead .mj-editorial-cover { aspect-ratio: 2.15; }
  .mj-editorial-caption { padding: 11px 10px 13px; }
  .mj-editorial-card:not(.mj-editorial-lead) .mj-editorial-arrow { display: none; }
  .mj-home .mj-editorial-card:not(.mj-editorial-lead) h3 { font-size: 17px; }
}
