/*
Theme Name: Hindi News Pro
Theme URI: https://example.com
Author: Your Name
Author URI: https://example.com
Description: Professional Hindi News Portal Theme with Full Customizer Support - Breaking News Ticker, Hero Section, Category Sections, Article Page, Mobile Responsive
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: hindi-news-pro
Tags: news, blog, hindi, responsive, custom-colors, custom-logo, custom-menu, featured-images, full-width-template, post-formats, sticky-post, threaded-comments, translation-ready
*/

/* ===== CSS VARIABLES ===== */
:root {
  --primary-color: #cc0000;
  --secondary-color: #111111;
  --accent-color: #ff4444;
  --text-color: #222222;
  --light-bg: #f5f5f5;
  --border-color: #e0e0e0;
  --footer-bg: #2d2d2d;
  --font-family: 'Noto Sans Devanagari', Arial, sans-serif;
  --font-size-base: 15px;
  --logo-font-size: 26px;
}

/* ===== RESET ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  color: var(--text-color);
  background: #ffffff;
  line-height: 1.6;
}
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* ===== SITE WRAPPER ===== */
.site-wrapper { max-width: 480px; margin: 0 auto; background: #fff; min-height: 100vh; position: relative; overflow-x: hidden; }

@media (min-width: 1024px) {
  .site-wrapper { max-width: 1140px; }
  .news-list-section.layout-grid-desktop { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px 20px; }
  .news-list-section.layout-grid-desktop .news-thumb-item { border-bottom: none; flex-direction: column; }
  .news-list-section.layout-grid-desktop .news-thumb-item .thumb { width: 100%; height: 160px; }
  .grid-news-section { grid-template-columns: repeat(3, 1fr); }
  .grid-news-item img { height: 160px; }
  .hero-section .hero-image { height: 420px; }
  .hero-title { font-size: 30px; }
  .article-content { font-size: 17px; }
  .article-main-title { font-size: 28px; }
}

@media (min-width: 600px) and (max-width: 1023px) {
  .site-wrapper { max-width: 700px; }
  .grid-news-section { grid-template-columns: repeat(2, 1fr); }
}

/* ===== HEADER ===== */
.site-header {
  background-color: #ffffff;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 200;
  box-shadow: 0 1px 4px rgba(0,0,0,0.12);
  gap: 10px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
/* When a header background image is active, body gets .has-header-bg
   (added by functions.php) — overlay keeps logo/icons readable on any image */
.has-header-bg .site-header {
  position: sticky;
}
.has-header-bg .site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.55);
  z-index: 0;
}
.has-header-bg .site-header > * { position: relative; z-index: 1; }
/* Default (logo-pos-left): logo first, icons after (icons_position decides which group renders, naturally sits on the right of the flex row) */
.site-header.logo-pos-left .site-logo-wrap { order: 1; }
.site-header.logo-pos-left .header-actions-left,
.site-header.logo-pos-left .header-actions-right { order: 2; margin-left: auto; }

/* Center: logo takes the middle, icon group (whichever side chosen) sits at the far right; if "left" chosen, it sits at far left */
.site-header.logo-pos-center .site-logo-wrap { order: 2; flex: 1; text-align: center; align-items: center; }
.site-header.logo-pos-center .header-actions-left  { order: 1; }
.site-header.logo-pos-center .header-actions-right { order: 3; }

/* Right: logo pushes to the far right, icon group sits at the far left */
.site-header.logo-pos-right .site-logo-wrap { order: 3; align-items: flex-end; }
.site-header.logo-pos-right .header-actions-left,
.site-header.logo-pos-right .header-actions-right { order: 1; }

