/*
Theme Name: Newzaa
Theme URI: https://newzaa.com/
Author: Newzaa Team
Author URI: https://newzaa.com/
Description: A modern news theme inspired by the Newzaa React frontend. Clean, fast, and fully responsive.
Version: 1.0.0
Requires at least: 5.9
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: newzaa
Tags: news, blog, custom-menu, featured-images, translation-ready
*/

/* === Reset & Base === */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --primary: #dc2626;
  --primary-hover: #b91c1c;
  --nav-bg: #1a1d23;
  --nav-fg: #f5f5f5;
  --bg: #f7f7f7;
  --fg: #1a1d2e;
  --card-bg: #ffffff;
  --border: #e5e7eb;
  --muted: #6b7280;
  --radius: 0.5rem;
}

body {
  font-family: 'Source Sans 3', system-ui, -apple-system, sans-serif;
  background-color: var(--bg);
  color: var(--fg);
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Playfair Display', Georgia, serif;
  line-height: 1.2;
}

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

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

/* === Container === */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* === Header === */
.site-header {
  background-color: var(--nav-bg);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  max-width: 1200px;
  margin: 0 auto;
}

.site-logo {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.75rem;
  font-weight: 800;
  color: #fff;
}

.site-logo span {
  color: var(--primary);
}

/* === Navigation === */
.main-nav ul {
  display: flex;
  list-style: none;
  gap: 0.25rem;
}

.main-nav a {
  display: block;
  padding: 0.5rem 1rem;
  color: var(--nav-fg);
  font-weight: 500;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: var(--radius);
  transition: background 0.2s, color 0.2s;
}

.main-nav a:hover,
.main-nav .current-menu-item a {
  background-color: var(--primary);
  color: #fff;
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
}

@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--nav-bg);
    padding: 1rem;
  }
  .main-nav.is-active {
    display: block;
  }
  .main-nav ul {
    flex-direction: column;
  }
}

/* === Hero Section === */
.hero-section {
  margin: 2rem auto;
  max-width: 1200px;
  padding: 0 1rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.5rem;
}

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

.hero-main {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 400px;
}

.hero-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 2rem;
}

.hero-overlay .category-badge {
  background: var(--primary);
  color: #fff;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  width: fit-content;
  margin-bottom: 0.75rem;
}

.hero-overlay h2 {
  color: #fff;
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
}

.hero-overlay .meta {
  color: rgba(255,255,255,0.7);
  font-size: 0.875rem;
}

.hero-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.hero-side-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 190px;
}

.hero-side-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
}

.hero-side-card .hero-overlay h2 {
  font-size: 1.1rem;
}

.hero-side-card .hero-overlay {
  padding: 1.25rem;
}

/* === Article Cards === */
.article-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: transform 0.2s, box-shadow 0.2s;
}

.article-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.article-card .card-image {
  aspect-ratio: 16/9;
  overflow: hidden;
}

.article-card .card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.article-card:hover .card-image img {
  transform: scale(1.05);
}

.article-card .card-content {
  padding: 1.25rem;
}

.article-card .category-badge {
  background: #fef2f2;
  color: var(--primary);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  display: inline-block;
  margin-bottom: 0.5rem;
}

.article-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.article-card h3 a:hover {
  color: var(--primary);
}

