/*
Theme Name: Newspress Pro
Author: Nilesh Khodke
Version: 1.0
*/

/* ==========================
   RESET / BASE
========================== */

/* Bug Fix #1: Global box-sizing reset — prevents horizontal overflow on mobile */
*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #fff;
  color: #111;
  font-size: 16px;
  line-height: 1.7;
}

a {
  color: inherit;
  transition: 0.3s;
}

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

h1,
h2,
h3 {
  line-height: 1.3;
}

.container {
  max-width: 1200px;
  margin: auto;
  padding: 12px;
}

/* ==========================
   BASIC HEADER / FOOTER
========================== */
.header {
  background: #111;
  color: #fff;
  padding: 15px;
}

.footer {
  background: #111;
  color: #fff;
  padding: 20px;
  text-align: center;
}

/* ==========================
   GRID
========================== */
.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

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

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

/* ==========================
   POST CARD
========================== */
.post-card {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.post-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
}

.post-card a {
  text-decoration: none;
  color: #111;
  display: block;
  position: relative;
}

.post-card img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.3s ease;
}

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

.post-card h2 {
  font-size: 20px;
  line-height: 1.45;
  font-weight: 700;
  padding: 0 12px;
  margin: 12px 0 0;
  color: #111;
}

.post-card h3 {
  font-size: 18px;
  line-height: 1.45;
  font-weight: 700;
  padding: 0 12px;
  margin: 12px 0 0;
  color: #111;
}

.post-card h2:hover,
.post-card h3:hover {
  color: #d62828;
}

.post-card .post-content {
  padding: 14px;
}

.post-card .post-meta {
  padding: 0 12px 14px;
  margin-top: 10px;
}

.post-date {
  font-size: 12px;
  color: #777;
  padding: 0 8px 8px;
  display: block;
}

.post-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  display: inline-block;
  padding: 5px 10px;
  font-size: 12px;
  line-height: 1.2;
  font-weight: 700;
  color: #fff;
  border-radius: 999px;
}

.post-badge.new {
  background: #d62828;
}

.post-badge.trending {
  background: #111;
}

/* ==========================
   HERO / TRENDING
========================== */
.hero-main img {
  width: 100%;
  height: 300px;
  object-fit: cover;
}

.hero-main h2 {
  font-size: 22px;
}

.trending a {
  display: block;
  margin-bottom: 8px;
  font-weight: bold;
}

.hero-slider {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.slide img {
  width: 100%;
  height: 250px;
  object-fit: cover;
}

.slide h2 {
  font-size: 18px;
}

/* ==========================
   GENERIC HEADING STYLE
========================== */
h3 {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 18px;
  margin: 20px 0 10px;
  border-left: 4px solid red;
  padding-left: 8px;
}

h3 a {
  font-size: 12px;
  text-decoration: none;
  color: red;
}

/* ==========================
   BREAKING BAR
========================== */
.breaking-bar {
  background: red;
  color: #fff;
  padding: 8px;
  font-size: 14px;
}

.breaking-bar span {
  font-weight: bold;
  margin-right: 10px;
}

.breaking-bar a {
  color: #fff;
  text-decoration: none;
  margin-right: 15px;
}

/* ==========================
   LIST RESET ONLY FOR UI
========================== */
.top-menu ul,
.primary-menu ul,
.footer-menu ul,
.pagination ul,
.share-buttons ul,
.widget ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* ==========================
   SITE HEADER
========================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 999;
  background: #fff;
  border-bottom: 1px solid #eee;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.top-menu {
  background: #f5f5f5;
  font-size: 13px;
  padding: 5px 0;
}

.top-menu ul {
  display: flex;
  gap: 15px;
}

.top-menu a {
  color: #333;
  text-decoration: none;
}

.header-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
}

.logo {
  flex: 0 0 auto;
}

.logo img {
  height: 40px;
  width: auto;
}

