/*
Theme Name: Bhartiya Hindi Times (भारतीय हिन्दी टाइम्स)
Theme URI: https://bhartiyahinditimes.com
Author: Bhartiya Hindi Times Tech & Editorial Team
Author URI: https://bhartiyahinditimes.com
Description: Official, high-performance, mobile-responsive Hindi news portal WordPress theme with integrated Reels/Shorts video player, category follow engine, Google AdSense/banner monetization, SEO schema markup, breaking news ticker, social auto-sharing, and dark mode support.
Version: 1.3.2
Tested up to: 6.7
Requires at least: 5.8
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: bhartiya-hindi-times
Tags: news, magazine, hindi, devanagari, reels, video, grid-layout, monetization, custom-colors, custom-menu, featured-images, translation-ready, dark-mode
*/

:root {
  --bht-primary: #dc2626;
  --bht-primary-dark: #991b1b;
  --bht-primary-darker: #450a0a;
  --bht-accent: #2563eb;
  --bht-bg: #f8fafc;
  --bht-card-bg: #ffffff;
  --bht-text: #0f172a;
  --bht-text-muted: #64748b;
  --bht-border: #e2e8f0;
  --bht-header-bg: #b91c1c;
  --bht-subbar-bg: #020617;
}

.dark, [data-theme="dark"] {
  --bht-bg: #030712;
  --bht-card-bg: #0f172a;
  --bht-text: #f8fafc;
  --bht-text-muted: #94a3b8;
  --bht-border: #1e293b;
  --bht-header-bg: #991b1b;
  --bht-subbar-bg: #000000;
}

/* Base Resets & Overflow Protection */
*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: hidden !important;
  font-family: 'Mukta', 'Noto Sans Devanagari', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bht-bg);
  color: var(--bht-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

#bht-page {
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: hidden !important;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.15s ease, opacity 0.15s ease;
}

a:hover {
  color: var(--bht-primary);
}

/* Strict Image & Media Containment */
img, 
figure, 
picture, 
video, 
iframe, 
embed, 
object, 
table {
  max-width: 100% !important;
  height: auto;
  box-sizing: border-box;
  display: block;
}

/* Article Content & WordPress Gutenberg Block Support */
.bht-article-content,
.bht-page-content,
.entry-content {
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: hidden;
  word-break: break-word;
  overflow-wrap: break-word;
}

.bht-article-content img,
.bht-page-content img,
.entry-content img,
.wp-block-image img,
.wp-block-cover img,
figure.wp-block-image img,
.wp-block-media-text img {
  max-width: 100% !important;
  width: 100% !important;
  height: auto !important;
  object-fit: cover !important;
  display: block !important;
  margin: 16px auto !important;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.wp-block-image,
figure.wp-block-image,
.wp-block-gallery,
.gallery,
figure {
  max-width: 100% !important;
  width: 100% !important;
  margin: 16px 0 !important;
  overflow: hidden;
}

.alignwide,
.alignfull {
  max-width: 100% !important;
  width: 100% !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

.aligncenter {
  display: block !important;
  margin-left: auto !important;
  margin-right: auto !important;
  text-align: center;
}

.alignleft {
  float: none !important;
  margin: 12px auto !important;
  display: block !important;
}

@media (min-width: 768px) {
  .alignleft {
    float: left !important;
    margin: 0 16px 16px 0 !important;
    max-width: 50% !important;
  }
  .alignright {
    float: right !important;
    margin: 0 0 16px 16px !important;
    max-width: 50% !important;
  }
}

.alignright {
  float: none !important;
  margin: 12px auto !important;
  display: block !important;
}

/* Comment Form & Inputs */
#respond, .comment-respond, #commentform {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

#commentform input[type="text"],
#commentform input[type="email"],
#commentform input[type="url"],
#commentform textarea {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  padding: 10px 14px;
  margin-bottom: 12px;
  background-color: #ffffff;
  color: #0f172a;
  font-size: 14px;
}

.dark #commentform input[type="text"],
.dark #commentform input[type="email"],
.dark #commentform input[type="url"],
.dark #commentform textarea {
  background-color: #1e293b;
  border-color: #334155;
  color: #f8fafc;
}

#commentform input[type="submit"],
.form-submit input {
  background-color: #dc2626;
  color: #ffffff;
  font-weight: 700;
  padding: 10px 24px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: background-color 0.2s;
}

#commentform input[type="submit"]:hover {
  background-color: #b91c1c;
}

/* Layout Utilities */
.bht-container {
  width: 100%;
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 12px;
  padding-right: 12px;
}

