/*
Theme Name: Interesi Magazine
Theme URI: https://interesi.cc/
Author: Interesi.cc
Description: Original, lightweight Russian editorial block theme.
Version: 0.5.4
Requires at least: 6.6
Text Domain: interesi-magazine
*/

@font-face { font-family: 'Golos Text'; src: url('assets/fonts/golos-cyrillic.woff2') format('woff2'); font-style: normal; font-weight: 400 700; font-display: swap; unicode-range: U+0400-052F,U+2DE0-2DFF,U+A640-A69F; }
@font-face { font-family: 'Golos Text'; src: url('assets/fonts/golos-latin.woff2') format('woff2'); font-style: normal; font-weight: 400 700; font-display: swap; unicode-range: U+0000-024F,U+1E00-1EFF; }
:root {
  --ink: #222b27;
  --muted: #5d6963;
  --paper: #ffffff;
  --surface: #fff;
  --line: #dfe5df;
  --accent: #385c50;
  --header: #ffffff;
  --signal: #ac704a;
  --fallback: #edf1ed;
  --display: 'Golos Text', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  --body: 'Golos Text', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  --brand: 'Golos Text', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  --shell: 1160px;
}

.interesi-ad { margin: 22px auto 26px; max-width: 560px; color: var(--muted); }
.interesi-ad__label { display: block; margin-bottom: 6px; font: 400 11px/1.2 var(--body); letter-spacing: .05em; text-transform: uppercase; }
.interesi-ad--video #movie_video { width: 100%; min-height: 180px; }
.interesi-ad--video:has(#movie_video:empty) { display: none; }
.interesi-ad--banner { max-width: 100%; min-height: 300px; }
.interesi-ad--banner:has(div[id^="movie_banner_"]:empty) { display: none; }
@media (max-width: 600px) {
  .interesi-ad { margin-block: 18px 22px; }
  .interesi-ad--video #movie_video { min-height: 170px; }
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--body); line-height: 1.55; overflow-wrap: break-word; }
img { max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: .18em; }
a:hover { color: var(--accent); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.shell { max-width: var(--shell); margin-inline: auto; padding-inline: clamp(18px, 4vw, 46px); }
.home-main.is-layout-constrained > *, .listing-main.is-layout-constrained > * { max-width: 100%; }
.wp-block-query.is-layout-constrained > .story-grid { max-width: 100%; }

/* Global navigation stays visible without theme JavaScript. */
.masthead { position: relative; z-index: 5; border-bottom: 1px solid var(--line); background: var(--header); color: var(--ink); }
.masthead__inner { min-height: 68px; gap: 24px; padding-block: 10px; }
.brand { margin: 0; font-family: var(--brand); font-size: clamp(25px, 2.3vw, 29px); font-weight: 700; line-height: 1; letter-spacing: -.055em; }
.brand a, .footer-brand a { text-decoration: none; }
.brand a:hover { color: var(--accent); }
.header-search { width: min(360px, 40vw); margin: 0; }
.mobile-search { display: none; }
.wp-block-search__inside-wrapper { display: flex; align-items: stretch; }
.wp-block-search__input { min-width: 0; width: 100%; border: 1px solid var(--line); border-right: 0; border-radius: 0; padding: 11px 13px; background: var(--surface); color: var(--ink); font: inherit; }
.wp-block-search__button { margin: 0; border: 1px solid var(--ink); border-radius: 0 8px 8px 0; padding: 11px 19px; background: var(--ink); color: #fff; font: 700 14px var(--body); cursor: pointer; }
.wp-block-search__button:hover { background: var(--accent); border-color: var(--accent); }
.masthead .wp-block-search__input { border-radius: 8px 0 0 8px; }
.section-nav { border-bottom: 1px solid var(--line); background: var(--surface); }
.section-nav__inner { overflow-x: auto; scrollbar-width: thin; }
.section-nav .wp-block-categories-list { display: flex; gap: clamp(16px, 2.6vw, 32px); align-items: center; width: max-content; min-width: 100%; list-style: none; margin: 0; padding: 0; }
.section-nav .wp-block-categories-list li { margin: 0; white-space: nowrap; }
.section-nav .wp-block-categories-list a { display: block; padding-block: 12px; text-decoration: none; font-size: 14px; font-weight: 600; }

.home-main, .listing-main { padding-block: 32px 46px; }
.section-head { gap: 20px; margin-bottom: 20px; padding-bottom: 0; }
.section-head h1 { margin: 0; font-family: var(--display); font-size: clamp(25px, 2.2vw, 30px); font-weight: 700; line-height: 1.2; letter-spacing: -.04em; }
.section-head__note { margin: 0; color: var(--muted); font-size: 13px; }
.listing-intro { margin: 6px 0 26px; border-bottom: 1px solid var(--line); padding: 10px 0 18px; }
.listing-intro.is-layout-constrained > * { max-width: 100%; margin-inline: 0; }
.kicker { margin: 0 0 5px; color: var(--accent); font-family: var(--brand); font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.listing-intro h1 { margin: 0; font-family: var(--display); font-size: clamp(32px, 4vw, 52px); line-height: 1.1; letter-spacing: -.04em; }
.listing-intro .taxonomy-description { max-width: 70ch; color: var(--muted); }
.intro-search { width: min(100%, 570px); margin: 18px 0 0; }
.wp-block-group.listing-intro.is-layout-constrained > .wp-block-search.intro-search { margin-left: 0 !important; margin-right: auto !important; }
.search .header-search { display: none; }

/* An even editorial grid keeps every subject available at a glance. */
.story-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px 24px; list-style: none; margin: 0; padding: 0; }
.story-grid > li { min-width: 0; margin-block-start: 0; border-bottom: 1px solid var(--line); padding-bottom: 18px; background: transparent; }
.story-card__image { display: block; aspect-ratio: 16 / 10; margin: 0; overflow: hidden; background: var(--fallback); }
.story-card__image a, .story-card__image img { display: block; width: 100%; height: 100%; }
.story-card__image img { object-fit: cover; }
.story-card__body { padding: 12px 0 0; }
.story-card__category { margin: 0 0 6px; padding: 0; color: var(--accent); font-size: 11px; font-weight: 700; letter-spacing: .025em; text-transform: uppercase; }
.story-card__category a { text-decoration: none; }
.story-card__title { margin: 0 0 7px; font-family: var(--display); font-size: clamp(18px, 1.55vw, 21px); font-weight: 700; letter-spacing: -.025em; line-height: 1.32; }
.story-card__title a { text-decoration: none; }
.story-card__excerpt { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.story-card__excerpt .wp-block-post-excerpt__excerpt { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; margin: 0; }
.story-card__excerpt .wp-block-post-excerpt__more-text { display: none; }
.story-card__date { margin-top: 8px; color: var(--muted); font-size: 12px; }
.story-grid > li:not(:has(img)) { min-height: 0; }
.story-grid > li:not(:has(img)) .story-card__image { display: none; }
.story-grid > li:not(:has(img)) .story-card__body { padding-top: 0; }
.home-grid .story-card__excerpt { display: none; }

.wp-block-query-pagination.site-pagination { display: flex; align-items: center; justify-content: center !important; flex-wrap: wrap; width: max-content; max-width: 100%; gap: 5px; margin: 28px auto 0 !important; border-top: 1px solid var(--line); padding: 18px 0 0; }
.site-pagination .wp-block-query-pagination-numbers { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 4px; margin: 0; }
.site-pagination a.page-numbers, .site-pagination .page-numbers.current, .site-pagination .page-numbers.dots { display: inline-flex; align-items: center; justify-content: center; min-width: 36px; min-height: 36px; padding: 6px; border-radius: 4px; background: transparent; text-decoration: none; font-size: 14px; font-weight: 600; }
.site-pagination a.page-numbers:hover { background: var(--fallback); }
.site-pagination .page-numbers.current { background: var(--ink); color: #fff; }
.site-pagination .wp-block-query-pagination-previous, .site-pagination .wp-block-query-pagination-next { display: inline-flex; align-items: center; min-height: 36px; margin: 0 !important; padding: 5px 9px; text-decoration: none; font-size: 14px; font-weight: 600; }
.site-pagination .wp-block-query-pagination-previous:hover, .site-pagination .wp-block-query-pagination-next:hover { color: var(--accent); }
.empty-state { max-width: 60ch; padding: 36px 0 60px; color: var(--muted); }

.article-shell { max-width: 830px; margin-inline: auto; padding: 18px clamp(18px, 4vw, 40px) 76px; }
.article-shell.is-layout-constrained > :first-child { margin-block-start: 0; }
.article-intro { margin-bottom: 18px; }
.article-intro.is-layout-constrained > * { margin-inline: 0; }
.article-breadcrumb { gap: 5px; color: var(--muted); font-size: 12px; }
.article-breadcrumb p { margin: 0; }
.article-breadcrumb a { text-decoration: none; }
.article-category { color: var(--accent); font-size: 12px; font-weight: 700; }
.article-category a { text-decoration: none; }
.article-intro h1, .plain-page h1, .not-found h1 { margin: 9px 0 10px; font-family: var(--display); font-size: clamp(30px, 2.8vw, 40px); font-weight: 700; letter-spacing: -.035em; line-height: 1.16; }
.article-dek { margin: 0 0 10px; color: var(--muted); font-size: clamp(17px, 1.6vw, 19px); line-height: 1.48; }
.article-dek p { margin: 0; }
.article-date { color: var(--muted); font-size: 13px; }
.article-image { margin: 0 0 26px; }
.article-image img { display: block; width: 100%; max-height: 420px; object-fit: cover; background: var(--fallback); }
.article-image__caption { margin-top: 7px; color: var(--muted); font-size: 12px; line-height: 1.4; }
.article-body { max-width: 66ch; margin-inline: auto; font-size: clamp(18px, 1.6vw, 19px); line-height: 1.72; }
.article-body p { margin: 0 0 1.3em; }
.article-body h2 { margin: 1.65em 0 .5em; font-family: var(--display); font-size: 1.65em; line-height: 1.2; }
.article-body h3 { margin: 1.5em 0 .45em; font-size: 1.3em; line-height: 1.24; }
.article-body figure, .article-body .wp-block-image { max-width: 100%; }
.article-body iframe { max-width: 100%; }
.article-body blockquote { margin: 1.6em 0; border-left: 4px solid var(--accent); padding-left: 1em; font-family: var(--display); font-size: 1.25em; line-height: 1.4; }
.article-related-inline { max-width: 66ch; margin: 30px 0 34px; border-block: 1px solid var(--line); padding: 15px 0; }
.article-related-inline__label { display: block; margin-bottom: 7px; color: var(--accent); font-size: 12px; font-weight: 700; }
.article-related-inline__link { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 15px; align-items: center; text-decoration: none; }
.article-related-inline__thumb { display: block; width: 84px; height: 64px; border-radius: 7px; background: var(--fallback); object-fit: cover; }
.article-related-inline__title { font-size: 16px; font-weight: 700; line-height: 1.35; }
.article-related-bottom { margin-top: 44px; border-top: 1px solid var(--line); padding-top: 22px; }
.article-related-bottom h2 { margin: 0 0 18px; font-family: var(--display); font-size: clamp(22px, 2.2vw, 27px); line-height: 1.25; letter-spacing: -.025em; }
.article-related-bottom__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; list-style: none; margin: 0; padding: 0; }
.article-related-bottom__grid li { min-width: 0; margin: 0; }
.article-related-bottom__grid a { display: block; height: 100%; border-radius: 9px; overflow: hidden; background: var(--surface); text-decoration: none; }
.article-related-bottom__image { display: block; width: 100%; aspect-ratio: 16 / 10; background: var(--fallback); object-fit: cover; }
.article-related-bottom__title { display: block; padding: 12px 13px 15px; font-size: 15px; font-weight: 700; line-height: 1.35; }
.article-related-inline__link:hover .article-related-inline__title, .article-related-bottom__grid a:hover .article-related-bottom__title { color: var(--accent); }
.not-found { min-height: 56vh; }
.not-found p { color: var(--muted); }

.site-footer { border-top: 1px solid var(--line); background: var(--surface); }
.footer-inner { gap: 20px; padding-block: 18px; color: var(--muted); font-size: 12px; }
.footer-inner p { margin: 0; }
.footer-brand { margin: 0; color: var(--ink); font-family: var(--brand); font-size: 14px; font-weight: 700; }

@media (max-width: 950px) {
  .story-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .masthead__inner { flex-wrap: nowrap; gap: 10px; min-height: 56px; padding-block: 8px; }
  .brand { font-size: 22px; }
  .header-search { display: none; }
  .mobile-search { display: block; margin-left: auto; }
  .mobile-search summary { display: flex; align-items: center; justify-content: center; min-width: 56px; min-height: 40px; border: 1px solid var(--line); border-radius: 6px; padding: 7px 10px; color: var(--ink); font-size: 13px; font-weight: 700; list-style: none; cursor: pointer; }
  .mobile-search summary::-webkit-details-marker { display: none; }
  .mobile-search[open] summary { background: var(--fallback); }
  .mobile-search form { position: absolute; top: 100%; left: 0; width: 100%; padding: 14px 18px 18px; background: var(--header); box-shadow: 0 10px 18px rgba(32,53,47,.12); }
  .mobile-search label { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 700; }
  .mobile-search__fields { display: flex; }
  .mobile-search input { width: 100%; min-width: 0; border: 1px solid var(--line); border-radius: 8px 0 0 8px; padding: 11px; font: inherit; }
  .mobile-search button { border: 1px solid var(--ink); border-radius: 0 8px 8px 0; padding: 10px 14px; background: var(--ink); color: #fff; font: 700 14px var(--body); }
  .search .mobile-search { display: none; }
  .section-nav__inner { scrollbar-width: none; -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 24px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 24px), transparent); }
  .section-nav__inner::-webkit-scrollbar { display: none; }
  .section-nav .wp-block-categories-list { gap: 12px; }
  .section-nav .wp-block-categories-list a { padding-block: 10px; font-size: 13px; }
  .home-main, .listing-main { padding-block: 20px 38px; }
  .section-head { align-items: baseline; margin-bottom: 16px; }
  .section-head__note { display: none; }
  .story-grid { grid-template-columns: 1fr; gap: 15px; }
  .story-grid > li { padding-bottom: 15px; }
  .home-grid > li { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 14px; align-items: start; }
  .home-grid .story-card__image { width: 104px; height: 86px; aspect-ratio: auto; }
  .home-grid .story-card__body { padding: 0; }
  .home-grid .story-card__category { margin-bottom: 3px; font-size: 10px; }
  .home-grid .story-card__title { margin: 0; font-size: 16px; line-height: 1.3; }
  .home-grid .story-card__date { margin-top: 4px; font-size: 11px; }
  .home-grid > li:not(:has(img)) { display: block; }
  .story-card__body { padding-top: 10px; }
  .story-card__excerpt { display: none; }
  .story-card__title { font-size: 19px; }
  .article-shell { padding-top: 12px; }
  .article-intro h1 { font-size: clamp(27px, 7.4vw, 31px); line-height: 1.18; }
  .article-dek { font-size: 16px; line-height: 1.5; }
  .article-image img { max-height: 280px; }
  .article-related-bottom__grid { grid-template-columns: 1fr; gap: 10px; }
  .article-related-bottom__grid a { display: grid; grid-template-columns: 92px minmax(0, 1fr); align-items: center; }
  .article-related-bottom__image { width: 92px; height: 76px; aspect-ratio: auto; }
  .article-related-bottom__title { padding: 10px 12px; }
  .footer-inner { align-items: flex-start; padding-block: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
