/* Pakistan — modern news design */
:root {
  --green: #0d7a3f;
  --green-dark: #095c30;
  --green-light: #8cdc96;
  --ink: #141414;
  --muted: #6b7280;
  --bg: #ffffff;
  --soft: #f4f6f5;
  --line: #e5e7eb;
  --radius: 12px;
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink); background: var(--bg); line-height: 1.6;
  transition: background 0.3s, color 0.3s;
}
body.dark {
  --bg: #121212; --ink: #e8e8e8; --soft: #1e1e1e;
  --line: #333; --muted: #999;
}
.container { max-width: 1140px; margin: 0 auto; padding: 0 16px; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* Logo */
.logo-img { height: 56px; width: auto; border-radius: 50%; }

/* Breaking ticker */
.breaking-ticker { background: #c0392b; color: #fff; overflow: hidden; }
.ticker-inner { display: flex; align-items: center; gap: 12px; padding: 8px 16px; }
.ticker-label {
  background: #fff; color: #c0392b; font-weight: 800; font-size: 12px;
  text-transform: uppercase; padding: 3px 10px; border-radius: 4px;
  flex-shrink: 0; animation: pulse 2s infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.7; } }
.ticker-scroll { overflow: hidden; white-space: nowrap; flex: 1; }
.ticker-scroll span { display: inline-block; animation: ticker 30s linear infinite; font-size: 14px; }
@keyframes ticker { 0% { transform: translateX(100%); } 100% { transform: translateX(-100%); } }

/* Top bar */
.topbar { background: var(--ink); color: #fff; font-size: 12px; }
.topbar-inner { display: flex; justify-content: space-between; padding: 6px 16px; }
.topbar .tagline { color: #9fd8b4; }

/* Header */
.site-header { border-bottom: 3px solid var(--green); background: #fff; position: sticky; top: 0; z-index: 50; }
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; }
.logo { font-size: 26px; font-weight: 800; letter-spacing: -0.5px; }
.logo-green { color: var(--green); }
.main-nav { display: flex; gap: 18px; }
.main-nav a { font-weight: 600; font-size: 14px; padding: 6px 2px; border-bottom: 2px solid transparent; }
.main-nav a:hover { color: var(--green); border-color: var(--green); }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 6px; font-size: 20px; padding: 4px 10px; cursor: pointer; }

/* Hero */
.hero { margin: 24px 0; }
.hero-card { display: grid; grid-template-columns: 1.4fr 1fr; border-radius: var(--radius); overflow: hidden; background: var(--ink); color: #fff; }
.hero-card img, .hero-card .img-ph { height: 380px; width: 100%; object-fit: cover; }
.hero-text { padding: 32px; display: flex; flex-direction: column; justify-content: center; gap: 12px; }
.hero-text h1 { font-size: 30px; line-height: 1.25; }
.hero-text p { color: #d1d5db; font-size: 15px; }
.cat-tag { display: inline-block; background: var(--green); color: #fff; font-size: 12px; font-weight: 700; text-transform: uppercase; padding: 3px 10px; border-radius: 20px; width: fit-content; }
.cat-tag.small { font-size: 11px; padding: 2px 8px; }
.meta { font-size: 12px; color: var(--muted); }
.hero-text .meta { color: #9ca3af; }

/* Image placeholders (gradient, no external images) */
.img-ph { height: 200px; }
.ph-1 { background: linear-gradient(135deg, #0d7a3f, #134e2a); }
.ph-2 { background: linear-gradient(135deg, #1d4ed8, #0d7a3f); }
.ph-3 { background: linear-gradient(135deg, #7c3aed, #1d4ed8); }
.ph-4 { background: linear-gradient(135deg, #b45309, #7c2d12); }
.ph-5 { background: linear-gradient(135deg, #0e7490, #134e2a); }

/* Sections & cards */
.section { margin: 36px 0; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 14px; }
.section-title { font-size: 22px; border-left: 4px solid var(--green); padding-left: 12px; }
.more-link { font-size: 14px; font-weight: 600; color: var(--green); }
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.small-grid { grid-template-columns: repeat(4, 1fr); }
.news-card { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; transition: box-shadow .15s; display: flex; flex-direction: column; }
.news-card:hover { box-shadow: 0 6px 20px rgba(0,0,0,.1); }
.news-card img, .news-card .img-ph { height: 170px; width: 100%; object-fit: cover; }
.small-grid .news-card img, .small-grid .news-card .img-ph { height: 120px; }
.card-body { padding: 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-body h3 { font-size: 16px; line-height: 1.4; }
.card-body p { font-size: 13px; color: var(--muted); }

/* Article page */
.article-page { max-width: 760px; margin: 28px auto; }
.article-title { font-size: 32px; line-height: 1.3; margin: 12px 0; }
.article-meta { display: flex; gap: 16px; font-size: 13px; color: var(--muted); margin-bottom: 18px; }
.article-image { width: 100%; border-radius: var(--radius); margin-bottom: 18px; max-height: 440px; object-fit: cover; }
.article-summary { font-size: 18px; font-weight: 500; color: #374151; margin-bottom: 18px; }
.article-body p { margin-bottom: 16px; font-size: 17px; }

/* Footer */
.site-footer { background: var(--ink); color: #d1d5db; margin-top: 48px; }
.footer-inner { display: grid; grid-template-columns: 2fr 1fr; gap: 32px; padding: 36px 16px; }
.footer-brand p { font-size: 14px; margin-top: 8px; max-width: 380px; }
.footer-links { display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.footer-links strong { color: #fff; margin-bottom: 4px; }
.footer-links a:hover { color: #9fd8b4; }
.footer-bottom { border-top: 1px solid #374151; text-align: center; font-size: 12px; padding: 12px; color: #9ca3af; }

/* Admin */
.admin-body { background: var(--soft); min-height: 100vh; }
.admin-login-box { max-width: 380px; margin: 80px auto; background: #fff; padding: 32px; border-radius: var(--radius); box-shadow: 0 4px 16px rgba(0,0,0,.08); }
.admin-login-box h2 { margin-bottom: 18px; }
.admin-wrap { max-width: 1000px; margin: 32px auto; padding: 0 16px; }
.admin-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; flex-wrap: wrap; gap: 12px; }
.error { color: #dc2626; margin-bottom: 12px; }
label { display: block; margin-bottom: 14px; font-weight: 600; font-size: 14px; }
input[type=text], input[type=password], input[type=url], select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 6px; font-size: 15px; margin-top: 6px; font-family: inherit;
}
textarea { resize: vertical; }
.btn { display: inline-block; background: var(--green); color: #fff; border: none; padding: 10px 20px; border-radius: 6px; font-size: 15px; font-weight: 600; cursor: pointer; }
.btn:hover { background: var(--green-dark); }
.btn-ghost { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.admin-table { width: 100%; background: #fff; border-collapse: collapse; border-radius: var(--radius); overflow: hidden; font-size: 14px; }
.admin-table th, .admin-table td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; }
.admin-table th { background: var(--soft); }
.actions { white-space: nowrap; }
.actions a { color: var(--green); font-weight: 600; margin-right: 10px; }
.link-btn { background: none; border: none; color: #dc2626; cursor: pointer; font-size: 14px; font-weight: 600; }
.article-form { background: #fff; padding: 24px; border-radius: var(--radius); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.check input { width: auto; }
.form-actions { display: flex; gap: 10px; margin-top: 8px; }

/* Responsive */
@media (max-width: 900px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .small-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-card { grid-template-columns: 1fr; }
  .hero-card img, .hero-card .img-ph { height: 240px; }
}
@media (max-width: 600px) {
  .card-grid, .small-grid { grid-template-columns: 1fr; }
  .nav-toggle { display: block; }
  .main-nav { display: none; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0; background: #fff; border-bottom: 2px solid var(--green); padding: 12px 16px; gap: 10px; }
  .main-nav.open { display: flex; }
  .site-header { position: relative; }
  .header-inner { position: relative; }
  .article-title { font-size: 24px; }
  .hero-text h1 { font-size: 22px; }
  .form-row { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .topbar .tagline { display: none; }
}

/* Footer */
.site-footer { background: #0a0e0a; color: #ccc; margin-top: 48px; border-top: 4px solid var(--green); }
.footer-inner { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 32px; padding: 40px 16px; }
.footer-logo { height: 64px; width: auto; border-radius: 50%; margin-bottom: 12px; }
.footer-brand p { font-size: 14px; color: #999; }
.footer-links strong, .footer-social strong { display: block; color: #fff; margin-bottom: 12px; font-size: 14px; text-transform: uppercase; }
.footer-links a { display: block; font-size: 14px; padding: 4px 0; color: #999; }
.footer-links a:hover { color: var(--green-light); }
.social-row { display: flex; gap: 10px; }
.social-row a {
  width: 40px; height: 40px; border-radius: 50%; background: #fff; color: #0a0e0a;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 16px;
}
.social-row a:hover { background: var(--green); color: #fff; }
.footer-bottom { text-align: center; padding: 16px; font-size: 13px; color: #666; border-top: 1px solid #222; }

/* Modern cards */
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; margin: 24px 0; }
.news-card {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); transition: transform 0.2s, box-shadow 0.2s;
}
.news-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,0.12); }
.news-card img { height: 180px; width: 100%; object-fit: cover; }
.news-card-body { padding: 16px; }
.news-card-body h3 { font-size: 17px; line-height: 1.4; margin: 8px 0; }
