/*
Theme Name: FQD Updates
Theme URI: https://fqdupdates.com/
Author: FQD Updates Team
Author URI: https://fqdupdates.com/
Description: ایک جدید، تیز اور موبائل فرینڈلی ورڈپریس تھیم اردو پاکستانی مقامی خبروں کی ویب سائٹ کے لیے۔ RTL سپورٹ، فیچرڈ نیوز، کیٹگریز اور سائیڈبار کے ساتھ۔ Farooqabad Updates کے لیے خاص طور پر ڈیزائن کیا گیا۔
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: fqd-updates
Tags: news, blog, rtl-language-support, custom-menu, featured-images, threaded-comments, translation-ready, two-columns, right-sidebar, custom-logo, custom-header
*/

/* ===== CSS Variables ===== */
:root {
  --primary: #0a5c36;          /* Pakistan Green */
  --primary-dark: #064025;
  --primary-light: #0e7a4a;
  --accent: #c41e3a;           /* Deep Red */
  --accent-hover: #a01830;
  --dark: #1a1a1a;
  --gray-900: #222;
  --gray-700: #444;
  --gray-500: #777;
  --gray-300: #ddd;
  --gray-100: #f5f5f5;
  --white: #ffffff;
  --shadow: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-lg: 0 4px 20px rgba(0,0,0,0.12);
  --radius: 6px;
  --transition: all 0.25s ease;
  --font-urdu: 'Noto Nastaliq Urdu', 'Jameel Noori Nastaleeq', 'Alvi Nastaleeq', 'Urdu Typesetting', 'Tahoma', serif;
  --font-sans: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-urdu);
  direction: rtl;
  text-align: right;
  background: var(--gray-100);
  color: var(--dark);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

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

a:hover {
  color: var(--accent);
}

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

ul, ol {
  list-style: none;
}

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.4;
  color: var(--dark);
  margin-bottom: 0.6em;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.15rem; }

p {
  margin-bottom: 1em;
}

/* ===== Layout ===== */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

.site-content {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 30px;
  padding: 30px 0 50px;
}

@media (max-width: 900px) {
  .site-content {
    grid-template-columns: 1fr;
  }
}

/* ===== Top Bar ===== */
.top-bar {
  background: var(--primary-dark);
  color: var(--white);
  font-size: 0.85rem;
  padding: 6px 0;
}

.top-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.top-bar a {
  color: var(--white);
  opacity: 0.9;
}

.top-bar a:hover {
  opacity: 1;
  color: #ffd700;
}

.top-links {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.top-social {
  display: flex;
  gap: 12px;
}

.top-social a {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
  font-size: 0.9rem;
}

/* ===== Header ===== */
.site-header {
  background: var(--white);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  gap: 20px;
}

.site-branding {
  display: flex;
  align-items: center;
  gap: 12px;
}

.site-logo img {
  max-height: 60px;
  width: auto;
}

.site-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
  margin: 0;
  line-height: 1.2;
}

.site-title a {
  color: inherit;
}

.site-description {
  font-size: 0.8rem;
  color: var(--gray-500);
  margin: 0;
}

/* Search */
.header-search {
  flex: 1;
  max-width: 380px;
}

.header-search form {
  display: flex;
  border: 2px solid var(--gray-300);
  border-radius: 50px;
  overflow: hidden;
  transition: var(--transition);
}

.header-search form:focus-within {
  border-color: var(--primary);
}

.header-search input[type="search"] {
  flex: 1;
  border: none;
  padding: 10px 18px;
  font-family: var(--font-urdu);
  font-size: 0.95rem;
  outline: none;
  background: transparent;
}

.header-search button {
  background: var(--primary);
  color: white;
  border: none;
  padding: 0 20px;
  cursor: pointer;
  font-size: 1rem;
  transition: var(--transition);
}

.header-search button:hover {
  background: var(--primary-dark);
}

/* Navigation */
.main-navigation {
  background: var(--primary);
}

.main-navigation .container {
  display: flex;
  align-items: center;
}

.primary-menu {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
}

.primary-menu > li {
  position: relative;
}

.primary-menu > li > a {
  display: block;
  color: var(--white);
  padding: 14px 18px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: var(--transition);
}

.primary-menu > li > a:hover,
.primary-menu > li.current-menu-item > a {
  background: var(--primary-dark);
  color: #ffd700;
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  padding: 12px 16px;
  cursor: pointer;
}

@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }
  .primary-menu {
    display: none;
    flex-direction: column;
    width: 100%;
    background: var(--primary-dark);
  }
  .primary-menu.active {
    display: flex;
  }
  .header-main {
    flex-wrap: wrap;
  }
  .header-search {
    order: 3;
    max-width: 100%;
    width: 100%;
  }
}

