/*
Theme Name: ApnaJhelum
Theme URI: https://apnajhelum.com
Author: ApnaJhelum
Author URI: https://apnajhelum.com
Description: The definitive district portal theme for Jhelum, Pakistan. Heritage, business directory, local news, classifieds, tourism & diaspora community.
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: apnajhelum
Tags: custom-logo, custom-menu, featured-images, threaded-comments, translation-ready
*/

/* ============================================
   CSS VARIABLES — APNAJHELUM BRAND SYSTEM
   ============================================ */
:root {
  /* Brand Colors */
  --aj-gold: #D4A84B;
  --aj-gold-light: #F0D78C;
  --aj-gold-dim: #A88535;
  --aj-gold-bg: rgba(212,168,75,0.06);
  --aj-green-deep: #0B2118;
  --aj-green: #1A3A2A;
  --aj-green-mid: #2D6B4F;
  --aj-green-light: #3D8B6A;
  --aj-river: #3A7CA5;
  --aj-river-light: #5BA8D4;
  --aj-terra: #C4654A;
  --aj-cream: #F5EFE0;
  --aj-cream-light: #FBF7F0;
  --aj-sand: #E8DCC8;

  /* Neutrals */
  --aj-white: #FAFAF9;
  --aj-off-white: #F5F5F4;
  --aj-gray-100: #E7E5E4;
  --aj-gray-200: #D6D3D1;
  --aj-gray-300: #A8A29E;
  --aj-gray-400: #78716C;
  --aj-gray-500: #57534E;
  --aj-gray-600: #44403C;
  --aj-gray-700: #292524;
  --aj-charcoal: #1C1917;
  --aj-black: #0C0A09;

  /* Typography */
  --aj-font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --aj-font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --aj-font-urdu: 'Noto Nastaliq Urdu', serif;

  /* Spacing */
  --aj-section-pad: clamp(3rem, 6vw, 6rem);
  --aj-content-max: 1200px;
  --aj-content-narrow: 800px;

  /* Transitions */
  --aj-ease: cubic-bezier(0.4, 0, 0.2, 1);
  --aj-duration: 0.3s;

  /* Shadows */
  --aj-shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --aj-shadow-md: 0 4px 20px rgba(0,0,0,0.06);
  --aj-shadow-lg: 0 12px 40px rgba(0,0,0,0.08);
  --aj-shadow-gold: 0 4px 20px rgba(212,168,75,0.15);

  /* Border Radius */
  --aj-radius-sm: 8px;
  --aj-radius-md: 14px;
  --aj-radius-lg: 20px;
  --aj-radius-full: 100px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--aj-font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--aj-gray-700);
  background: var(--aj-white);
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--aj-green-mid); text-decoration: none; transition: color var(--aj-duration) var(--aj-ease); }
a:hover { color: var(--aj-gold); }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--aj-font-display);
  font-weight: 700;
  line-height: 1.25;
  color: var(--aj-charcoal);
}

h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.6rem); }

p { margin: 0 0 1rem; }

.container {
  max-width: var(--aj-content-max);
  margin: 0 auto;
  padding: 0 2rem;
}

.container-narrow {
  max-width: var(--aj-content-narrow);
  margin: 0 auto;
  padding: 0 2rem;
}

/* ============================================
   SECTION COMPONENTS
   ============================================ */
.aj-section {
  padding: var(--aj-section-pad) 0;
}

.aj-section-label {
  display: inline-block;
  font-family: var(--aj-font-body);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--aj-gold);
  border: 1px solid rgba(212,168,75,0.3);
  padding: 5px 16px;
  border-radius: var(--aj-radius-full);
  margin-bottom: 1.25rem;
}

.aj-section-title {
  font-family: var(--aj-font-display);
  font-weight: 800;
  margin-bottom: 0.75rem;
  color: var(--aj-charcoal);
}

.aj-section-desc {
  font-size: 1rem;
  color: var(--aj-gray-400);
  line-height: 1.8;
  max-width: 600px;
  margin-bottom: 2.5rem;
}

/* ============================================
   HEADER & NAVIGATION
   ============================================ */
.aj-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(11, 33, 24, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255,255,255,0.04);
  transition: all var(--aj-duration) var(--aj-ease);
}

