/*
Theme Name: Modern Newspaper Lite
Theme URI: https://example.com/modern-newspaper-lite
Author: ChatGPT
Author URI: https://openai.com
Description: |
  Modern Newspaper Lite is a clean, responsive WordPress theme inspired by the popular Newspaper
  layout. It features a flexible, modern design with selectable full‑width or boxed layouts, a
  configurable maximum width (default 1660px) and simple header/footer areas that are easy to
  customise via the WordPress Customiser. The theme is optimised for readability and provides
  a posts grid on the home page, making it ideal for blogs, news and magazine sites. It
  supports custom logos, featured images, widgets and translation.
Version: 1.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: modern-newspaper-lite
Tags: blog, news, magazine, full-width, boxed, custom-background, custom-header, custom-logo,
  custom-menu, responsive-layout, two-columns, one-column
*/

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600;700&family=Roboto+Slab:wght@700&display=swap');

/* CSS Reset & Global Styles */
*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Open Sans', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #333;
  background-color: #f5f5f5;
}

a {
  color: #0073aa;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

/* Root CSS variables. The `--max-width` value is overwritten via
   inline styles generated by functions.php based on the Customiser setting. */
:root {
  --primary-color: #005cbf;
  --secondary-color: #e0e0e0;
  --max-width: 1660px;
}

/* Layout container */
.site-container {
  width: 100%;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: #ffffff;
}

/* Full‑width vs boxed layouts */
body.site-boxed {
  background-color: #e9e9e9;
}
body.site-boxed .site-container {
  max-width: var(--max-width);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
}
body.site-fullwidth .site-container {
  max-width: 100%;
}

/* Header */
.site-header {
  background-color: #ffffff;
  border-bottom: 1px solid #e5e5e5;
  padding: 20px 0;
}
.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
}
.site-branding {
  display: flex;
  flex-direction: column;
}
.site-title {
  font-family: 'Roboto Slab', serif;
  font-size: 2rem;
  margin: 0;
  font-weight: 700;
  color: #222;
}
.site-description {
  margin: 0;
  font-size: 0.9rem;
  color: #666;
}

/* Navigation */
.main-navigation {
  margin-top: 10px;
}
.main-navigation ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
}
.main-navigation li {
  position: relative;
}
.main-navigation a {
  color: #333;
  font-weight: 600;
  padding: 8px 0;
  display: block;
}
.main-navigation a:hover,
.main-navigation a:focus {
  color: var(--primary-color);
}

/* Header widget columns */
.header-widgets {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 20px;
}
.header-widgets .header-widget-col {
  padding: 0;
}
.header-widgets .widget {
  margin: 0;
}

/* Sidebar */
.sidebar {
  padding: 20px;
  background-color: #fafafa;
  border-left: 1px solid #eee;
}
.widget {
  margin-bottom: 30px;
}
.widget-title {
  font-size: 1.2rem;
  margin-bottom: 10px;
  font-weight: 600;
  border-bottom: 2px solid var(--secondary-color);
  display: inline-block;
  padding-bottom: 5px;
}

/* Main content area */
.content-area {
  flex: 1 1 auto;
  padding: 20px;
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-direction: row;
  gap: 30px;
  width: 100%;
}
.content-area > .posts-grid {
  flex: 1 1 auto;
}

/* Posts grid */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}
.post-item {
  border-bottom: 1px solid #eee;
  padding-bottom: 20px;
}
.post-item:last-child {
  border-bottom: none;
}
.post-item .post-thumbnail img {
  width: 100%;
  height: auto;
  display: block;
}
.post-item .post-title {
  font-family: 'Roboto Slab', serif;
  font-size: 1.4rem;
  margin: 10px 0;
  color: #222;
}
.post-item .post-title a {
  color: inherit;
}
.post-item .post-meta {
  font-size: 0.8rem;
  color: #777;
  margin-bottom: 10px;
  display: flex;
  gap: 10px;
}
.post-item .post-excerpt {
  font-size: 0.9rem;
  color: #555;
  margin-bottom: 10px;
}
.post-item .read-more {
  font-weight: 600;
  color: var(--primary-color);
  text-decoration: none;
}
.post-item .read-more:hover {
  text-decoration: underline;
}

/* Single post */
.single-post .single-title {
  font-family: 'Roboto Slab', serif;
  font-size: 2rem;
  margin: 20px 0;
}
.single-post .single-meta {
  font-size: 0.9rem;
  color: #777;
  margin-bottom: 20px;
  display: flex;
  gap: 10px;
}
.single-post .post-content {
  font-size: 1rem;
  color: #333;
}
.single-post .post-content p {
  margin-bottom: 1.2em;
}

/* Page content */
.page-content .page-title {
  font-family: 'Roboto Slab', serif;
  font-size: 2rem;
  margin: 20px 0;
}
.page-content .page-content {
  font-size: 1rem;
  color: #333;
}

/* Footer */
.site-footer {
  background-color: #222;
  color: #fff;
  padding: 40px 20px;
  margin-top: auto;
}
/* Footer widget columns */
.footer-widgets {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto 20px;
  padding: 0 20px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}
.footer-widgets .footer-widget-col {
  padding: 0;
}
.site-footer .widget-title {
  color: #fff;
  border-color: rgba(255,255,255,0.2);
}
.site-info {
  font-size: 0.8rem;
  text-align: center;
  margin-top: 20px;
}
.site-footer a {
  color: #ccc;
}
.site-footer a:hover {
  color: #fff;
}

/* Pagination */
.pagination {
  margin-top: 30px;
  text-align: center;
}
.pagination .page-numbers {
  display: inline-block;
  margin: 0 5px;
  padding: 8px 12px;
  background-color: #f0f0f0;
  color: #333;
  border-radius: 4px;
}
.pagination .page-numbers.current {
  background-color: var(--primary-color);
  color: #fff;
}
.pagination .page-numbers:hover {
  background-color: var(--primary-color);
  color: #fff;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .content-area {
    flex-direction: column;
    gap: 0;
  }
  .sidebar {
    border-left: none;
    border-top: 1px solid #eee;
  }
}