/*
 * ================================================================
 *  PashtoSphere — Magazine CSS
 *  Pashtoon Touch + Modern + HamariWeb Style
 * ================================================================
 */

/* ── Google Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700;800;900&family=Source+Sans+3:wght@300;400;500;600;700&family=Noto+Nastaliq+Urdu:wght@400;500;600;700&family=Noto+Sans+Arabic:wght@400;500;600&display=swap');

/* ── CSS Variables ── */
:root {
  /* Pashtoon-inspired palette: deep forest green + gold + earth */
  --primary:       #1a6b3a;   /* Deep Pashtoon green */
  --primary-dark:  #0f4525;
  --primary-light: #e8f5ee;
  --gold:          #c9962a;   /* Afghan gold */
  --gold-light:    #fef3dc;
  --accent:        #e63b2e;   /* Bold red accent */
  --dark:          #111827;
  --dark-2:        #1f2937;
  --text:          #374151;
  --text-muted:    #6b7280;
  --border:        #e5e7eb;
  --surface:       #f9fafb;
  --white:         #ffffff;

  /* Typography */
  --font-display:  'Playfair Display', Georgia, serif;
  --font-body:     'Source Sans 3', system-ui, sans-serif;
  --font-pashto:   'Noto Nastaliq Urdu', 'Noto Sans Arabic', serif;

  /* Spacing & Shape */
  --radius-sm:  6px;
  --radius:     10px;
  --radius-lg:  16px;
  --shadow-sm:  0 1px 3px rgba(0,0,0,.06);
  --shadow:     0 4px 16px rgba(0,0,0,.08);
  --shadow-lg:  0 8px 32px rgba(0,0,0,.12);
  --transition: all .25s cubic-bezier(.4,0,.2,1);
}

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
}

/* ── TOP BAR ── */
.top-bar {
  background: var(--primary-dark);
  padding: .35rem 0;
  font-size: .78rem;
  font-family: var(--font-body);
}

.top-bar a { color: rgba(255,255,255,.75); text-decoration: none; transition: color .2s; }
.top-bar a:hover { color: var(--gold); }

.top-bar .date-time {
  color: rgba(255,255,255,.6);
  display: flex;
  align-items: center;
  gap: 1rem;
}

.top-bar .social-icons a {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: rgba(255,255,255,.1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .7rem;
  transition: var(--transition);
}
.top-bar .social-icons a:hover { background: var(--gold); color: #fff; }

/* ── NAVBAR ── */
.main-navbar {
  background: var(--white) !important;
  border-bottom: 3px solid var(--primary);
  box-shadow: 0 2px 12px rgba(0,0,0,.08);
  padding: .6rem 0;
  position: sticky;
  top: 0;
  z-index: 1030;
}

.navbar-brand-wrap {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.brand-main {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 900;
  color: var(--primary) !important;
  letter-spacing: -.03em;
  line-height: 1;
}

.brand-main span { color: var(--gold); }

.brand-tagline {
  font-size: .65rem;
  color: var(--text-muted);
  letter-spacing: .15em;
  text-transform: uppercase;
  font-family: var(--font-body);
  margin-top: 2px;
}

.main-nav-link {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: .82rem;
  color: var(--dark) !important;
  padding: .45rem .8rem !important;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  text-transform: uppercase;
  letter-spacing: .04em;
  position: relative;
}

.main-nav-link::after {
  content: '';
  position: absolute;
  bottom: 0; left: 50%; right: 50%;
  height: 2px;
  background: var(--primary);
  transition: all .25s ease;
}

.main-nav-link:hover::after,
.main-nav-link.active::after { left: 8px; right: 8px; }

.main-nav-link:hover,
.main-nav-link.active {
  color: var(--primary) !important;
  background: var(--primary-light);
}

.nav-search-btn {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 2px solid var(--primary);
  color: var(--primary);
  background: transparent;
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
  cursor: pointer;
}

.nav-search-btn:hover { background: var(--primary); color: #fff; }

/* Search overlay */
.search-overlay {
  position: fixed;
  inset: 0;
  background: rgba(17,24,39,.95);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
}

.search-overlay.open { opacity: 1; pointer-events: all; }

.search-overlay-inner {
  width: 100%;
  max-width: 640px;
  padding: 2rem;
}

.search-overlay input {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 2px solid rgba(255,255,255,.3);
  color: #fff;
  font-size: 2rem;
  font-family: var(--font-display);
  padding: .5rem 0;
  outline: none;
}

.search-overlay input::placeholder { color: rgba(255,255,255,.3); }
.search-overlay input:focus { border-bottom-color: var(--gold); }

/* ── BREAKING NEWS ── */
.breaking-bar {
  background: var(--accent);
  padding: .5rem 0;
  overflow: hidden;
}

.breaking-label {
  background: var(--dark);
  color: #fff;
  font-family: var(--font-body);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: .3rem .9rem;
  flex-shrink: 0;
  white-space: nowrap;
}

.breaking-ticker {
  overflow: hidden;
  flex: 1;
  height: 22px;
  position: relative;
}

.breaking-ticker ul {
  list-style: none;
  padding: 0; margin: 0;
  display: flex;
  animation: marquee 30s linear infinite;
  width: max-content;
}

.breaking-ticker li { padding: 0 3rem; white-space: nowrap; }

.breaking-ticker a {
  color: #fff;
  text-decoration: none;
  font-family: var(--font-body);
  font-size: .82rem;
  font-weight: 500;
}

@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ── HERO / FEATURED ── */
.hero-featured {
  padding: 1.5rem 0 1rem;
  background: var(--white);
  border-bottom: 1px solid var(--border);
}

.hero-main-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  height: 420px;
  display: block;
  text-decoration: none;
}

.hero-main-card img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}

.hero-main-card:hover img { transform: scale(1.04); }

.hero-main-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.9) 0%, rgba(0,0,0,.3) 50%, transparent 100%);
  z-index: 1;
}

