/* Majmua-e-Kalam archive — premium white editorial UI. */
.naat-maj-main { padding-top: 120px; padding-bottom: 64px; }
.naat-maj-wrap { max-width: 1520px; margin: 0 auto; padding: 0 20px; }

/* Hero */
.naat-maj-hero { text-align: center; margin-bottom: 28px; }
.naat-maj-kicker { display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; color: #94a3b8; }
.naat-maj-h1 { font-size: clamp(30px, 5vw, 46px); font-weight: 800; color: #0f172a; margin: 6px 0 8px; }
.naat-maj-sub { color: #64748b; font-size: 15px; margin: 0; }

/* Filters */
.naat-maj-filters { background: #fff; border: 1px solid #eef1f5; border-radius: 20px; padding: 18px; box-shadow: 0 8px 30px rgba(15,23,42,.05); margin-bottom: 18px; }
.naat-maj-searchrow { position: relative; margin-bottom: 16px; }
.naat-maj-search-ic { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: #94a3b8; }
#maj-search { width: 100%; padding: 13px 16px 13px 42px; border: 1px solid #e2e8f0; border-radius: 14px; font-size: 15px; outline: none; transition: border-color .15s, box-shadow .15s; }
#maj-search:focus { border-color: #10b981; box-shadow: 0 0 0 3px rgba(16,185,129,.12); }
.naat-maj-grid-filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.naat-maj-field { display: flex; flex-direction: column; gap: 5px; }
.naat-maj-flabel { font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: #94a3b8; }
.naat-maj-field select { width: 100%; padding: 9px 12px; border: 1px solid #e2e8f0; border-radius: 11px; font-size: 13px; background: #f8fafc; color: #0f172a; cursor: pointer; }
.naat-maj-field select:focus { border-color: #10b981; outline: none; }
.naat-maj-filteractions { margin-top: 14px; }
.naat-maj-clear { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; border-radius: 999px; padding: 7px 16px; font-size: 12px; font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; transition: all .15s; }
.naat-maj-clear:hover { background: #dc2626; color: #fff; border-color: #dc2626; }

/* Alphabet navigation */
.naat-maj-alpha-wrap { margin-bottom: 16px; }
.naat-maj-alpha-modes { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 12px; }
.naat-maj-amode { font-family: var(--font-urdu, "Noto Nastaliq Urdu", serif); font-size: 15px; line-height: 2; padding: 8px 20px; border-radius: 14px; border: 1px solid #eef1f5; background: #fff; color: #475569; cursor: pointer; transition: all .15s; }
.naat-maj-amode:hover { border-color: #d1fae5; }
.naat-maj-amode.is-active { background: #059669; color: #fff; border-color: #059669; box-shadow: 0 4px 14px rgba(5,150,105,.22); }
.naat-maj-alpha { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; padding: 10px; background: #fff; border: 1px solid #eef1f5; border-radius: 16px; }
.naat-maj-letter { min-width: 38px; padding: 7px 11px; border: 0; background: #f8fafc; border-radius: 10px; font-size: 15px; font-weight: 700; color: #475569; cursor: pointer; transition: all .15s; }
.naat-maj-letter[dir="rtl"] { font-family: var(--font-urdu, "Noto Nastaliq Urdu", serif); }
.naat-maj-letter:hover { background: #ecfdf5; color: #047857; }
.naat-maj-letter.is-active { background: #059669; color: #fff; }

/* Toolbar */
.naat-maj-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.naat-maj-sort { display: flex; align-items: center; gap: 8px; }
.naat-maj-sort label { font-size: 12px; font-weight: 700; color: #64748b; text-transform: uppercase; letter-spacing: .04em; }
.naat-maj-sort select { padding: 8px 14px; border: 1px solid #e2e8f0; border-radius: 11px; font-size: 13px; background: #fff; color: #0f172a; cursor: pointer; }
.naat-maj-count { font-size: 13px; color: #64748b; }
.naat-maj-count #maj-count { font-weight: 800; color: #059669; }

/* Results */
.naat-maj-results.is-loading { opacity: .5; pointer-events: none; transition: opacity .15s; }
.naat-maj-empty { text-align: center; padding: 48px 16px; color: #94a3b8; font-size: 15px; }
.naat-maj-more-wrap { text-align: center; margin-top: 28px; }
.naat-maj-more { padding: 12px 28px; border-radius: 999px; background: #fff; border: 1px solid #d1fae5; color: #047857; font-weight: 700; font-size: 14px; cursor: pointer; transition: all .15s; }
.naat-maj-more:hover { background: #059669; color: #fff; border-color: #059669; }

@media (prefers-reduced-motion: reduce) {
	.naat-maj-amode, .naat-maj-letter, .naat-maj-clear, .naat-maj-more, #maj-search { transition: none; }
}

/* ============================================================
   Item 5 — Unified compact sticky toolbar + view switcher
   ============================================================ */
.naat-maj-toolbar2 { position: sticky; top: 96px; z-index: 30; margin-bottom: 16px; }
.naat-maj-tbar {
    display: flex; align-items: center; gap: 10px;
    background: rgba(255,255,255,0.92); backdrop-filter: blur(14px);
    border: 1px solid #e8edf3; border-radius: 16px;
    padding: 8px 10px; box-shadow: 0 6px 22px -10px rgba(15,23,42,.14);
}
.naat-maj-tbar-search { position: relative; flex: 0 0 auto; min-width: 200px; display: flex; align-items: center; }
.naat-maj-tbar-search i { position: absolute; left: 12px; color: #10b981; font-size: 13px; }
.naat-maj-tbar-search input { width: 200px; max-width: 28vw; padding: 9px 12px 9px 32px; border: 1px solid #e2e8f0; border-radius: 999px; font-size: 13px; outline: none; background: #f8fafc; transition: border-color .15s, background .15s; }
.naat-maj-tbar-search input:focus { border-color: #34d399; background: #fff; }

.naat-maj-tbar-scroll { flex: 1 1 auto; display: flex; align-items: center; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.naat-maj-tbar-scroll::-webkit-scrollbar { display: none; }
.naat-maj-tbar-scroll select {
    flex: 0 0 auto; appearance: none; -webkit-appearance: none;
    padding: 8px 30px 8px 14px; border: 1px solid #e2e8f0; border-radius: 999px;
    font-size: 12.5px; font-weight: 600; color: #475569; background: #fff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' fill='%2394a3b8' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 12px center; cursor: pointer;
    transition: border-color .15s, color .15s; white-space: nowrap;
}
.naat-maj-tbar-scroll select:hover { border-color: #34d399; color: #047857; }
.naat-maj-sortsel { font-weight: 700 !important; color: #047857 !important; border-color: #a7f3d0 !important; background-color: #ecfdf5 !important; }
.naat-maj-clear { flex: 0 0 auto; width: 34px; height: 34px; border-radius: 999px; border: 1px solid #fecaca; background: #fef2f2; color: #ef4444; cursor: pointer; transition: background .15s; }
.naat-maj-clear:hover { background: #fee2e2; }

.naat-maj-viewswitch { flex: 0 0 auto; display: flex; gap: 2px; background: #f1f5f9; border-radius: 12px; padding: 3px; }
.naat-maj-vbtn { width: 36px; height: 32px; border: none; background: transparent; border-radius: 9px; color: #94a3b8; cursor: pointer; transition: all .15s; font-size: 15px; }
.naat-maj-vbtn.is-active { background: #fff; color: #047857; box-shadow: 0 2px 6px -2px rgba(15,23,42,.2); }

.naat-maj-countstrip { display: flex; justify-content: flex-end; margin-bottom: 12px; }

/* Card grid (view: card) */
/* Match the Front Page Latest Kalam grid exactly (2 mobile → 4 desktop). */
.naat-maj-results.is-card { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; align-items: stretch; }
@media (min-width: 640px) { .naat-maj-results.is-card { gap: 1.5rem; } }
@media (min-width: 1024px) { .naat-maj-results.is-card { grid-template-columns: repeat(4, 1fr); } }

/* List view (view: list) — dense reading mode */
.naat-maj-results.is-list { display: flex; flex-direction: column; gap: 8px; }
.naat-maj-row {
    display: flex; align-items: stretch; gap: 14px;
    background: #fff; border: 1px solid #eef1f5; border-radius: 14px;
    padding: 12px 16px 12px 0; text-decoration: none; position: relative; overflow: hidden;
    transition: border-color .18s, box-shadow .18s, transform .18s;
}
.naat-maj-row:hover { border-color: #a7f3d0; box-shadow: 0 8px 22px -12px rgba(4,120,87,.3); transform: translateX(2px); }
.naat-maj-row-bar { width: 4px; border-radius: 4px; flex: 0 0 4px; }
.naat-maj-row-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.naat-maj-row-titles { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.naat-maj-row-urdu { font-size: 19px; color: #0f2a22; line-height: 1.6; }
.naat-maj-row-roman { font-size: 13px; color: #64748b; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.naat-maj-row-writer { display: flex; align-items: center; gap: 6px; font-size: 14px; color: #475569; }
.naat-maj-row-writer .naat-tax { font-size: 15px; }
.naat-maj-row-ico { width: 22px; height: 22px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; }
.naat-maj-row-meta { flex: 0 0 auto; display: flex; align-items: center; gap: 12px; font-size: 12px; color: #94a3b8; }
.naat-maj-row-cat { font-family: var(--naat-font-ui); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.naat-maj-row-book { font-size: 14px; color: #64748b; }
.naat-maj-row-bahr { font-size: 15px; color: #b45309; }
.naat-maj-row-stat { display: inline-flex; align-items: center; gap: 4px; }
.naat-maj-row-go { color: #cbd5e1; transition: transform .18s, color .18s; }
.naat-maj-row:hover .naat-maj-row-go { color: #047857; transform: translateX(3px); }
@media (max-width: 640px) {
    .naat-maj-row { flex-wrap: wrap; padding: 12px; gap: 8px; }
    .naat-maj-row-bar { width: 100%; height: 3px; flex-basis: 3px; }
    .naat-maj-row-meta { width: 100%; flex-wrap: wrap; gap: 8px; }
}
@media (prefers-reduced-motion: reduce) { .naat-maj-row, .naat-maj-row-go { transition: none; } }

/* ============================================================
   Majmua-e-Kalam — Premium White card (cover + title + writer + count).
   ============================================================ */
.naat-mc {
	position: relative; display: flex; flex-direction: column; align-items: center;
	text-align: center; text-decoration: none; height: 100%;
	background: #ffffff; border: 1px solid #f2f2f2; border-radius: 22px;
	padding: 22px 18px 16px; overflow: hidden;
	box-shadow: 0 10px 30px -20px rgba(15,23,42,.22);
	transition: transform .3s cubic-bezier(.22,1,.36,1), box-shadow .3s ease, border-color .3s ease;
}
.naat-mc-tint {
	position: absolute; inset: 0 0 auto 0; height: 46%; pointer-events: none;
	background: linear-gradient(180deg, color-mix(in srgb, var(--mc-accent, #047857) 10%, #fff) 0%, rgba(255,255,255,0) 100%);
}
.naat-mc > * { position: relative; z-index: 1; }
.naat-mc:hover {
	transform: translateY(-6px);
	box-shadow: 0 26px 50px -24px color-mix(in srgb, var(--mc-accent, #047857) 45%, rgba(15,23,42,.3));
	border-color: color-mix(in srgb, var(--mc-accent, #047857) 35%, #f2f2f2);
}
.naat-mc-cat {
	align-self: center; font-family: var(--naat-font-ui, "Bricolage Grotesque", sans-serif);
	font-size: 10px; font-weight: 700; text-transform: uppercase; color: #fff;
	background: var(--mc-accent, #047857); padding: 4px 12px; border-radius: 999px; margin-bottom: 14px;
	box-shadow: 0 6px 14px -8px color-mix(in srgb, var(--mc-accent, #047857) 80%, transparent);
}
.naat-mc-cover-wrap { width: 96px; aspect-ratio: 4 / 5; margin-bottom: 16px; flex: 0 0 auto; }
.naat-mc-cover {
	width: 100%; height: 100%; object-fit: cover; border-radius: 12px;
	box-shadow: 0 12px 24px -12px rgba(15,23,42,.4); background: #f1f5f9;
}
.naat-mc-cover-ph {
	display: flex; align-items: center; justify-content: center; width: 100%; height: 100%;
	border-radius: 12px; color: #fff; font-size: 34px; font-weight: 700;
	font-family: var(--naat-font-ui, "Bricolage Grotesque", sans-serif);
	background: linear-gradient(140deg, var(--mc-accent, #047857), color-mix(in srgb, var(--mc-accent, #047857) 55%, #0b1f17));
}
.naat-mc-body { display: flex; flex-direction: column; align-items: center; gap: 5px; width: 100%; margin-bottom: 14px; }
.naat-mc-title {
	font-size: 19px; line-height: 1.55; color: #0b1220; font-weight: 600; width: 100%;
	overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.naat-mc-title.font-urdu { font-size: 20px; line-height: 1.9; }
.naat-mc-roman {
	font-size: 12.5px; color: #94a3b8; width: 100%;
	overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.naat-mc-writer { display: inline-flex; align-items: center; gap: 7px; margin-top: 4px; max-width: 100%; }
.naat-mc-avatar {
	flex: 0 0 auto; width: 22px; height: 22px; border-radius: 50%; display: inline-flex;
	align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: #fff;
	font-family: var(--naat-font-ui, "Bricolage Grotesque", sans-serif);
	background: linear-gradient(140deg, var(--mc-accent, #047857), color-mix(in srgb, var(--mc-accent, #047857) 60%, #0b1f17));
}
.naat-mc-writer-name {
	font-size: 14px; color: #475569; font-weight: 600;
	overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.naat-mc-foot {
	margin-top: auto; width: 100%; display: flex; flex-direction: column; align-items: center; gap: 8px;
	padding-top: 14px; border-top: 1px solid #f1f5f9;
}
.naat-mc-book {
	font-size: 12.5px; color: #64748b; display: inline-flex; align-items: center; gap: 5px; max-width: 100%;
	overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.naat-mc-book i { color: var(--mc-accent, #047857); flex: 0 0 auto; }
.naat-mc-count {
	display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; color: #0b1220;
	background: color-mix(in srgb, var(--mc-accent, #047857) 8%, #fff);
	border: 1px solid color-mix(in srgb, var(--mc-accent, #047857) 22%, #f2f2f2);
	padding: 5px 14px; border-radius: 999px;
}
.naat-mc-count i { color: var(--mc-accent, #047857); font-size: 13px; }
@media (prefers-reduced-motion: reduce) { .naat-mc { transition: none; } }

/* Kalam archive: optional sticky contextual sidebar (desktop only). */
.naat-maj-layout { display: block; }
.naat-maj-primary { min-width: 0; }
@media (min-width: 1024px) {
	.naat-maj-layout.has-ctx { display: grid; grid-template-columns: minmax(0,1fr) 300px; gap: 2rem; align-items: start; }
	.naat-maj-layout.has-ctx .naat-maj-aside { align-self: start; }
}
.naat-maj-aside { width: 100%; margin-top: 28px; }
@media (min-width: 1024px) { .naat-maj-aside { margin-top: 0; } }
