/*
Theme Name: NewsPoint
Theme URI: https://example.com/newspoint
Author: Vipin
Description: A fast, mobile-first WordPress newspaper/news theme with built-in ad slots (AdSense/Adsterra ready), breaking-news ticker, category grid homepage, and clean article typography. Built for content sites monetized via display ads.
Version: 1.0
Requires at least: 6.0
Requires PHP: 7.4
Tested up to: 6.6
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: newspoint
Tags: news, blog, grid-layout, custom-menu, featured-images, threaded-comments, translation-ready, footer-widgets
*/

/* ==========================================================================
   0. RESET / BASE
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: Georgia, 'Times New Roman', serif;
  color: #1a1a1a;
  background: #f4f4f2;
  line-height: 1.6;
  font-size: 17px;
}
img { max-width: 100%; height: auto; display: block; }
a { color: #b91c1c; text-decoration: none; }
a:hover { text-decoration: underline; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 { font-family: 'Helvetica Neue', Arial, sans-serif; font-weight: 800; line-height: 1.25; margin: 0 0 .5em; color: #0d0d0d; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.screen-reader-text { position: absolute; left: -9999px; }

/* ==========================================================================
   1. TOP BAR / DATE
   ========================================================================== */
.np-topbar {
  background: #0d0d0d;
  color: #ccc;
  font-family: Arial, sans-serif;
  font-size: 12px;
}
.np-topbar .container { display: flex; justify-content: space-between; align-items: center; height: 32px; }
.np-topbar a { color: #ccc; }

/* ==========================================================================
   2. HEADER
   ========================================================================== */
.np-header {
  background: #fff;
  border-bottom: 4px solid #b91c1c;
  padding: 20px 0;
}
.np-header .container { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.np-logo { font-family: 'Playfair Display', Georgia, serif; font-size: 34px; font-weight: 900; letter-spacing: -1px; color: #0d0d0d; }
.np-logo a { color: inherit; }
.np-logo span { color: #b91c1c; }
.np-tagline { font-family: Arial, sans-serif; font-size: 12px; color: #777; letter-spacing: 1px; text-transform: uppercase; }

.np-search-form { display: flex; }
.np-search-form input[type="search"] {
  border: 1px solid #ccc; padding: 8px 10px; font-family: Arial, sans-serif; font-size: 13px; width: 180px;
}
.np-search-form button {
  background: #0d0d0d; color: #fff; border: none; padding: 8px 14px; cursor: pointer; font-family: Arial, sans-serif;
}

/* ==========================================================================
   3. NAVIGATION
   ========================================================================== */
.np-nav-wrap { background: #0d0d0d; }
.np-nav {
  display: flex; align-items: center; flex-wrap: wrap;
  font-family: Arial, sans-serif; text-transform: uppercase; font-size: 13px; letter-spacing: .5px;
}
.np-nav li { position: relative; }
.np-nav a { display: block; padding: 13px 15px; color: #fff; font-weight: 700; }
.np-nav a:hover { background: #b91c1c; text-decoration: none; }
.np-nav ul ul { display: none; position: absolute; top: 100%; left: 0; background: #1a1a1a; min-width: 200px; z-index: 50; }
.np-nav ul li:hover > ul { display: block; }
.np-nav ul ul a { padding: 10px 15px; text-transform: none; font-weight: 400; }

.np-menu-toggle {
  display: none; background: none; border: none; color: #fff; font-size: 24px; padding: 10px 15px; cursor: pointer;
}

/* ==========================================================================
   4. BREAKING NEWS TICKER
   ========================================================================== */
.np-ticker {
  background: #b91c1c; color: #fff; font-family: Arial, sans-serif; font-size: 14px;
  display: flex; align-items: center; overflow: hidden; white-space: nowrap;
}
.np-ticker-label {
  background: #0d0d0d; padding: 8px 14px; font-weight: 700; flex-shrink: 0; text-transform: uppercase; font-size: 12px;
}
.np-ticker-track { padding: 8px 0; display: inline-block; animation: np-scroll 30s linear infinite; }
.np-ticker-track a { color: #fff; margin-right: 40px; }
@keyframes np-scroll { 0% { transform: translateX(0); } 100% { transform: translateX(-100%); } }

/* ==========================================================================
   5. AD SLOTS
   ========================================================================== */
.np-ad { text-align: center; margin: 20px 0; overflow: hidden; }
.np-ad-label { font-family: Arial, sans-serif; font-size: 10px; text-transform: uppercase; letter-spacing: 1px; color: #999; margin-bottom: 6px; }
.np-ad-header { background: #fff; padding: 10px 0; border-bottom: 1px solid #eee; }
.np-ad-incontent { float: none; clear: both; margin: 28px 0; padding: 12px 0; border-top: 1px dashed #ddd; border-bottom: 1px dashed #ddd; }
.np-ad-sidebar { margin-bottom: 30px; }
.np-ad-footer { background: #fff; padding: 20px 0; }
.np-ad ins.adsbygoogle { display: block; }

/* ==========================================================================
   6. HOMEPAGE / GRID LAYOUT
   ========================================================================== */
.np-layout { display: grid; grid-template-columns: 2fr 1fr; gap: 30px; padding: 30px 0; }

.np-lead-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; margin-bottom: 30px; }
.np-lead-story { position: relative; }
.np-lead-story img { width: 100%; height: 380px; object-fit: cover; }
.np-lead-story .np-cat-badge { position: absolute; top: 12px; left: 12px; }
.np-lead-story h2 { font-size: 28px; margin-top: 12px; }
.np-lead-story h2 a { color: #0d0d0d; }
.np-lead-story .np-excerpt { color: #555; font-size: 15px; }

.np-side-stories { display: flex; flex-direction: column; gap: 16px; }
.np-side-story { display: flex; gap: 12px; border-bottom: 1px solid #e5e5e5; padding-bottom: 16px; }
.np-side-story img { width: 100px; height: 75px; object-fit: cover; flex-shrink: 0; }
.np-side-story h3 { font-size: 15px; margin: 0; }
.np-side-story h3 a { color: #0d0d0d; }

.np-cat-badge {
  display: inline-block; background: #b91c1c; color: #fff; font-family: Arial, sans-serif;
  font-size: 10px; font-weight: 700; text-transform: uppercase; padding: 3px 8px; letter-spacing: .5px;
}

.np-section-title {
  font-size: 20px; text-transform: uppercase; letter-spacing: .5px; border-bottom: 3px solid #0d0d0d;
  padding-bottom: 8px; margin-bottom: 18px;
}

.np-article-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-bottom: 36px; }
.np-card img { width: 100%; height: 160px; object-fit: cover; margin-bottom: 10px; }
.np-card h3 { font-size: 16px; margin-bottom: 6px; }
.np-card h3 a { color: #0d0d0d; }
.np-card .np-meta { font-family: Arial, sans-serif; font-size: 11px; color: #888; text-transform: uppercase; }

/* Post list (archives/search) */
.np-post-list-item { display: flex; gap: 18px; padding: 20px 0; border-bottom: 1px solid #e5e5e5; }
.np-post-list-item img { width: 220px; height: 140px; object-fit: cover; flex-shrink: 0; }
.np-post-list-item h2 { font-size: 21px; margin-bottom: 6px; }
.np-post-list-item h2 a { color: #0d0d0d; }

/* ==========================================================================
   7. SIDEBAR
   ========================================================================== */
.np-widget { background: #fff; padding: 20px; margin-bottom: 26px; border: 1px solid #e5e5e5; }
.np-widget h3 { font-size: 15px; text-transform: uppercase; border-bottom: 2px solid #b91c1c; padding-bottom: 8px; margin-bottom: 14px; }
.np-widget ul li { padding: 8px 0; border-bottom: 1px solid #f0f0f0; font-size: 14px; }
.np-widget ul li:last-child { border-bottom: none; }

.np-trending-item { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid #f0f0f0; }
.np-trending-num { font-family: 'Helvetica Neue', Arial, sans-serif; font-size: 26px; font-weight: 900; color: #d9d9d9; flex-shrink: 0; width: 30px; }
.np-trending-item h4 { font-size: 14px; margin: 0; }
.np-trending-item h4 a { color: #0d0d0d; }

/* ==========================================================================
   8. SINGLE POST / ARTICLE
   ========================================================================== */
.np-article { background: #fff; padding: 30px; border: 1px solid #e5e5e5; }
.np-article-header { margin-bottom: 20px; }
.np-article-header h1 { font-size: 32px; }
.np-article-meta { font-family: Arial, sans-serif; font-size: 12px; color: #888; text-transform: uppercase; letter-spacing: .5px; }
.np-article-meta a { color: #b91c1c; }
.np-featured-img { margin: 20px -30px; }
.np-featured-img img { width: 100%; }
.np-article-content { font-size: 18px; line-height: 1.8; }
.np-article-content p { margin: 0 0 1.2em; }
.np-article-content h2 { font-size: 24px; margin-top: 1.4em; }
.np-article-content img { margin: 20px 0; }
.np-article-content blockquote { border-left: 4px solid #b91c1c; margin: 20px 0; padding: 4px 20px; font-style: italic; color: #444; }
.np-share-bar { display: flex; gap: 10px; margin: 24px 0; font-family: Arial, sans-serif; }
.np-share-bar a { background: #0d0d0d; color: #fff; padding: 8px 14px; font-size: 12px; text-transform: uppercase; }
.np-tags { margin: 20px 0; font-family: Arial, sans-serif; font-size: 12px; }
.np-tags a { background: #f0f0f0; padding: 5px 10px; margin-right: 6px; display: inline-block; margin-bottom: 6px; }

/* ==========================================================================
   9. COMMENTS
   ========================================================================== */
.comment-list { list-style: none; margin: 30px 0 0; padding: 0; }
.comment-body { border-bottom: 1px solid #eee; padding: 16px 0; }
.comment-author { font-weight: 700; font-family: Arial, sans-serif; font-size: 14px; }
.comment-metadata { font-size: 11px; color: #999; font-family: Arial, sans-serif; }
.comment-form input, .comment-form textarea { width: 100%; padding: 10px; border: 1px solid #ccc; font-family: Arial, sans-serif; margin-bottom: 10px; }
.comment-form label { font-family: Arial, sans-serif; font-size: 13px; }

/* ==========================================================================
   10. FOOTER
   ========================================================================== */
.np-footer { background: #0d0d0d; color: #ccc; margin-top: 40px; padding: 40px 0 0; font-family: Arial, sans-serif; }
.np-footer-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; padding-bottom: 30px; }
.np-footer-grid h3 { color: #fff; font-size: 14px; text-transform: uppercase; margin-bottom: 14px; }
.np-footer-grid a { color: #999; line-height: 2; display: block; font-size: 13px; }
.np-footer-grid a:hover { color: #fff; }
.np-footer-bottom { border-top: 1px solid #222; padding: 18px 0; text-align: center; font-size: 12px; color: #777; }

/* ==========================================================================
   11. PAGINATION / 404
   ========================================================================== */
.np-pagination { display: flex; gap: 8px; justify-content: center; margin: 30px 0; font-family: Arial, sans-serif; }
.np-pagination a, .np-pagination span { padding: 8px 14px; background: #fff; border: 1px solid #ddd; font-size: 13px; }
.np-pagination .current { background: #0d0d0d; color: #fff; border-color: #0d0d0d; }
.np-404 { text-align: center; padding: 80px 20px; }
.np-404 h1 { font-size: 90px; color: #e5e5e5; margin: 0; }

/* ==========================================================================
   12. RESPONSIVE / MOBILE-FIRST OVERRIDES
   ========================================================================== */
@media (max-width: 960px) {
  .np-layout { grid-template-columns: 1fr; }
  .np-article-grid { grid-template-columns: repeat(2, 1fr); }
  .np-footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 782px) {
  .np-menu-toggle { display: block; }
  .np-nav { display: none; flex-direction: column; width: 100%; }
  .np-nav.is-open { display: flex; }
  .np-nav ul ul { position: static; background: #262626; }
  .np-nav > ul { flex-direction: column; width: 100%; }
  .np-nav li { width: 100%; }

  .np-header .container { flex-direction: column; align-items: flex-start; }
  .np-search-form { width: 100%; }
  .np-search-form input[type="search"] { flex: 1; width: auto; }

  .np-lead-grid { grid-template-columns: 1fr; }
  .np-lead-story img { height: 220px; }
  .np-lead-story h2 { font-size: 22px; }

  .np-article-grid { grid-template-columns: 1fr; }
  .np-post-list-item { flex-direction: column; }
  .np-post-list-item img { width: 100%; height: 200px; }

  .np-article { padding: 18px; }
  .np-featured-img { margin: 16px -18px; }
  .np-article-header h1 { font-size: 24px; }
  .np-article-content { font-size: 16.5px; }

  body { font-size: 16px; }
}

@media (max-width: 480px) {
  .np-logo { font-size: 26px; }
  .np-ticker-label { font-size: 10px; padding: 6px 10px; }
  .np-footer-grid { grid-template-columns: 1fr; }
}