.search-box input {
  padding: 6px 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.primary-menu {
  border-top: 1px solid #eee;
}

.primary-menu ul {
  display: flex;
  gap: 20px;
  padding: 10px 0;
}

.primary-menu a {
  color: #111;
  text-decoration: none;
  font-size: 14px;
}

.menu-toggle {
  display: none;
  font-size: 22px;
}

/* ==========================
   HEADER SEARCH FINAL
========================== */
.desktop-search-box {
  margin-left: auto;
  width: 100%;
  max-width: 360px;
}

.header-search-form {
  position: relative;
  width: 100%;
}

.header-search-icon {
  position: absolute;
  top: 50%;
  left: 12px;
  transform: translateY(-50%);
  font-size: 15px;
  line-height: 1;
  pointer-events: none;
}

.header-search-form input[type="search"],
.header-search-form input[type="text"] {
  width: 100%;
  height: 44px;
  padding: 0 14px 0 42px;
  border: 1px solid #d9d9d9;
  border-radius: 10px;
  background: #fff;
  font-size: 14px;
  color: #111;
  box-sizing: border-box;
}

.header-search-icon-btn {
  position: absolute;
  top: 50%;
  left: 8px;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
}

.mobile-header-right {
  display: none;
  align-items: center;
  gap: 10px;
}

.mobile-search-toggle,
.menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid #d9d9d9;
  border-radius: 8px;
  background: #fff;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.mobile-search-toggle .search-icon {
  font-size: 18px;
  line-height: 1;
}

.mobile-search-bar {
  display: none;
  position: relative;
  z-index: 999;
  background: #fff;
  border-top: 1px solid #eee;
  border-bottom: 1px solid #eee;
}

.mobile-search-bar.active {
  display: block;
}

.mobile-search-inner {
  padding: 12px 0;
}

.mobile-search-bar .header-search-form {
  width: 100%;
}

.mobile-search-bar .header-search-form input[type="search"],
.mobile-search-bar .header-search-form input[type="text"] {
  width: 100%;
  height: 42px;
  padding: 0 14px 0 38px;
  border: 1px solid #ddd;
  border-radius: 8px;
  background: #fff;
  font-size: 14px;
}

/* ==========================
   SITE FOOTER
========================== */
.site-footer {
  background: #111;
  color: #fff;
  padding: 20px 0;
  margin-top: 30px;
}

.footer-menu ul {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 10px;
}

.footer-menu a {
  color: #ccc;
  text-decoration: none;
  font-size: 14px;
}

.footer-menu a:hover {
  color: #fff;
}

.footer-credit {
  text-align: center;
  font-size: 13px;
  color: #aaa;
}

/* ==========================
   LAYOUT / SIDEBAR
========================== */
.layout-2col {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
}

.sidebar {
  background: #fafafa;
  padding: 10px;
  position: sticky;
  top: 80px;
  height: fit-content;
}

.widget {
  margin-bottom: 20px;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 16px;
}

.widget h3 {
  font-size: 16px;
  margin-bottom: 10px;
}

.sidebar .widget-title,
.widget-title {
  font-size: 18px;
  line-height: 1.3;
  margin-bottom: 14px;
}

.side-post {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}

.side-post img {
  width: 70px;
  height: 50px;
  object-fit: cover;
}

.side-post span {
  font-size: 13px;
}

.ad-box {
  background: #eee;
  text-align: center;
  padding: 20px;
  font-size: 14px;
}

/* ==========================
   BREADCRUMB
========================== */
.breadcrumb {
  font-size: 13px;
  margin-bottom: 10px;
  color: #777;
}

.breadcrumb a {
  text-decoration: none;
  color: #555;
}

.breadcrumb a:hover {
  color: red;
}

/* ==========================
   META
========================== */
.post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: #666;
  margin-bottom: 8px;
}

.post-meta span,
.post-meta a {
  display: inline-flex;
  align-items: center;
  color: #666;
  text-decoration: none;
}

.post-meta span::after {
  content: "•";
  margin-left: 10px;
  color: #aaa;
}

.post-meta span:last-child::after {
  content: "";
  margin: 0;
}

.post-meta a:hover {
  color: #d62828;
}

/* ==========================
   SINGLE POST BASIC
========================== */
.single-layout {
  max-width: 800px;
}

.post-title {
  font-size: 26px;
  margin-bottom: 10px;
}

.post-image img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  margin-bottom: 15px;
}

.post-content {
  font-size: 16px;
  line-height: 1.7;
}

.post-content img {
  max-width: 100%;
  height: auto;
}

.single-layout + .container {
  margin-top: 30px;
}

/* ==========================
   AUTHOR BOX
========================== */
.author-box {
  display: flex;
  gap: 15px;
  margin-top: 25px;
  padding: 15px;
  background: #f9f9f9;
  border-radius: 8px;
}

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

.author-info h4 {
  margin: 0;
  font-size: 16px;
}

.author-info h4 a {
  text-decoration: none;
  color: #111;
}

.author-info h4 a:hover {
  color: red;
}

.author-info p {
  font-size: 13px;
  color: #555;
  margin: 5px 0;
}

