/*
Theme Name: NovaJournal
Theme URI: https://example.com/novajournal
Author: NcedCloud
Author URI: https://ncedcloud.co.uk
Description: A lightweight WordPress editorial theme with one clean blue brand color, full-width homepage, pill navigation, simple cards, no sidebars, and clean reading pages. No page builder required.
Version: 1.1.0
Requires at least: 5.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: novajournal
Tags: blog, custom-logo, featured-images, one-column, full-width-template, lightweight, news
*/

:root {
  --bg: #f5f9ff;
  --bg-2: #eaf2ff;
  --surface: #ffffff;
  --surface-soft: #eef5ff;
  --ink: #13202e;
  --ink-soft: #354355;
  --muted: #788191;
  --line: #d9e6fb;
  --line-strong: #b7cff5;
  --accent: #1663d9;
  --accent-2: #1663d9;
  --accent-3: #1663d9;
  --glow: rgba(22, 99, 217, .16);
  --shadow: 0 10px 24px rgba(22, 99, 217, .08);
  --shadow-soft: 0 6px 16px rgba(22, 99, 217, .05);
  --radius: 20px;
  --radius-sm: 12px;
  --container: 1200px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.72;
  color: var(--ink);
  background: var(--bg);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--ink); text-decoration: none; }
a:hover, a:focus { color: var(--ink); text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 4px; }
img { max-width: 100%; height: auto; display: block; }
button, input, textarea, select { font: inherit; }

.screen-reader-text,
.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.skip-link:focus {
  left: 16px;
  top: 16px;
  width: auto;
  height: auto;
  z-index: 9999;
  padding: 10px 14px;
  color: #fff;
  background: var(--ink);
  border-radius: 999px;
}

