/* =====================================================================
   Amravati Range Police — Theme Upgrade
   Load AFTER your existing stylesheet. Restyles all public pages:
   about, article, contact, districts, gallery, news, officers.
   ===================================================================== */

:root {
  --tp-navy: #0b2447;
  --tp-navy-2: #143a72;
  --tp-blue: #1d5bbf;
  --tp-gold: #c9a227;
  --tp-gold-soft: #f6ecc6;
  --tp-ink: #1c2a3f;
  --tp-body: #44536a;
  --tp-muted: #7b8a9e;
  --tp-line: #e3e9f2;
  --tp-bg: #f4f7fb;
  --tp-card: #ffffff;
  --tp-radius: 14px;
  --tp-radius-sm: 9px;
  --tp-shadow-sm: 0 1px 2px rgba(11, 36, 71, .06), 0 2px 8px rgba(11, 36, 71, .05);
  --tp-shadow: 0 6px 24px rgba(11, 36, 71, .10);
  --tp-shadow-lg: 0 14px 40px rgba(11, 36, 71, .16);
  --gold: var(--tp-gold);
}

/* ---------- Base ---------- */
html { scroll-behavior: smooth; }
body { background: var(--tp-bg); color: var(--tp-body); line-height: 1.7; -webkit-font-smoothing: antialiased; }
main { display: block; }
img { max-width: 100%; }
a { transition: color .2s ease, background .2s ease, border-color .2s ease, box-shadow .2s ease, transform .2s ease; }
:focus-visible { outline: 3px solid var(--tp-gold); outline-offset: 2px; border-radius: 4px; }
.container { width: 100%; max-width: 1220px; margin-inline: auto; padding-inline: 20px; }