.author-link {
  font-size: 12px;
  text-decoration: none;
  color: red;
}

.author-social {
  margin: 8px 0;
}

.author-social a {
  font-size: 12px;
  margin-right: 10px;
  text-decoration: none;
  color: #555;
}

.author-social a:hover {
  color: red;
}

.author-social-buttons {
  margin-top: 10px;
}

.social-btn {
  display: inline-block;
  padding: 6px 12px;
  margin: 5px 6px 0 0;
  font-size: 13px;
  text-decoration: none;
  border-radius: 4px;
  color: #fff;
  transition: 0.3s;
}

.social-btn.fb {
  background: #1877f2;
}

.social-btn.x {
  background: #000;
}

.social-btn.ig {
  background: #e4405f;
}

.social-btn.ln {
  background: #0077b5;
}

.social-btn:hover {
  opacity: 0.85;
}

/* ==========================
   SHARE BUTTONS STYLE
========================== */
.share-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.share-buttons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  color: #fff;
  transition: all 0.2s ease;
}

.share-buttons a:nth-child(1) {
  background: #25d366;
}

.share-buttons a:nth-child(2) {
  background: #1877f2;
}

.share-buttons a:nth-child(3) {
  background: #000000;
}

.share-buttons a:nth-child(4) {
  background: #ff4500;
}

.share-buttons a:nth-child(5) {
  background: #666666;
}

.share-buttons a:nth-child(6) {
  background: #4285f4;
}

.share-buttons a:hover {
  opacity: 0.85;
  transform: translateY(-1px);
}

/* ==========================
   SEARCH PAGE BASIC
========================== */
.no-result {
  text-align: center;
  padding: 40px 0;
}

.no-result h2 {
  font-size: 20px;
  margin-bottom: 10px;
}

.no-result p {
  color: #666;
}

/* ==========================
   404 BASIC
========================== */
.error-404 {
  text-align: center;
  padding: 60px 20px;
}

.error-404 h1 {
  font-size: 60px;
  margin-bottom: 10px;
}

.error-404 h2 {
  font-size: 22px;
  margin-bottom: 10px;
}

.error-404 p {
  color: #666;
  margin-bottom: 20px;
}

.error-404 .search-box input {
  padding: 8px 10px;
  border: 1px solid #ddd;
  width: 200px;
}

.home-btn {
  display: inline-block;
  margin-top: 15px;
  padding: 8px 15px;
  background: #111;
  color: #fff;
  text-decoration: none;
}

.home-btn:hover {
  background: red;
}

/* ==========================
   PAGINATION
========================== */
.pagination {
  margin: 20px 0 0;
  text-align: center;
}

.pagination ul {
  display: flex;
  justify-content: center;
  gap: 5px;
  padding: 0;
}

.pagination li {
  list-style: none;
}

.pagination a,
.pagination span {
  display: block;
  padding: 6px 10px;
  background: #eee;
  text-decoration: none;
  color: #111;
  font-size: 14px;
}

.pagination span.current {
  background: #111;
  color: #fff;
}

.pagination a:hover {
  background: #111;
  color: #fff;
}

/* ==========================
   HOMEPAGE POLISH
========================== */
.site-main,
.home .site-main,
.blog .site-main {
  padding-top: 20px;
  padding-bottom: 20px;
}

.home section,
.home .section,
.home .content-section,
.home .homepage-section,
.home .post-section,
.home .widget,
.home .trending-section,
.home .related-posts,
.home .recent-posts {
  margin-bottom: 28px;
}

.home h2,
.home .section-title,
.home .widget-title {
  font-size: 24px;
  line-height: 1.3;
  font-weight: 700;
  margin: 0 0 16px;
  color: #111;
}

.post-grid,
.home .posts-grid,
.home .news-grid,
.home .grid-layout,
.home .latest-posts-grid {
  gap: 18px;
}

.home article,
.home .grid-item,
.home .news-card,
.home .post-item {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.home article:hover,
.home .grid-item:hover,
.home .news-card:hover,
.home .post-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
}

.home article img,
.home .grid-item img,
.home .news-card img,
.home .post-item img {
  display: block;
  width: 100%;
  height: auto;
}

.home article .entry-content,
.home .card-content,
.home .post-info,
.home .post-details {
  padding: 14px;
}

.home article h2,
.home article h3,
.home .entry-title,
.home .post-title {
  font-size: 18px;
  line-height: 1.45;
  font-weight: 700;
  margin: 10px 0 0;
}

.home article h2 a,
.home article h3 a,
.home .entry-title a,
.home .post-title a {
  color: #111;
  text-decoration: none;
}