.container {
  width: min(var(--container), calc(100% - 34px));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: #f8fbff;
  border-bottom: 1px solid var(--line);
}
.header-main {
  padding: 14px 0;
}
.header-main-inner {
  display: grid;
  grid-template-columns: minmax(180px, auto) 1fr minmax(260px, 360px);
  align-items: center;
  gap: 18px;
}
.site-branding { min-width: 0; }
.custom-logo-link img {
  width: auto;
  max-height: 68px;
}
.site-title {
  margin: 0;
  font-size: clamp(28px, 4.2vw, 46px);
  line-height: .98;
  font-weight: 900;
  letter-spacing: -1.8px;
}
.site-title a {
  color: var(--ink);
  text-decoration: none;
}
.site-title a::after {
  content: '';
  display: block;
  width: 72px;
  height: 5px;
  margin-top: 9px;
  border-radius: 999px;
  background: var(--accent);
}
.site-description {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 14px;
}
.header-search { min-width: 0; }
.search-form {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: none;
}
.search-field {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  padding: 12px 12px;
}
.search-field:focus {
  box-shadow: inset 0 -2px 0 var(--accent);
}
.search-submit,
.form-submit .submit {
  border: 0;
  border-radius: 13px;
  background: var(--ink);
  color: #fff;
  padding: 11px 16px;
  font-weight: 800;
  cursor: pointer;
}
.search-submit:hover,
.form-submit .submit:hover {
  background: var(--accent-2);
}
.menu-toggle-check { display: none; }
.menu-toggle-label {
  display: none;
  justify-self: end;
  width: max-content;
  padding: 10px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  font-weight: 850;
  cursor: pointer;
}
.main-navigation {
  justify-self: center;
  min-width: 0;
}
.primary-menu,
.primary-menu ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.primary-menu {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 7px;
}
.primary-menu li { position: relative; }
.primary-menu a {
  display: block;
  padding: 10px 13px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 850;
  text-decoration: none;
}
.primary-menu a:hover,
.primary-menu .current-menu-item > a,
.primary-menu .current_page_item > a {
  color: var(--ink);
  background: var(--surface-soft);
  border-color: var(--line-strong);
  box-shadow: none;
}
.primary-menu .sub-menu,
.primary-menu .children {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 230px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.primary-menu li:hover > .sub-menu,
.primary-menu li:hover > .children { display: block; }
.primary-menu .sub-menu a,
.primary-menu .children a { border-radius: 13px; }

/* Homepage */
.prism-hero {
  padding: 24px 0 18px;
}
.prism-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(320px, .88fr);
  gap: 16px;
}
.hero-lead,
.hero-stack-card,
.home-post-card,
.post-card,
.single-article,
.page-article,
.comments-area {
  border: 1px solid var(--line);
  background: rgba(255,255,255,.82);
  box-shadow: var(--shadow-soft);
}
.hero-lead,
.hero-stack-card {
  position: relative;
  overflow: hidden;
  min-width: 0;
  border-radius: 24px;
}
.hero-lead-link,
.hero-stack-link {
  display: block;
  position: relative;
  height: 100%;
  color: #fff;
  text-decoration: none;
}
.hero-lead-link:hover,
.hero-stack-link:hover { color: #fff; text-decoration: none; }
.hero-lead { min-height: 460px; }
.hero-stack {
  display: grid;
  gap: 14px;
}
.hero-stack-card { min-height: 140px; }
.hero-lead img,
.hero-stack-card img,
.hero-lead .image-placeholder,
.hero-stack-card .image-placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-shade {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  gap: 12px;
  padding: 26px;
  background: linear-gradient(180deg, rgba(19, 32, 46, 0) 18%, rgba(19, 32, 46, .88) 100%);
}
.hero-stack-card .hero-shade {
  padding: 22px;
}
.kicker-pill,
.category-pill {
  display: inline-flex;
  align-items: center;
  width: max-content;
  max-width: 100%;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--surface-soft);
  border: 1px solid rgba(22, 99, 217, .28);
  color: var(--accent);
  font-size: 11px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.hero-shade .kicker-pill { background: rgba(255, 255, 255, .92); color: var(--ink); }
.hero-title {
  margin: 0;
  max-width: 780px;
  color: #fff;
  font-size: clamp(32px, 4.8vw, 56px);
  line-height: .98;
  letter-spacing: -2.2px;
  text-wrap: balance;
}
.hero-stack-title {
  margin: 0;
  color: #fff;
  font-size: 20px;
  line-height: 1.14;
  letter-spacing: -.6px;
}
.hero-meta,
.home-post-date,
.post-meta {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}
.hero-shade .hero-meta { color: rgba(255,255,255,.82); }
.image-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-soft);
  color: var(--ink);
  font-size: 46px;
  font-weight: 950;
}
.home-main { padding: 34px 0 52px; }
.section-heading-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}
.section-kicker {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.section-kicker::before {
  content: '';
  width: 34px;
  height: 2px;
  border-radius: 999px;
  background: var(--accent-2);
}
.section-title,
.archive-title,
.entry-title {
  margin: 0;
  line-height: 1.08;
  letter-spacing: -1.2px;
}
.section-title { font-size: clamp(30px, 4.6vw, 52px); }
.section-note,
.archive-description,
.page-subtitle { color: var(--muted); margin: 8px 0 0; }
.home-layout {
  display: block;
}
.latest-posts-wrap {
  width: 100%;
}
.latest-story-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.home-post-card {
  min-width: 0;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
}
.home-post-card:hover,
.post-card:hover {
  box-shadow: var(--shadow);
}
.home-post-image {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--surface-soft);
}
.home-post-image img,
.home-post-image .image-placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.home-post-body { padding: 18px; }
.home-post-meta,
.post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px 12px;
  margin-bottom: 12px;
}
.home-post-title,
.post-card-title {
  margin: 0;
  font-size: clamp(22px, 2.3vw, 31px);
  line-height: 1.16;
  letter-spacing: -.65px;
}
.home-post-title a,
.post-card-title a { text-decoration: none; }
.home-post-excerpt,
.post-card-excerpt {
  margin: 12px 0 0;
  color: var(--ink-soft);
}
.home-read-more,
.read-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.home-read-more::after,
.read-more::after { content: '↗'; }