.scrollbar-none::-webkit-scrollbar {
  display: none;
}
.scrollbar-none {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* 1. TOP HEADER (RED BAR) */
.bht-navbar {
  background-color: var(--bht-header-bg);
  color: #ffffff;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.bht-navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  gap: 12px;
}

.bht-logo-badge {
  background-color: #450a0a;
  color: #ffffff;
  font-weight: 800;
  font-size: 18px;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid rgba(239, 68, 68, 0.4);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: Georgia, serif;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.bht-logo-badge .bht-times {
  color: #fbbf24;
  font-style: italic;
  font-family: sans-serif;
  font-size: 14px;
  font-weight: 900;
}

.bht-home-btn {
  background-color: #7f1d1d;
  color: #ffffff;
  font-weight: 700;
  font-size: 13px;
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid rgba(239, 68, 68, 0.4);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: background-color 0.2s;
}

.bht-home-btn:hover {
  background-color: #450a0a;
  color: #ffffff;
}

/* 2. SLIM BLACK CATEGORY STRIP */
.bht-category-strip {
  background-color: var(--bht-subbar-bg);
  color: #ffffff;
  border-bottom: 1px solid #1e293b;
  padding: 6px 12px;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.5);
}

.bht-category-strip-inner {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 600;
}

.bht-category-pill {
  padding: 4px 10px;
  border-radius: 6px;
  color: #cbd5e1;
  transition: all 0.15s;
  flex-shrink: 0;
}

.bht-category-pill:hover {
  background-color: #1e293b;
  color: #ffffff;
}

.bht-category-pill.active {
  background-color: #dc2626;
  color: #ffffff;
  font-weight: 700;
}

.bht-reels-pill {
  color: #f472b6;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.bht-reels-pill:hover {
  background-color: #1e293b;
  color: #fbcfe8;
}

/* 3. TRENDING HASHTAGS STRIP */
.bht-trending-bar {
  background-color: #f1f5f9;
  border-bottom: 1px solid #e2e8f0;
  padding: 6px 12px;
}
.dark .bht-trending-bar {
  background-color: #0f172a;
  border-bottom: 1px solid #1e293b;
}

.bht-trending-inner {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  white-space: nowrap;
  font-size: 12px;
}

.bht-trending-badge {
  background-color: #dc2626;
  color: #ffffff;
  font-weight: 900;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  flex-shrink: 0;
}

.bht-hashtag-pill {
  background-color: #ffffff;
  color: #334155;
  border: 1px solid #e2e8f0;
  padding: 3px 10px;
  border-radius: 9999px;
  transition: all 0.15s;
  flex-shrink: 0;
}
.dark .bht-hashtag-pill {
  background-color: #1e293b;
  color: #e2e8f0;
  border-color: #334155;
}
.bht-hashtag-pill:hover {
  border-color: #dc2626;
  color: #dc2626;
}

/* News Grid & Cards */
.bht-news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.bht-news-card {
  background: var(--bht-card-bg);
  border: 1px solid var(--bht-border);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.bht-news-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}

.bht-card-thumb {
  width: 100%;
  height: 190px;
  object-fit: cover;
  background-color: #020617;
  transition: transform 0.4s ease;
}
.bht-news-card:hover .bht-card-thumb {
  transform: scale(1.04);
}

.bht-card-body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.bht-card-title {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
  margin: 6px 0 8px 0;
}

.bht-card-excerpt {
  font-size: 13px;
  color: var(--bht-text-muted);
  line-height: 1.5;
  margin-bottom: 12px;
}

/* Reels Hub */
.bht-reels-strip {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 12px 0;
  scrollbar-width: none;
}

.bht-reel-card {
  flex: 0 0 190px;
  height: 330px;
  border-radius: 16px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 20px -4px rgba(0, 0, 0, 0.3);
  background-color: #020617;
}

/* Ad Slot */
.bht-ad-slot {
  margin: 20px 0;
  text-align: center;
  background: #f1f5f9;
  border: 1px dashed #cbd5e1;
  padding: 12px;
  border-radius: 10px;
}

.dark .bht-ad-slot, [data-theme="dark"] .bht-ad-slot {
  background: #1e293b;
  border-color: #334155;
}

/* Reactions Button Smooth Interactions */
.bht-emoji-react-btn {
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  white-space: nowrap;
}

.bht-emoji-react-btn:active {
  transform: scale(0.95);
}

/* Global Strict Viewport Lock */
html, body {
  position: relative;
  overflow-x: hidden !important;
  max-width: 100vw !important;
}

h1, h2, h3, h4, h5, h6, p, a, span, div {
  overflow-wrap: break-word !important;
  word-break: break-word !important;
}