.home article h2 a:hover,
.home article h3 a:hover,
.home .entry-title a:hover,
.home .post-title a:hover {
  color: #d62828;
}

.home .post-meta,
.home .entry-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: #666;
  margin-top: 10px;
}

.home .post-meta span,
.home .entry-meta span,
.home .post-meta a,
.home .entry-meta a {
  display: inline-flex;
  align-items: center;
  color: #666;
  text-decoration: none;
}

.home .post-meta span::after,
.home .entry-meta span::after {
  content: "•";
  margin-left: 10px;
  color: #aaa;
}

.home .post-meta span:last-child::after,
.home .entry-meta span:last-child::after {
  content: "";
  margin: 0;
}

.home .featured-post,
.home .hero-post,
.home .top-post {
  margin-bottom: 24px;
}

.home .featured-post img,
.home .hero-post img,
.home .top-post img {
  border-radius: 14px;
}

.home .featured-post h2,
.home .hero-post h2,
.home .top-post h2 {
  font-size: 30px;
  line-height: 1.3;
  margin-top: 14px;
}

.trending-section {
  margin: 28px 0;
}

.trending-section h2 {
  font-size: 24px;
  margin-bottom: 16px;
}

.trending-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.trending-post h3 {
  font-size: 16px;
  line-height: 1.4;
  margin-top: 8px;
}

.navigation.pagination,
.pagination {
  margin-top: 28px;
}

/* ==========================
   HOMEPAGE SECTION SPACING
========================== */
.home-section {
  margin-bottom: 34px;
}

.home-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 0 0 16px;
}

.section-title {
  margin: 0;
  font-size: 24px;
  line-height: 1.3;
  font-weight: 700;
  color: #111;
}

.section-link {
  display: inline-flex;
  align-items: center;
  margin: 0;
  font-size: 14px;
  line-height: 1.2;
  font-weight: 600;
  color: #e12626;
  text-decoration: none;
  white-space: nowrap;
}

.section-link:hover {
  text-decoration: underline;
}

.home-section .grid {
  margin: 0;
}

.home .grid,
.homepage-section,
.home .category-section,
.home .latest-posts,
.home .trending-section,
.home .npc-trending-grid {
  margin-bottom: 30px;
}

.home .grid {
  margin-top: 0;
  row-gap: 18px;
}

.home .home-section-header + .grid {
  padding-top: 2px;
}

/* ==========================
   SINGLE POST POLISH
========================== */
.single-content-area {
  min-width: 0;
}

.single-post-layout {
  max-width: 860px;
  margin: 0 auto;
}

.breadcrumb-wrap {
  margin-bottom: 14px;
}

.single-header {
  margin-bottom: 18px;
}

.single-title {
  font-size: 34px;
  line-height: 1.25;
  font-weight: 800;
  color: #111;
  margin: 0 0 14px;
}

.single-excerpt {
  font-size: 16px;
  line-height: 1.7;
  color: #444;
  margin: 0 0 18px;
  padding-left: 12px;
  border-left: 3px solid #d62828;
}

.single-featured-image {
  margin: 22px 0 24px;
}

.single-featured-image img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 14px;
}

.post-content.single-content,
.single-content {
  font-size: 18px;
  line-height: 1.85;
  color: #222;
  word-break: break-word;
  overflow-wrap: break-word;
}

.single-content > *:first-child {
  margin-top: 0;
}

.single-content > *:last-child {
  margin-bottom: 0;
}

.single-content p {
  margin: 0 0 18px;
}

.single-content h2 {
  font-size: 30px;
  line-height: 1.35;
  font-weight: 700;
  margin: 34px 0 16px;
  color: #111;
}

.single-content h3 {
  font-size: 24px;
  line-height: 1.4;
  font-weight: 700;
  margin: 28px 0 14px;
  color: #111;
}

.single-content h4 {
  font-size: 20px;
  line-height: 1.45;
  font-weight: 600;
  margin: 24px 0 12px;
  color: #111;
}

.single-content h2 + p,
.single-content h3 + p,
.single-content h4 + p {
  margin-top: 0;
}

.single-content ul {
  list-style: disc;
}

.single-content ol {
  list-style: decimal;
}

.single-content ul,
.single-content ol {
  margin: 0 0 20px 22px;
  padding: 0;
}

.single-content li {
  margin-bottom: 10px;
  line-height: 1.8;
}

