/*
Theme Name: 123Nellore News
Theme URI: https://123nellore.in
Author: 123Nellore
Author URI: https://123nellore.in
Description: A powerful, modern Telugu news portal theme for 123Nellore — covering Politics, Entertainment, Viral, Tollywood, and Nellore local news. Fully responsive with breaking news ticker, category color coding, and Google Fonts Telugu support.
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: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: nellore123
Tags: news, blog, two-columns, right-sidebar, custom-colors, custom-menu, featured-images, rtl-language-support, translation-ready, wide-blocks
*/

/* ===================================================
   CSS VARIABLES
=================================================== */
:root {
  --primary:    #C0392B;
  --primary-dk: #922B21;
  --secondary:  #1a1a2e;
  --accent:     #e67e22;
  --gold:       #f0a500;
  --light-bg:   #f5f5f5;
  --white:      #ffffff;
  --text:       #1c1c1c;
  --text-muted: #666666;
  --border:     #e0e0e0;
  --card-shadow:0 2px 12px rgba(0,0,0,.08);
  --radius:     6px;
  --transition: .2s ease;
  --font-main:  'Noto Sans Telugu', 'Noto Sans', sans-serif;
  --font-head:  'Playfair Display', Georgia, serif;
}

/* ===================================================
   RESET & BASE
=================================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-main);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--light-bg);
}

a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary-dk); }

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

ul, ol { list-style: none; }

h1,h2,h3,h4,h5,h6 {
  font-family: var(--font-head);
  line-height: 1.3;
  color: var(--secondary);
}

/* ===================================================
   UTILITY CLASSES
=================================================== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

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

.btn {
  display: inline-block;
  padding: 8px 20px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .5px;
  cursor: pointer;
  border: none;
  transition: background var(--transition), transform var(--transition);
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dk); color: #fff; transform: translateY(-1px); }

.category-label {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
  background: var(--primary);
  color: #fff;
}

/* ===================================================
   TOP BAR
=================================================== */
.top-bar {
  background: var(--secondary);
  color: #ccc;
  font-size: 12px;
  padding: 6px 0;
}
.top-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.top-bar .date-time { color: #aaa; }
.top-bar .social-links a {
  color: #aaa;
  margin-left: 12px;
  font-size: 13px;
}
.top-bar .social-links a:hover { color: var(--gold); }

/* ===================================================
   SITE HEADER
=================================================== */
.site-header {
  background: var(--white);
  box-shadow: 0 2px 10px rgba(0,0,0,.08);
  position: sticky;
  top: 0;
  z-index: 999;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}
.site-branding { display: flex; align-items: center; gap: 12px; }
.site-title {
  font-family: var(--font-head);
  font-size: 32px;
  font-weight: 900;
  color: var(--primary);
  line-height: 1;
}
.site-title span { color: var(--secondary); }
.site-tagline {
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 1px;
  text-transform: uppercase;
}
.header-search input[type="search"] {
  padding: 8px 14px;
  border: 2px solid var(--border);
  border-radius: 30px;
  font-size: 13px;
  width: 200px;
  outline: none;
  transition: border-color var(--transition);
}
.header-search input[type="search"]:focus { border-color: var(--primary); }
.header-search button {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 8px 14px;
  border-radius: 30px;
  cursor: pointer;
  margin-left: -40px;
  font-size: 13px;
}

/* ===================================================
   NAVIGATION
=================================================== */
.main-navigation {
  background: var(--secondary);
}
.main-navigation .container {
  display: flex;
  align-items: center;
}
.nav-menu {
  display: flex;
  align-items: center;
  gap: 0;
}
.nav-menu > li > a {
  display: block;
  padding: 13px 18px;
  color: #ddd;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .3px;
  text-transform: uppercase;
  transition: background var(--transition), color var(--transition);
}
.nav-menu > li > a:hover,
.nav-menu > li.current-menu-item > a {
  background: var(--primary);
  color: #fff;
}
/* Dropdown */
.nav-menu li { position: relative; }
.nav-menu .sub-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--secondary);
  min-width: 180px;
  box-shadow: 0 6px 20px rgba(0,0,0,.3);
  display: none;
  z-index: 1000;
}
.nav-menu li:hover .sub-menu { display: block; }
.nav-menu .sub-menu li a {
  display: block;
  padding: 10px 18px;
  color: #ccc;
  font-size: 12px;
  border-bottom: 1px solid rgba(255,255,255,.05);
}
.nav-menu .sub-menu li a:hover { background: var(--primary); color: #fff; }

/* Mobile toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  padding: 12px 0;
}

/* ===================================================
   BREAKING NEWS TICKER
=================================================== */
.breaking-news {
  background: var(--primary);
  padding: 8px 0;
  overflow: hidden;
}
.breaking-news .container {
  display: flex;
  align-items: center;
  gap: 14px;
}
.breaking-label {
  background: var(--white);
  color: var(--primary);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 3px;
  white-space: nowrap;
  flex-shrink: 0;
}
.ticker-wrap {
  overflow: hidden;
  flex: 1;
}
.ticker-items {
  display: flex;
  gap: 60px;
  animation: ticker-scroll 40s linear infinite;
  white-space: nowrap;
}
.ticker-items a {
  color: #fff;
  font-size: 13px;
  font-weight: 500;
}
.ticker-items a:hover { color: var(--gold); }
@keyframes ticker-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ===================================================
   LAYOUT
=================================================== */
.site-content {
  padding: 30px 0 40px;
}
.content-area {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 28px;
}
.no-sidebar .content-area { grid-template-columns: 1fr; }

/* ===================================================
   HERO / FEATURED SECTION
=================================================== */
.featured-section {
  margin-bottom: 30px;
}
.featured-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  grid-template-rows: 280px 200px;
  gap: 4px;
  border-radius: var(--radius);
  overflow: hidden;
}
.featured-item {
  position: relative;
  overflow: hidden;
}
.featured-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.featured-item:hover img { transform: scale(1.04); }
.featured-item.large { grid-row: span 2; }
.featured-caption {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,.85));
  padding: 20px 16px 14px;
}
.featured-caption .category-label { margin-bottom: 6px; }
.featured-caption h2, .featured-caption h3 {
  color: #fff;
  font-size: 16px;
  line-height: 1.4;
}
.featured-item.large .featured-caption h2 { font-size: 22px; }
.featured-caption .post-date {
  font-size: 11px;
  color: rgba(255,255,255,.7);
  margin-top: 4px;
}