/* ===== Breaking News Ticker ===== */
.breaking-news {
  background: var(--accent);
  color: white;
  padding: 8px 0;
  overflow: hidden;
}

.breaking-news .container {
  display: flex;
  align-items: center;
  gap: 15px;
}

.breaking-label {
  background: var(--dark);
  padding: 4px 14px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 0.85rem;
  white-space: nowrap;
}

.breaking-content {
  flex: 1;
  overflow: hidden;
}

.breaking-content marquee,
.ticker-wrap {
  white-space: nowrap;
}

/* ===== Featured Posts ===== */
.featured-section {
  margin-bottom: 30px;
}

.featured-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 16px;
}

.featured-main {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 360px;
}

.featured-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 360px;
}

.featured-main .post-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.85));
  padding: 30px 20px 20px;
  color: white;
}

.featured-main .post-title {
  font-size: 1.5rem;
  color: white;
  margin-bottom: 8px;
}

.featured-main .post-title a {
  color: white;
}

.featured-main .post-title a:hover {
  color: #ffd700;
}

.featured-side {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.featured-side-item {
  display: flex;
  gap: 12px;
  background: white;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.featured-side-item:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.featured-side-item img {
  width: 120px;
  height: 90px;
  object-fit: cover;
  flex-shrink: 0;
}

.featured-side-item .post-content {
  padding: 10px 12px 10px 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.featured-side-item .post-title {
  font-size: 0.95rem;
  margin-bottom: 4px;
  line-height: 1.4;
}

.featured-side-item .post-meta {
  font-size: 0.75rem;
  color: var(--gray-500);
}

@media (max-width: 768px) {
  .featured-grid {
    grid-template-columns: 1fr;
  }
  .featured-main {
    min-height: 260px;
  }
  .featured-main img {
    min-height: 260px;
  }
}

/* ===== Section Titles ===== */
.section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 3px solid var(--primary);
}

.section-title h2 {
  margin: 0;
  font-size: 1.35rem;
  color: var(--primary);
}

.section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--gray-300);
}

/* ===== Post Cards ===== */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 22px;
}

.post-card {
  background: white;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.post-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}

.post-card .post-thumbnail {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16/10;
}

.post-card .post-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.post-card:hover .post-thumbnail img {
  transform: scale(1.05);
}

.post-card .category-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--accent);
  color: white;
  font-size: 0.75rem;
  padding: 3px 10px;
  border-radius: 3px;
  font-weight: 600;
}

.post-card .post-content {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.post-card .post-title {
  font-size: 1.1rem;
  margin-bottom: 8px;
  line-height: 1.45;
}

.post-card .post-title a {
  color: var(--dark);
}

.post-card .post-title a:hover {
  color: var(--primary);
}

.post-card .post-excerpt {
  font-size: 0.9rem;
  color: var(--gray-700);
  margin-bottom: 12px;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.8rem;
  color: var(--gray-500);
  margin-top: auto;
}

.post-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ===== Category Blocks ===== */
.category-block {
  margin-bottom: 40px;
}

.category-posts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 600px) {
  .category-posts {
    grid-template-columns: 1fr;
  }
}

/* ===== Sidebar ===== */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.widget {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.widget-title {
  background: var(--primary);
  color: white;
  padding: 12px 16px;
  font-size: 1.05rem;
  margin: 0;
  font-weight: 700;
}

.widget-content {
  padding: 16px;
}

/* Recent Posts Widget */
.recent-posts-list li {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--gray-300);
}

.recent-posts-list li:last-child {
  border-bottom: none;
}

.recent-posts-list img {
  width: 70px;
  height: 55px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
}

.recent-posts-list .post-title {
  font-size: 0.9rem;
  margin-bottom: 4px;
  line-height: 1.35;
}

.recent-posts-list .post-date {
  font-size: 0.75rem;
  color: var(--gray-500);
}

/* Categories Widget */
.widget_categories ul li,
.widget_archive ul li {
  padding: 8px 0;
  border-bottom: 1px solid var(--gray-300);
  display: flex;
  justify-content: space-between;
}

.widget_categories ul li:last-child,
.widget_archive ul li:last-child {
  border-bottom: none;
}

.widget_categories a:hover {
  color: var(--accent);
}

/* Ad Placeholder */
.ad-placeholder {
  background: var(--gray-100);
  border: 2px dashed var(--gray-300);
  text-align: center;
  padding: 30px 15px;
  color: var(--gray-500);
  font-size: 0.9rem;
  border-radius: var(--radius);
}