.aj-header-inner {
  max-width: var(--aj-content-max);
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

.aj-logo {
  display: flex;
  align-items: baseline;
  gap: 0;
  text-decoration: none;
}

.aj-logo-text {
  font-family: var(--aj-font-display);
  font-size: 1.6rem;
  font-weight: 900;
  line-height: 1;
}

.aj-logo-apna { color: var(--aj-gold); }
.aj-logo-jhelum { color: var(--aj-white); }

.aj-logo-urdu {
  font-family: var(--aj-font-urdu);
  font-size: 0.55rem;
  color: rgba(212,168,75,0.35);
  display: block;
  text-align: right;
  direction: rtl;
  unicode-bidi: bidi-override;
  margin-top: 1px;
  line-height: 1.6;
}

/* Navigation */
.aj-nav { display: flex; align-items: center; gap: 0; }

.aj-nav-list {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  gap: 0.25rem;
}

.aj-nav-list li a {
  display: block;
  padding: 8px 14px;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.3px;
  color: rgba(255,255,255,0.45);
  border-radius: var(--aj-radius-sm);
  transition: all var(--aj-duration) var(--aj-ease);
  white-space: nowrap;
}

.aj-nav-list li a:hover,
.aj-nav-list li.current-menu-item a {
  color: var(--aj-white);
  background: rgba(255,255,255,0.06);
}

.aj-nav-list li.current-menu-item a {
  color: var(--aj-gold);
}

/* Dropdown Submenus — Bulletproof */
.aj-nav-list > li {
  position: relative;
}

.aj-nav-list > li > .sub-menu,
.aj-nav-list .sub-menu {
  visibility: hidden !important;
  opacity: 0 !important;
  position: absolute !important;
  top: 100%;
  left: 0;
  background: #0D2818;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 0.5rem 0;
  min-width: 220px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.35);
  z-index: 1000;
  list-style: none !important;
  margin: 0 !important;
  display: block !important;
  flex-direction: column !important;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  pointer-events: none;
}

.aj-nav-list > li:hover > .sub-menu,
.aj-nav-list > li.menu-item-has-children:hover > .sub-menu {
  visibility: visible !important;
  opacity: 1 !important;
  transform: translateY(0);
  pointer-events: auto;
}

.aj-nav-list .sub-menu li {
  display: block !important;
  width: 100%;
}

.aj-nav-list .sub-menu li a {
  display: block !important;
  padding: 9px 18px !important;
  font-size: 0.76rem !important;
  font-weight: 500;
  color: rgba(255,255,255,0.5) !important;
  white-space: nowrap;
  border-radius: 0 !important;
  transition: all 0.15s ease;
}

.aj-nav-list .sub-menu li a:hover {
  color: #fff !important;
  background: rgba(212,168,75,0.1) !important;
  padding-left: 22px !important;
}

/* Dropdown arrow indicator for parent items */
.aj-nav-list > li.menu-item-has-children > a::after {
  content: ' ▾';
  font-size: 0.6rem;
  opacity: 0.4;
  margin-left: 3px;
}

/* Mobile Menu Toggle */
.aj-menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--aj-white);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 8px;
}

/* Search in header */
.aj-header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 1rem;
}

.aj-header-search-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.35);
  cursor: pointer;
  transition: all var(--aj-duration) var(--aj-ease);
}

.aj-header-search-btn:hover {
  background: rgba(212,168,75,0.1);
  border-color: rgba(212,168,75,0.2);
  color: var(--aj-gold);
}