.site-logo-wrap { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }
.site-logo a {
  font-size: var(--logo-font-size);
  font-weight: 900;
  color: var(--primary-color);
  font-style: italic;
  letter-spacing: 1px;
  display: block;
  white-space: nowrap;
}
.site-logo img { height: var(--logo-img-height, 40px); width: auto; }
.site-tagline { font-size: 11px; color: #888; margin-top: 2px; font-style: normal; white-space: nowrap; }

.header-actions-left, .header-actions-right { display: flex; align-items: center; gap: 16px; flex-shrink: 0; }
.header-actions-left button, .header-actions-right button {
  font-size: 22px;
  color: #333;
  line-height: 1;
  padding: 2px;
  background: none;
  border: none;
}

/* ===== BREAKING NEWS ===== */
.breaking-news-bar {
  background: var(--primary-color);
  color: #fff;
  display: flex;
  align-items: center;
  padding: 8px 12px;
  gap: 10px;
  overflow: hidden;
  position: relative;
}
.breaking-label {
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}
.breaking-label::before { content: "▶"; }
.breaking-ticker-wrap { flex: 1; overflow: hidden; }
.breaking-ticker-text {
  display: inline-block;
  white-space: nowrap;
  animation: marquee var(--ticker-speed, 20s) linear infinite;
  font-size: 13px;
}
@keyframes marquee {
  0% { transform: translateX(100%); }
  100% { transform: translateX(-100%); }
}
.breaking-close {
  font-size: 18px;
  color: rgba(255,255,255,0.85);
  flex-shrink: 0;
  padding: 0 4px;
  line-height: 1;
}

/* ===== HERO SECTION ===== */
.hero-section { position: relative; }
.hero-section .hero-image {
  width: 100%;
  height: 250px;
  object-fit: cover;
}
.hero-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.88));
  padding: 30px 14px 16px;
}
.hero-title {
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.4;
}
.hero-section a:hover .hero-title { color: #ffdddd; }

/* ===== NEWS LIST (thumbnail + title) ===== */
.news-list-section { padding: 0 12px; }
.news-thumb-item {
  display: flex;
  gap: 10px;
  padding: 11px 0;
  border-bottom: 1px solid var(--border-color);
  align-items: flex-start;
}
.news-thumb-item:last-child { border-bottom: none; }
.news-thumb-item .thumb {
  width: 92px;
  height: 66px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
}
.news-thumb-item .thumb-content { display: flex; flex-direction: column; min-width: 0; }
.news-thumb-item .thumb-title {
  font-size: var(--list-title-font-size, 14px);
  font-weight: 600;
  line-height: 1.45;
  color: #1a1a1a;
}
.news-thumb-item:hover .thumb-title { color: var(--primary-color); }
.news-thumb-item .thumb-date {
  font-size: 11px;
  color: #999;
  margin-top: 4px;
}

/* ===== SECTION HEADER (Red bar) ===== */
.section-header-red {
  background: var(--primary-color);
  color: #fff;
  padding: 10px 14px;
  font-size: 17px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
}

/* ===== SECTION HEADER (centered plain) ===== */
.section-header-center {
  text-align: center;
  color: var(--primary-color);
  font-size: 18px;
  font-weight: 700;
  padding: 14px 0 8px;
  border-bottom: 2px solid var(--primary-color);
  margin: 0 12px 4px;
}

/* ===== 2-COLUMN GRID NEWS ===== */
.grid-news-section { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 10px 12px; }
.grid-news-item { border: 1px solid var(--border-color); border-radius: 4px; overflow: hidden; }
.grid-news-item img { width: 100%; height: 112px; object-fit: cover; }
.grid-news-item .grid-title { font-size: var(--list-title-font-size, 13px); font-weight: 600; padding: 7px 8px; line-height: 1.4; text-align: center; }
.grid-news-item:hover .grid-title { color: var(--primary-color); }

/* ===== SOCIAL SHARE BAR ===== */
.social-share-bar { display: flex; gap: 8px; padding: 12px; }
.social-share-bar .s-btn {
  flex: 1;
  padding: 10px 0;
  color: #fff;
  border-radius: 4px;
  font-size: 17px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}
.s-btn.fb { background: #1877f2; }
.s-btn.tw { background: #000; }
.s-btn.wa { background: #25d366; }
.s-btn.tg { background: #0088cc; }
.s-btn.sh { background: #555; }

/* ===== LATEST / SIMPLE NEWS LIST ===== */
.latest-news-section {}
.latest-item {
  display: flex;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-color);
  align-items: flex-start;
}
.latest-item img { width: 82px; height: 60px; object-fit: cover; border-radius: 3px; flex-shrink: 0; }
.latest-item .latest-content { display: flex; flex-direction: column; min-width: 0; }
.latest-item .l-title { font-size: var(--list-title-font-size, 14px); font-weight: 600; line-height: 1.45; color: #1a1a1a; }
.latest-item:hover .l-title { color: var(--primary-color); }
.latest-item .l-date { font-size: 11px; color: #999; margin-top: 4px; }

/* ===== SLIDER / ARROW LIST ===== */
.arrow-list-section { padding: 0 12px 8px; }
.arrow-list-item {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-color);
}
.arrow-list-item .arr { color: var(--primary-color); font-size: 14px; flex-shrink: 0; margin-top: 2px; }
.arrow-list-item .arr-title { font-size: var(--list-title-font-size, 14px); color: #1a1a1a; line-height: 1.45; }
.arrow-list-item:hover .arr-title { color: var(--primary-color); }

/* ===== PAGINATION ===== */
.pagination-wrap { text-align: center; padding: 16px; }
.next-page-btn {
  border: 1px solid #ccc;
  padding: 8px 26px;
  background: #fff;
  color: #1877f2;
  font-size: 15px;
  border-radius: 3px;
}
.next-page-btn:hover { background: #f0f0f0; }

/* ===== SIDE MENU ===== */
.menu-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 300;
}
.menu-overlay.active { display: block; }
.side-nav {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: 78%;
  max-width: 300px;
  background: var(--primary-color);
  z-index: 301;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  overflow-y: auto;
}
.side-nav.active { transform: translateX(0); }
.side-nav-logo {
  color: #fff;
  font-size: 22px;
  font-weight: 900;
  font-style: italic;
  padding: 22px 16px 26px;
  display: block;
}
.side-nav ul li a {
  display: block;
  color: #fff;
  font-size: 19px;
  font-weight: 700;
  padding: 15px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.18);
}
.side-nav ul li a:hover { background: rgba(0,0,0,0.15); }

/* ===== SEARCH OVERLAY ===== */
.search-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.88);
  z-index: 400;
  flex-direction: column;
  align-items: center;
  padding-top: 60px;
}
.search-overlay.active { display: flex; }
.search-overlay .s-close { color: #fff; font-size: 30px; align-self: flex-end; margin: 0 16px 12px; }
.search-overlay input {
  width: 90%;
  max-width: 420px;
  padding: 14px 18px;
  font-size: 16px;
  border: none;
  border-radius: 4px;
  outline: none;
}

/* ===== ARTICLE PAGE ===== */
.article-header { padding: 14px 12px 6px; border-bottom: 1px solid var(--border-color); }
.article-main-title { font-size: var(--title-font-size, 20px); font-weight: 700; line-height: 1.4; color: #111; }
.post-meta-date {
  font-size: 12px;
  color: #888;
  margin-top: 8px;
  padding-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.post-meta-date i { font-size: 11px; }

/* "Report by" author box - placed right after featured image */
.report-by-box {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  margin: 10px 12px 4px;
}
.report-by-box .rb-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.report-by-box .rb-text { font-size: 13px; color: #555; }
.report-by-box .rb-text .rb-label { color: #999; }
.report-by-box .rb-text .rb-name { font-weight: 700; color: #222; }

.author-info-box {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  margin: 10px 12px;
}
.author-avatar { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.author-details .a-name { font-weight: 700; font-size: 14px; }
.author-details .a-date { font-size: 12px; color: #888; }
.cat-tag {
  margin-left: auto;
  background: #eef0ff;
  border: 1px solid #aab0ff;
  color: #1877f2;
  padding: 5px 12px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
}
.article-featured-img { width: 100%; max-height: 250px; object-fit: cover; }
.article-content { padding: 14px 12px; font-size: var(--desc-font-size, 15px); line-height: 1.85; color: #222; }
.article-content p { margin-bottom: 14px; }

/* ===== QUICK COMMENT BOX (after description) ===== */
.quick-comment-box {
  margin: 6px 12px 16px;
  padding: 12px;
  background: #f8f8f8;
  border: 1px solid var(--border-color);
  border-radius: 6px;
}
.quick-comment-box .qc-title { font-size: 14px; font-weight: 700; margin-bottom: 8px; color: #333; }
.quick-comment-box textarea {
  width: 100%;
  min-height: 60px;
  padding: 8px 10px;
  font-size: 13px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-family: inherit;
  resize: vertical;
}
.quick-comment-box button {
  margin-top: 8px;
  background: var(--primary-color);
  color: #fff;
  padding: 7px 18px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 700;
}

/* ===== FOOTER ===== */
.site-footer {
  background: var(--footer-bg);
  color: #eee;
  padding: 22px 16px 16px;
}
.footer-logo-text {
  color: #fff;
  font-size: 20px;
  font-weight: 900;
  font-style: italic;
  text-align: center;
  margin-bottom: 12px;
}
.footer-logo-img { margin: 0 auto 12px; height: 36px; width: auto; }
.footer-desc { font-size: 13px; color: #aaa; line-height: 1.65; margin-bottom: 22px; }
.footer-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 22px; }
.footer-col h4 { color: #fff; font-size: 15px; margin-bottom: 10px; }
.footer-col a {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #bbb;
  font-size: 13px;
  padding: 4px 0;
}
.footer-col a::before { content: "▶"; color: var(--primary-color); font-size: 9px; }
.footer-col a:hover { color: #fff; }
.footer-social-wrap { text-align: center; margin-bottom: 18px; }
.footer-social-wrap h4 { color: #fff; margin-bottom: 12px; font-size: 16px; }
.footer-social-icons { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.footer-social-icons a {
  width: 48px;
  height: 48px;
  border: 1px solid #666;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #ccc;
}
.footer-social-icons a:hover { border-color: var(--primary-color); color: #fff; background: var(--primary-color); }
.footer-copy { text-align: center; font-size: 12px; color: #777; padding-top: 14px; border-top: 1px solid #444; }

/* ===== BACK BUTTON ===== */
.back-btn { font-size: 22px; color: #333; margin-right: 6px; display: none; background: none; border: none; }

/* ===== WIDGETS ===== */
.widget { margin-bottom: 20px; }
.widget-title { font-size: 16px; font-weight: 700; color: var(--primary-color); border-bottom: 2px solid var(--primary-color); padding-bottom: 6px; margin-bottom: 12px; }

/* ===== UTILITY ===== */
.text-red { color: var(--primary-color); }
.mt-10 { margin-top: 10px; }
.hidden { display: none !important; }

/* ===== RESPONSIVE NOTE =====
   Desktop/tablet widths are handled by the min-width rules above
   (768px+ uses 700px wrapper via the 600–1023px rule, 1024px+ uses
   1140px via the desktop rule). No override needed here — a duplicate
   rule here previously forced the wrapper back to 480px on all
   screens ≥768px, which is why the site looked mobile-width even on
   desktop. */
