/*
Theme Name: Canews24 Simple
Theme URI: https://canews24.online
Author: Checane Eddy
Author URI: https://canews24.online
Description: A lightweight, editorial-style blog theme built for Canews24.online. Clean single-column reading experience with a light sidebar, inspired by minimal frameworks like Astra but with its own visual identity.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: canews24
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
*/

/* ==========================================================================
   Design tokens
   ========================================================================== */

:root {
  --c-bg: #f5f3ee;
  --c-surface: #ffffff;
  --c-text: #1b1b1b;
  --c-muted: #6e6a62;
  --c-border: #e2ded4;
  --c-accent: #1f4b4f;
  --c-accent-warm: #b8763e;
  --c-accent-soft: #e7edec;

  --font-display: "Newsreader", Georgia, "Times New Roman", serif;
  --font-body: "Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --content-width: 700px;
  --page-width: 1080px;
  --radius: 3px;
}

/* ==========================================================================
   Reset & base
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--c-bg);
  color: var(--c-text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--c-accent);
  text-decoration: none;
}

a:hover {
  color: var(--c-accent-warm);
  text-decoration: underline;
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--c-accent-warm);
  outline-offset: 2px;
}

ul,
ol {
  padding-left: 1.3em;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.25;
  margin: 0 0 0.5em;
  color: var(--c-text);
}

p {
  margin: 0 0 1.3em;
}

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

/* ==========================================================================
   Layout shell
   ========================================================================== */

.site {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.wrap {
  max-width: var(--page-width);
  margin: 0 auto;
  padding: 0 28px;
}

@media (max-width: 480px) {
  .wrap {
    padding: 0 20px;
  }
}

@media (min-width: 481px) and (max-width: 860px) {
  .wrap {
    padding: 0 36px;
  }
}

@media (min-width: 861px) {
  .wrap {
    padding: 0 64px;
  }
}

.content-wrap {
  max-width: var(--content-width);
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 56px;
  align-items: start;
  padding: 40px 0 64px;
}

.layout--narrow {
  grid-template-columns: minmax(0, 1fr);
}

@media (max-width: 860px) {
  .layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }
}

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
  border-bottom: 1px solid var(--c-border);
  background: var(--c-surface);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 24px;
  padding-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
}

@media (min-width: 861px) {
  .site-header__inner {
    padding-top: 28px;
    padding-bottom: 28px;
  }
}

.site-branding {
  display: flex;
  flex-direction: column;
}

.site-title {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.01em;
}

.site-title a {
  color: var(--c-text);
  text-decoration: none;
}

.site-description {
  font-size: 13px;
  color: var(--c-muted);
  margin-top: 2px;
}

.menu-toggle {
  display: none;
  background: none;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 8px 12px;
  font-family: var(--font-body);
  font-size: 14px;
  cursor: pointer;
  color: var(--c-text);
}

.primary-navigation {
  margin-left: 24px;
}

.primary-navigation ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 26px;
  margin: 0;
  padding: 0;
  justify-content: flex-end;
}

.primary-navigation a {
  color: var(--c-text);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
}

.primary-navigation a:hover,
.primary-navigation .current-menu-item > a {
  border-bottom-color: var(--c-accent-warm);
  color: var(--c-text);
}

@media (max-width: 860px) {
  .menu-toggle {
    display: inline-block;
  }

  .primary-navigation {
    display: none;
    width: 100%;
    order: 3;
    margin-left: 0;
  }

  .primary-navigation.is-open {
    display: block;
  }

  .primary-navigation ul {
    flex-direction: column;
    justify-content: flex-start;
    gap: 4px;
    padding: 12px 0 4px;
    border-top: 1px solid var(--c-border);
  }

  .primary-navigation a {
    display: block;
    padding: 10px 4px;
  }
}

/* ==========================================================================
   Post cards / archive loop
   ========================================================================== */

.post-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 28px;
}

.post-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 26px rgba(27, 27, 27, 0.08);
  display: flex;
  flex-direction: column;
}

.post-card__body {
  padding: 18px 20px 22px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.post-card__eyebrow {
  font-size: 13px;
  color: var(--c-accent);
  font-weight: 700;
  margin-bottom: 8px;
  display: inline-block;
}

.post-card__title {
  font-size: 19px;
  margin-bottom: 8px;
  line-height: 1.3;
}

.post-card__title a {
  color: var(--c-text);
}

.post-card__title a:hover {
  color: var(--c-accent);
  text-decoration: none;
}

.post-card__meta {
  font-size: 13px;
  color: var(--c-muted);
  margin-bottom: 12px;
}

.post-card__meta a {
  color: var(--c-accent);
  font-weight: 600;
}

.post-card__meta a:hover {
  color: var(--c-accent-warm);
}

.post-card__excerpt {
  color: #4a4a4a;
  font-size: 14px;
}

.post-card__thumb {
  margin: 0;
  display: block;
  box-shadow: none;
}

.post-card__thumb img {
  border-radius: 0;
}

/* Featured / first post treatment on the homepage */

.post-feature {
  padding-bottom: 40px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--c-border);
}

