/*
Theme Name: NOVINI359 Clean News
Theme URI: https://novini359.com/
Author: Custom theme for NOVINI359
Description: A clean, minimal, image-first WordPress news theme with chronological posts and no public category UI.
Version: 1.3.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
Text Domain: novini359-clean-news
*/

:root {
  --n359-bg: #ffffff;
  --n359-text: #141414;
  --n359-muted: #6b6b6b;
  --n359-line: #e9e9e9;
  --n359-soft: #f7f7f7;
  --n359-accent: #b31217;
  --n359-width: 1420px;
  --n359-reading: 800px;
  --n359-headline: 1080px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--n359-bg);
  color: var(--n359-text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 18px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; opacity: 1 !important; filter: none !important; mix-blend-mode: normal !important; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--n359-accent); }

.n359-wrap {
  width: min(calc(100% - 64px), var(--n359-width));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,.97);
  border-bottom: 1px solid var(--n359-line);
  backdrop-filter: blur(10px);
}
.admin-bar .site-header { top: 32px; }
.header-inner {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.site-branding { min-width: 0; }
.custom-logo-link { display: inline-flex; align-items: center; }
.custom-logo { max-height: 46px; width: auto; }
.site-title {
  margin: 0;
  font-size: clamp(1.7rem, 2.2vw, 2.35rem);
  font-weight: 850;
  line-height: 1;
  letter-spacing: -0.045em;
}
.site-title a { color: var(--n359-text); }
.site-title .brand-accent { color: var(--n359-accent); }
.site-description { margin: 7px 0 0; color: var(--n359-muted); font-size: .82rem; }

.header-actions { display: flex; align-items: center; gap: 16px; }
.primary-menu { margin: 0; padding: 0; display: flex; align-items: center; list-style: none; gap: 20px; font-size: .88rem; font-weight: 650; }
.primary-menu li { margin: 0; }
.search-toggle {
  border: 1px solid var(--n359-line);
  background: #fff;
  border-radius: 999px;
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  font-size: 0;
}
.search-toggle::before { content: "⌕"; font-size: 25px; line-height: 1; transform: translateY(-1px); }
.search-toggle:hover { border-color: #bdbdbd; }
.header-search { display: none; padding: 0 0 18px; }
.header-search.is-open { display: block; }
.search-form { display: flex; gap: 10px; }
.search-field {
  flex: 1;
  min-width: 0;
  border: 1px solid #d7d7d7;
  background: #fff;
  border-radius: 8px;
  padding: 12px 14px;
  font: inherit;
}
.search-submit {
  border: 0;
  background: var(--n359-text);
  color: #fff;
  border-radius: 8px;
  padding: 11px 18px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.site-main { padding: 34px 0 78px; }
.home-intro {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 34px;
}
.home-heading { margin: 0; font-size: clamp(1.8rem, 2.6vw, 2.65rem); line-height: 1.1; letter-spacing: -.035em; }
.home-subtitle { margin: 7px 0 0; color: var(--n359-muted); font-size: .94rem; }

.lead-story {
  display: grid;
  grid-template-columns: minmax(0, 1.42fr) minmax(380px, 1fr);
  gap: 48px;
  align-items: center;
  padding-bottom: 48px;
  margin-bottom: 44px;
  border-bottom: 1px solid var(--n359-line);
}
.lead-media, .card-media, .related-media {
  display: block;
  overflow: hidden;
  background: var(--n359-soft);
}
.lead-media { aspect-ratio: 16/9; border-radius: 12px; }
.lead-media img, .card-media img, .related-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 1 !important;
  filter: none !important;
  transform: none;
}
.lead-content { min-width: 0; }
.post-date { color: var(--n359-muted); font-size: .78rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.lead-title { margin: 12px 0 14px; font-size: clamp(2.55rem, 3.8vw, 4.6rem); line-height: 1.01; letter-spacing: -.055em; }
.lead-excerpt { margin: 0; color: #404040; font-size: 1.04rem; line-height: 1.6; }
.read-more { display: inline-flex; align-items: center; gap: 8px; margin-top: 18px; font-size: .88rem; font-weight: 800; }
.read-more::after { content: "→"; }

.news-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 46px 30px;
}
.news-card { min-width: 0; }
.card-media { aspect-ratio: 16/9; border-radius: 9px; margin-bottom: 14px; }
.card-title { margin: 8px 0 8px; font-size: clamp(1.25rem, 1.7vw, 1.62rem); line-height: 1.16; letter-spacing: -.028em; font-weight: 800; }
.card-excerpt { margin: 0; color: #515151; font-size: .94rem; line-height: 1.58; }

.pagination { margin-top: 54px; }
.nav-links { display: flex; flex-wrap: wrap; gap: 8px; }
.page-numbers {
  min-width: 42px;
  height: 42px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--n359-line);
  border-radius: 7px;
  font-size: .88rem;
  font-weight: 700;
}
.page-numbers.current { background: var(--n359-text); border-color: var(--n359-text); color: #fff; }

.single-wrap, .page-wrap { width: min(calc(100% - 40px), var(--n359-reading)); margin-inline: auto; }
.single-post .site-main { padding-top: 24px; }
.article-header {
  width: min(calc(100% - 64px), var(--n359-headline));
  margin-inline: auto;
  padding-top: 0;
  margin-bottom: 20px;
}
.article-title {
  margin: 10px 0 8px;
  font-size: clamp(2.4rem, 4.15vw, 4rem);
  line-height: 1.02;
  letter-spacing: -.045em;
  text-wrap: balance;
}
.article-featured {
  width: min(calc(100% - 64px), 1240px);
  margin: 0 auto 36px;
}
.article-featured img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 760px;
  object-fit: contain;
  background: #fff;
  border-radius: 10px;
  opacity: 1 !important;
  filter: none !important;
}
.entry-content { font-size: 1.04rem; }
.entry-content > * { max-width: 100%; }
.entry-content p { margin: 0 0 1.45em; }
.entry-content h2, .entry-content h3, .entry-content h4 { line-height: 1.15; letter-spacing: -.025em; margin: 1.7em 0 .65em; }
.entry-content a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.entry-content img { border-radius: 8px; opacity: 1 !important; filter: none !important; }
.entry-content blockquote { margin: 1.5em 0; padding: .4em 0 .4em 1.2em; border-left: 3px solid var(--n359-accent); color: #3d3d3d; }

.article-navigation {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 46px;
  padding-top: 28px;
  border-top: 1px solid var(--n359-line);
}
.article-navigation a { display: block; border: 1px solid var(--n359-line); border-radius: 9px; padding: 18px; }
.nav-label { display: block; color: var(--n359-muted); font-size: .72rem; text-transform: uppercase; font-weight: 800; margin-bottom: 4px; }
.nav-title { font-weight: 800; line-height: 1.25; }

.related-section {
  width: min(calc(100% - 40px), var(--n359-width));
  margin: 60px auto 0;
  padding-top: 34px;
  border-top: 1px solid var(--n359-line);
}
.section-title { margin: 0 0 22px; font-size: 1.5rem; letter-spacing: -.03em; }
.related-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.related-media { aspect-ratio: 16/9; border-radius: 8px; margin-bottom: 11px; }
.related-title { margin: 5px 0 0; font-size: 1.03rem; line-height: 1.2; }

.archive-header, .search-header { margin-bottom: 30px; }
.archive-title, .search-title { margin: 0; font-size: clamp(1.6rem, 4vw, 2.6rem); letter-spacing: -.04em; }
.empty-state { padding: 70px 0; text-align: center; }
.empty-state p { color: var(--n359-muted); }

.site-footer { border-top: 1px solid var(--n359-line); padding: 30px 0 42px; color: var(--n359-muted); font-size: .82rem; }
.footer-inner { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }

.screen-reader-text { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@media (max-width: 1100px) {
  .n359-wrap { width: min(calc(100% - 40px), var(--n359-width)); }
  .lead-story { grid-template-columns: minmax(0, 1.25fr) minmax(320px, 1fr); gap: 32px; }
  .lead-title { font-size: clamp(2.25rem, 4.6vw, 3.7rem); }
  .card-title { font-size: 1.22rem; }
}

@media (max-width: 900px) {
  .lead-story { grid-template-columns: 1fr; gap: 20px; }
  .lead-title { font-size: clamp(2rem, 8vw, 3.3rem); }
  .news-grid, .related-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .primary-menu { display: none; }
}

@media (max-width: 782px) {
  .admin-bar .site-header { top: 46px; }
}

@media (max-width: 620px) {
  body { font-size: 17px; }
  .n359-wrap, .single-wrap, .page-wrap, .article-featured, .related-section { width: min(calc(100% - 28px), var(--n359-width)); }
  .article-header { width: min(calc(100% - 28px), var(--n359-headline)); }
  .header-inner { min-height: 66px; }
  .site-description { display: none; }
  .site-main { padding-top: 28px; }
  .home-intro { margin-bottom: 20px; }
  .lead-story { padding-bottom: 30px; margin-bottom: 28px; }
  .lead-media { border-radius: 8px; }
  .news-grid, .related-grid { grid-template-columns: 1fr; gap: 30px; }
  .card-media { border-radius: 7px; }
  .article-title { font-size: clamp(2rem, 9.5vw, 3rem); line-height: 1.04; }
  .article-featured { margin-bottom: 30px; }
  .article-featured img { border-radius: 7px; }
  .article-navigation { grid-template-columns: 1fr; }
  .footer-inner { display: block; }
}