.hero-main-card .card-content {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 1.75rem;
  z-index: 2;
}

.hero-main-card .card-content h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.3;
  margin-bottom: .5rem;
}

.hero-side-card {
  display: block;
  text-decoration: none;
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  height: 198px;
}

.hero-side-card img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}

.hero-side-card:hover img { transform: scale(1.05); }

.hero-side-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.85), transparent 60%);
  z-index: 1;
}

.hero-side-card .card-content {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 1rem;
  z-index: 2;
}

.hero-side-card .card-content h5 {
  font-family: var(--font-body);
  font-size: .88rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.4;
  margin: 0;
}

/* ── SECTION LABEL ── */
.section-label {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: 1.25rem;
}

.section-label h2 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--dark);
  margin: 0;
  line-height: 1;
}

.section-label::before {
  content: '';
  width: 4px;
  height: 24px;
  background: var(--primary);
  border-radius: 2px;
  flex-shrink: 0;
}

.section-label.gold::before { background: var(--gold); }
.section-label.red::before  { background: var(--accent); }
.section-label.blue::before { background: #3b82f6; }

/* ── NEWS CARDS ── */
.news-card {
  display: flex;
  gap: .9rem;
  padding: .75rem 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

.news-card:last-child { border-bottom: none; }
.news-card:hover { padding-left: .5rem; }

.news-card img {
  width: 80px; height: 65px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
  transition: transform .3s ease;
}

.news-card:hover img { transform: scale(1.03); }

.news-card-title {
  font-family: var(--font-body);
  font-size: .88rem;
  font-weight: 600;
  color: var(--dark);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card-meta {
  font-size: .72rem;
  color: var(--text-muted);
  margin-top: .3rem;
}

/* ── GRID NEWS CARD ── */
.grid-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  height: 100%;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--border);
}

.grid-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
  color: inherit;
}

.grid-card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  transition: transform .4s ease;
}

.grid-card:hover img { transform: scale(1.04); }

