/*
Theme Name: Nonstop Modern
Theme URI: https://example.com/nonstop-modern
Author: OpenAI
Author URI: https://openai.com
Description: A custom WordPress news and business magazine theme rebuilt from scratch for recovered content, with a modern 2024–2025 editorial layout.
Version: 1.0.1
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
Text Domain: nonstop-modern
*/

:root {
  --bg: #f5f4ef;
  --surface: #ffffff;
  --surface-soft: #ece8df;
  --surface-strong: #e4dfd2;
  --text: #1f2521;
  --muted: #66716a;
  --accent: #224038;
  --accent-strong: #152a24;
  --border: #d8d3c8;
  --shadow: 0 20px 48px rgba(26, 39, 33, 0.08);
  --radius: 24px;
  --radius-small: 16px;
  --frame: min(1240px, calc(100vw - 2rem));
  --content: 760px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  color: var(--accent);
}

button,
input,
textarea,
select {
  font: inherit;
}

.site-frame {
  width: var(--frame);
  margin-inline: auto;
}

.site-content {
  padding: 2rem 0 5rem;
}

.topbar {
  border-bottom: 1px solid rgba(216, 211, 200, 0.6);
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(12px);
}

.topbar-inner,
.brand-row,
.nav-inner,
.footer-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.topbar-inner {
  min-height: 48px;
}