/* Archives and cards */
.site-main-full { padding: 42px 0 56px; }
.archive-shell {
  width: min(var(--container), calc(100% - 34px));
  margin-inline: auto;
}
.content-shell {
  width: min(980px, calc(100% - 34px));
  margin-inline: auto;
}
.archive-header,
.page-header { margin-bottom: 30px; }
.archive-title { font-size: clamp(34px, 5vw, 64px); }
.full-post-grid,
.post-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.post-card {
  min-width: 0;
  overflow: hidden;
  border-radius: 24px;
}
.post-card-image {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--surface-soft);
}
.post-card-image img,
.post-card-image .image-placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.post-card-body { padding: 18px; }
.post-card-title { font-size: 24px; }

/* Single content */
.single-article,
.page-article,
.comments-area {
  border-radius: 24px;
  padding: clamp(22px, 4vw, 44px);
}
.entry-title { font-size: clamp(36px, 5.5vw, 66px); }
.entry-featured {
  margin: 24px 0;
  overflow: hidden;
  border-radius: 20px;
  border: 1px solid var(--line);
}
.entry-featured img { width: 100%; }
.entry-content {
  color: #233143;
  font-size: 17px;
}
.entry-content > *:first-child { margin-top: 0; }
.entry-content p { margin: 0 0 1.15em; }
.entry-content h2,
.entry-content h3,
.entry-content h4 {
  margin: 1.75em 0 .65em;
  line-height: 1.16;
  letter-spacing: -.65px;
  color: var(--ink);
}
.entry-content h2 { font-size: clamp(27px, 3vw, 38px); }
.entry-content h3 { font-size: 25px; }
.entry-content blockquote {
  margin: 1.5em 0;
  padding: 18px 20px;
  border: 1px solid rgba(22, 99, 217, .22);
  border-left: 6px solid var(--accent-2);
  background: var(--surface-soft);
  border-radius: 16px;
}
.entry-content table {
  width: 100%;
  margin: 1.5em 0;
  border-collapse: collapse;
  overflow: hidden;
  background: #fff;
}
.entry-content th,
.entry-content td {
  border: 1px solid var(--line);
  padding: 11px 13px;
  text-align: left;
}
.entry-content pre {
  overflow-x: auto;
  padding: 18px;
  border-radius: 18px;
  background: #13202e;
  color: #fff;
}
.entry-content code {
  border-radius: 8px;
  background: rgba(19,32,46,.08);
  padding: .12em .28em;
}
.entry-content pre code { background: transparent; padding: 0; }
.entry-footer {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

/* Navigation and pagination */
.post-navigation,
.posts-navigation,
.pagination,
.nav-links { margin-top: 26px; }
.pagination,
.nav-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 10px;
}
.page-numbers,
.nav-previous a,
.nav-next a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  min-height: 42px;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 900;
  text-decoration: none;
}
.page-numbers.current,
.page-numbers:hover,
.nav-previous a:hover,
.nav-next a:hover {
  border-color: var(--accent-2);
  background: var(--accent-2);
  color: #fff;
  text-decoration: none;
}

/* Comments */
.comments-area { margin-top: 34px; }
.comments-title { margin-top: 0; }
.comment-list { padding-left: 22px; }
.comment-respond input:not([type="submit"]),
.comment-respond textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px 14px;
  background: #f8fbff;
}
.no-comments { color: var(--muted); }

/* Footer */
.site-footer {
  padding: 42px 0 34px;
  background: #13202e;
  color: rgba(255,255,255,.78);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 24px;
}
.footer-title,
.footer-heading {
  color: #fff;
  margin: 0 0 12px;
}
.footer-title { font-size: 28px; letter-spacing: -.7px; }
.footer-heading { font-size: 16px; }
.footer-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.footer-list li + li { margin-top: 8px; }
.site-footer a { color: rgba(255,255,255,.86); }
.site-footer a:hover { color: #fff; }
.footer-bottom {
  margin-top: 34px;
  padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,.12);
  display: flex;
  justify-content: center;
  gap: 14px;
  color: rgba(255,255,255,.62);
  font-size: 14px;
  text-align: center;
}