.grid-card .card-body {
  padding: .9rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.grid-card .card-title {
  font-family: var(--font-body);
  font-size: .9rem;
  font-weight: 700;
  line-height: 1.45;
  color: var(--dark);
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.grid-card .card-meta {
  font-size: .72rem;
  color: var(--text-muted);
  margin-top: .6rem;
  padding-top: .6rem;
  border-top: 1px solid var(--border);
}

/* Section color strips */
.strip-green  { height: 3px; background: var(--primary); }
.strip-gold   { height: 3px; background: var(--gold); }
.strip-red    { height: 3px; background: var(--accent); }
.strip-blue   { height: 3px; background: #3b82f6; }
.strip-purple { height: 3px; background: #8b5cf6; }
.strip-teal   { height: 3px; background: #0891b2; }

/* ── SECTION BADGE ── */
.sec-badge {
  display: inline-block;
  font-family: var(--font-body);
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: .2rem .6rem;
  border-radius: 3px;
  margin-bottom: .4rem;
}

/* ── SIDEBAR ── */
.sidebar-box {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.sidebar-box-header {
  background: var(--primary);
  color: #fff;
  font-family: var(--font-body);
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  padding: .6rem 1rem;
}

.sidebar-box-header.gold  { background: var(--gold); }
.sidebar-box-header.red   { background: var(--accent); }
.sidebar-box-header.dark  { background: var(--dark-2); }

.sidebar-box-body { padding: .75rem; }

/* Sidebar news item */
.sidebar-news-item {
  display: flex;
  gap: .6rem;
  padding: .55rem 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

.sidebar-news-item:last-child { border-bottom: none; }
.sidebar-news-item:hover { padding-left: .35rem; }

.sidebar-news-item img {
  width: 60px; height: 50px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.sidebar-news-title {
  font-size: .82rem;
  font-weight: 600;
  color: var(--dark);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── POETRY SECTION ── */
.poetry-magazine-section {
  background: var(--primary-dark);
  position: relative;
  overflow: hidden;
  padding: 3rem 0;
}

.poetry-magazine-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 10% 50%, rgba(201,150,42,.12) 0%, transparent 40%),
    radial-gradient(circle at 90% 20%, rgba(26,107,58,.3) 0%, transparent 40%);
}

.poetry-magazine-section .container { position: relative; z-index: 1; }

.poetry-mag-card {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius);
  padding: 1.25rem;
  transition: var(--transition);
  text-decoration: none;
  display: block;
  height: 100%;
}

.poetry-mag-card:hover {
  background: rgba(255,255,255,.12);
  transform: translateY(-3px);
  border-color: var(--gold);
}

.poetry-type-badge {
  display: inline-block;
  font-size: .65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  padding: .2rem .6rem;
  border-radius: 3px;
  margin-bottom: .75rem;
  font-family: var(--font-body);
}

.poetry-text {
  font-family: var(--font-pashto);
  font-size: .95rem;
  line-height: 2.5;
  color: rgba(255,255,255,.85);
  margin-bottom: .9rem;
}

.poetry-author {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding-top: .75rem;
  border-top: 1px solid rgba(255,255,255,.1);
}

.poetry-author img {
  width: 28px; height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--gold);
}

.poetry-author span {
  font-size: .78rem;
  color: var(--gold);
  font-family: var(--font-body);
}

/* ── PASHTOON PATTERN DIVIDER ── */
.pattern-divider {
  height: 8px;
  background: repeating-linear-gradient(
    90deg,
    var(--primary) 0px,
    var(--primary) 20px,
    var(--gold) 20px,
    var(--gold) 24px,
    var(--primary) 24px,
    var(--primary) 44px,
    transparent 44px,
    transparent 48px
  );
  opacity: .9;
}

/* ── WEATHER WIDGET ── */
.weather-widget {
  background: linear-gradient(135deg, var(--primary), #2d9b5e);
  border-radius: var(--radius);
  padding: 1.25rem;
  color: #fff;
}

.weather-widget .city { font-size: .8rem; opacity: .8; font-family: var(--font-body); }
.weather-widget .temp { font-family: var(--font-display); font-size: 2.5rem; font-weight: 900; line-height: 1; }
.weather-widget .desc { font-size: .82rem; opacity: .75; font-family: var(--font-body); }

/* ── CURRENCY STRIP ── */
.currency-strip {
  background: var(--dark-2);
  padding: .5rem 0;
  overflow: hidden;
}

.currency-item {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: 0 1.5rem;
  color: rgba(255,255,255,.8);
  font-family: var(--font-body);
  font-size: .78rem;
  white-space: nowrap;
  border-right: 1px solid rgba(255,255,255,.1);
}

.currency-item .flag { font-size: 1rem; }
.currency-item .rate { color: var(--gold); font-weight: 700; }
.currency-item .change-up   { color: #34d399; font-size: .7rem; }
.currency-item .change-down { color: #f87171; font-size: .7rem; }

/* ── FOOTER ── */
.site-footer {
  background: var(--dark);
  color: rgba(255,255,255,.65);
  padding: 3rem 0 1.5rem;
  font-family: var(--font-body);
}

.footer-brand {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 900;
  color: #fff;
}

.footer-brand span { color: var(--gold); }
.footer-tagline { font-size: .82rem; color: rgba(255,255,255,.5); margin-top: .3rem; }

.footer-heading {
  color: var(--gold);
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
  margin-bottom: 1rem;
  padding-bottom: .5rem;
  border-bottom: 1px solid rgba(255,255,255,.1);
}

.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: .4rem; }
.footer-links a { color: rgba(255,255,255,.55); text-decoration: none; font-size: .85rem; transition: color .2s; }
.footer-links a:hover { color: var(--gold); }

.footer-social a {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  display: inline-flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.65);
  text-decoration: none;
  margin-right: .4rem;
  transition: var(--transition);
}

.footer-social a:hover { background: var(--primary); color: #fff; }

.footer-bottom {
  color: rgba(255,255,255,.35);
  font-size: .78rem;
  padding-top: 1.25rem;
  margin-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,.08);
  text-align: center;
}

/* ── PASHTOON ORNAMENT ── */
.pashto-ornament {
  color: var(--gold);
  font-size: 1.1rem;
  opacity: .6;
}

/* ── PAGINATION ── */
.pagination .page-link {
  color: var(--primary);
  border-color: var(--border);
  font-family: var(--font-body);
  border-radius: var(--radius-sm) !important;
  margin: 0 2px;
  font-size: .85rem;
}

.pagination .page-item.active .page-link {
  background: var(--primary);
  border-color: var(--primary);
}

/* ── BACK TO TOP ── */
#back-to-top {
  position: fixed;
  bottom: 1.5rem; right: 1.5rem;
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  box-shadow: 0 4px 15px rgba(26,107,58,.4);
  opacity: 0; transform: translateY(12px);
  transition: var(--transition);
  z-index: 999;
}

#back-to-top.visible { opacity: 1; transform: translateY(0); }
#back-to-top:hover { background: var(--primary-dark); transform: translateY(-2px); }

/* ── RESPONSIVE ── */
@media (max-width: 991px) {
  .hero-main-card { height: 300px; }
  .hero-main-card .card-content h2 { font-size: 1.2rem; }
}

@media (max-width: 767px) {
  .brand-main { font-size: 1.4rem; }
  .hero-main-card { height: 240px; }
  .hero-side-card { height: 160px; }
  .currency-strip { display: none; }
}