/* ===== Single Post ===== */
.single-post {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 30px;
}

.single-post .entry-header {
  margin-bottom: 25px;
  border-bottom: 1px solid var(--gray-300);
  padding-bottom: 20px;
}

.single-post .entry-title {
  font-size: 1.9rem;
  line-height: 1.35;
  margin-bottom: 12px;
}

.single-post .entry-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.9rem;
  color: var(--gray-500);
}

.single-post .post-thumbnail {
  margin-bottom: 25px;
  border-radius: var(--radius);
  overflow: hidden;
}

.single-post .entry-content {
  font-size: 1.1rem;
  line-height: 2;
}

.single-post .entry-content p {
  margin-bottom: 1.2em;
}

.single-post .entry-content h2,
.single-post .entry-content h3 {
  margin-top: 1.5em;
}

.single-post .entry-content img {
  border-radius: var(--radius);
  margin: 1.5em 0;
}

.single-post .entry-content blockquote {
  border-right: 4px solid var(--primary);
  padding: 15px 20px;
  background: var(--gray-100);
  margin: 1.5em 0;
  font-style: italic;
}

/* Tags & Share */
.post-tags {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid var(--gray-300);
}

.post-tags a {
  display: inline-block;
  background: var(--gray-100);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  margin: 0 6px 6px 0;
  color: var(--gray-700);
}

.post-tags a:hover {
  background: var(--primary);
  color: white;
}

/* Author Box */
.author-box {
  display: flex;
  gap: 20px;
  background: var(--gray-100);
  padding: 20px;
  border-radius: var(--radius);
  margin-top: 30px;
}

.author-box img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
}

/* Related Posts */
.related-posts {
  margin-top: 40px;
}

/* ===== Comments ===== */
.comments-area {
  margin-top: 40px;
  background: white;
  padding: 25px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.comment-list {
  margin-bottom: 30px;
}

.comment {
  padding: 15px 0;
  border-bottom: 1px solid var(--gray-300);
}

.comment-author {
  font-weight: 700;
  margin-bottom: 5px;
}

/* ===== Pagination ===== */
.pagination,
.nav-links {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 40px;
  flex-wrap: wrap;
}

.pagination a,
.pagination span,
.nav-links a,
.page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  background: white;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  color: var(--dark);
  font-weight: 600;
  transition: var(--transition);
}

.pagination a:hover,
.nav-links a:hover,
.page-numbers:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.pagination .current,
.page-numbers.current {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* ===== Footer ===== */
.site-footer {
  background: var(--dark);
  color: #ccc;
  padding: 50px 0 0;
  margin-top: 40px;
}

.footer-widgets {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 30px;
  padding-bottom: 40px;
}

.footer-widgets .widget-title {
  background: transparent;
  color: white;
  padding: 0 0 12px;
  border-bottom: 2px solid var(--primary);
  margin-bottom: 16px;
  font-size: 1.1rem;
}

.footer-widgets a {
  color: #bbb;
}

.footer-widgets a:hover {
  color: #ffd700;
}

.footer-widgets ul li {
  padding: 6px 0;
}

.footer-bottom {
  background: #111;
  padding: 18px 0;
  text-align: center;
  font-size: 0.9rem;
  border-top: 1px solid #333;
}

.footer-bottom a {
  color: #ffd700;
}

/* ===== Page ===== */
.page-content {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 30px;
}

/* ===== 404 ===== */
.error-404 {
  text-align: center;
  padding: 60px 20px;
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.error-404 h1 {
  font-size: 5rem;
  color: var(--primary);
  margin-bottom: 10px;
}

/* ===== Utilities ===== */
.btn {
  display: inline-block;
  background: var(--primary);
  color: white;
  padding: 10px 24px;
  border-radius: var(--radius);
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  font-family: var(--font-urdu);
}

.btn:hover {
  background: var(--primary-dark);
  color: white;
}

.btn-accent {
  background: var(--accent);
}

.btn-accent:hover {
  background: var(--accent-hover);
}

.text-center { text-align: center; }
.mt-20 { margin-top: 20px; }
.mb-20 { margin-bottom: 20px; }

/* ===== WordPress Core ===== */
.alignleft { float: left; margin-right: 1.5em; }
.alignright { float: right; margin-left: 1.5em; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: 0.85rem; color: var(--gray-500); text-align: center; }
.gallery { margin-bottom: 1.5em; }
.sticky { /* optional styling */ }

/* Screen reader */
.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  word-wrap: normal !important;
}