/* WordPress helpers */
.alignleft { float: left; margin: .4em 1.5em 1em 0; }
.alignright { float: right; margin: .4em 0 1em 1.5em; }
.aligncenter { margin-left: auto; margin-right: auto; }
.wp-caption { max-width: 100%; }
.wp-caption-text { color: var(--muted); font-size: 14px; }
.gallery { display: grid; gap: 12px; }
.bypostauthor, .sticky { outline: 0; }

@media (max-width: 1100px) {
  .header-main-inner { grid-template-columns: 1fr auto; }
  .main-navigation {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: start;
  }
  .header-search { grid-column: 2; grid-row: 1; width: min(360px, 42vw); }
  .prism-hero-grid { grid-template-columns: 1fr; }
  .latest-story-grid,
  .full-post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  .header-main-inner {
    grid-template-columns: 1fr auto;
    gap: 14px;
  }
  .menu-toggle-label { display: inline-flex; }
  .main-navigation {
    display: none;
    grid-column: 1 / -1;
    width: 100%;
  }
  .menu-toggle-check:checked ~ .main-navigation { display: block; }
  .primary-menu { display: grid; grid-template-columns: 1fr; }
  .primary-menu a { border-radius: 14px; }
  .primary-menu .sub-menu,
  .primary-menu .children {
    display: block;
    position: static;
    width: auto;
    padding: 0 0 0 14px;
    margin-top: 2px;
    border: 0;
    box-shadow: none;
    background: transparent;
  }
  .header-search {
    grid-column: 1 / -1;
    grid-row: 3;
    width: 100%;
  }
  .prism-hero-grid,
  .latest-story-grid,
  .full-post-grid,
  .post-grid,
  .footer-grid { grid-template-columns: 1fr; }
  .hero-lead { min-height: 390px; }
  .hero-stack-card { min-height: 170px; }
}

@media (max-width: 560px) {
  .container,
  .archive-shell,
  .content-shell { width: min(100% - 22px, var(--container)); }
  .header-main { padding: 14px 0; }
  .site-title { font-size: 31px; }
  .prism-hero { padding-top: 16px; }
  .hero-lead { min-height: 320px; }
  .hero-shade { padding: 20px; }
  .hero-title { font-size: 31px; }
  .section-heading-row { display: block; }
  .single-article,
  .page-article,
  .comments-area { border-radius: 24px; }
  .footer-bottom { flex-direction: column; }
}

/* Single post previous / next navigation - professional alignment */
.single-post-nav {
  margin: 34px auto 30px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 28px;
  align-items: stretch;
  width: 100%;
}
.single-post-nav__slot {
  display: flex;
  min-width: 0;
}
.single-post-nav__slot--previous { justify-content: flex-start; }
.single-post-nav__slot--next { justify-content: flex-end; }
.single-post-nav__card {
  width: min(100%, 520px);
  min-height: 92px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 7px;
  padding: 18px 24px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 10px 24px rgba(22, 99, 217, .06);
  color: var(--ink);
  text-decoration: none;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.single-post-nav__card:hover,
.single-post-nav__card:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 16px 32px rgba(22, 99, 217, .12);
  color: var(--ink);
  text-decoration: none;
  transform: translateY(-2px);
}
.single-post-nav__label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}
.single-post-nav__title {
  display: block;
  font-size: 16px;
  line-height: 1.35;
  font-weight: 900;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.single-post-nav__card--next {
  align-items: flex-end;
  text-align: right;
}
.single-post-nav__card--next .single-post-nav__label {
  justify-content: flex-end;
}
@media (max-width: 820px) {
  .single-post-nav {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .single-post-nav__slot,
  .single-post-nav__slot--previous,
  .single-post-nav__slot--next {
    justify-content: stretch;
  }
  .single-post-nav__card {
    width: 100%;
  }
}