.single-content ul ul,
.single-content ol ol,
.single-content ul ol,
.single-content ol ul {
  margin-top: 10px;
  margin-bottom: 10px;
}

.single-content blockquote {
  margin: 24px 0;
  padding: 16px 18px;
  border-left: 4px solid #111;
  background: #f7f7f7;
  font-style: italic;
}

.single-content blockquote p:last-child {
  margin-bottom: 0;
}

.single-content a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.single-content img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  display: block;
}

.single-content figure {
  margin: 24px 0;
}

.single-content figcaption,
.single-content .wp-caption-text {
  font-size: 13px;
  color: #666;
  margin-top: 8px;
  text-align: center;
}

.single-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  display: block;
  overflow-x: auto;
}

.single-content th,
.single-content td {
  border: 1px solid #ddd;
  padding: 10px 12px;
  text-align: left;
  font-size: 15px;
}

.single-content iframe,
.single-content embed,
.single-content object,
.single-content video {
  max-width: 100%;
}

.single-content .wp-block-image,
.single-content .wp-block-embed,
.single-content .wp-block-gallery,
.single-content .wp-block-table {
  margin: 24px 0;
}

.after-post-ad {
  margin: 28px 0;
  padding: 16px;
  border: 1px solid #eee;
  border-radius: 12px;
  background: #fafafa;
}

.post-tags {
  margin-top: 20px;
}

.post-tags a {
  display: inline-block;
  margin: 0 8px 8px 0;
  padding: 7px 12px;
  font-size: 13px;
  line-height: 1.2;
  color: #333;
  text-decoration: none;
  background: #f4f4f4;
  border-radius: 999px;
}

.post-tags a:hover {
  background: #ececec;
}

.single-bottom-blocks {
  margin-top: 30px;
}

.related-posts-wrap {
  margin-top: 34px;
}

.related-title {
  font-size: 24px;
  line-height: 1.3;
  margin: 0 0 16px;
  color: #111;
}

/* ==========================
   ARCHIVE / CATEGORY POLISH
========================== */
.archive-title {
  font-size: 22px;
  margin: 20px 0;
}

.archive-desc {
  font-size: 14px;
  color: #555;
  margin-bottom: 15px;
}

.archive-layout {
  display: grid;
  gap: 28px;
  align-items: start;
}

.archive-layout.has-sidebar {
  grid-template-columns: minmax(0, 1fr) 320px;
}

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

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

.archive-layout-full .archive-content {
  max-width: 1200px;
}

.archive-header {
  margin-bottom: 22px;
}

.archive-title {
  font-size: 32px;
  line-height: 1.25;
  font-weight: 800;
  color: #111;
  margin: 0 0 10px;
}

.archive-description {
  font-size: 16px;
  line-height: 1.7;
  color: #555;
  max-width: 780px;
}

.archive-grid {
  margin-top: 12px;
}

.archive-layout.has-sidebar .archive-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.archive-layout-full .archive-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.archive-grid .post-card h2 {
  font-size: 20px;
  line-height: 1.45;
  font-weight: 700;
  margin: 10px 0 0;
  color: #111;
}

.archive-grid .post-meta {
  margin-top: 10px;
}

.no-results {
  padding: 28px;
  border: 1px solid #eee;
  border-radius: 14px;
  background: #fafafa;
}

.no-results h2 {
  font-size: 24px;
  margin: 0 0 10px;
  color: #111;
}

.no-results p {
  margin: 0;
  color: #666;
  line-height: 1.7;
}

/* ==========================
   SEARCH PAGE POLISH
========================== */
.search-layout-full {
  grid-template-columns: minmax(0, 1fr);
}

.search-layout-full .archive-content {
  max-width: 1200px;
}

.search-header {
  margin-bottom: 22px;
}

.search-no-results {
  text-align: left;
  padding: 26px;
}

.search-form-wrap {
  margin-top: 16px;
  margin-left: auto;
  margin-right: auto;
  max-width: 680px;
  width: 100%;
}

