/*
Theme Name: Nowjaryan Blocksy
Template: blocksy
Description: Blocksy child theme for the Nowjaryan circular economy knowledge library.
Version: 1.1.0
Requires PHP: 7.4
Text Domain: nowjaryan-blocksy
*/

:root {
  --nj-ink: #14332a;
  --nj-dark: #143830;
  --nj-muted: #526459;
  --nj-soft: #f1f3eb;
  --nj-line: #dce5db;
  --nj-gold: #f0bf6a;
  --nj-link: #245846;
}
.nj-wrap { width: min(1120px, calc(100% - 3rem)); margin-inline: auto; }
.home #main-container { position: relative; }
.home #header { position: absolute; inset: 0 0 auto; z-index: 20; }
.home #header [data-row="middle"] { background: linear-gradient(#102921d9, transparent); }
.home #header .site-title a,
.home #header .menu a,
.home #header .ct-header-trigger { color: #fff; }
.home #header .menu a:hover,
.home #header .current-menu-item > a { color: var(--nj-gold); }
.nj-cover, .nj-guide { position: relative; isolation: isolate; overflow: hidden; color: #fff; background: var(--nj-dark); }
.nj-cover > .nj-image, .nj-guide > .nj-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.nj-cover::after, .nj-guide::after { content: ""; position: absolute; inset: 0; background: linear-gradient(270deg, #102921ef 4%, #102921b0 45%, #10292135 95%); z-index: -1; }
.nj-cover-home { min-height: min(760px, 95svh); display: grid; align-items: center; padding-top: 70px; }
.nj-cover-home > .nj-image { object-position: 35% center; }
.nj-cover-content { padding-block: clamp(4rem, 11vw, 8rem); }
.nj-cover h1 { font-size: clamp(2.7rem, 6vw, 6.1rem); color: #fff; line-height: 1.22; margin: .4rem 0 1.1rem; }
.nj-cover p:not(.nj-kicker) { max-width: 34rem; color: #f3f5ef; font-size: clamp(1rem, 1.7vw, 1.2rem); }
.nj-cover-page .nj-cover-content { padding-block: clamp(3rem, 7vw, 5.5rem); }
.nj-cover-page h1 { font-size: clamp(2.2rem, 5vw, 4rem); }
.nj-kicker { font-weight: 700; font-size: .9rem; color: var(--nj-link); margin: 0 0 .45rem; }
.nj-cover .nj-kicker { color: #f7d79c; }
.nj-actions { display: flex; align-items: center; flex-wrap: wrap; gap: .75rem; margin-block-start: 1.8rem; }
.nj-button, .nj-secondary { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: .6rem 1.15rem; border: 1px solid transparent; border-radius: .4rem; font: inherit; font-weight: 700; line-height: 1.5; cursor: pointer; }
.nj-button { color: #283620; background: var(--nj-gold); }
.nj-button:hover { color: #283620; background: #fadc9e; }
.nj-secondary { color: #fff; border-color: #ffffffa3; background: #15362e66; }
.nj-secondary:hover { color: #fff; background: #15362e; }
.nj-text-link { color: var(--nj-link); text-decoration: underline; text-underline-offset: .26em; font-weight: 700; }
.nj-section { padding-block: clamp(3rem, 6vw, 5rem); scroll-margin-top: 6rem; }
.nj-soft { background: var(--nj-soft); }
.nj-title, .nj-center { text-align: center; }
.nj-title { margin: 0 auto clamp(1.35rem, 3vw, 2.4rem); max-width: 41rem; }
.nj-title h2, .nj-split h2, .nj-guide h2, .nj-metrics h2 { font-size: clamp(1.65rem, 3.6vw, 2.9rem); line-height: 1.45; color: var(--nj-ink); margin: 0 0 .55rem; }
.nj-title p, .nj-card p, .nj-principle p, .nj-intro { color: var(--nj-muted); margin: 0; }
.nj-center { margin-block-start: 1.8rem; }
.nj-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(.85rem, 2vw, 1.4rem); }
.nj-four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.nj-card, .nj-empty { background: #fff; border: 1px solid var(--nj-line); border-radius: .8rem; overflow: hidden; }
.nj-card { color: var(--nj-ink); }
.nj-card .nj-image { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; height: auto; }
.nj-topic-card .nj-image { aspect-ratio: 2 / 1; }
.nj-card-content { padding: clamp(.9rem, 2vw, 1.3rem); }
.nj-card h3, .nj-principle h3 { font-size: 1.2rem; line-height: 1.55; color: var(--nj-ink); margin: 0 0 .45rem; }
.nj-card h3 a { color: inherit; }
.nj-card h3 a:hover { text-decoration: underline; }
.nj-card p + a { display: inline-block; margin-block-start: .65rem; }
.nj-tag { display: inline-block; margin-block-end: .6rem; background: #e8f0e2; color: #275541; border-radius: 2rem; font-weight: 700; font-size: .875rem; padding: .1rem .65rem; }
.nj-split { display: grid; grid-template-columns: 1fr 1fr; background: #e7eee2; }
.nj-split > .nj-image { width: 100%; height: 100%; object-fit: cover; }
.nj-split > div { align-self: center; padding: clamp(1.5rem, 6.2vw, 5.7rem); }
.nj-split h3 { color: var(--nj-ink); font-size: 1.16rem; margin: 1rem 0 .2rem; }
.nj-split p { margin: 0; }
.nj-split-inner { margin-block: 0; }
.nj-reverse .nj-image { order: 2; }
.nj-field .nj-image { aspect-ratio: 5 / 4; }
.nj-field { scroll-margin-top: 6rem; }
.nj-guide { border-radius: .8rem; min-height: clamp(15rem, 40vw, 27rem); display: grid; place-items: center; text-align: center; padding: 1.5rem; }
.nj-guide::after { background: #142b22b5; }
.nj-guide h2 { color: #fff; margin-block-end: 1.25rem; }
.nj-principle { padding: 1.3rem 1rem; text-align: center; border: 1px solid var(--nj-line); border-radius: .8rem; }
.nj-principle .nj-image { width: 70px; height: 70px; display: block; object-fit: cover; border-radius: 50%; margin: 0 auto 1rem; }
.nj-metrics { padding-block: clamp(2.5rem, 5vw, 4rem); background: var(--nj-dark); color: #fff; text-align: center; }
.nj-metrics h2 { color: #fff; }
.nj-metrics dl { margin: 1.2rem 0 0; }
.nj-metrics dl > div { display: flex; flex-direction: column-reverse; border-inline-start: 1px solid #fff3; }
.nj-metrics dl > div:first-child { border-inline-start: 0; }
.nj-metrics dd { color: var(--nj-gold); font-size: clamp(1.8rem, 4.5vw, 3.3rem); line-height: 1.3; font-weight: 700; margin: 0; }
.nj-cta p { margin: .6rem 0 1.2rem; }
.nj-guide-steps { max-width: 760px; }
.nj-detail { background: #fff; padding: .75rem 1rem; border: 1px solid var(--nj-line); border-radius: .5rem; margin-block-end: .6rem; }
.nj-detail summary { cursor: pointer; font-weight: 700; color: var(--nj-ink); }
.nj-detail p { margin: .6rem 0 0; }
.nj-main { min-height: 64vh; }
.nj-results, .nj-empty, .pagination { margin-block-start: 1.5rem; }
.nj-empty { padding: 1.25rem; }
.nj-search { display: flex; align-items: stretch; gap: .625rem; max-width: 52rem; margin-block: 1.5rem 0; }
.nj-search input, .nj-search select, .nj-feedback input, .nj-feedback textarea { background: #fff; color: var(--nj-ink); border: 1px solid #aebfb1; border-radius: .4rem; padding-inline: .8rem; min-height: 46px; }
.nj-search input { min-width: 0; flex: 1; }
.nj-search select { width: auto; }
.nj-article { max-width: 46rem; margin-inline: auto; overflow-wrap: anywhere; }
.nj-article h1 { font-size: clamp(1.7rem, 5vw, 2.7rem); margin-block: .8rem 1.25rem; }
.nj-article h2 { margin-block-start: 1.5rem; }
.nj-article-terms { color: var(--nj-muted); margin-block-start: .5rem; }
.nj-feedback { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.nj-feedback label { display: grid; gap: .35rem; font-weight: 700; }
.nj-wide { grid-column: 1 / -1; }
.nj-notice { padding: .75rem; background: #fff; border-inline-start: 4px solid var(--nj-link); }
.nj-trap { position: absolute; inline-size: 1px; block-size: 1px; clip-path: inset(50%); overflow: hidden; }
.nj-footer-links { background: #102921; color: #e7eee2; padding-block: 2rem; }
.nj-footer-links .nj-wrap, .nj-footer-links nav { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: .75rem 1.5rem; }
.nj-footer-links a { color: #fff; }
.nj-footer-links a:hover { color: var(--nj-gold); }
.nj-footer-brand { font-size: 1.4rem; font-weight: 700; }
.nj-footer-links p { margin: .25rem 0 0; }

@media (max-width: 900px) {
  .nj-four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .nj-wrap { width: calc(100% - 1.5rem); }
  .nj-cover-home { min-height: min(650px, 87svh); }
  .nj-cover::after { background: linear-gradient(270deg, #102921eb, #10292180); }
  .nj-grid:not(.nj-four), .nj-split, .nj-feedback { grid-template-columns: minmax(0, 1fr); }
  .nj-split > .nj-image { aspect-ratio: 3 / 2; }
  .nj-reverse .nj-image { order: 0; }
  .nj-search:has(select) { display: grid; grid-template-columns: 1fr auto; }
  .nj-search:has(select) input { grid-column: 1 / -1; }
  .nj-metrics dl > div:nth-child(odd) { border-inline-start: 0; }
}