@media (max-width: 960px) {
  .aj-menu-toggle { display: block; }
  .aj-nav-list {
    display: none;
    position: absolute;
    top: 70px;
    left: 0; right: 0;
    background: var(--aj-green-deep);
    flex-direction: column;
    padding: 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
  }
  .aj-nav-list.active { display: flex; }
  .aj-nav-list li a { padding: 12px 16px; }
  .aj-header-search { display: none; }

  /* Mobile: Override absolute dropdown to inline stacked */
  .aj-nav-list > li > .sub-menu,
  .aj-nav-list .sub-menu {
    position: static !important;
    visibility: hidden !important;
    opacity: 0 !important;
    display: none !important;
    background: rgba(0,0,0,0.15) !important;
    border: none !important;
    border-radius: 8px !important;
    box-shadow: none !important;
    min-width: 0 !important;
    transform: none !important;
    margin: 0 0 0 1rem !important;
    padding: 0.25rem 0 !important;
    max-height: 0;
    overflow: hidden;
  }
  .aj-nav-list > li.mobile-open > .sub-menu {
    visibility: visible !important;
    opacity: 1 !important;
    display: block !important;
    max-height: 500px;
    pointer-events: auto;
  }
  .aj-nav-list .sub-menu li a {
    padding: 10px 16px !important;
    font-size: 0.75rem !important;
  }
}

/* ============================================
   HERO SLIDER — AUTO IMAGE ROTATOR
   ============================================ */
.aj-hero {
  position: relative;
  height: clamp(450px, 70vh, 650px);
  overflow: hidden;
  background: var(--aj-green-deep);
}

.aj-hero-slides {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
}

.aj-hero-slide {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  opacity: 0;
  transition: opacity 1.5s ease;
  background-size: cover;
  background-position: center;
}

.aj-hero-slide.active { opacity: 1; }

.aj-hero-slide::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(
    180deg,
    rgba(11,33,24,0.5) 0%,
    rgba(11,33,24,0.3) 40%,
    rgba(11,33,24,0.7) 100%
  );
}

.aj-hero-content {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  z-index: 2;
  padding: 3rem 2rem;
  max-width: var(--aj-content-max);
  margin: 0 auto;
}

.aj-hero-title {
  font-family: var(--aj-font-display);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 900;
  color: var(--aj-white);
  line-height: 1.15;
  margin-bottom: 0.5rem;
  text-shadow: 0 2px 20px rgba(0,0,0,0.3);
}

.aj-hero-title span { color: var(--aj-gold); }

.aj-hero-subtitle {
  font-size: 1.05rem;
  color: rgba(255,255,255,0.6);
  max-width: 500px;
  margin-bottom: 1.5rem;
}

.aj-hero-search {
  display: flex;
  max-width: 520px;
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--aj-radius-full);
  overflow: hidden;
}

.aj-hero-search input {
  flex: 1;
  background: transparent;
  border: none;
  padding: 14px 22px;
  color: var(--aj-white);
  font-family: var(--aj-font-body);
  font-size: 0.9rem;
  outline: none;
}

.aj-hero-search input::placeholder { color: rgba(255,255,255,0.35); }

.aj-hero-search button {
  background: var(--aj-gold);
  border: none;
  padding: 14px 28px;
  color: var(--aj-green-deep);
  font-family: var(--aj-font-body);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  transition: background var(--aj-duration) var(--aj-ease);
}

.aj-hero-search button:hover { background: var(--aj-gold-light); }

/* Slide Indicators */
.aj-hero-indicators {
  position: absolute;
  bottom: 2rem;
  right: 2rem;
  z-index: 3;
  display: flex;
  gap: 6px;
}

.aj-hero-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  cursor: pointer;
  transition: all var(--aj-duration) var(--aj-ease);
}

.aj-hero-dot.active {
  background: var(--aj-gold);
  width: 24px;
  border-radius: 4px;
}

/* Slide Caption */
.aj-hero-caption {
  position: absolute;
  bottom: 2rem;
  right: 6rem;
  z-index: 3;
  font-size: 0.7rem;
  color: rgba(255,255,255,0.3);
  letter-spacing: 1px;
}

/* ============================================
   QUICK CATEGORIES BAR
   ============================================ */
.aj-categories-bar {
  background: var(--aj-white);
  border-bottom: 1px solid var(--aj-gray-100);
  padding: 1.25rem 0;
  position: relative;
  z-index: 5;
  margin-top: -1px;
}

.aj-categories-grid {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  max-width: var(--aj-content-max);
  margin: 0 auto;
  padding: 0 2rem;
}

.aj-cat-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--aj-radius-full);
  background: var(--aj-cream-light);
  border: 1px solid transparent;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--aj-gray-600);
  cursor: pointer;
  transition: all var(--aj-duration) var(--aj-ease);
  text-decoration: none;
}