.search-form-wrap form {
  position: relative;
  width: 100%;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.search-form-wrap .search-form-group {
  width: 100%;
}

.search-form-wrap input[type="search"],
.search-form-wrap .search-field {
  width: 100%;
  min-width: 0;
  height: 46px;
  padding: 0 14px 0 42px;
  border: 1px solid #ddd;
  border-radius: 10px;
  font-size: 15px;
  box-sizing: border-box;
}

.search-form-wrap button,
.search-form-wrap input[type="submit"] {
  position: absolute;
  top: 50%;
  left: 8px;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}

.search-form-wrap button:hover,
.search-form-wrap input[type="submit"]:hover {
  opacity: 0.9;
}

/* ==========================
   404 PAGE POLISH
========================== */
.error-404-wrap {
  padding-top: 20px;
  padding-bottom: 30px;
}

.error-404-box {
  max-width: 760px;
  margin: 0 auto 36px;
  padding: 34px 24px;
  text-align: center;
  background: #fafafa;
  border: 1px solid #eee;
  border-radius: 16px;
}

.error-code {
  display: inline-block;
  font-size: 56px;
  line-height: 1;
  font-weight: 800;
  color: #d62828;
  margin-bottom: 12px;
}

.error-title {
  font-size: 34px;
  line-height: 1.25;
  font-weight: 800;
  color: #111;
  margin: 0 0 12px;
}

.error-text {
  max-width: 560px;
  margin: 0 auto 20px;
  font-size: 16px;
  line-height: 1.7;
  color: #555;
}

.error-search {
  max-width: 520px;
  margin: 0 auto 18px;
}

.error-search form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.error-search input[type="search"] {
  flex: 1;
  min-width: 220px;
  height: 46px;
  padding: 0 14px;
  border: 1px solid #ddd;
  border-radius: 10px;
  font-size: 14px;
}

.error-search input[type="submit"],
.error-search button {
  height: 46px;
  padding: 0 18px;
  border: 0;
  border-radius: 10px;
  background: #111;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.error-search input[type="submit"]:hover,
.error-search button:hover {
  opacity: 0.9;
}

.error-actions {
  margin-top: 8px;
}

.error-home-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 10px;
  background: #d62828;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.error-home-btn:hover {
  opacity: 0.92;
}

.error-latest-posts h2 {
  font-size: 24px;
  line-height: 1.3;
  margin: 0 0 16px;
  color: #111;
}

/* ==========================
   SIDEBAR TRENDING
========================== */
.npc-trending-widget {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.npc-trending-widget-item {
  padding-bottom: 14px;
  border-bottom: 1px solid #eee;
}

.npc-trending-widget-item:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.npc-trending-widget-link {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  text-decoration: none;
}

.npc-trending-widget-thumb {
  flex: 0 0 84px;
  max-width: 84px;
}

.npc-trending-widget-thumb img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 8px;
}

.npc-trending-widget-content {
  flex: 1;
  min-width: 0;
}

.npc-trending-widget-content h4 {
  margin: 0;
  font-size: 15px;
  line-height: 1.45;
  font-weight: 700;
  color: #111;
}

.npc-trending-widget-link:hover h4 {
  color: #d62828;
}

.npc-trending-sidebar {
  display: block;
}

.npc-trending-item {
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid #eee;
}

.npc-trending-item:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: 0;
}

.npc-trending-link {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  text-decoration: none;
}

.npc-trending-thumb {
  width: 84px;
  min-width: 84px;
}

.npc-trending-thumb img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 8px;
}

.npc-trending-content {
  flex: 1;
  min-width: 0;
}

.npc-trending-content h4 {
  margin: 0;
  font-size: 15px;
  line-height: 1.45;
  font-weight: 700;
  color: #111;
}

.npc-trending-link:hover h4 {
  color: #d62828;
}

.sidebar .npc-trending-sidebar .post-card,
.sidebar .npc-trending-sidebar .grid {
  display: block;
  border: 0;
  box-shadow: none;
  padding: 0;
  background: transparent;
}

/* ==========================
   MOBILE
========================== */
@media (max-width: 991px) {
  .archive-layout.has-sidebar {
    grid-template-columns: 1fr;
  }

  .archive-layout.has-sidebar .archive-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .archive-layout-full .archive-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .archive-title {
    font-size: 26px;
  }
}