/* ---------- Page hero ---------- */
.page-hero {
  position: relative;
  padding: 54px 0 62px;
  color: #fff;
  background:
    radial-gradient(900px 300px at 85% -20%, rgba(201, 162, 39, .28), transparent 60%),
    radial-gradient(700px 260px at 0% 120%, rgba(29, 91, 191, .45), transparent 60%),
    linear-gradient(135deg, var(--tp-navy) 0%, var(--tp-navy-2) 100%);
  overflow: hidden;
}
/* decorative ring and gold bottom border come from style.css */
.page-hero h1 { color: #fff; font-size: clamp(24px, 3.4vw, 36px); line-height: 1.25; margin: 10px 0 8px; font-weight: 800; letter-spacing: .1px; }
.page-hero p { color: rgba(255, 255, 255, .85); margin: 0; max-width: 760px; font-size: 15px; }

.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; color: rgba(255, 255, 255, .75); }
.breadcrumb a { color: #fff; opacity: .9; text-decoration: none; }
.breadcrumb a:hover { color: var(--tp-gold-soft); text-decoration: underline; }
.breadcrumb .sep { opacity: .5; }
.prose .breadcrumb { color: var(--tp-muted); }
.prose .breadcrumb a { color: var(--tp-blue); }

/* ---------- Layout ---------- */
.page-wrap { padding: 36px 0 64px; margin-top: -22px; position: relative; z-index: 2; }
.page-hero + .page-wrap { margin-top: 0; padding-top: 34px; }
.layout-side { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 28px; align-items: start; }
.sidebar { display: grid; gap: 20px; position: sticky; top: 90px; }
.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* ---------- Cards ---------- */
.card, .side-card, .form-wrap, .prose, .filter-bar {
  background: var(--tp-card);
  border: 1px solid var(--tp-line);
  border-radius: var(--tp-radius);
  box-shadow: var(--tp-shadow-sm);
}
.card { overflow: hidden; transition: transform .25s ease, box-shadow .25s ease; }
.card:hover { transform: translateY(-3px); box-shadow: var(--tp-shadow); }
.card-head { padding: 14px 20px; border-bottom: 1px solid var(--tp-line); background: linear-gradient(180deg, #fbfcfe, #f5f8fc); }
.card-head h3 { margin: 0; font-size: 16px; color: var(--tp-navy); }
.card-body { padding: 18px 20px; }

.side-card { overflow: hidden; }
.side-card > h3 {
  margin: 0; padding: 13px 18px; font-size: 15px; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, var(--tp-navy), var(--tp-navy-2));
  border-bottom: 3px solid var(--tp-gold);
}
.side-body { padding: 16px 18px; }

/* ---------- Prose ---------- */
.prose { padding: 30px 34px; color: var(--tp-body); font-size: 15.5px; }
.prose h2 {
  font-size: 22px; color: var(--tp-navy); margin: 34px 0 14px; padding-bottom: 10px; position: relative;
  border-bottom: 1px solid var(--tp-line);
}
.prose h2::after { content: ""; position: absolute; left: 0; bottom: -1px; width: 64px; height: 3px; background: var(--tp-gold); border-radius: 3px; }
.prose h2:first-child { margin-top: 0; }
.prose p { margin: 0 0 14px; }
.prose ul { padding-left: 0; list-style: none; margin: 0 0 16px; }
.prose ul li { position: relative; padding: 8px 0 8px 28px; border-bottom: 1px dashed var(--tp-line); }
.prose ul li:last-child { border-bottom: 0; }
.prose ul li::before { content: ""; position: absolute; left: 4px; top: 17px; width: 9px; height: 9px; background: var(--tp-gold); border-radius: 2px; transform: rotate(45deg); }
.prose a { color: var(--tp-blue); }
.prose img { border-radius: var(--tp-radius-sm); height: auto; }

/* ---------- Tables (prose) ---------- */
.prose table { width: 100%; border-collapse: separate; border-spacing: 0; margin: 14px 0 20px; font-size: 14px; border: 1px solid var(--tp-line); border-radius: var(--tp-radius-sm); overflow: hidden; display: block; overflow-x: auto; }
.prose table thead th { background: var(--tp-navy); color: #fff; text-align: left; padding: 12px 14px; font-weight: 600; white-space: nowrap; }
.prose table td { padding: 11px 14px; border-top: 1px solid var(--tp-line); vertical-align: top; }
.prose table tbody tr:nth-child(even) { background: #f8fafd; }
.prose table tbody tr:hover { background: #eef4ff; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 22px; border-radius: 999px; border: 1.5px solid transparent;
  font-weight: 600; font-size: 14.5px; line-height: 1.2; text-decoration: none; cursor: pointer;
}
.btn-sm { padding: 8px 16px; font-size: 13px; }
.btn-primary { background: linear-gradient(135deg, var(--tp-blue), var(--tp-navy-2)); color: #fff; box-shadow: 0 4px 14px rgba(29, 91, 191, .30); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(29, 91, 191, .38); color: #fff; }
.btn-outline-dark { background: #fff; color: var(--tp-navy); border-color: #c9d4e6; }
.btn-outline-dark:hover { background: var(--tp-navy); color: #fff; border-color: var(--tp-navy); }

/* ---------- Chips / filters ---------- */
.chip-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 24px; }
.chip {
  padding: 8px 18px; border-radius: 999px; background: #fff; color: var(--tp-navy);
  border: 1px solid #d5deec; font-size: 13.5px; font-weight: 600; text-decoration: none;
}
.chip:hover { border-color: var(--tp-blue); color: var(--tp-blue); transform: translateY(-1px); }
.chip.is-active { background: var(--tp-navy); color: #fff; border-color: var(--tp-navy); box-shadow: 0 4px 12px rgba(11, 36, 71, .25); }

.filter-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; margin-bottom: 18px; }
.filter-bar form { display: flex; flex-wrap: wrap; gap: 10px; flex: 1 1 320px; }
.filter-bar input[type="search"] { flex: 1 1 200px; padding: 10px 16px; border: 1px solid #d5deec; border-radius: 999px; background: #f8fafd; font: inherit; }
.filter-bar input[type="search"]:focus { outline: none; border-color: var(--tp-blue); background: #fff; box-shadow: 0 0 0 4px rgba(29, 91, 191, .12); }

/* ---------- Officer cards ---------- */
.officer-card {
  background: #fff; border: 1px solid var(--tp-line); border-radius: var(--tp-radius);
  overflow: hidden; box-shadow: var(--tp-shadow-sm); display: flex; flex-direction: column;
  transition: transform .25s ease, box-shadow .25s ease;
}
.officer-card:hover { transform: translateY(-4px); box-shadow: var(--tp-shadow-lg); }
.officer-card .officer-photo {
  position: relative; width: 100%; aspect-ratio: 4 / 5; height: auto !important;
  overflow: hidden; background: linear-gradient(160deg, #e9eff8, #dfe8f5);
}
.officer-card .officer-photo img {
  position: absolute; inset: 0; width: 100% !important; height: 100% !important; max-width: none;
  object-fit: cover; object-position: center top; display: block; transition: transform .5s ease;
}
.officer-card:hover .officer-photo img { transform: scale(1.04); }
.officer-card .officer-photo.is-placeholder img { object-fit: contain; object-position: center; padding: 14%; box-sizing: border-box; transform: none; }
.officer-photo .ribbon {
  position: absolute; z-index: 2; left: 12px; bottom: 12px; padding: 5px 12px; border-radius: 999px;
  background: rgba(11, 36, 71, .88); color: #fff; font-size: 12px; font-weight: 600;
  border: 1px solid rgba(201, 162, 39, .7); backdrop-filter: blur(4px);
}
.officer-body { padding: 16px 18px 18px; border-top: 3px solid var(--tp-gold); flex: 1; }
.officer-body h3 { margin: 0 0 4px; font-size: 17px; color: var(--tp-navy); line-height: 1.35; }
.officer-body .desig { color: var(--tp-blue); font-weight: 600; font-size: 13.5px; }
.officer-body .contact { display: grid; gap: 4px; margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--tp-line); font-size: 13px; word-break: break-word; }
.officer-body .contact a { color: var(--tp-navy); font-weight: 600; text-decoration: none; }
.officer-body .contact a:hover { color: var(--tp-blue); text-decoration: underline; }

/* ---------- IG message card (about) ---------- */
.ig-card { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 0; border: 1px solid var(--tp-line); border-radius: var(--tp-radius); overflow: hidden; background: linear-gradient(180deg, #fff, #f8fafd); box-shadow: var(--tp-shadow-sm); }
.ig-photo-wrap { position: relative; background: var(--tp-navy); min-height: 300px; }
.ig-photo-wrap img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.ig-photo-tag { position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 16px 14px; color: #fff; background: linear-gradient(0deg, rgba(11, 36, 71, .95), transparent); display: grid; gap: 2px; }
.ig-photo-tag strong { font-size: 15px; }
.ig-photo-tag span { font-size: 12.5px; opacity: .85; }
.ig-body { padding: 24px 28px; position: relative; }
.ig-body::before { content: "\201C"; position: absolute; top: 2px; right: 22px; font: 700 90px/1 Georgia, serif; color: var(--tp-gold); opacity: .25; }
.signature { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--tp-line); }
.sig-name { font-weight: 700; color: var(--tp-navy); }
.sig-role { font-size: 13px; color: var(--tp-muted); }

/* ---------- Districts ---------- */
.district-head { padding: 16px 20px; color: #fff; background: linear-gradient(135deg, var(--tp-navy), var(--tp-navy-2)); border-bottom: 3px solid var(--tp-gold); display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.district-head h3 { margin: 0; font-size: 18px; color: #fff; }
.district-head small { color: rgba(255, 255, 255, .7); letter-spacing: .5px; text-transform: uppercase; font-size: 11.5px; }
.card[id^="d"] dl { padding: 4px 0; }
.card[id^="d"] dt { font-weight: 500; }
.card[id^="d"] dd a { color: var(--tp-blue); font-weight: 600; text-decoration: none; }

/* ---------- News / post cards ---------- */
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 22px; }
.post-card { background: #fff; border: 1px solid var(--tp-line); border-radius: var(--tp-radius); overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--tp-shadow-sm); transition: transform .25s ease, box-shadow .25s ease; }
.post-card:hover { transform: translateY(-4px); box-shadow: var(--tp-shadow); }
.post-card-media { position: relative; height: 185px; overflow: hidden; background: #e9eff8; }
.post-card-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s ease; }
.post-card:hover .post-card-media img { transform: scale(1.06); }
.post-card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.post-card-body h3 { margin: 0; font-size: 16px; line-height: 1.45; }
.post-card-body h3 a { color: var(--tp-navy); text-decoration: none; }
.post-card-body h3 a:hover { color: var(--tp-blue); }
.post-card-body p { margin: 0; font-size: 13.5px; color: var(--tp-body); }
.post-card .meta, .meta { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: auto; padding-top: 10px; border-top: 1px dashed var(--tp-line); font-size: 12px; color: var(--tp-muted); }

.cat-badge { display: inline-block; padding: 4px 11px; border-radius: 999px; font-size: 11.5px; font-weight: 700; letter-spacing: .2px; } /* colours come from .cat-* in style.css */
.post-card-media .cat-badge { position: absolute; left: 12px; top: 12px; box-shadow: 0 2px 8px rgba(0, 0, 0, .2); }
.pin-flag { display: inline-block; margin-left: 6px; padding: 3px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 700; background: #fde8e8; color: #b42318; }

/* ---------- Article ---------- */
.article-head h1 { font-size: clamp(24px, 3vw, 32px); line-height: 1.35; color: var(--tp-navy); margin: 12px 0 10px; }
.article-meta { display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 13px; color: var(--tp-muted); padding: 10px 0 14px; border-bottom: 1px solid var(--tp-line); margin-bottom: 18px; }
.article-meta span { display: inline-flex; align-items: center; gap: 6px; }
.article-image { margin: 0 0 20px; border-radius: var(--tp-radius); overflow: hidden; box-shadow: var(--tp-shadow-sm); background: #e9eff8; }
.article-image img { width: 100%; height: auto; max-height: 520px; object-fit: cover; display: block; }
.attachment-box { display: flex; align-items: center; gap: 12px; padding: 14px 16px; margin: 20px 0; background: #f3f8ff; border: 1px solid #cfe0fb; border-left: 4px solid var(--tp-blue); border-radius: var(--tp-radius-sm); color: var(--tp-blue); }
.attachment-box a { font-weight: 600; }
.share-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--tp-line); font-weight: 600; color: var(--tp-navy); }
.share-row a { width: 36px; height: 36px; display: inline-grid; place-items: center; border-radius: 50%; background: var(--tp-navy); color: #fff; font-size: 12px; font-weight: 700; text-decoration: none; }
.share-row a:hover { background: var(--tp-gold); color: #3b2f00; transform: translateY(-2px); }

/* ---------- Notice list ---------- */
.notice-list { list-style: none; margin: 0; padding: 0; }
/* style.css already adds the diamond bullet via li::before */
.notice-list a { color: var(--tp-ink); text-decoration: none; }
.notice-list a:hover { color: var(--tp-blue); text-decoration: underline; }
.notice-list .date { display: block; font-size: 12px; color: var(--tp-muted); margin-top: 2px; }

/* ---------- Helpline ---------- */
.helpline-card { padding: 20px; border-radius: var(--tp-radius); color: #fff; background: linear-gradient(145deg, #a4161a, #d7263d); box-shadow: 0 10px 26px rgba(164, 22, 26, .28); }
.helpline-card h3 { margin: 0 0 4px; color: #fff; font-size: 17px; }
.helpline-card p { margin: 0 0 14px; font-size: 13px; opacity: .9; }
.helpline-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.helpline-grid a { display: grid; gap: 2px; text-align: center; padding: 10px 6px; border-radius: 10px; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .28); color: #fff; text-decoration: none; }
.helpline-grid a:hover { background: #fff; color: #a4161a; transform: translateY(-2px); }
.helpline-grid strong { font-size: 20px; line-height: 1.1; }
.helpline-grid span { font-size: 11.5px; opacity: .9; }

/* ---------- Forms ---------- */
.form-wrap { padding: 28px 30px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.form-grid .full { grid-column: 1 / -1; }
.field label { display: block; margin-bottom: 6px; font-size: 13.5px; font-weight: 600; color: var(--tp-navy); }
.field .req, .req { color: #d92d20; }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px; font: inherit; color: var(--tp-ink);
  background: #f8fafd; border: 1.5px solid #d5deec; border-radius: var(--tp-radius-sm);
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; background: #fff; border-color: var(--tp-blue); box-shadow: 0 0 0 4px rgba(29, 91, 191, .13); }
.form-actions { margin-top: 20px; }
.form-note { font-size: 13px; color: var(--tp-muted); }

/* ---------- Alerts / empty ---------- */
.alert { padding: 14px 18px; border-radius: var(--tp-radius-sm); border: 1px solid; border-left-width: 5px; font-size: 14px; margin-bottom: 18px; }
.alert-info { background: #eef5ff; border-color: #b9d3fb; color: #123e7c; }
.alert-warning { background: #fff8e6; border-color: #f2d98c; color: #7a5a00; }
.alert-error { background: #fff0ee; border-color: #f5b5ad; color: #912018; }
.alert-success { background: #ecfdf3; border-color: #a6e9c4; color: #05603a; }
.alert a { font-weight: 600; text-decoration: underline; }
.empty { text-align: center; padding: 46px 20px; background: #fff; border: 2px dashed #cfd9e8; border-radius: var(--tp-radius); color: var(--tp-muted); }
.empty strong { display: block; font-size: 17px; color: var(--tp-navy); margin-bottom: 6px; }

/* ---------- Gallery ---------- */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.gallery-tile { position: relative; overflow: hidden; border-radius: var(--tp-radius); background: #fff; border: 1px solid var(--tp-line); box-shadow: var(--tp-shadow-sm); }
.gallery-tile a { display: block; aspect-ratio: 4 / 3; overflow: hidden; }
.gallery-tile img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s ease; }
.gallery-tile:hover img { transform: scale(1.08); }
.gallery-tile figcaption { padding: 10px 14px; font-size: 13px; color: var(--tp-ink); }
.card > a > img[style*="height:190px"] { transition: transform .5s ease; }
.card:hover > a > img[style*="height:190px"] { transform: scale(1.04); }
.card > a[style*="position:relative"] { overflow: hidden; }

/* ---------- Pagination (generic) ---------- */
.pagination { gap: 8px; margin: 30px 0 0; }
.page-link {
  min-width: 40px; height: 40px; border-radius: 10px; border: 1px solid #d5deec;
  color: var(--tp-navy); font-weight: 600; text-decoration: none;
}
.page-link:hover { border-color: var(--tp-blue); color: var(--tp-blue); background: #fff; }
.page-link.is-current { background: var(--tp-navy); color: #fff; border-color: var(--tp-navy); box-shadow: 0 4px 12px rgba(11, 36, 71, .25); }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .layout-side { grid-template-columns: 1fr; }
  .sidebar { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .page-hero { padding: 38px 0 46px; }
  .prose { padding: 22px 18px; }
  .form-wrap { padding: 20px 16px; }
  .grid-2, .grid-3, .form-grid, .sidebar { grid-template-columns: 1fr; }
  .ig-card { grid-template-columns: 1fr; }
  .ig-photo-wrap { min-height: 320px; }
  .card[id^="d"] dl { grid-template-columns: 1fr !important; gap: 2px 0 !important; }
  .card[id^="d"] dd { margin-bottom: 8px !important; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
@media print {
  .sidebar, .share-row, .helpline-card, .page-hero::after { display: none !important; }
  .page-hero { background: #fff; color: #000; padding: 10px 0; }
  .page-hero h1, .page-hero p, .breadcrumb a { color: #000; }
}