.aj-cat-pill:hover {
  background: var(--aj-gold-bg);
  border-color: rgba(212,168,75,0.2);
  color: var(--aj-gold-dim);
  transform: translateY(-1px);
}

.aj-cat-pill .icon { font-size: 1.1rem; }

/* ============================================
   NEWS SECTION
   ============================================ */
.aj-news-section {
  padding: var(--aj-section-pad) 0;
  background: var(--aj-white);
}

.aj-news-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.aj-news-header .aj-view-all {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--aj-gold);
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.aj-news-header .aj-view-all:hover { gap: 10px; }

.aj-news-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

@media (max-width: 768px) {
  .aj-news-grid { grid-template-columns: 1fr; }
}

/* Featured news (first item) */
.aj-news-card {
  background: var(--aj-white);
  border-radius: var(--aj-radius-md);
  overflow: hidden;
  border: 1px solid var(--aj-gray-100);
  transition: all var(--aj-duration) var(--aj-ease);
}

.aj-news-card:hover {
  border-color: rgba(212,168,75,0.2);
  box-shadow: var(--aj-shadow-md);
  transform: translateY(-2px);
}

.aj-news-card.featured {
  grid-column: 1;
  grid-row: 1 / span 3;
}

.aj-news-card .thumb {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: var(--aj-cream);
}

.aj-news-card.featured .thumb { height: 100%; min-height: 300px; }

.aj-news-card .content { padding: 1.25rem; }

.aj-news-card .category-tag {
  display: inline-block;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--aj-gold-dim);
  background: var(--aj-gold-bg);
  padding: 3px 10px;
  border-radius: var(--aj-radius-full);
  margin-bottom: 0.75rem;
}

.aj-news-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  line-height: 1.35;
}

.aj-news-card h3 a { color: var(--aj-charcoal); }
.aj-news-card h3 a:hover { color: var(--aj-gold); }

.aj-news-card.featured h3 { font-size: 1.35rem; }

.aj-news-card .meta {
  font-size: 0.72rem;
  color: var(--aj-gray-300);
  display: flex;
  gap: 1rem;
}

.aj-news-card .excerpt {
  font-size: 0.88rem;
  color: var(--aj-gray-400);
  line-height: 1.65;
  margin-top: 0.5rem;
}

/* Side news list */
.aj-news-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.aj-news-list-item {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  background: var(--aj-cream-light);
  border-radius: var(--aj-radius-sm);
  transition: all var(--aj-duration) var(--aj-ease);
  text-decoration: none;
}

.aj-news-list-item:hover {
  background: var(--aj-gold-bg);
  transform: translateX(4px);
}

.aj-news-list-item .num {
  font-family: var(--aj-font-display);
  font-size: 1.5rem;
  font-weight: 800;
  color: rgba(212,168,75,0.2);
  line-height: 1;
  min-width: 30px;
}

.aj-news-list-item h4 {
  font-family: var(--aj-font-body);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--aj-charcoal);
  line-height: 1.4;
  margin-bottom: 0.25rem;
}

.aj-news-list-item .list-meta {
  font-size: 0.68rem;
  color: var(--aj-gray-300);
}

/* ============================================
   PORTAL SECTIONS GRID
   ============================================ */