.article-card .excerpt {
  color: var(--muted);
  font-size: 0.875rem;
  margin-bottom: 0.75rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-card .meta {
  color: var(--muted);
  font-size: 0.8rem;
}

/* === Category Sections === */
.category-section {
  margin: 3rem auto;
  max-width: 1200px;
  padding: 0 1rem;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  border-bottom: 2px solid var(--primary);
  padding-bottom: 0.75rem;
}

.section-header h2 {
  font-size: 1.5rem;
}

.section-header a {
  color: var(--primary);
  font-weight: 600;
  font-size: 0.875rem;
}

.articles-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

@media (max-width: 1024px) {
  .articles-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

/* === Single Post === */
.single-post-header {
  max-width: 800px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.single-post-header .category-badge {
  background: #fef2f2;
  color: var(--primary);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  display: inline-block;
  margin-bottom: 1rem;
}

.single-post-header h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.single-post-header .meta {
  color: var(--muted);
  font-size: 0.875rem;
}

.single-post-image {
  max-width: 800px;
  margin: 1.5rem auto;
  padding: 0 1rem;
}

.single-post-image img {
  border-radius: var(--radius);
  width: 100%;
}

.single-post-content {
  max-width: 800px;
  margin: 0 auto 3rem;
  padding: 0 1rem;
  font-size: 1.1rem;
  line-height: 1.8;
}

.single-post-content p {
  margin-bottom: 1.5rem;
}

.single-post-content h2 {
  font-size: 1.75rem;
  margin: 2rem 0 1rem;
}

.single-post-content h3 {
  font-size: 1.4rem;
  margin: 1.5rem 0 0.75rem;
}

.single-post-content blockquote {
  border-left: 4px solid var(--primary);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  background: #fef2f2;
  font-style: italic;
}

.single-post-content ul,
.single-post-content ol {
  margin: 1rem 0 1.5rem 2rem;
}

/* === Archive Page === */
.archive-header {
  background: var(--nav-bg);
  color: #fff;
  padding: 3rem 1rem;
  text-align: center;
  margin-bottom: 2rem;
}

.archive-header h1 {
  font-size: 2.5rem;
}

.archive-header p {
  color: rgba(255,255,255,0.7);
  margin-top: 0.5rem;
}

/* === Footer === */
.site-footer {
  background: var(--nav-bg);
  color: var(--nav-fg);
  padding: 3rem 0 1.5rem;
  margin-top: 3rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

.footer-col h3 {
  font-size: 1rem;
  margin-bottom: 1rem;
  font-family: 'Source Sans 3', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: 0.5rem;
}

.footer-col a {
  color: rgba(255,255,255,0.7);
  font-size: 0.875rem;
  transition: color 0.2s;
}

.footer-col a:hover {
  color: var(--primary);
}

.social-links {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  transition: background 0.2s;
}

.social-links a:hover {
  background: var(--primary);
}

.social-links svg {
  width: 18px;
  height: 18px;
  fill: #fff;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  margin-top: 2rem;
  padding-top: 1.5rem;
  text-align: center;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

.footer-bottom p {
  color: rgba(255,255,255,0.5);
  font-size: 0.8rem;
}

/* === Search === */
.search-form {
  display: flex;
  max-width: 600px;
  margin: 2rem auto;
}

.search-form input {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius) 0 0 var(--radius);
  font-size: 1rem;
  outline: none;
}

.search-form button {
  padding: 0.75rem 1.5rem;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 0 var(--radius) var(--radius) 0;
  cursor: pointer;
  font-weight: 600;
}

/* === 404 === */
.error-404 {
  text-align: center;
  padding: 5rem 1rem;
}

.error-404 h1 {
  font-size: 6rem;
  color: var(--primary);
}

.error-404 p {
  font-size: 1.25rem;
  color: var(--muted);
  margin: 1rem 0 2rem;
}

.btn-primary {
  display: inline-block;
  padding: 0.75rem 2rem;
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius);
  font-weight: 600;
  transition: background 0.2s;
}

.btn-primary:hover {
  background: var(--primary-hover);
}

/* === Pagination === */
.pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin: 2rem 0;
}

.pagination a,
.pagination span {
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.875rem;
}

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

/* === Page Template === */
.page-content {
  max-width: 800px;
  margin: 2rem auto;
  padding: 0 1rem;
  line-height: 1.8;
}

.page-content h1 {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
}

.page-content p {
  margin-bottom: 1.5rem;
}

/* === Comments === */
.comments-area {
  max-width: 800px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.comments-area h2 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
}

.comment-list {
  list-style: none;
}

.comment-body {
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 1rem;
  background: var(--card-bg);
}

.comment-meta {
  margin-bottom: 0.75rem;
  font-size: 0.875rem;
  color: var(--muted);
}

.comment-respond {
  margin-top: 2rem;
}

.comment-form label {
  display: block;
  margin-bottom: 0.25rem;
  font-weight: 600;
}

.comment-form input,
.comment-form textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 1rem;
  font-size: 1rem;
}

.comment-form .submit {
  padding: 0.75rem 2rem;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 600;
}