/* ===================================================
   SECTION HEADERS
=================================================== */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  padding-bottom: 10px;
  border-bottom: 3px solid var(--secondary);
}
.section-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--secondary);
  text-transform: uppercase;
  letter-spacing: .5px;
  position: relative;
}
.section-title::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 18px;
  background: var(--primary);
  margin-right: 8px;
  vertical-align: middle;
  border-radius: 2px;
}
.section-header a { font-size: 12px; color: var(--primary); font-weight: 600; }

/* ===================================================
   POST CARDS
=================================================== */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 30px;
}
.posts-grid-2 { grid-template-columns: repeat(2, 1fr); }

.post-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--card-shadow);
  transition: transform var(--transition), box-shadow var(--transition);
}
.post-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
}
.post-card-thumb {
  overflow: hidden;
  aspect-ratio: 16/9;
}
.post-card-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.post-card:hover .post-card-thumb img { transform: scale(1.06); }
.post-card-body { padding: 14px 16px 18px; }
.post-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.post-card-meta .post-date {
  font-size: 11px;
  color: var(--text-muted);
}
.post-card h3 {
  font-size: 15px;
  line-height: 1.45;
  color: var(--secondary);
  margin-bottom: 8px;
}
.post-card h3 a { color: inherit; }
.post-card h3 a:hover { color: var(--primary); }
.post-card-excerpt {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.read-more {
  display: inline-block;
  margin-top: 10px;
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: .3px;
}
.read-more:hover { color: var(--primary-dk); }

/* List-style post */
.post-list-item {
  display: flex;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.post-list-item:last-child { border-bottom: none; }
.post-list-thumb {
  width: 90px;
  height: 68px;
  flex-shrink: 0;
  border-radius: var(--radius);
  overflow: hidden;
}
.post-list-thumb img { width: 100%; height: 100%; object-fit: cover; }
.post-list-content h4 {
  font-size: 14px;
  line-height: 1.4;
  margin-bottom: 4px;
}
.post-list-content h4 a { color: var(--secondary); }
.post-list-content h4 a:hover { color: var(--primary); }
.post-list-content .post-date { font-size: 11px; color: var(--text-muted); }

/* ===================================================
   CATEGORY COLOR CODING
=================================================== */
.cat-politics    .category-label, .cat-politics-border    { background: #c0392b; }
.cat-entertainment .category-label, .cat-entertainment-border { background: #8e44ad; }
.cat-lifestyle   .category-label, .cat-lifestyle-border   { background: #27ae60; }
.cat-viral       .category-label, .cat-viral-border       { background: #e67e22; }
.cat-tollywood   .category-label, .cat-tollywood-border   { background: #d35400; }
.cat-health      .category-label, .cat-health-border      { background: #16a085; }
.cat-education   .category-label, .cat-education-border   { background: #2980b9; }
.cat-nellore     .category-label, .cat-nellore-border     { background: #c0392b; }
.cat-crime       .category-label, .cat-crime-border       { background: #2c3e50; }

/* ===================================================
   SINGLE POST
=================================================== */
.single-post-wrap {
  background: var(--white);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--card-shadow);
}
.single-post-header { margin-bottom: 20px; }
.single-post-header .category-label { margin-bottom: 12px; }
.single-post-header h1 {
  font-size: 28px;
  line-height: 1.35;
  color: var(--secondary);
  margin-bottom: 14px;
}
.post-meta-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  color: var(--text-muted);
  flex-wrap: wrap;
  padding: 12px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}
.post-meta-bar .author-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  object-fit: cover;
}
.post-featured-img {
  margin-bottom: 24px;
  border-radius: var(--radius);
  overflow: hidden;
}
.post-featured-img img { width: 100%; max-height: 440px; object-fit: cover; }
.post-content {
  font-size: 16px;
  line-height: 1.85;
  color: var(--text);
}
.post-content p { margin-bottom: 18px; }
.post-content h2 { font-size: 22px; margin: 28px 0 14px; }
.post-content h3 { font-size: 18px; margin: 22px 0 10px; }
.post-content ul, .post-content ol {
  padding-left: 24px;
  margin-bottom: 18px;
}
.post-content ul li { list-style: disc; }
.post-content ol li { list-style: decimal; }
.post-content blockquote {
  border-left: 4px solid var(--primary);
  padding: 14px 20px;
  background: #fdf5f5;
  margin: 20px 0;
  font-style: italic;
  color: #555;
}
.post-tags { margin-top: 24px; }
.post-tags a {
  display: inline-block;
  padding: 4px 12px;
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 12px;
  margin: 3px;
  color: var(--text-muted);
}
.post-tags a:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

/* Share bar */
.share-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.share-bar span { font-size: 13px; font-weight: 700; color: var(--secondary); }
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 14px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
}
.share-btn.fb  { background: #1877f2; }
.share-btn.tw  { background: #1da1f2; }
.share-btn.wa  { background: #25d366; }

/* ===================================================
   SIDEBAR
=================================================== */
.sidebar { }
.widget {
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--card-shadow);
  margin-bottom: 24px;
}
.widget-title {
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--secondary);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--primary);
}
.widget ul li { padding: 7px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.widget ul li:last-child { border-bottom: none; }
.widget ul li a { color: var(--text); }
.widget ul li a:hover { color: var(--primary); }
.widget ul li span {
  float: right;
  background: var(--light-bg);
  border-radius: 20px;
  padding: 1px 8px;
  font-size: 11px;
  color: var(--text-muted);
}

/* Social widget */
.social-widget { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.social-widget-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
}
.social-widget-btn.yt   { background: #ff0000; }
.social-widget-btn.fb   { background: #1877f2; }
.social-widget-btn.tw   { background: #1da1f2; }
.social-widget-btn.koo  { background: #f5c518; color: #222; }

/* ===================================================
   ARCHIVE / CATEGORY PAGE
=================================================== */
.archive-header {
  background: var(--secondary);
  color: #fff;
  border-radius: var(--radius);
  padding: 24px 20px;
  margin-bottom: 24px;
}
.archive-header .archive-title {
  font-size: 24px;
  color: #fff;
  margin-bottom: 4px;
}
.archive-header .archive-desc {
  font-size: 14px;
  color: rgba(255,255,255,.7);
}
.archive-header .post-count {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  font-size: 11px;
  padding: 2px 10px;
  border-radius: 20px;
  margin-left: 10px;
}

/* ===================================================
   PAGINATION
=================================================== */
.pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 30px;
}
.pagination a, .pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
  background: var(--white);
  color: var(--text);
  box-shadow: var(--card-shadow);
}
.pagination .current { background: var(--primary); color: #fff; }
.pagination a:hover { background: var(--primary); color: #fff; }

/* ===================================================
   FOOTER
=================================================== */
.site-footer {
  background: var(--secondary);
  color: #aaa;
  margin-top: 30px;
}
.footer-widgets {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  padding: 40px 0 30px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.footer-widget-title {
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: #fff;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--primary);
}
.footer-widget ul li {
  padding: 5px 0;
  border-bottom: 1px solid rgba(255,255,255,.05);
  font-size: 13px;
}
.footer-widget ul li a { color: #aaa; }
.footer-widget ul li a:hover { color: var(--gold); padding-left: 4px; transition: padding .15s; }
.footer-about p { font-size: 13px; line-height: 1.7; margin-bottom: 14px; }
.footer-social { display: flex; gap: 10px; }
.footer-social a {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  display: flex; align-items: center; justify-content: center;
  color: #ccc; font-size: 14px;
}
.footer-social a:hover { background: var(--primary); color: #fff; }
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  font-size: 12px;
  color: #666;
}
.footer-bottom a { color: #888; }
.footer-bottom a:hover { color: var(--gold); }

/* ===================================================
   SEARCH RESULTS PAGE
=================================================== */
.search-hero {
  background: var(--secondary);
  padding: 30px 0;
  text-align: center;
  margin-bottom: 28px;
}
.search-hero h1 { color: #fff; font-size: 22px; margin-bottom: 14px; }
.search-hero form { display: flex; max-width: 500px; margin: 0 auto; }
.search-hero input[type="search"] {
  flex: 1;
  padding: 12px 18px;
  border: none;
  border-radius: 4px 0 0 4px;
  font-size: 15px;
  outline: none;
}
.search-hero button {
  padding: 12px 20px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 0 4px 4px 0;
  cursor: pointer;
  font-size: 15px;
}

/* ===================================================
   404 PAGE
=================================================== */
.error404-wrap {
  text-align: center;
  padding: 60px 20px;
}
.error404-wrap .error-code {
  font-size: 100px;
  font-weight: 900;
  color: var(--primary);
  line-height: 1;
}
.error404-wrap h2 { font-size: 24px; margin: 10px 0 16px; }
.error404-wrap p { color: var(--text-muted); margin-bottom: 24px; }

/* ===================================================
   RESPONSIVE
=================================================== */
@media (max-width: 1024px) {
  .posts-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-widgets { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .content-area { grid-template-columns: 1fr; }
  .featured-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }
  .featured-item.large { grid-row: auto; }
  .nav-menu { display: none; flex-direction: column; width: 100%; }
  .nav-menu.active { display: flex; }
  .nav-menu > li > a { padding: 12px 16px; border-bottom: 1px solid rgba(255,255,255,.05); }
  .nav-menu .sub-menu { position: static; box-shadow: none; }
  .menu-toggle { display: block; }
  .main-navigation .container { flex-wrap: wrap; }
  .posts-grid { grid-template-columns: 1fr; }
  .posts-grid-2 { grid-template-columns: 1fr; }
  .footer-widgets { grid-template-columns: 1fr; gap: 20px; }
  .header-search { display: none; }
  .top-bar .date-time { display: none; }
  .site-title { font-size: 24px; }
  .single-post-header h1 { font-size: 22px; }
  .single-post-wrap { padding: 18px; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
}

@media (max-width: 480px) {
  .featured-grid { gap: 2px; }
  .breaking-news .container { gap: 8px; }
}