/* Emergency Quick-Dial Strip */
.aj-emergency-strip {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.85rem 1.25rem;
  background: linear-gradient(135deg, #8B0000, #C4654A);
  border-radius: 12px;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  overflow-x: auto;
}

.aj-emer-label {
  font-size: 0.72rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-right: 0.5rem;
  white-space: nowrap;
}

.aj-emer-btn {
  padding: 0.4rem 0.85rem;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.15s;
}

.aj-emer-btn.rescue { background: rgba(255,255,255,0.2); color: #fff; }
.aj-emer-btn.police { background: rgba(255,255,255,0.15); color: #fff; }
.aj-emer-btn.edhi { background: rgba(255,255,255,0.12); color: #fff; }
.aj-emer-btn.fire { background: rgba(255,255,255,0.1); color: #fff; }
.aj-emer-btn.wapda { background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.8); }
.aj-emer-btn.gas { background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.7); }
.aj-emer-btn.all { background: #fff; color: #8B0000; font-weight: 800; margin-left: auto; }
.aj-emer-btn:hover { transform: translateY(-1px); opacity: 0.9; }

@media (max-width: 600px) {
  .aj-emergency-strip { padding: 0.65rem 0.85rem; }
  .aj-emer-btn { padding: 0.35rem 0.65rem; font-size: 0.68rem; }
  .aj-emer-btn.all { margin-left: 0; margin-top: 0.25rem; }
}

.aj-portals-section {
  padding: var(--aj-section-pad) 0;
  background: var(--aj-cream-light);
}

.aj-portals-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

@media (max-width: 960px) { .aj-portals-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .aj-portals-grid { grid-template-columns: 1fr; } }

.aj-portal-card {
  background: var(--aj-white);
  border-radius: var(--aj-radius-lg);
  padding: 2rem;
  border: 1px solid var(--aj-gray-100);
  transition: all var(--aj-duration) var(--aj-ease);
  text-decoration: none;
  display: block;
  position: relative;
  overflow: hidden;
}

.aj-portal-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--aj-gold), var(--aj-green-mid));
  transform: scaleX(0);
  transition: transform 0.4s var(--aj-ease);
  transform-origin: left;
}

.aj-portal-card:hover::before { transform: scaleX(1); }

.aj-portal-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--aj-shadow-lg);
  border-color: transparent;
}

.aj-portal-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--aj-radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
}

.aj-portal-icon.gold { background: var(--aj-gold-bg); }
.aj-portal-icon.green { background: rgba(45,107,79,0.08); }
.aj-portal-icon.blue { background: rgba(58,124,165,0.08); }
.aj-portal-icon.terra { background: rgba(196,101,74,0.08); }
.aj-portal-icon.cream { background: var(--aj-cream); }

.aj-portal-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--aj-charcoal);
}

.aj-portal-card p {
  font-size: 0.85rem;
  color: var(--aj-gray-400);
  line-height: 1.65;
  margin: 0;
}

.aj-portal-card .card-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--aj-gold);
  letter-spacing: 0.5px;
}

/* ============================================
   HERITAGE / TOURISM SHOWCASE
   ============================================ */
.aj-heritage-section {
  padding: var(--aj-section-pad) 0;
  background: var(--aj-green-deep);
  color: var(--aj-white);
}

.aj-heritage-section .aj-section-label { color: var(--aj-gold-light); border-color: rgba(212,168,75,0.2); }
.aj-heritage-section .aj-section-title { color: var(--aj-white); }
.aj-heritage-section .aj-section-desc { color: rgba(255,255,255,0.4); }

.aj-heritage-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}

.aj-heritage-card {
  border-radius: var(--aj-radius-lg);
  overflow: hidden;
  position: relative;
  height: 320px;
  cursor: pointer;
  transition: transform var(--aj-duration) var(--aj-ease);
}

.aj-heritage-card:hover { transform: scale(1.02); }

.aj-heritage-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.aj-heritage-card .overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 1.5rem;
  background: linear-gradient(transparent, rgba(0,0,0,0.7));
}

.aj-heritage-card .overlay h3 {
  font-size: 1.1rem;
  color: var(--aj-white);
  margin-bottom: 0.25rem;
}

.aj-heritage-card .overlay p {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.5);
  margin: 0;
}

.aj-heritage-card .tag {
  position: absolute;
  top: 1rem;
  left: 1rem;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  background: rgba(212,168,75,0.9);
  color: var(--aj-green-deep);
  padding: 4px 12px;
  border-radius: var(--aj-radius-full);
}

/* ============================================
   COMMUNITY FORUM PREVIEW
   ============================================ */
.aj-forum-section {
  padding: var(--aj-section-pad) 0;
  background: var(--aj-white);
}

.aj-forum-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 2rem;
}

@media (max-width: 860px) {
  .aj-forum-grid { grid-template-columns: 1fr; }
}

.aj-forum-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.aj-forum-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--aj-gray-100);
  transition: all var(--aj-duration) var(--aj-ease);
}

.aj-forum-item:hover { padding-left: 0.5rem; }

.aj-forum-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--aj-green), var(--aj-green-mid));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--aj-gold);
  font-family: var(--aj-font-display);
  font-size: 0.75rem;
  font-weight: 900;
  flex-shrink: 0;
}