.topbar-copy,
.topbar-menu,
.footer-menu,
.primary-menu {
  display: flex;
  align-items: center;
  gap: 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.topbar-copy,
.topbar-menu a,
.footer-menu a,
.post-card-meta,
.entry-meta-line,
.archive-description,
.site-description,
.copyright,
.search-form .search-field::placeholder {
  color: var(--muted);
}

.dot,
.meta-sep,
.sep {
  color: rgba(102, 113, 106, 0.5);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(245, 244, 239, 0.82);
  backdrop-filter: blur(18px);
}

.brand-row {
  padding: 1.2rem 0;
  gap: 2rem;
}

.branding {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.custom-logo-link,
.site-logo a {
  display: inline-flex;
}

.site-logo {
  display: flex;
  align-items: center;
}

.custom-logo {
  max-height: 82px;
  width: auto;
}

.default-logo {
  max-width: min(100%, 360px);
}

.site-title,
.site-title a,
.footer-title {
  margin: 0;
  font-size: clamp(1.5rem, 2vw, 2.1rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.site-description,
.footer-text,
.author-copy p,
.post-card-excerpt,
.prose-block p,
.archive-description,
.empty-state p,
.error-card p {
  font-size: 1rem;
}

.header-tools {
  width: min(360px, 100%);
}

.nav-row {
  border-top: 1px solid rgba(216, 211, 200, 0.7);
  border-bottom: 1px solid rgba(216, 211, 200, 0.7);
}

.nav-inner {
  min-height: 62px;
  position: relative;
}

.primary-navigation {
  flex: 1;
}

.primary-menu {
  flex-wrap: wrap;
  gap: 1.1rem 1.4rem;
}

.primary-menu a,
.topbar-menu a,
.footer-menu a {
  font-weight: 600;
  font-size: 0.95rem;
}

.primary-menu .menu-item-has-children {
  position: relative;
}

.primary-menu .sub-menu {
  display: none;
  position: absolute;
  top: calc(100% + 0.6rem);
  left: 0;
  min-width: 220px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 0.75rem;
  list-style: none;
}

.primary-menu .menu-item-has-children:hover > .sub-menu,
.primary-menu .menu-item-has-children:focus-within > .sub-menu {
  display: block;
}

.primary-menu .sub-menu li + li {
  margin-top: 0.2rem;
}

.primary-menu .sub-menu a {
  display: block;
  padding: 0.5rem 0.75rem;
  border-radius: 12px;
}

.primary-menu .sub-menu a:hover {
  background: var(--surface-soft);
}

.menu-toggle {
  display: none;
  align-items: center;
  gap: 0.8rem;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 999px;
  padding: 0.7rem 1rem;
  color: var(--text);
}

.menu-toggle-lines {
  width: 18px;
  height: 2px;
  background: var(--text);
  position: relative;
  display: inline-block;
}

.menu-toggle-lines::before,
.menu-toggle-lines::after {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  width: 18px;
  height: 2px;
  background: var(--text);
}

.menu-toggle-lines::before {
  top: -6px;
}

.menu-toggle-lines::after {
  top: 6px;
}

.search-form {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.35rem;
}

.search-form label {
  flex: 1;
}

.search-field {
  width: 100%;
  background: transparent;
  border: 0;
  padding: 0.85rem 1rem;
  outline: none;
  color: var(--text);
}

.search-submit,
.button-link,
.wp-block-button__link,
input[type="submit"],
button[type="submit"] {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  padding: 0.9rem 1.25rem;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.search-submit:hover,
.button-link:hover,
.wp-block-button__link:hover,
input[type="submit"]:hover,
button[type="submit"]:hover {
  background: var(--accent-strong);
  color: #fff;
  transform: translateY(-1px);
}

.page-intro,
.archive-intro,
.author-intro-card,
.error-card,
.front-page-content,
.author-box,
.comments-area,
.single-article,
.widget,
.post-card,
.category-block,
.latest-strip {
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(216, 211, 200, 0.9);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
}

.front-page-shell,
.archive-shell,
.single-shell,
.page-shell,
.error-shell {
  display: grid;
  gap: 1.75rem;
}

.archive-shell,
.single-shell,
.page-shell {
  grid-template-columns: minmax(0, 1fr) 320px;
  align-items: start;
}

.content-column {
  min-width: 0;
}

.page-column {
  max-width: 100%;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  margin-bottom: 1rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.page-intro,
.author-intro-card,
.front-page-content,
.error-card,
.comments-area {
  padding: 1.8rem;
}

.author-intro-card {
  display: flex;
  gap: 1.2rem;
  align-items: center;
}

.section-eyebrow,
.footer-kicker,
.category-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--accent);
}

.category-badge {
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  background: rgba(34, 64, 56, 0.1);
}

.section-title,
.page-title,
.entry-title,
.post-card-title,
.widget-title,
.comments-title,
.author-copy h2 {
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.page-title,
.entry-title {
  font-size: clamp(2rem, 4vw, 3.8rem);
  margin: 0.35rem 0 0;
}

.section-title {
  font-size: clamp(1.5rem, 2.4vw, 2.4rem);
  margin: 0.4rem 0 0;
}

.section-heading-row {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
  margin-bottom: 1.2rem;
}

.section-link {
  color: var(--accent);
  font-weight: 700;
}

.hero-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
}

.hero-grid .post-card--hero {
  grid-row: span 4;
  overflow: hidden;
}

.hero-grid .post-card--stacked .post-card-media img,
.post-card--compact .post-card-media img,
.post-card:not(.post-card--hero) .post-card-media img {
  aspect-ratio: 16 / 10;
}

.post-card {
  overflow: hidden;
}

.post-card-media {
  display: block;
  background: linear-gradient(135deg, #ddd7cc, #f0ede4);
}

.post-card-media img,
.featured-media img {
  width: 100%;
  object-fit: cover;
}

.post-card--hero .post-card-media img,
.featured-media img {
  aspect-ratio: 16 / 9;
}

.media-placeholder {
  display: block;
  width: 100%;
  min-height: 220px;
  background: linear-gradient(135deg, #ddd7cc, #f0ede4);
}

.post-card-content {
  padding: 1.3rem 1.3rem 1.45rem;
}

.post-card-title {
  font-size: clamp(1.15rem, 2vw, 1.55rem);
  margin: 0.7rem 0;
}

.post-card--hero .post-card-title {
  font-size: clamp(1.8rem, 3vw, 2.7rem);
}

.post-card--stacked .post-card-content {
  padding: 1rem 1rem 1.1rem;
}

.post-card--stacked .post-card-title,
.post-card--compact .post-card-title {
  font-size: 1.05rem;
}

.post-card-meta,
.entry-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
  font-size: 0.92rem;
}

.latest-strip,
.category-block {
  padding: 1.5rem;
}

.latest-grid,
.post-grid,
.category-grid,
.related-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.archive-shell .post-grid,
.related-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.single-article {
  padding: 2rem;
}

.single-header {
  margin-bottom: 1.4rem;
}

.featured-media {
  margin: 1.5rem 0 0;
  border-radius: var(--radius-small);
  overflow: hidden;
}

.prose-block > * + * {
  margin-top: 1.15rem;
}

.prose-block h2,
.prose-block h3,
.prose-block h4 {
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-top: 2rem;
}

.prose-block ul,
.prose-block ol {
  padding-left: 1.3rem;
}

.prose-block blockquote {
  margin: 2rem 0;
  padding: 1.5rem;
  border-left: 4px solid var(--accent);
  background: rgba(236, 232, 223, 0.6);
  border-radius: 0 var(--radius-small) var(--radius-small) 0;
}

.prose-block table,
.wp-block-table table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 18px;
}

.prose-block table th,
.prose-block table td,
.wp-block-table table th,
.wp-block-table table td {
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

.author-box {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.25rem;
  padding: 1.5rem;
  margin-top: 1.5rem;
}

.author-avatar img {
  border-radius: 50%;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.tag-list a {
  padding: 0.55rem 0.8rem;
  background: var(--surface-soft);
  border-radius: 999px;
  font-size: 0.9rem;
}

.post-navigation,
.posts-navigation,
.pagination,
.navigation.pagination {
  margin-top: 1.8rem;
}

.nav-links {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.nav-previous,
.nav-next,
.page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 999px;
  padding: 0.8rem 1rem;
  min-width: 48px;
}

.page-numbers.current {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.sidebar-area {
  display: grid;
  gap: 1rem;
  position: sticky;
  top: 144px;
}

.widget {
  padding: 1.4rem;
}

.widget-title {
  margin: 0 0 1rem;
  font-size: 1.05rem;
}

.widget ul,
.widget ol {
  list-style: none;
  margin: 0;
  padding: 0;
}

.widget li + li {
  border-top: 1px solid rgba(216, 211, 200, 0.7);
  margin-top: 0.85rem;
  padding-top: 0.85rem;
}

.widget select,
.widget input:not([type="submit"]),
.widget textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--surface);
}

.site-footer {
  padding: 4rem 0 2rem;
  border-top: 1px solid rgba(216, 211, 200, 0.8);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 320px) minmax(0, 1fr);
  gap: 2rem;
  align-items: start;
}

.footer-widgets {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.footer-widget-column .widget {
  height: 100%;
}

.footer-meta {
  margin-top: 2rem;
  padding-top: 1.2rem;
  border-top: 1px solid rgba(216, 211, 200, 0.8);
}

.comments-area .comment-list {
  list-style: none;
  padding: 0;
}

.comments-area .comment {
  padding: 1rem 0;
  border-top: 1px solid rgba(216, 211, 200, 0.8);
}

.comments-area .children {
  list-style: none;
  margin: 1rem 0 0 1.25rem;
  padding-left: 1rem;
  border-left: 1px solid rgba(216, 211, 200, 0.8);
}

.comments-area .comment-meta,
.comments-area .comment-metadata {
  color: var(--muted);
  font-size: 0.92rem;
}

.comments-area input:not([type="submit"]),
.comments-area textarea {
  width: 100%;
  padding: 0.9rem 1rem;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--surface);
}

.comments-area .form-submit {
  margin: 1rem 0 0;
}

.empty-state,
.error-card {
  max-width: 720px;
}

.error-shell {
  justify-items: center;
  padding-top: 2rem;
}

.screen-reader-text {
  position: absolute;
  clip: rect(1px, 1px, 1px, 1px);
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.alignwide {
  margin-left: auto;
  margin-right: auto;
  max-width: var(--frame);
}

.alignfull {
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  max-width: 100vw;
  width: 100vw;
}

.wp-block-image,
.wp-block-gallery,
.wp-block-embed,
.wp-block-cover,
.wp-block-table,
.wp-block-group,
.wp-block-columns {
  margin-top: 1.4rem;
  margin-bottom: 1.4rem;
}

@media (max-width: 1100px) {
  .archive-shell,
  .single-shell,
  .page-shell,
  .footer-grid,
  .footer-widgets,
  .hero-grid,
  .latest-grid,
  .category-grid,
  .post-grid,
  .related-grid {
    grid-template-columns: 1fr;
  }

  .sidebar-area {
    position: static;
  }

  .hero-grid .post-card--hero {
    grid-row: auto;
  }
}

@media (max-width: 880px) {
  .topbar {
    display: none;
  }

  .brand-row {
    flex-direction: column;
    align-items: stretch;
  }

  .header-tools {
    width: 100%;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .primary-navigation {
    position: absolute;
    top: calc(100% + 0.75rem);
    left: 0;
    right: 0;
    display: none;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1rem;
  }

  .mobile-menu-open .primary-navigation {
    display: block;
  }

  .primary-menu {
    flex-direction: column;
    align-items: stretch;
  }

  .primary-menu .menu-item-has-children:hover > .sub-menu,
  .primary-menu .menu-item-has-children:focus-within > .sub-menu {
    display: none;
  }

  .primary-menu .sub-menu {
    position: static;
    display: block;
    box-shadow: none;
    border: 0;
    border-radius: 0;
    padding: 0.5rem 0 0.3rem 1rem;
    background: transparent;
  }
}

@media (max-width: 640px) {
  :root {
    --frame: min(100vw - 1rem, 100vw - 1rem);
    --radius: 20px;
    --radius-small: 14px;
  }

  .site-content {
    padding-top: 1rem;
  }

  .brand-row,
  .page-intro,
  .author-intro-card,
  .front-page-content,
  .error-card,
  .comments-area,
  .single-article,
  .widget,
  .latest-strip,
  .category-block {
    padding: 1.2rem;
  }

  .author-box {
    grid-template-columns: 1fr;
  }

  .author-intro-card {
    flex-direction: column;
    align-items: start;
  }

  .search-form {
    flex-direction: column;
    align-items: stretch;
    border-radius: 20px;
  }

  .search-submit {
    width: 100%;
  }

  .section-heading-row,
  .footer-meta {
    align-items: start;
    flex-direction: column;
  }
}