.post-feature__title {
  font-size: 34px;
}

.post-feature__excerpt {
  font-size: 18px;
  color: #333;
}

/* ==========================================================================
   Single post
   ========================================================================== */

.single-post-header {
  margin-bottom: 28px;
}

.single-post-header__eyebrow {
  font-size: 13px;
  font-weight: 600;
  color: var(--c-accent);
}

.single-post-header__title {
  font-size: 38px;
  margin: 10px 0 14px;
}

.single-post-header__meta {
  font-size: 14px;
  color: var(--c-muted);
}

.single-post-thumb {
  margin: 24px 0;
  border-radius: 12px;
  box-shadow: 0 10px 26px rgba(27, 27, 27, 0.14);
}

.single-post-thumb img {
  border-radius: 12px;
  display: block;
}

.entry-content {
  font-size: 18px;
  line-height: 1.75;
}

.entry-content h2 {
  font-size: 26px;
  margin-top: 1.6em;
}

.entry-content h3 {
  font-size: 21px;
  margin-top: 1.4em;
}

.entry-content blockquote {
  margin: 1.6em 0;
  padding: 4px 0 4px 20px;
  border-left: 3px solid var(--c-accent-warm);
  color: #3a3a3a;
  font-style: italic;
}

.entry-content figure {
  margin: 1.8em 0;
}

.entry-content figcaption {
  font-size: 13px;
  color: var(--c-muted);
  margin-top: 6px;
}

.post-tags {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--c-border);
  font-size: 13px;
}

.post-tags a {
  display: inline-block;
  margin: 0 8px 8px 0;
  padding: 4px 10px;
  background: var(--c-accent-soft);
  border-radius: 20px;
  color: var(--c-accent);
  text-decoration: none;
}

.post-tags a:hover {
  background: var(--c-accent);
  color: #fff;
}

.author-box {
  margin-top: 36px;
  padding: 22px;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.author-box img {
  border-radius: 50%;
  width: 56px;
  height: 56px;
}

.author-box__name {
  font-weight: 600;
  margin-bottom: 4px;
}

.author-box__bio {
  font-size: 14px;
  color: var(--c-muted);
  margin: 0;
}

.post-nav {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--c-border);
  font-size: 14px;
}

.post-nav__label {
  display: block;
  font-size: 12px;
  color: var(--c-muted);
  margin-bottom: 4px;
}

/* ==========================================================================
   Sidebar
   ========================================================================== */

.sidebar .widget {
  margin-bottom: 40px;
}

.sidebar .widget-title {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--c-muted);
  margin-bottom: 16px;
}

.sidebar ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sidebar li {
  margin-bottom: 10px;
  font-size: 15px;
}

.sidebar a {
  color: var(--c-text);
}

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

/* ==========================================================================
   Pagination
   ========================================================================== */

.pagination {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  font-size: 14px;
}

.pagination a,
.pagination span {
  padding: 8px 14px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  color: var(--c-text);
}

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

.pagination a:hover {
  border-color: var(--c-accent);
  text-decoration: none;
}

/* ==========================================================================
   Forms / comments (minimal)
   ========================================================================== */

.comment-respond input[type="text"],
.comment-respond input[type="email"],
.comment-respond input[type="url"],
.comment-respond textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 15px;
  margin-bottom: 14px;
  background: var(--c-surface);
  color: var(--c-text);
}

.comment-respond textarea {
  min-height: 120px;
}

.comment-respond .form-submit input {
  width: auto;
  background: var(--c-accent);
  color: #fff;
  border: none;
  padding: 10px 22px;
  cursor: pointer;
  font-weight: 600;
}

.comment-respond .form-submit input:hover {
  background: var(--c-accent-warm);
}

.search-form {
  display: flex;
  gap: 8px;
}

.search-form input[type="search"] {
  flex: 1;
  padding: 9px 12px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  font-family: var(--font-body);
}

.search-form button {
  background: var(--c-accent);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  padding: 9px 16px;
  cursor: pointer;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  margin-top: auto;
  background: var(--c-text);
  color: #d8d6d0;
  padding: 48px 0 28px;
}

.site-footer a {
  color: #f0eee8;
}

.footer-columns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-bottom: 32px;
}

@media (max-width: 720px) {
  .footer-columns {
    grid-template-columns: 1fr;
  }
}

.footer-columns .widget-title {
  color: #fff;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 14px;
}

.footer-columns ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-columns li {
  margin-bottom: 8px;
  font-size: 14px;
}

.site-footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 20px;
  font-size: 13px;
  color: #a7a49c;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.social-links {
  display: flex;
  gap: 14px;
  list-style: none;
  padding: 0;
  margin: 0;
}
