/*
Theme Name: TaazaPress
Theme URI: https://example.com/taazapress
Author: OpenCode
Author URI: https://example.com
Description: TaazaPress - Hindi/English news portal theme with red accent, dual navigation, category grid sections, and web stories. Exact replica of TaazaTime design.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: GPL v2 or later
Text Domain: taazapress
Tags: news, blog, custom-logo, custom-menu, featured-images, two-columns, right-sidebar, threaded-comments, responsive-embeds
*/

:root {
  --red: #d32f2f;
  --red-dark: #b71c1c;
  --red-light: #ef5350;
  --bg: #f5f5f5;
  --surface: #ffffff;
  --ink: #222;
  --muted: #666;
  --line: #e0e0e0;
  --dark: #333;
  --darker: #1a1a1a;
  --max: 1200px;
  --radius: 8px;
  --shadow: 0 1px 4px rgba(0,0,0,0.08);
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --font: 'Noto Sans', 'Noto Sans Devanagari', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-head: 'Noto Sans', 'Noto Sans Devanagari', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--red); }

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

ul { list-style: none; }

.screen-reader-text {
  border: 0; clip: rect(1px,1px,1px,1px); height: 1px; overflow: hidden;
  position: absolute !important; width: 1px;
}

.skip-link:focus {
  clip: auto; background: var(--ink); color: #fff; height: auto;
  left: 1rem; padding: .75rem 1rem; top: 1rem; width: auto; z-index: 999;
}

.container { margin: 0 auto; max-width: var(--max); padding: 0 12px; }

/* ===== TOP BAR ===== */
.top-bar {
  background: var(--darker);
  color: rgba(255,255,255,0.85);
  font-size: 12px;
  line-height: 1;
}

.top-bar__inner {
  align-items: center;
  display: flex;
  height: 36px;
  justify-content: space-between;
}

.top-bar__left {
  align-items: center;
  display: flex;
  gap: 12px;
}

.top-bar__social {
  align-items: center;
  display: flex;
  gap: 6px;
}

.top-bar__social a {
  color: rgba(255,255,255,0.7);
  display: inline-flex;
  font-size: 14px;
  transition: color .2s;
}

.top-bar__social a:hover { color: var(--red-light); }

.top-bar__right {
  align-items: center;
  display: flex;
  gap: 10px;
}

.top-bar__right a, .top-bar__right span {
  color: rgba(255,255,255,0.7);
  font-size: 12px;
}

