/*
Theme Name: Khobordin Lite
Theme URI: https://example.com/khobordin-lite
Author: OpenAI
Description: A lightweight Bengali public-interest reporting theme for WordPress. Minimal homepage, verified report cards, simple report detail pages, and a dedicated report-submission page template.
Version: 1.1.1
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
Text Domain: khobordin-lite
License: GPL-2.0-or-later
*/

:root {
  --kd-red: #d91f26;
  --kd-red-dark: #b8171d;
  --kd-ink: #111827;
  --kd-muted: #5f6672;
  --kd-border: #e7e7ea;
  --kd-soft: #fafafa;
  --kd-max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Noto Sans Bengali", "Hind Siliguri", "Segoe UI", sans-serif;
  background: #fff;
  color: var(--kd-ink);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
button, input, select, textarea { font: inherit; }

.kd-container { width: min(calc(100% - 32px), var(--kd-max)); margin-inline: auto; }

/* Header */
.kd-header { border-bottom: 1px solid var(--kd-border); background: rgba(255,255,255,.98); position: sticky; top: 0; z-index: 50; }
.kd-header-row { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.kd-brand { display: inline-flex; align-items: center; gap: 10px; font-size: clamp(28px, 3vw, 42px); font-weight: 900; letter-spacing: -1.5px; line-height: 1; }
.kd-brand .kd-brand-black { color: #05070b; }
.kd-brand .kd-brand-red { color: var(--kd-red); }
.kd-brand .custom-logo { max-height: 48px; width: auto; }
.kd-nav { display: flex; align-items: center; gap: 30px; font-weight: 650; }
.kd-nav a:hover { color: var(--kd-red); }
.kd-cta { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 24px; border-radius: 8px; color: #fff !important; background: var(--kd-red); font-weight: 800; box-shadow: 0 6px 16px rgba(217,31,38,.12); }
.kd-cta:hover { background: var(--kd-red-dark); transform: translateY(-1px); }
.kd-menu-toggle { display: none; border: 0; background: transparent; padding: 8px; }
.kd-menu-toggle span { display: block; width: 24px; height: 2px; background: var(--kd-ink); margin: 5px 0; }

/* Hero */
.kd-hero { border-bottom: 1px solid #f2f2f3; overflow: hidden; background: linear-gradient(90deg,#fff 0%,#fff 55%,#fffafa 100%); }
.kd-hero-grid { min-height: 390px; display: grid; grid-template-columns: 1.05fr .95fr; align-items: center; gap: 44px; padding: 44px 0 22px; }
.kd-eyebrow { color: var(--kd-red); font-weight: 800; font-size: 14px; letter-spacing: .04em; text-transform: uppercase; margin-bottom: 10px; }
.kd-hero h1 { margin: 0; font-size: clamp(42px, 5vw, 68px); line-height: 1.14; letter-spacing: -2px; font-weight: 900; }
.kd-hero h1 .accent { color: var(--kd-red); display: block; }
.kd-hero p { margin: 22px 0 28px; font-size: clamp(18px, 2vw, 23px); color: #252a32; max-width: 650px; }
.kd-hero-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.kd-primary-btn, .kd-secondary-btn { min-height: 58px; padding: 0 28px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; gap: 12px; font-weight: 800; }
.kd-primary-btn { background: var(--kd-red); color: #fff; }
.kd-primary-btn:hover { background: var(--kd-red-dark); }
.kd-secondary-btn { border: 1px solid #d9dce2; background: #fff; }
.kd-secondary-btn:hover { border-color: var(--kd-red); color: var(--kd-red); }
.kd-hero-art { align-self: end; display: flex; justify-content: center; }
.kd-hero-art img { width: min(100%, 560px); }

/* Reports */
.kd-section { padding: 34px 0; }
.kd-section-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.kd-section-title { margin: 0; font-size: clamp(26px, 3vw, 34px); line-height: 1.25; }
.kd-all-link { color: var(--kd-red); font-weight: 800; white-space: nowrap; }
.kd-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.kd-card { border: 1px solid var(--kd-border); border-radius: 10px; padding: 24px; background: #fff; min-height: 250px; display: flex; flex-direction: column; transition: transform .18s ease, box-shadow .18s ease; }
.kd-card:hover { transform: translateY(-3px); box-shadow: 0 16px 40px rgba(17,24,39,.07); }
.kd-card-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 15px; margin-bottom: 14px; }
.kd-card-cat { color: var(--kd-red); font-weight: 800; }
.kd-dot { color: #a2a6ae; }
.kd-card h3 { margin: 0 0 14px; font-size: 22px; line-height: 1.42; }
.kd-card-excerpt { margin: 0 0 20px; color: #424852; }
.kd-card-bottom { margin-top: auto; display: flex; justify-content: space-between; gap: 14px; align-items: center; font-size: 14px; }
.kd-card-date { color: var(--kd-muted); }
.kd-read { color: var(--kd-red); font-weight: 800; }
.kd-empty { border: 1px dashed #d8dbe1; border-radius: 10px; padding: 28px; color: var(--kd-muted); }

/* Trust strip */
.kd-trust { padding-bottom: 34px; }
.kd-trust-grid { border: 1px solid var(--kd-border); border-radius: 10px; display: grid; grid-template-columns: repeat(3,1fr); overflow: hidden; }
.kd-trust-item { padding: 22px 24px; display: grid; grid-template-columns: 50px 1fr; gap: 14px; align-items: center; }
.kd-trust-item + .kd-trust-item { border-left: 1px solid var(--kd-border); }
.kd-icon { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: #fff0f1; color: var(--kd-red); font-size: 24px; font-weight: 900; }
.kd-trust-item h4 { margin: 0 0 2px; font-size: 18px; }
.kd-trust-item p { margin: 0; color: #565c65; font-size: 14px; }

/* Footer */
.kd-footer { border-top: 1px solid var(--kd-border); padding: 26px 0; }
.kd-footer-row { display: flex; justify-content: space-between; align-items: center; gap: 20px; color: #535965; font-size: 14px; }
.kd-footer-links { display: flex; gap: 18px; flex-wrap: wrap; }
.kd-footer-links a:hover { color: var(--kd-red); }

/* Archive / single */
.kd-page-hero { padding: 46px 0 24px; }
.kd-page-hero h1 { margin: 0 0 8px; font-size: clamp(34px, 4vw, 52px); }
.kd-page-hero p { margin: 0; color: var(--kd-muted); font-size: 18px; }
.kd-archive-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; padding-bottom: 52px; }
.kd-article { width: min(calc(100% - 32px), 850px); margin: 0 auto; padding: 50px 0 70px; }
.kd-article-meta { color: var(--kd-muted); display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.kd-article h1 { font-size: clamp(34px, 5vw, 56px); line-height: 1.24; margin: 0 0 20px; }
.kd-article .entry-content { font-size: 19px; }
.kd-article .entry-content p { margin: 0 0 1.25em; }
.kd-article .entry-content img { border-radius: 10px; margin: 28px 0; }
.kd-video-box { margin: 30px 0 0; border: 1px solid var(--kd-border); border-radius: 10px; padding: 20px; background: #fafafa; }
.kd-video-box strong { display: block; margin-bottom: 10px; }
.kd-video-box a { color: var(--kd-red); font-weight: 800; }

/* Submission page */
.kd-submit-wrap { width: min(calc(100% - 32px), 760px); margin: 0 auto; padding: 42px 0 68px; }
.kd-submit-head { text-align: center; margin-bottom: 26px; }
.kd-submit-head h1 { margin: 0 0 10px; font-size: clamp(34px,4vw,48px); }
.kd-submit-head p { margin: 0 auto; max-width: 650px; color: var(--kd-muted); }
.kd-submit-card { border: 1px solid var(--kd-border); border-radius: 12px; padding: 26px; background: #fff; box-shadow: 0 10px 35px rgba(17,24,39,.04); }
.kd-submit-note { margin-top: 18px; border-radius: 8px; background: #fff7f7; padding: 14px 16px; color: #6d2527; font-size: 14px; }

/* Generic WordPress form styling */
.kd-submit-card form label { font-weight: 700; display: block; margin-bottom: 6px; }
.kd-submit-card input[type="text"],
.kd-submit-card input[type="email"],
.kd-submit-card input[type="tel"],
.kd-submit-card input[type="url"],
.kd-submit-card select,
.kd-submit-card textarea,
.kd-submit-card input[type="file"] { width: 100%; border: 1px solid #d9dde4; border-radius: 8px; padding: 12px 14px; background: #fff; }
.kd-submit-card textarea { min-height: 140px; resize: vertical; }
.kd-submit-card input[type="submit"], .kd-submit-card button[type="submit"] { border: 0; border-radius: 8px; background: var(--kd-red); color: #fff; min-height: 50px; padding: 0 24px; font-weight: 800; cursor: pointer; }

@media (max-width: 900px) {
  .kd-menu-toggle { display: block; }
  .kd-nav { display: none; position: absolute; top: 76px; left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--kd-border); padding: 18px 20px 24px; flex-direction: column; align-items: stretch; gap: 12px; }
  .kd-nav.is-open { display: flex; }
  .kd-nav .kd-cta { display: none; }
  .kd-hero-grid { grid-template-columns: 1fr; min-height: auto; padding-top: 44px; }
  .kd-hero-art { order: -1; max-height: 250px; overflow: hidden; }
  .kd-hero-art img { max-width: 380px; }
  .kd-grid, .kd-archive-grid { grid-template-columns: 1fr 1fr; }
  .kd-trust-grid { grid-template-columns: 1fr; }
  .kd-trust-item + .kd-trust-item { border-left: 0; border-top: 1px solid var(--kd-border); }
}

@media (max-width: 640px) {
  .kd-container { width: min(calc(100% - 24px), var(--kd-max)); }
  .kd-header-row { min-height: 68px; }
  .kd-brand { font-size: 30px; }
  .kd-nav { top: 68px; }
  .kd-hero-grid { padding: 26px 0 22px; gap: 18px; }
  .kd-hero-art { display: none; }
  .kd-hero h1 { font-size: 45px; }
  .kd-hero p { font-size: 17px; margin: 18px 0 22px; }
  .kd-primary-btn, .kd-secondary-btn { width: 100%; }
  .kd-grid, .kd-archive-grid { grid-template-columns: 1fr; }
  .kd-card { min-height: 0; }
  .kd-section { padding: 28px 0; }
  .kd-section-head { align-items: flex-end; }
  .kd-footer-row { flex-direction: column; align-items: flex-start; }
  .kd-card-bottom { align-items: flex-end; }
}


/* v1.1 mobile resilience */
.kd-card h3, .kd-card-excerpt, .kd-trust-item h4, .kd-trust-item p, .kd-footer-row, .kd-nav a {
  overflow-wrap: anywhere;
}
.kd-primary-btn, .kd-cta, .kd-all-link, .kd-read { touch-action: manipulation; }
@media (max-width: 640px) {
  .kd-section-head { gap: 12px; flex-wrap: wrap; }
  .kd-all-link { white-space: normal; }
  .kd-trust-item { grid-template-columns: 44px minmax(0,1fr); padding: 18px; gap: 12px; }
  .kd-icon { width: 44px; height: 44px; }
  .kd-submit-card { padding: 18px; }
  .kd-submit-wrap { width: min(calc(100% - 24px), 760px); padding-top: 28px; }
}
