/* ============================================================
   Magazine Module — Archive listing + Single article
   Modern sans-serif (Bricolage Grotesque) for Latin, Urdu font preserved.
   ============================================================ */

:root { --magx-ui: var(--naat-font-ui, "Bricolage Grotesque", system-ui, sans-serif); }

/* ---------- Archive hero ---------- */
.naat-magx-hero { text-align: center; max-width: 640px; margin: 0 auto 2.5rem; }
.naat-magx-kicker { font-family: var(--magx-ui); font-size: 12px; font-weight: 800; letter-spacing: .2em; text-transform: uppercase; color: #059669; }
.naat-magx-h1 { font-family: var(--magx-ui); font-size: clamp(30px, 5vw, 46px); font-weight: 800; letter-spacing: -.02em; color: #0f172a; margin: .35rem 0 .6rem; line-height: 1.08; }
.naat-magx-lead { font-family: var(--magx-ui); font-size: 15px; color: #64748b; line-height: 1.6; }

/* ---------- Archive grid ---------- */
.naat-magx-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
@media (max-width: 720px) { .naat-magx-grid { grid-template-columns: minmax(0, 1fr); gap: 20px; } }

.naat-magx-card { display: flex; flex-direction: column; background: #fff; border: 1px solid #eef2f6; border-radius: 20px; overflow: hidden; box-shadow: 0 8px 24px -18px rgba(6,78,59,.4); transition: transform .28s cubic-bezier(.22,.61,.36,1), box-shadow .28s ease, border-color .28s ease; }
.naat-magx-card:hover { transform: translateY(-4px); border-color: #cbfaf0; box-shadow: 0 22px 40px -24px rgba(6,78,59,.5); }
.naat-magx-card.is-lead { grid-column: 1 / -1; flex-direction: row; }
@media (max-width: 720px) { .naat-magx-card.is-lead { flex-direction: column; } }

.naat-magx-cover { position: relative; display: block; overflow: hidden; aspect-ratio: 16 / 9; background: linear-gradient(135deg, #ecfdf5, #d1fae5); }
.naat-magx-card.is-lead .naat-magx-cover { flex: 0 0 52%; aspect-ratio: auto; min-height: 300px; }
.naat-magx-cover img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s ease; }
.naat-magx-card:hover .naat-magx-cover img { transform: scale(1.05); }
.naat-magx-cover-ph { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #34d399; font-size: 2.4rem; }
.naat-magx-cover-topic { position: absolute; top: 12px; left: 12px; font-family: var(--magx-ui); font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #065f46; background: rgba(255,255,255,.92); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); padding: 4px 11px; border-radius: 999px; box-shadow: 0 2px 8px -3px rgba(6,78,59,.3); }

.naat-magx-body { flex: 1; display: flex; flex-direction: column; padding: 18px 20px 20px; }
.naat-magx-card.is-lead .naat-magx-body { justify-content: center; padding: 32px 36px; }
.naat-magx-title { font-family: var(--magx-ui); font-size: 18px; font-weight: 800; letter-spacing: -.015em; line-height: 1.3; margin: 0 0 8px; }
.naat-magx-card.is-lead .naat-magx-title { font-size: clamp(22px, 3vw, 30px); }
.naat-magx-title a { color: #0f172a; text-decoration: none; transition: color .2s ease; }
.naat-magx-title a:hover { color: #047857; }
.naat-magx-excerpt { font-family: var(--magx-ui); font-size: 13.5px; color: #64748b; line-height: 1.6; margin: 0 0 14px; flex: 1; }
.naat-magx-card.is-lead .naat-magx-excerpt { font-size: 15px; }
.naat-magx-foot { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-family: var(--magx-ui); font-size: 12px; color: #94a3b8; margin-top: auto; }
.naat-magx-author { font-weight: 700; color: #334155; }
.naat-magx-dot { color: #cbd5e1; }
.naat-magx-read i { font-size: 11px; }

/* ---------- Single Magazine article ---------- */
.naat-mag-crumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; font-family: var(--magx-ui); font-size: 12px; color: #94a3b8; margin-bottom: 18px; }
.naat-mag-crumbs a { color: #64748b; text-decoration: none; transition: color .18s ease; }
.naat-mag-crumbs a:hover { color: #047857; }
.naat-mag-crumbs .bi { font-size: 9px; color: #cbd5e1; }
.naat-mag-crumb-current { color: #0f172a; font-weight: 600; max-width: 46ch; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.naat-mag-head { margin-bottom: 22px; }
.naat-mag-topic { display: inline-block; font-family: var(--magx-ui); font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: #047857; background: linear-gradient(135deg, #ecfdf5, #d1fae5); border: 1px solid #a7f3d0; padding: 4px 13px; border-radius: 999px; text-decoration: none; margin-bottom: 14px; }
.naat-mag-title { font-family: var(--magx-ui); font-size: clamp(26px, 4.5vw, 42px); font-weight: 800; letter-spacing: -.02em; line-height: 1.12; color: #0f172a; margin: 0 0 18px; }

.naat-mag-byline { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; font-family: var(--magx-ui); font-size: 13px; color: #64748b; }
.naat-mag-byline-author { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.naat-mag-av { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 9999px; display: inline-flex; align-items: center; justify-content: center; overflow: hidden; color: #fff; background: linear-gradient(140deg, #10b981, #047857); box-shadow: 0 6px 14px -8px rgba(4,120,87,.6), 0 0 0 3px #fff, 0 0 0 4px #d1fae5; }
.naat-mag-av-img { width: 100%; height: 100%; object-fit: cover; }
.naat-mag-av-icon svg { width: 20px; height: 20px; }
.naat-mag-av-txt { display: flex; flex-direction: column; line-height: 1.2; }
.naat-mag-av-kicker { font-size: 10px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: #94a3b8; }
.naat-mag-av-name { font-size: 14px; font-weight: 700; color: #1e293b; }
.naat-mag-byline-author:hover .naat-mag-av-name { color: #047857; }
.naat-mag-dot { color: #cbd5e1; }
.naat-mag-metaitem { display: inline-flex; align-items: center; gap: 5px; }
.naat-mag-metaitem i { font-size: 12px; color: #059669; }
a.naat-mag-poet { color: #64748b; text-decoration: none; }
a.naat-mag-poet:hover { color: #047857; }

.naat-mag-cover { margin: 0 0 26px; border-radius: 18px; overflow: hidden; box-shadow: 0 16px 40px -24px rgba(6,78,59,.45); }
.naat-mag-cover img { width: 100%; height: auto; display: block; }

.naat-mag-content { font-size: 1.06rem; line-height: 1.85; color: #334155; }
.naat-mag-content > * + * { margin-top: 1.15em; }
.naat-mag-content h2, .naat-mag-content h3 { font-family: var(--magx-ui); font-weight: 800; letter-spacing: -.01em; color: #0f172a; margin-top: 1.7em; }
.naat-mag-content h2 { font-size: 1.5rem; } .naat-mag-content h3 { font-size: 1.25rem; }
.naat-mag-content a { color: #047857; text-decoration: underline; text-underline-offset: 3px; }
.naat-mag-content blockquote { border-left: 3px solid #10b981; padding: 4px 0 4px 20px; margin: 1.6em 0; font-style: italic; color: #475569; }
.naat-mag-content img { border-radius: 12px; }

.naat-mag-tags { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 28px; padding-top: 20px; border-top: 1px solid #f1f5f9; }
.naat-mag-tags-label { font-family: var(--magx-ui); font-size: 12px; font-weight: 700; color: #94a3b8; text-transform: uppercase; letter-spacing: .08em; }
.naat-mag-tags a { font-family: var(--magx-ui); font-size: 12px; font-weight: 600; color: #475569; background: #f1f5f9; padding: 4px 12px; border-radius: 999px; text-decoration: none; transition: all .18s ease; }
.naat-mag-tags a:hover { background: #d1fae5; color: #047857; }

/* ---------- Related Magazine Posts ---------- */
.naat-mag-related { margin-top: 26px; }
.naat-mag-related-head { margin-bottom: 18px; }
.naat-mag-related-eyebrow { font-family: var(--magx-ui); font-size: 11px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; color: #059669; }
.naat-mag-related-title { font-family: var(--magx-ui); font-size: 22px; font-weight: 800; letter-spacing: -.01em; color: #0f172a; margin: .25rem 0 0; }
.naat-mag-related-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 760px) { .naat-mag-related-grid { grid-template-columns: minmax(0, 1fr); } }
.naat-mag-rcard { display: flex; flex-direction: column; text-decoration: none; background: #fff; border: 1px solid #eef2f6; border-radius: 16px; overflow: hidden; transition: transform .24s ease, box-shadow .24s ease, border-color .24s ease; }
.naat-mag-rcard:hover { transform: translateY(-3px); border-color: #cbfaf0; box-shadow: 0 16px 30px -22px rgba(6,78,59,.5); }
.naat-mag-rthumb { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: linear-gradient(135deg, #ecfdf5, #d1fae5); }
.naat-mag-rthumb img { width: 100%; height: 100%; object-fit: cover; }
.naat-mag-rthumb-ph { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #34d399; font-size: 1.6rem; }
.naat-mag-rbody { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; }
.naat-mag-rtopic { font-family: var(--magx-ui); font-size: 9.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #059669; }
.naat-mag-rtitle { font-family: var(--magx-ui); font-size: 14px; font-weight: 700; line-height: 1.35; color: #1e293b; }
.naat-mag-rmeta { font-family: var(--magx-ui); font-size: 11px; color: #94a3b8; display: inline-flex; align-items: center; gap: 4px; }

@media (prefers-reduced-motion: reduce) {
  .naat-magx-card, .naat-magx-cover img, .naat-mag-rcard { transition: none; }
  .naat-magx-card:hover, .naat-mag-rcard:hover { transform: none; }
  .naat-magx-card:hover .naat-magx-cover img { transform: none; }
}