.top-bar__right a:hover { color: #fff; }

.lang-toggle {
  background: var(--red);
  border-radius: 3px;
  color: #fff !important;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
}

/* ===== HEADER ===== */
.site-header {
  background: var(--surface);
  border-bottom: 2px solid var(--red);
}

.header-inner {
  align-items: center;
  display: flex;
  height: 70px;
  justify-content: space-between;
}

.site-branding {
  align-items: center;
  display: flex;
  flex-shrink: 0;
}

.custom-logo-link img { max-height: 50px; width: auto; }

.site-title {
  font-family: var(--font-head);
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.site-title a { color: var(--darker); }
.site-title a:hover { color: var(--red); }

.header-right {
  align-items: center;
  display: flex;
  gap: 12px;
}

.header-search { width: 200px; }

.search-form {
  align-items: center;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 4px;
  display: flex;
  overflow: hidden;
}

.search-form input[type="search"] {
  background: transparent;
  border: 0;
  font-size: 13px;
  outline: 0;
  padding: 8px 10px;
  width: 100%;
}

.search-form button, .search-submit {
  background: var(--red);
  border: 0;
  color: #fff;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  padding: 8px 14px;
  transition: background .2s;
}

.search-form button:hover { background: var(--red-dark); }

/* ===== NAVIGATION ===== */
.nav-primary {
  background: var(--red);
}

.nav-primary__inner {
  align-items: center;
  display: flex;
  height: 44px;
  justify-content: space-between;
}

.primary-menu {
  align-items: center;
  display: flex;
  gap: 0;
  height: 100%;
}

.primary-menu > li { height: 100%; }

.primary-menu > li > a {
  align-items: center;
  color: #fff;
  display: flex;
  font-size: 13px;
  font-weight: 600;
  height: 100%;
  padding: 0 14px;
  position: relative;
  text-transform: uppercase;
  transition: background .2s;
}

.primary-menu > li > a:hover,
.primary-menu > .current-menu-item > a,
.primary-menu > .current_page_item > a {
  background: rgba(0,0,0,0.15);
}

.primary-menu .menu-item-has-children { position: relative; }

.primary-menu .sub-menu {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 0 0 4px 4px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
  left: 0;
  min-width: 200px;
  opacity: 0;
  padding: 8px 0;
  position: absolute;
  top: 100%;
  transform: translateY(8px);
  transition: opacity .2s, transform .2s;
  visibility: hidden;
  z-index: 200;
}

.primary-menu .menu-item-has-children:hover .sub-menu {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
}

.primary-menu .sub-menu a {
  color: var(--ink);
  display: block;
  font-size: 13px;
  padding: 8px 16px;
}

.primary-menu .sub-menu a:hover { background: var(--bg); color: var(--red); }

/* Secondary Navigation */
.nav-secondary {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.nav-secondary__inner {
  align-items: center;
  display: flex;
  height: 38px;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav-secondary__inner::-webkit-scrollbar { display: none; }

.secondary-menu {
  align-items: center;
  display: flex;
  gap: 0;
  white-space: nowrap;
}

.secondary-menu a {
  color: var(--muted);
  display: block;
  font-size: 12px;
  font-weight: 500;
  padding: 0 12px;
  position: relative;
}

.secondary-menu a + a::before {
  background: var(--line);
  content: "";
  height: 12px;
  left: 0;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
}

.secondary-menu a:hover { color: var(--red); }

.menu-toggle {
  background: transparent;
  border: 0;
  color: #fff;
  cursor: pointer;
  display: none;
  font-size: 13px;
  font-weight: 700;
  padding: 0 12px;
  height: 100%;
}

/* ===== BREAKING NEWS TICKER ===== */
.breaking-news {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.breaking-news__inner {
  align-items: center;
  display: flex;
  height: 36px;
}

.breaking-label {
  background: var(--red);
  color: #fff;
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 4px 12px;
  text-transform: uppercase;
}

.breaking-items {
  align-items: center;
  display: flex;
  gap: 24px;
  margin-left: 12px;
  overflow: hidden;
  white-space: nowrap;
}

.breaking-items a {
  animation: ticker 30s linear infinite;
  color: var(--ink);
  display: inline-block;
  font-size: 12px;
  font-weight: 500;
}

.breaking-items a:hover { color: var(--red); }

@keyframes ticker {
  0% { transform: translateX(100%); }
  100% { transform: translateX(-100%); }
}

/* ===== CONTENT AREA ===== */
.content-area { padding: 16px 0 30px; }

/* ===== FEATURED SECTION ===== */
.featured-section {
  display: grid;
  gap: 2px;
  grid-template-columns: 2fr 1fr;
  margin-bottom: 20px;
  background: var(--line);
  border: 1px solid var(--line);
}

.featured-main {
  background: var(--surface);
  overflow: hidden;
  position: relative;
}

.featured-main__image {
  aspect-ratio: 16 / 9;
  object-fit: cover;
  width: 100%;
}

.featured-main__body {
  bottom: 0;
  left: 0;
  padding: 16px;
  position: absolute;
  right: 0;
  z-index: 2;
}

.featured-main__body::before {
  background: linear-gradient(transparent, rgba(0,0,0,0.85));
  bottom: 0;
  content: "";
  left: -16px;
  position: absolute;
  right: -16px;
  top: -80px;
  z-index: -1;
}

.featured-main h2 {
  color: #fff;
  font-family: var(--font-head);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.25;
}

.featured-main h2 a { color: #fff; }
.featured-main h2 a:hover { color: var(--red-light); }

.featured-side {
  display: grid;
  gap: 2px;
}

.featured-side-item {
  background: var(--surface);
  display: grid;
  gap: 10px;
  grid-template-columns: 120px 1fr;
  overflow: hidden;
  padding: 10px;
}

.featured-side-item__image {
  aspect-ratio: 16 / 10;
  object-fit: cover;
  width: 100%;
}

.featured-side-item h3 {
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
}

/* ===== CATEGORY SECTION ===== */
.category-section {
  margin-bottom: 24px;
}

.cat-section-head {
  align-items: center;
  border-bottom: 2px solid var(--red);
  display: flex;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 4px;
}

.cat-section-head h2 {
  color: var(--red);
  font-family: var(--font-head);
  font-size: 18px;
  font-weight: 700;
  text-transform: uppercase;
}

.cat-section-head .view-all {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.cat-section-head .view-all:hover { color: var(--red); }

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

.cat-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow .2s;
}

.cat-card:hover { box-shadow: var(--shadow); }

.cat-card__image {
  aspect-ratio: 16 / 9;
  object-fit: cover;
  width: 100%;
}

.cat-card__body { padding: 10px 12px; }

.cat-card h3 {
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 6px;
}

.cat-card .post-meta {
  color: var(--muted);
  font-size: 12px;
}

/* ===== POST META ===== */
.post-meta {
  color: var(--muted);
  font-size: 12px;
}

.post-meta span { display: inline; }

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

/* ===== NEWS GRID (for archive etc) ===== */
.news-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, 1fr);
}

.news-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow .2s;
}

.news-card:hover { box-shadow: var(--shadow); }

.news-card__image {
  aspect-ratio: 16 / 9;
  object-fit: cover;
  width: 100%;
}

.news-card__body { padding: 10px 12px; }

.news-card h2, .news-card h3 {
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 6px;
}

/* ===== POST LIST ===== */
.post-list { display: grid; gap: 12px; }

.post-list .news-card {
  display: grid;
  gap: 0;
  grid-template-columns: 220px 1fr;
  border-radius: 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}

.post-list .news-card__image {
  aspect-ratio: auto;
  height: 140px;
  object-fit: cover;
}

/* ===== SINGLE ===== */
.article-shell {
  background: var(--surface);
  padding: 24px;
}

.article-header { margin-bottom: 20px; }

.cat-link {
  color: var(--red);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.article-title {
  font-family: var(--font-head);
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 700;
  line-height: 1.2;
  margin: 8px 0 10px;
}

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

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

.article-content p { margin: 1em 0; }
.article-content a { color: var(--red); text-decoration: underline; }
.article-content h2, .article-content h3 {
  font-family: var(--font-head);
  font-weight: 700;
  margin-top: 1.4em;
}
.article-content h2 { font-size: 22px; }
.article-content h3 { font-size: 18px; }
.article-content blockquote {
  border-left: 4px solid var(--red);
  color: var(--muted);
  font-style: italic;
  margin: 1.5em 0;
  padding: 4px 0 4px 16px;
}

.article-footer {
  border-top: 1px solid var(--line);
  margin-top: 20px;
  padding-top: 16px;
}

.tags-list {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tags-list a {
  background: var(--bg);
  border-radius: 3px;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
}

.tags-list a:hover { background: var(--red); color: #fff; }

/* ===== RELATION POSTS ===== */
.related-section { margin-top: 24px; }

.related-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 12px;
}

/* ===== WEB STORIES ===== */
.web-stories-section { margin-bottom: 24px; }

.web-stories-scroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 4px 0 8px;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
}

.web-story-card {
  border-radius: var(--radius);
  flex: 0 0 200px;
  overflow: hidden;
  position: relative;
  scroll-snap-align: start;
}

.web-story-card__image {
  aspect-ratio: 9 / 16;
  object-fit: cover;
  width: 100%;
}

.web-story-card__body {
  background: linear-gradient(transparent, rgba(0,0,0,0.85));
  bottom: 0;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  left: 0;
  line-height: 1.3;
  padding: 30px 10px 10px;
  position: absolute;
  right: 0;
}

.web-story-card:hover .web-story-card__body { color: var(--red-light); }

/* ===== SIDEBAR ===== */
.sidebar { display: grid; gap: 16px; align-content: start; }

.widget {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
}

.widget-title, .widget h2, .widget h3 {
  border-bottom: 2px solid var(--red);
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 12px;
  padding-bottom: 6px;
  text-transform: uppercase;
}

.widget ul { list-style: none; }

.widget li + li {
  border-top: 1px solid var(--line);
  margin-top: 8px;
  padding-top: 8px;
}

.widget a { font-size: 13px; font-weight: 500; line-height: 1.4; }

.widget select {
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 8px;
  width: 100%;
}

/* ===== AD SLOTS ===== */
.ad-slot {
  align-items: center;
  display: flex;
  justify-content: center;
  min-height: 90px;
  overflow: hidden;
  text-align: center;
}

.ad-slot--leaderboard { min-height: 90px; }
.ad-slot--inline { margin: 20px 0; min-height: 250px; }
.ad-slot--sidebar { min-height: 250px; }

.ad-slot .widget {
  background: transparent;
  border: 0;
  padding: 0;
  width: 100%;
}

/* ===== COMMENTS ===== */
.comments-area {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-top: 20px;
  padding: 20px;
}

.comment-list { list-style: none; }

.comment-body { border-bottom: 1px solid var(--line); padding: 12px 0; }

.comment-form input:not([type="submit"]), .comment-form textarea {
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 8px 12px;
  width: 100%;
}

/* ===== PAGINATION ===== */
.pagination, .post-navigation { margin-top: 20px; }

.nav-links {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.nav-links a, .page-numbers, .comment-reply-link, .form-submit .submit {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 3px;
  color: var(--ink);
  display: inline-flex;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 14px;
}

.nav-links a:hover, .page-numbers:hover, .page-numbers.current {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}

/* ===== ARCHIVE ===== */
.archive-header { margin-bottom: 20px; }

.archive-title {
  font-family: var(--font-head);
  font-size: 24px;
  font-weight: 700;
}

/* ===== FOOTER ===== */
.site-footer {
  background: var(--darker);
  color: rgba(255,255,255,0.8);
  margin-top: 30px;
  padding: 30px 0 0;
}

.footer-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
}

.footer-col p { color: rgba(255,255,255,0.6); font-size: 13px; line-height: 1.6; }

.footer-col .widget {
  background: transparent;
  border: 0;
  padding: 0;
}

.footer-col .widget-title, .footer-col .widget h2, .footer-col .widget h3 {
  border-color: rgba(255,255,255,0.15);
  color: #fff;
}

.footer-col a { color: rgba(255,255,255,0.65); font-size: 13px; }
.footer-col a:hover { color: var(--red-light); }

.footer-social {
  align-items: center;
  display: flex;
  gap: 8px;
  margin: 10px 0;
}

.footer-social a {
  align-items: center;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
  color: #fff;
  display: inline-flex;
  font-size: 16px;
  height: 36px;
  justify-content: center;
  transition: background .2s;
  width: 36px;
}

.footer-social a:hover { background: var(--red); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  font-size: 12px;
  margin-top: 24px;
  padding: 16px 0;
  text-align: center;
  color: rgba(255,255,255,0.5);
}

/* ===== PAGE CARD (404) ===== */
.page-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 40px;
  text-align: center;
}

.page-card h1 { font-size: 28px; font-weight: 700; margin-bottom: 12px; }

/* ===== PLACEHOLDER ===== */
.placeholder-thumb {
  align-items: center;
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  color: #fff;
  display: flex;
  font-size: 11px;
  font-weight: 700;
  justify-content: center;
  min-height: 100%;
  text-transform: uppercase;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .featured-section { grid-template-columns: 1fr; }
  .layout-grid { grid-template-columns: 1fr; }
  .news-grid { grid-template-columns: repeat(2, 1fr); }
  .related-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .header-search { width: 160px; }
}

@media (max-width: 768px) {
  .top-bar__inner { height: auto; flex-direction: column; padding: 6px 0; gap: 4px; }
  .top-bar__right { display: none; }

  .header-inner { height: auto; padding: 10px 0; flex-wrap: wrap; gap: 8px; }
  .header-right { width: 100%; }
  .header-search { width: 100%; }
  .search-form { width: 100%; }

  .menu-toggle { display: flex; }

  .primary-menu {
    background: var(--surface);
    display: none;
    flex-direction: column;
    left: 0;
    position: absolute;
    right: 0;
    top: 100%;
    z-index: 300;
  }

  .primary-menu.is-open { display: flex; }
  .primary-menu > li > a { color: var(--ink); padding: 12px 16px; }
  .primary-menu > li > a:hover { background: var(--bg); color: var(--red); }

  .primary-menu .sub-menu {
    border: 0;
    box-shadow: none;
    opacity: 1;
    padding-left: 16px;
    position: static;
    transform: none;
    visibility: visible;
  }

  .nav-primary__inner { position: relative; }

  .nav-secondary { display: none; }

  .featured-main__body { position: static; padding: 12px; }
  .featured-main__body::before { display: none; }
  .featured-main h2 { color: var(--ink); font-size: 18px; }
  .featured-main h2 a { color: var(--ink); }

  .featured-side-item { grid-template-columns: 80px 1fr; }
  .featured-side-item__image { aspect-ratio: 1; }

  .post-list .news-card { grid-template-columns: 1fr; }
  .post-list .news-card__image { height: 180px; aspect-ratio: 16/9; }

  .web-story-card { flex: 0 0 140px; }
}

@media (max-width: 520px) {
  .news-grid, .cat-grid { grid-template-columns: 1fr; }
  .related-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .article-shell { padding: 16px; }
  .comments-area { padding: 16px; }
  .featured-side-item { grid-template-columns: 80px 1fr; padding: 8px; }
  .cat-card h3 { font-size: 14px; }
}