.aj-forum-item h4 {
  font-family: var(--aj-font-body);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--aj-charcoal);
  margin-bottom: 0.25rem;
  line-height: 1.35;
}

.aj-forum-item h4 a { color: var(--aj-charcoal); }
.aj-forum-item h4 a:hover { color: var(--aj-gold); }

.aj-forum-excerpt {
  font-size: 0.8rem;
  color: var(--aj-gray-400);
  line-height: 1.55;
  margin-bottom: 0.35rem;
}

.aj-forum-meta {
  font-size: 0.68rem;
  color: var(--aj-gray-300);
  display: flex;
  gap: 1rem;
}

/* Forum Sidebar */
.aj-forum-sidebar {}

.aj-forum-cta {
  background: linear-gradient(145deg, var(--aj-green-deep), var(--aj-green));
  border-radius: var(--aj-radius-lg);
  padding: 2rem;
  text-align: center;
  margin-bottom: 1.5rem;
}

.aj-forum-cta h3 {
  font-size: 1.2rem;
  color: var(--aj-white);
  margin-bottom: 0.5rem;
}

.aj-forum-cta p {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.4);
  margin-bottom: 1.25rem;
}

.aj-btn-gold {
  display: inline-block;
  background: var(--aj-gold);
  color: var(--aj-green-deep);
  font-family: var(--aj-font-body);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.5px;
  padding: 12px 28px;
  border-radius: var(--aj-radius-full);
  border: none;
  cursor: pointer;
  transition: all var(--aj-duration) var(--aj-ease);
  text-decoration: none;
}

.aj-btn-gold:hover {
  background: var(--aj-gold-light);
  transform: translateY(-1px);
  box-shadow: var(--aj-shadow-gold);
  color: var(--aj-green-deep);
}

.aj-btn-outline {
  display: inline-block;
  background: transparent;
  color: var(--aj-gold);
  font-family: var(--aj-font-body);
  font-weight: 600;
  font-size: 0.8rem;
  padding: 10px 24px;
  border-radius: var(--aj-radius-full);
  border: 1px solid rgba(212,168,75,0.3);
  cursor: pointer;
  transition: all var(--aj-duration) var(--aj-ease);
  text-decoration: none;
}

.aj-btn-outline:hover {
  background: var(--aj-gold-bg);
  border-color: var(--aj-gold);
  color: var(--aj-gold);
}

/* Forum Stats Widget */
.aj-forum-stats {
  background: var(--aj-cream-light);
  border-radius: var(--aj-radius-md);
  padding: 1.5rem;
  border: 1px solid var(--aj-gray-100);
}

.aj-forum-stats h4 {
  font-family: var(--aj-font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--aj-gray-400);
  margin-bottom: 1rem;
}

.aj-stat-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--aj-gray-100);
}

.aj-stat-row:last-child { border: none; }

.aj-stat-row span:first-child {
  font-size: 0.85rem;
  color: var(--aj-gray-500);
}

.aj-stat-row span:last-child {
  font-family: var(--aj-font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--aj-charcoal);
}

/* ============================================
   FOOTER
   ============================================ */
.aj-footer {
  background: var(--aj-charcoal);
  color: rgba(255,255,255,0.4);
  padding: 4rem 0 0;
}

.aj-footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2.5rem;
  max-width: var(--aj-content-max);
  margin: 0 auto;
  padding: 0 2rem 3rem;
}

@media (max-width: 768px) {
  .aj-footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
}
@media (max-width: 480px) {
  .aj-footer-grid { grid-template-columns: 1fr; }
}

.aj-footer-brand .logo {
  font-family: var(--aj-font-display);
  font-size: 1.6rem;
  font-weight: 900;
  margin-bottom: 0.25rem;
}

.aj-footer-brand .logo .apna { color: var(--aj-gold); }
.aj-footer-brand .logo .jhelum { color: var(--aj-white); }

.aj-footer-brand .urdu {
  font-family: var(--aj-font-urdu);
  font-size: 0.75rem;
  color: rgba(212,168,75,0.3);
  direction: rtl;
  unicode-bidi: bidi-override;
  margin-bottom: 1rem;
}

