/*
Theme Name: The Apna Times
Theme URI: https://theapnatimes.com
Author: The Apna Times
Author URI: https://theapnatimes.com
Description: India ki Apni News - A fast, clean Hindi/English news WordPress theme with AdSense slots, breaking news ticker, hero layout, sidebar widgets, and full responsive design.
Version: 1.0.0
Requires at least: 6.0
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: theapnatimes
Tags: news, blog, hindi, responsive, custom-menu, featured-images, threaded-comments, translation-ready
*/

/* ===================================================
   THE APNA TIMES — WORDPRESS THEME STYLESHEET
   =================================================== */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --red: #C0392B;
  --dark-red: #922B21;
  --ink: #1a1a1a;
  --soft: #f5f0eb;
  --muted: #6b6560;
  --border: #d4cdc6;
  --white: #ffffff;
  --gold: #B7860B;
  --adbg: #f8f6f2;
}

body {
  font-family: 'Noto Sans', sans-serif;
  background: var(--soft);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.6;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }

/* ===== TOP BAR ===== */
.topbar {
  background: var(--ink);
  color: #ccc;
  font-size: 12px;
  padding: 6px 0;
  border-bottom: 2px solid var(--red);
}
.topbar-inner {
  max-width: 1200px;
  margin: auto;
  padding: 0 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.topbar a { color: #aaa; }
.topbar a:hover { color: #fff; }
.ticker {
  flex: 1;
  overflow: hidden;
  white-space: nowrap;
  position: relative;
}
.ticker-label {
  display: inline-block;
  background: var(--red);
  color: #fff;
  padding: 1px 8px;
  font-weight: 600;
  font-size: 11px;
  margin-right: 10px;
  letter-spacing: 0.5px;
}
.ticker-content {
  display: inline-block;
  animation: ticker 28s linear infinite;
}
@keyframes ticker {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.topbar-date { white-space: nowrap; font-size: 11px; }

/* ===== HEADER ===== */
header {
  background: var(--white);
  border-bottom: 3px solid var(--ink);
}
.header-main {
  max-width: 1200px;
  margin: auto;
  padding: 18px 16px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.logo-block { text-align: center; flex: 1; }
.logo-name {
  font-family: 'Playfair Display', serif;
  font-size: clamp(32px, 6vw, 58px);
  font-weight: 900;
  letter-spacing: -1px;
  color: var(--ink);
  line-height: 1;
}
.logo-name span { color: var(--red); }
.logo-tagline {
  font-family: 'Noto Sans Devanagari', sans-serif;
  font-size: 13px;
  color: var(--muted);
  margin-top: 3px;
  letter-spacing: 2px;
  text-transform: uppercase;
}
.logo-rule {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  justify-content: center;
}
.logo-rule span { height: 1px; background: var(--border); flex: 1; max-width: 80px; }
.logo-rule i { font-size: 10px; color: var(--gold); }

.header-ad {
  background: var(--adbg);
  border: 1px dashed var(--border);
  border-radius: 4px;
  width: 300px;
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  font-size: 11px;
  color: var(--muted);
  flex-shrink: 0;
}
.header-ad span { font-size: 9px; opacity: 0.6; }

/* ===== NAV ===== */
nav.main-nav {
  background: var(--ink);
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-inner {
  max-width: 1200px;
  margin: auto;
  padding: 0 16px;
  display: flex;
  align-items: center;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav-inner::-webkit-scrollbar { display: none; }
.nav-inner a,
#primary-menu li a {
  color: #ddd;
  font-size: 13px;
  font-weight: 500;
  padding: 12px 14px;
  display: block;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
  transition: all 0.2s;
  letter-spacing: 0.3px;
}
#primary-menu { display: flex; list-style: none; }
#primary-menu li a:hover,
#primary-menu li.current-menu-item > a { color: #fff; border-bottom-color: var(--red); }
.nav-search {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
}
.nav-search input {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 3px;
  color: #fff;
  font-size: 12px;
  padding: 5px 10px;
  width: 160px;
  outline: none;
}
.nav-search input::placeholder { color: #888; }
.nav-search input:focus { border-color: var(--red); background: rgba(255,255,255,0.12); }
.nav-search button {
  background: var(--red);
  color: #fff;
  border: none;
  border-radius: 3px;
  padding: 5px 10px;
  font-size: 12px;
  cursor: pointer;
}

/* ===== LAYOUT ===== */
.page-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 16px;
}

/* ===== AD BANNERS ===== */
.ad-banner {
  background: var(--adbg);
  border: 1px dashed var(--border);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  font-size: 11px;
  color: var(--muted);
  text-align: center;
  padding: 8px;
}
.ad-banner span { font-size: 9px; opacity: 0.5; margin-top: 2px; }
.ad-leaderboard { width: 100%; height: 90px; margin-bottom: 20px; }
.ad-rectangle { width: 100%; height: 250px; margin-bottom: 20px; }
.ad-sidebar { width: 100%; height: 250px; }
.ad-inline { width: 100%; height: 90px; margin: 20px 0; }

/* ===== HERO SECTION ===== */
.hero { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; margin-bottom: 20px; background: var(--border); border: 1px solid var(--border); }
.hero-main { background: var(--white); padding: 0; position: relative; overflow: hidden; }
.hero-main-img { width: 100%; height: 380px; object-fit: cover; }
.hero-main-body { padding: 20px; }
.hero-right { display: grid; grid-template-rows: 1fr 1fr; gap: 2px; }
.hero-sub { background: var(--white); padding: 14px; display: flex; gap: 12px; align-items: flex-start; }
.hero-sub-img { width: 110px; height: 80px; object-fit: cover; flex-shrink: 0; border-radius: 2px; }
.cat-label {
  display: inline-block;
  background: var(--red);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  margin-bottom: 6px;
  border-radius: 2px;
}
.cat-label.gold { background: var(--gold); }
.cat-label.blue { background: #1a5276; }
.cat-label.green { background: #1e8449; }
.cat-label.purple { background: #6c3483; }

.hero-title {
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--ink);
  margin-bottom: 8px;
}
.hero-title:hover { color: var(--red); }
.hero-sub-title {
  font-family: 'Playfair Display', serif;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 4px;
}
.hero-sub-title:hover { color: var(--red); }
.meta { font-size: 12px; color: var(--muted); }
.meta b { color: var(--ink); font-weight: 600; }

/* ===== SECTION HEADERS ===== */
.section-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--ink);
}
.section-head h2 {
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  font-weight: 700;
}
.section-head a { font-size: 12px; color: var(--red); margin-left: auto; white-space: nowrap; }
.section-head a:hover { text-decoration: underline; }

/* ===== NEWS GRID ===== */
.main-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; margin-bottom: 24px; }
.card { background: var(--white); border: 1px solid var(--border); border-radius: 2px; overflow: hidden; transition: box-shadow 0.2s; }
.card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.08); }
.card-img { width: 100%; height: 180px; object-fit: cover; }
.card-body { padding: 14px; }
.card-title {
  font-family: 'Playfair Display', serif;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 6px;
  cursor: pointer;
}
.card-title:hover { color: var(--red); }
.card-desc { font-size: 13px; color: var(--muted); line-height: 1.5; margin-bottom: 8px; }

/* ===== 2-COL LAYOUT ===== */
.two-col { display: grid; grid-template-columns: 1fr 320px; gap: 28px; margin-bottom: 24px; }

/* ===== SIDEBAR ===== */
.widget-area {}
.widget-block { background: var(--white); border: 1px solid var(--border); margin-bottom: 20px; }
.widget-head { background: var(--ink); color: #fff; padding: 10px 14px; font-family: 'Playfair Display', serif; font-size: 15px; font-weight: 700; }
.widget-body { padding: 14px; }
.trending-item { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--border); }
.trending-item:last-child { border-bottom: none; padding-bottom: 0; }
.trend-num { font-size: 22px; font-weight: 700; color: var(--border); line-height: 1; min-width: 24px; }
.trend-title { font-size: 13px; font-weight: 600; line-height: 1.4; cursor: pointer; }
.trend-title:hover { color: var(--red); }
.trend-meta { font-size: 11px; color: var(--muted); margin-top: 2px; }

/* List card style */
.list-card { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--border); }
.list-card:last-child { border-bottom: none; }
.list-card-img { width: 90px; height: 64px; object-fit: cover; flex-shrink: 0; border-radius: 2px; }
.list-card-title { font-family: 'Playfair Display', serif; font-size: 14px; font-weight: 700; line-height: 1.3; margin-bottom: 4px; cursor: pointer; }
.list-card-title:hover { color: var(--red); }

/* ===== OPINION SECTION ===== */
.opinion-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; margin-bottom: 24px; }
.opinion-card { background: var(--white); border: 1px solid var(--border); padding: 16px; text-align: center; }
.opinion-avatar { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; margin: 0 auto 10px; border: 3px solid var(--soft); }
.opinion-name { font-weight: 600; font-size: 13px; }
.opinion-role { font-size: 11px; color: var(--muted); margin-bottom: 8px; }
.opinion-title { font-family: 'Playfair Display', serif; font-size: 14px; font-weight: 700; line-height: 1.3; cursor: pointer; }
.opinion-title:hover { color: var(--red); }

/* ===== VIDEO SECTION ===== */
.video-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; margin-bottom: 24px; }
.video-card { background: var(--ink); border-radius: 2px; overflow: hidden; position: relative; cursor: pointer; }
.video-thumb { width: 100%; height: 160px; object-fit: cover; opacity: 0.8; display: block; }
.video-play {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  width: 44px; height: 44px; background: rgba(192,57,43,0.9); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.video-play::after { content: ''; border-left: 16px solid #fff; border-top: 10px solid transparent; border-bottom: 10px solid transparent; margin-left: 4px; }
.video-title { padding: 10px 12px; color: #fff; font-size: 13px; font-weight: 600; line-height: 1.35; }

/* ===== SINGLE POST ===== */
.single-post-wrap { max-width: 800px; margin: 0 auto; background: var(--white); padding: 28px; border: 1px solid var(--border); }
.post-featured-img { width: 100%; max-height: 420px; object-fit: cover; margin-bottom: 20px; }
.post-headline { font-family: 'Playfair Display', serif; font-size: 30px; font-weight: 900; line-height: 1.2; margin-bottom: 12px; }
.post-meta-bar { font-size: 12px; color: var(--muted); margin-bottom: 20px; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.post-meta-bar b { color: var(--ink); }
.post-content { font-size: 16px; line-height: 1.8; color: #2a2a2a; }
.post-content p { margin-bottom: 16px; }
.post-content h2 { font-family: 'Playfair Display', serif; font-size: 22px; font-weight: 700; margin: 24px 0 12px; }
.post-content h3 { font-family: 'Playfair Display', serif; font-size: 18px; font-weight: 700; margin: 20px 0 10px; }
.post-content blockquote { border-left: 4px solid var(--red); padding: 12px 20px; background: var(--soft); margin: 20px 0; font-style: italic; }
.post-tags { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--border); }
.post-tags a { display: inline-block; background: var(--soft); border: 1px solid var(--border); padding: 4px 10px; font-size: 12px; border-radius: 2px; margin: 4px 4px 4px 0; }
.post-tags a:hover { background: var(--red); color: #fff; border-color: var(--red); }

/* ===== FOOTER ===== */
footer { background: var(--ink); color: #aaa; margin-top: 32px; }
.footer-top { max-width: 1200px; margin: auto; padding: 32px 16px; display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; }
.footer-brand-name { font-family: 'Playfair Display', serif; font-size: 28px; font-weight: 900; color: #fff; }
.footer-brand-name span { color: var(--red); }
.footer-desc { font-size: 13px; line-height: 1.6; margin: 10px 0; }
.footer-social { display: flex; gap: 8px; margin-top: 12px; }
.footer-social a { display: inline-flex; width: 32px; height: 32px; background: rgba(255,255,255,0.08); border-radius: 50%; align-items: center; justify-content: center; font-size: 12px; color: #fff; transition: background 0.2s; }
.footer-social a:hover { background: var(--red); }
.footer-col h4 { color: #fff; font-size: 14px; font-weight: 600; margin-bottom: 14px; padding-bottom: 8px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.footer-col a { display: block; font-size: 13px; color: #999; margin-bottom: 8px; }
.footer-col a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.08); max-width: 1200px; margin: auto; padding: 14px 16px; display: flex; justify-content: space-between; font-size: 12px; }
.footer-bottom-links { display: flex; gap: 16px; }
.footer-bottom-links a { color: #888; }
.footer-bottom-links a:hover { color: #fff; }

/* ===== SCROLL TOP ===== */
.scroll-top { position: fixed; bottom: 24px; right: 24px; background: var(--red); color: #fff; width: 40px; height: 40px; border-radius: 50%; border: none; font-size: 18px; cursor: pointer; display: none; align-items: center; justify-content: center; box-shadow: 0 2px 10px rgba(0,0,0,0.2); z-index: 999; }
.scroll-top.show { display: flex; }

/* ===== PAGINATION ===== */
.pagination { display: flex; gap: 8px; justify-content: center; padding: 24px 0; }
.pagination a, .pagination span { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border: 1px solid var(--border); font-size: 13px; font-weight: 600; border-radius: 2px; }
.pagination .current { background: var(--red); color: #fff; border-color: var(--red); }
.pagination a:hover { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ===== COMMENTS ===== */
.comments-area { margin-top: 32px; }
.comments-title { font-family: 'Playfair Display', serif; font-size: 20px; font-weight: 700; margin-bottom: 20px; padding-bottom: 10px; border-bottom: 2px solid var(--ink); }
.comment-list { list-style: none; }
.comment-body { background: var(--white); border: 1px solid var(--border); padding: 16px; margin-bottom: 12px; }
.comment-author { font-weight: 600; font-size: 14px; }
.comment-meta { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.comment-content p { font-size: 14px; line-height: 1.6; }
.comment-form label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.comment-form input, .comment-form textarea {
  width: 100%; padding: 8px 12px; border: 1px solid var(--border); border-radius: 2px;
  font-family: inherit; font-size: 14px; margin-bottom: 14px; background: var(--white);
  outline: none;
}
.comment-form input:focus, .comment-form textarea:focus { border-color: var(--red); }
.comment-form textarea { height: 120px; resize: vertical; }
.comment-form .submit-btn {
  background: var(--red); color: #fff; border: none; padding: 10px 24px;
  font-size: 14px; font-weight: 600; border-radius: 2px; cursor: pointer; letter-spacing: 0.5px;
}
.comment-form .submit-btn:hover { background: var(--dark-red); }

/* ===== MOBILE ===== */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .hero-right { grid-template-rows: auto auto; }
  .main-grid { grid-template-columns: 1fr 1fr; }
  .two-col { grid-template-columns: 1fr; }
  .opinion-grid { grid-template-columns: 1fr 1fr; }
  .video-grid { grid-template-columns: 1fr 1fr; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .header-ad { display: none; }
  .single-post-wrap { padding: 16px; }
}
@media (max-width: 600px) {
  .main-grid { grid-template-columns: 1fr; }
  .opinion-grid { grid-template-columns: 1fr 1fr; }
  .video-grid { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; }
  .logo-name { font-size: 36px; }
  .post-headline { font-size: 22px; }
}