@media (max-width: 768px) {
  .logo img {
    height: 32px;
  }

  .search-box {
    display: none;
  }

  .primary-menu {
    display: none;
  }

  .primary-menu.active {
    display: block;
  }

  .primary-menu ul {
    flex-direction: column;
  }

  .menu-toggle {
    display: block;
  }

  .desktop-search-box {
    display: none;
  }

  .mobile-header-right {
    display: flex;
  }

  .logo img {
    max-width: 210px;
    height: auto !important;
  }

  .header-main {
    gap: 12px;
  }

  .footer-menu ul {
    flex-direction: column;
    align-items: center;
  }

  .layout-2col {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

  .author-box {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .author-img {
    margin-bottom: 10px;
  }

  .site-main,
  .home .site-main,
  .blog .site-main {
    padding-top: 14px;
    padding-bottom: 14px;
  }

  .home h2,
  .home .section-title,
  .home .widget-title {
    font-size: 20px;
    margin-bottom: 12px;
  }

  .post-card h2,
  .post-card h3,
  .home article h2,
  .home article h3,
  .home .entry-title,
  .home .post-title {
    font-size: 16px;
    line-height: 1.4;
  }

  .home .featured-post h2,
  .home .hero-post h2,
  .home .top-post h2 {
    font-size: 22px;
  }

  .post-card .post-content,
  .home article .entry-content,
  .home .card-content,
  .home .post-info,
  .home .post-details {
    padding: 12px;
  }

  .trending-grid {
    grid-template-columns: 1fr;
  }

  .home-section {
    margin-bottom: 26px;
  }

  .home-section-header {
    margin: 0 0 12px;
    gap: 10px;
    align-items: flex-start;
  }

  .section-title {
    font-size: 20px;
  }

  .section-link {
    font-size: 13px;
  }

  .home .grid,
  .homepage-section,
  .home .category-section,
  .home .latest-posts,
  .home .trending-section,
  .home .npc-trending-grid {
    margin-bottom: 24px;
  }

  .single-title {
    font-size: 26px;
    line-height: 1.3;
  }

  .single-excerpt {
    font-size: 15px;
    line-height: 1.65;
  }

  .post-meta {
    gap: 8px;
    font-size: 13px;
  }

  .single-featured-image {
    margin: 18px 0 20px;
  }

  .single-content {
    font-size: 16px;
    line-height: 1.8;
  }

  .single-content p {
    margin-bottom: 16px;
  }

  .single-content h2 {
    font-size: 24px;
    margin: 28px 0 14px;
  }

  .single-content h3 {
    font-size: 20px;
    margin: 24px 0 12px;
  }

  .single-content h4 {
    font-size: 18px;
    margin: 20px 0 10px;
  }

  .single-content ul,
  .single-content ol {
    margin-left: 18px;
  }

  .single-content blockquote {
    padding: 14px;
  }

  .after-post-ad {
    padding: 14px;
  }

  .archive-title {
    font-size: 24px;
  }

  .archive-description {
    font-size: 15px;
    line-height: 1.65;
  }

  .archive-grid .post-card h2 {
    font-size: 18px;
  }

  .no-results {
    padding: 20px;
  }

  .search-no-results {
    padding-left: 16px;
    padding-right: 16px;
  }

  .search-form-wrap {
    width: 100%;
    max-width: 100%;
    padding: 0;
    box-sizing: border-box;
  }

  .search-form-wrap .search-field {
    width: 100%;
    height: 46px;
    font-size: 15px;
    padding-left: 42px;
    padding-right: 14px;
    box-sizing: border-box;
  }

  .share-buttons {
    gap: 8px;
  }

  .share-buttons a {
    flex: 1 1 auto;
    font-size: 13px;
    padding: 8px 10px;
  }

  .error-404-box {
    padding: 26px 18px;
  }

  .error-code {
    font-size: 44px;
  }

  .error-title {
    font-size: 26px;
  }

  .error-text {
    font-size: 15px;
  }
}

@media (max-width: 600px) {
  .archive-layout.has-sidebar .archive-grid,
  .archive-layout-full .archive-grid {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 769px) {
  .mobile-search-toggle,
  .mobile-header-right,
  .mobile-search-bar {
    display: none !important;
  }
}
/* ==========================
   EMBED RESPONSIVE FIX
========================== */

.single-content iframe,
.post-content iframe,
.entry-content iframe,
.single-content embed,
.post-content embed,
.entry-content embed,
.single-content object,
.post-content object,
.entry-content object,
.single-content video,
.post-content video,
.entry-content video {
  max-width: 100%;
}

/* Responsive video wrapper */
.responsive-video-embed {
  position: relative;
  width: 100%;
  max-width: 100%;
  margin: 24px 0;
  padding-bottom: 56.25%; /* 16:9 */
  height: 0;
  overflow: hidden;
  border-radius: 12px;
}

.responsive-video-embed iframe,
.responsive-video-embed object,
.responsive-video-embed embed,
.responsive-video-embed video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* WordPress/Gutenberg embed blocks */
.wp-block-embed,
.wp-block-embed__wrapper,
.wp-block-embed iframe {
  max-width: 100%;
}

.wp-block-embed {
  margin: 24px 0;
}

.wp-block-embed.is-type-video iframe,
.wp-block-embed.is-provider-youtube iframe,
.wp-block-embed.is-provider-vimeo iframe {
  width: 100%;
}

/* Twitter / X / Instagram / generic oEmbed */
.twitter-tweet,
.instagram-media,
.tiktok-embed,
.fb-post,
.fb-video,
.wp-block-embed-twitter,
.wp-block-embed-instagram,
.wp-block-embed-tiktok {
  max-width: 100% !important;
  margin: 24px auto !important;
}

/* Prevent horizontal overflow */
.single-content,
.post-content,
.entry-content {
  overflow-wrap: break-word;
  word-wrap: break-word;
}

.single-content .wp-block-embed,
.single-content .twitter-tweet,
.single-content .instagram-media,
.single-content iframe,
.single-content video {
  overflow: hidden;
}

/* Tables/pre/code also stay inside mobile width */
.single-content pre,
.post-content pre,
.entry-content pre {
  max-width: 100%;
  overflow-x: auto;
  padding: 12px 14px;
  background: #f7f7f7;
  border-radius: 10px;
}

/* Mobile */
@media (max-width: 768px) {
  .responsive-video-embed {
    margin: 20px 0;
    border-radius: 10px;
  }

  .twitter-tweet,
  .instagram-media,
  .tiktok-embed,
  .fb-post,
  .fb-video {
    min-width: 0 !important;
  }
}
.responsive-embed-wrap {
  max-width: 100%;
  margin: 24px 0;
}

.responsive-embed-wrap iframe {
  max-width: 100%;
}
.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.single-content,
.post-content,
.entry-content {
  min-width: 0;
  overflow-wrap: break-word;
  word-wrap: break-word;
  word-break: break-word;
}

.single-content p,
.post-content p,
.entry-content p,
.single-content li,
.post-content li,
.entry-content li,
.single-content h2,
.single-content h3,
.single-content h4 {
  overflow-wrap: break-word;
  word-wrap: break-word;
}

.single-content img,
.post-content img,
.entry-content img,
.single-content iframe,
.post-content iframe,
.entry-content iframe,
.single-content table,
.post-content table,
.entry-content table,
.single-content pre,
.post-content pre,
.entry-content pre {
  max-width: 100%;
}

.single-content pre,
.post-content pre,
.entry-content pre {
  overflow-x: auto;
}
@media (max-width: 768px) {
  .single-content,
  .post-content,
  .entry-content {
    width: 100%;
    max-width: 100%;
  }
}
/* ==========================
   SAFE OVERFLOW FIX
========================== */

/* Bug Fix #2: overflow-x:hidden on html/body breaks position:sticky sidebar.
   Moved to .site-wrapper instead so sticky works correctly. */
.site-wrapper {
  overflow-x: hidden;
}

.layout-2col,
.archive-layout,
.single-post-layout,
.single-content-area,
.archive-content {
  min-width: 0;
}

.single-content,
.post-content,
.entry-content {
  overflow-wrap: break-word;
  word-wrap: break-word;
}

.single-content img,
.post-content img,
.entry-content img,
.single-content iframe,
.post-content iframe,
.entry-content iframe,
.single-content video,
.post-content video,
.entry-content video,
.single-content embed,
.post-content embed,
.entry-content embed,
.single-content object,
.post-content object,
.entry-content object {
  max-width: 100%;
  height: auto;
}

.single-content table,
.post-content table,
.entry-content table {
  display: block;
  width: 100%;
  overflow-x: auto;
}

.single-content pre,
.post-content pre,
.entry-content pre,
.single-content code,
.post-content code,
.entry-content code {
  white-space: pre-wrap;
  word-break: break-word;
  overflow-x: auto;
}

@media (max-width: 768px) {
  .single-content,
  .post-content,
  .entry-content {
    word-break: break-word;
  }
}
/* ==========================
   RESPONSIVE TABLE FIX
========================== */

.single-content table,
.post-content table,
.entry-content table {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-collapse: collapse;
}

.single-content tbody,
.post-content tbody,
.entry-content tbody {
  width: 100%;
}

.single-content th,
.single-content td,
.post-content th,
.post-content td,
.entry-content th,
.entry-content td {
  white-space: nowrap;
  padding: 10px 12px;
  border: 1px solid #ddd;
}

@media (max-width: 768px) {
  .single-content table,
  .post-content table,
  .entry-content table {
    font-size: 14px;
  }

  .single-content th,
  .single-content td,
  .post-content th,
  .post-content td,
  .entry-content th,
  .entry-content td {
    padding: 8px 10px;
  }
}