.aj-footer-brand p {
  font-size: 0.85rem;
  line-height: 1.7;
  color: rgba(255,255,255,0.3);
}

.aj-footer h4 {
  font-family: var(--aj-font-body);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  margin-bottom: 1.25rem;
}

.aj-footer ul {
  list-style: none;
  padding: 0; margin: 0;
}

.aj-footer ul li { margin-bottom: 0.6rem; }

.aj-footer ul li a {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.35);
  transition: all var(--aj-duration) var(--aj-ease);
}

.aj-footer ul li a:hover {
  color: var(--aj-gold);
  padding-left: 4px;
}

/* Footer Bottom */
.aj-footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 1.5rem 2rem;
  max-width: var(--aj-content-max);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.aj-footer-bottom p {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.2);
  margin: 0;
}

.aj-footer-tagline {
  font-family: var(--aj-font-display);
  font-style: italic;
  font-size: 0.85rem;
  color: rgba(212,168,75,0.25);
}

.aj-footer-social {
  display: flex;
  gap: 0.75rem;
}

.aj-footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.25);
  transition: all var(--aj-duration) var(--aj-ease);
  font-size: 0.8rem;
}

.aj-footer-social a:hover {
  background: rgba(212,168,75,0.08);
  border-color: rgba(212,168,75,0.2);
  color: var(--aj-gold);
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.text-gold { color: var(--aj-gold); }
.text-green { color: var(--aj-green-mid); }
.bg-cream { background: var(--aj-cream-light); }
.bg-green { background: var(--aj-green-deep); color: var(--aj-white); }

/* WordPress Core Styles */

/* ============================================
   IMAGE ALIGNMENT & TEXT WRAPPING
   Works with both Classic Editor and Block Editor
   ============================================ */

/* Float left — text wraps on the right */
.alignleft,
.wp-block-image.alignleft,
.wp-block-image .alignleft,
figure.alignleft {
  float: left;
  margin: 0.5rem 1.5rem 1rem 0;
  max-width: 50%;
}

/* Float right — text wraps on the left */
.alignright,
.wp-block-image.alignright,
.wp-block-image .alignright,
figure.alignright {
  float: right;
  margin: 0.5rem 0 1rem 1.5rem;
  max-width: 50%;
}

/* Centered */
.aligncenter,
.wp-block-image.aligncenter,
figure.aligncenter {
  display: block;
  margin: 1.5rem auto;
  text-align: center;
  clear: both;
}

/* Full width */
.alignwide,
.wp-block-image.alignwide {
  margin-left: -2rem;
  margin-right: -2rem;
  max-width: calc(100% + 4rem);
  width: calc(100% + 4rem);
}

.alignfull,
.wp-block-image.alignfull {
  margin-left: calc(-50vw + 50%);
  margin-right: calc(-50vw + 50%);
  max-width: 100vw;
  width: 100vw;
}

/* All images in content */
.entry-content img,
.aj-fm-op-content img,
.single-business .aj-biz-single-main img,
.page img:not(.aj-nch-thumb img) {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  transition: box-shadow 0.2s;
}

.entry-content img:hover {
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

/* Image with caption (Classic Editor) */
.wp-caption {
  max-width: 100%;
  background: var(--aj-cream-light, #FAFAF5);
  border-radius: 12px;
  padding: 6px;
  border: 1px solid var(--aj-gray-100, #eee);
}

.wp-caption img {
  border-radius: 8px;
  display: block;
  width: 100%;
}

.wp-caption-text,
.wp-caption .wp-caption-text {
  font-size: 0.75rem;
  color: var(--aj-gray-400, #999);
  text-align: center;
  padding: 8px 8px 4px;
  line-height: 1.5;
  margin: 0;
  font-style: italic;
}

/* Image with caption (Block Editor) */
figure.wp-block-image {
  margin: 1.25rem 0;
}

figure.wp-block-image img {
  border-radius: 10px;
  display: block;
}

figure.wp-block-image figcaption,
.wp-block-image figcaption {
  font-size: 0.75rem;
  color: var(--aj-gray-400, #999);
  text-align: center;
  margin-top: 8px;
  font-style: italic;
  line-height: 1.5;
}

/* Gallery */
.wp-block-gallery,
.gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 1.5rem 0;
}

.wp-block-gallery .wp-block-image,
.gallery-item {
  flex: 1 1 calc(33.333% - 6px);
  min-width: 150px;
  border-radius: 10px;
  overflow: hidden;
}

.wp-block-gallery .wp-block-image img,
.gallery-item img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 0;
}

/* Clear floats after content with images */
.entry-content::after,
.aj-fm-op-content::after {
  content: '';
  display: table;
  clear: both;
}

/* Mobile: Stack floated images */
@media (max-width: 600px) {
  .alignleft,
  .alignright,
  .wp-block-image.alignleft,
  .wp-block-image.alignright,
  figure.alignleft,
  figure.alignright {
    float: none;
    margin: 1rem 0;
    max-width: 100%;
    display: block;
  }

  .alignwide {
    margin-left: -1rem;
    margin-right: -1rem;
    max-width: calc(100% + 2rem);
    width: calc(100% + 2rem);
  }
}

/* ============================================
   POST & PAGE CONTENT TYPOGRAPHY
   ============================================ */
.entry-content,
.aj-fm-op-content,
.single-business .aj-biz-single-main > div {
  font-size: 0.92rem;
  color: var(--aj-gray-500, #555);
  line-height: 1.85;
}

.entry-content p {
  margin: 0 0 1.25rem;
}

.entry-content h2 {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--aj-charcoal, #1A1A1A);
  margin: 2rem 0 0.75rem;
  line-height: 1.3;
}

.entry-content h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--aj-charcoal, #1A1A1A);
  margin: 1.75rem 0 0.65rem;
  line-height: 1.35;
}

.entry-content h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--aj-charcoal, #1A1A1A);
  margin: 1.5rem 0 0.5rem;
}

.entry-content ul,
.entry-content ol {
  margin: 0 0 1.25rem 1.5rem;
  padding: 0;
}

.entry-content li {
  margin-bottom: 0.4rem;
  line-height: 1.7;
}

.entry-content blockquote {
  border-left: 4px solid var(--aj-gold, #D4A84B);
  margin: 1.5rem 0;
  padding: 1rem 1.5rem;
  background: var(--aj-cream-light, #FAFAF5);
  border-radius: 0 10px 10px 0;
  font-style: italic;
  color: var(--aj-gray-500, #555);
}

.entry-content blockquote p:last-child {
  margin-bottom: 0;
}

.entry-content a {
  color: var(--aj-gold-dim, #B8903A);
  text-decoration: underline;
  text-decoration-color: rgba(212, 168, 75, 0.3);
  text-underline-offset: 2px;
  transition: all 0.15s;
}

.entry-content a:hover {
  color: var(--aj-gold, #D4A84B);
  text-decoration-color: var(--aj-gold, #D4A84B);
}

.entry-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.85rem;
}

.entry-content th {
  background: var(--aj-green-deep, #1A3A2A);
  color: #fff;
  padding: 10px 14px;
  text-align: left;
  font-weight: 600;
  font-size: 0.78rem;
}

.entry-content td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--aj-gray-100, #eee);
}

.entry-content tr:hover td {
  background: var(--aj-cream-light, #FAFAF5);
}

.entry-content hr {
  border: none;
  border-top: 1px solid var(--aj-gray-100, #eee);
  margin: 2rem 0;
}

.entry-content code {
  background: var(--aj-cream-light, #FAFAF5);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.85em;
  color: var(--aj-charcoal, #1A1A1A);
  border: 1px solid var(--aj-gray-100, #eee);
}

.entry-content pre {
  background: var(--aj-charcoal, #1A1A1A);
  color: #e0e0e0;
  padding: 1.25rem;
  border-radius: 10px;
  overflow-x: auto;
  font-size: 0.82rem;
  line-height: 1.6;
  margin: 1.5rem 0;
}

.entry-content pre code {
  background: none;
  border: none;
  padding: 0;
  color: inherit;
}

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

/* WordPress comment styles */
.comment-list { list-style: none; padding: 0; }
.comment-body { padding: 1.5rem 0; border-bottom: 1px solid var(--aj-gray-100); }
</style>
