/*
Theme Name: PakSindh
Theme URI: https://paksindh.com
Author: PakSindh
Description: Heritage, Culture and Tourism portal theme for paksindh.com (Ajrak-inspired design).
Version: 4.0
Text Domain: paksindh
*/

/* =========================================================
   TOKENS
   ========================================================= */
:root {
    --navy: #0f1f4b;
    --navy-deep: #0b1a3a;
    --red: #b3141b;
    --red-bright: #c4161c;
    --green: #0e7a4b;
    --cream: #faf7f2;
    --card: #ffffff;
    --line: #e6dfd3;
    --text: #1f2937;
    --muted: #6b7280;
    --font-serif: 'Playfair Display', var(--font-arabic), Georgia, 'Times New Roman', serif;
    --font-sans: 'Inter', var(--font-arabic), system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
    --container: 1240px;
    --gutter: 24px;
    --radius: 8px;

    --ink: #0f1f4b;
    --text-body: #26303f;
    --text-soft: #5b6472;
    --font-arabic: 'Noto Naskh Arabic';

    /* Legacy aliases used by single.css and inner templates */
    --accent: #b3141b;
    --accent-hover: #8f1015;
    --primary: #0f1f4b;
    --border-color: #e6dfd3;
    --text-dark: #1f2937;
    --text-muted: #6b7280;
    --bg-light: #ffffff;
    --card-bg: #ffffff;
    --font-main: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}

/* =========================================================
   BASE
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; overflow-x: clip; }
body { overflow-x: clip; overflow-wrap: break-word; word-wrap: break-word; }
iframe, video, embed, object, svg { max-width: 100%; }

body {
    margin: 0;
    font-family: var(--font-sans);
    font-size: 15px;
    line-height: 1.6;
    color: var(--text);
    background: var(--cream);
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; }

a { color: var(--ink); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--red); }

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-serif);
    color: var(--ink);
    line-height: 1.3;
    margin-top: 0;
}

.icon { width: 1em; height: 1em; flex: 0 0 auto; display: inline-block; vertical-align: -0.125em; }

.wrapper { width: 100%; min-height: 100vh; }

.top-bar, .main-header, .nav-bar, .site-main {
    width: calc(100% - (var(--gutter) * 2));
    max-width: var(--container);
    margin-left: auto;
    margin-right: auto;
}

.site-main { padding-bottom: 20px; }

/* =========================================================
   TOP BAR
   ========================================================= */
.top-bar {
    margin-top: 14px;
    height: 38px;
    background: var(--navy-deep);
    border-radius: 8px;
    display: flex;
    align-items: center;
    overflow: hidden;
    color: #fff;
    font-size: 13px;
}

.breaking-badge {
    background: var(--red);
    color: #fff;
    height: 100%;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 18px 0 16px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .6px;
    flex: 0 0 auto;
}
.breaking-badge .icon { width: 14px; height: 14px; }

.top-date {
    padding: 0 16px;
    margin-right: 0;
    border-right: 1px solid rgba(255,255,255,.3);
    line-height: 16px;
    white-space: nowrap;
    flex: 0 0 auto;
    margin-left: 4px;
}

.ticker-wrap {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
    height: 100%;
    padding-left: 16px;
}
.ticker-item {
    position: absolute;
    left: 16px; right: 12px; top: 0; bottom: 0;
    display: block;
    line-height: 38px;
    color: #fff;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    opacity: 0;
    visibility: hidden;
    transition: opacity .5s ease;
}
.ticker-item.is-active { opacity: 1; visibility: visible; }
.ticker-item:hover { color: #fff; text-decoration: underline; }

.top-social {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0 16px;
    flex: 0 0 auto;
}
.top-social a { color: #fff; display: inline-flex; font-size: 15px; }
.top-social a:hover { color: #f3b6b9; }

/* =========================================================
   HEADER
   ========================================================= */
.main-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 14px 0 14px;
}

.site-logo { flex: 0 0 auto; }
.site-logo a { display: block; line-height: 0; }
.site-logo img.custom-logo { display: block; height: 58px; width: auto; max-width: 100%; }

.header-search {
    display: flex;
    flex: 0 1 440px;
    min-width: 0;
    margin-left: auto;
    margin-right: 8px;
}
.header-search input[type="search"] {
    flex: 1 1 auto;
    min-width: 0;
    height: 42px;
    padding: 0 16px;
    font: inherit;
    font-size: 14px;
    color: var(--text);
    background: var(--card);
    border: 1px solid #cfd5e1;
    border-right: 0;
    border-radius: 6px 0 0 6px;
    outline: none;
    -webkit-appearance: none;
}
.header-search input[type="search"]:focus { border-color: var(--ink); }
.header-search button {
    width: 52px;
    height: 42px;
    border: 0;
    background: var(--navy);
    color: #fff;
    border-radius: 0 6px 6px 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 19px;
}
.header-search button:hover { background: var(--red); }

.auth-links {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
    font-size: 14px;
    font-weight: 500;
}
.auth-links .icon { font-size: 26px; color: var(--ink); }
.auth-links a { color: var(--ink); }
.auth-links a:hover { color: var(--red); }
.auth-sep { width: 1px; height: 16px; background: #b9c0cf; }

.nav-toggle {
    display: none;
    width: 42px; height: 42px;
    border: 0; border-radius: 6px;
    background: var(--navy);
    color: #fff;
    font-size: 22px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
}

/* =========================================================
   NAV BAR
   ========================================================= */
.nav-bar {
    position: relative;
    z-index: 50;
    display: flex;
    align-items: stretch;
    justify-content: center;
    height: 46px;
    background: var(--navy);
    border-radius: 4px;
}

.nav-ajrak {
    flex: 0 0 68px;
    background: url('assets/ajrak-pattern.svg') center / 34px 34px repeat;
    border-top: 2px solid var(--navy);
    border-bottom: 2px solid var(--navy);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.35);
}
.nav-ajrak-left { border-radius: 4px 0 0 4px; }
.nav-ajrak-right { border-radius: 0 4px 4px 0; }

.nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: stretch;
    justify-content: center;
    flex: 1 1 auto;
    min-width: 0;
}
.nav-li { position: relative; display: flex; }

.nav-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 0 18px;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
}
.nav-item .chev { width: 12px; height: 12px; opacity: .85; }
.nav-item:hover { background: rgba(255,255,255,.1); color: #fff; }
.nav-item.active { background: var(--red-bright); color: #fff; }

.nav-auth-li { display: none; }

.dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 230px;
    background: var(--card);
    border-radius: 0 0 8px 8px;
    border-top: 3px solid var(--red);
    box-shadow: 0 14px 30px rgba(11,26,58,.18);
    padding: 6px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: opacity .18s ease, transform .18s ease, visibility .18s;
}
.has-dropdown:hover .dropdown,
.has-dropdown:focus-within .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.dropdown a {
    display: block;
    padding: 9px 18px;
    font-size: 14px;
    color: var(--text);
    border-left: 3px solid transparent;
}
.dropdown a:hover { background: #f5efe6; color: var(--red); border-left-color: var(--red); }
.dropdown .dropdown-all { font-weight: 700; color: var(--ink); border-bottom: 1px solid var(--line); margin-bottom: 4px; }

/* =========================================================
   CATEGORY BADGE (shared)
   ========================================================= */
.cat-badge {
    display: inline-block;
    padding: 5px 12px;
    background: var(--green);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .7px;
    text-transform: uppercase;
    line-height: 1.2;
    border-radius: 4px;
}

/* =========================================================
   HERO
   ========================================================= */
.hero-area {
    display: grid;
    grid-template-columns: 1fr 1.04fr;
    gap: 14px;
    margin-top: 22px;
    height: 450px;
}

.hero-grid-right {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 14px;
    min-height: 0;
}
.grid-card-full { grid-column: 1 / -1; }

.hero-card {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--navy) url('assets/ajrak-pattern.svg') center / 60px repeat;
    min-height: 0;
    color: #fff;
}
.hero-card::before, .article-thumb::before, .single-thumb::before {
    content: 'PakSindh';
    position: absolute;
    left: 50%; top: 50%;
    transform: translate(-50%, -50%);
    z-index: 0;
    padding: 7px 18px;
    background: rgba(11,26,58,.88);
    border: 1px solid rgba(255,255,255,.55);
    border-radius: 4px;
    color: #fff;
    font-family: var(--font-serif);
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 1.5px;
    white-space: nowrap;
    pointer-events: none;
}
.hero-card::before { font-size: 24px; padding: 9px 24px; }
.hero-img { z-index: 1; }
.hero-overlay { z-index: 2; }
.hero-arrow { z-index: 3 !important; }

.hero-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .6s ease;
}
.hero-card:hover .hero-img { transform: scale(1.04); }

.hero-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
    gap: 10px;
    padding: 22px 64px 20px 24px;
    background: linear-gradient(to top, rgba(8,18,45,.92) 0%, rgba(8,18,45,.55) 42%, rgba(8,18,45,0) 75%);
}

.hero-title { margin: 0; color: #fff; font-weight: 700; letter-spacing: -.2px; }
.hero-title a { color: #fff; }
.hero-title a:hover { color: #fff; }
.stretched::after { content: ''; position: absolute; inset: 0; z-index: 2; }

.hero-main .hero-title { font-size: 34px; line-height: 1.2; max-width: 440px; text-shadow: 0 2px 8px rgba(0,0,0,.3); }
.grid-card-full .hero-title { font-size: 24px; line-height: 1.25; max-width: 440px; }
.grid-card-half .hero-title { font-size: 19px; line-height: 1.25; }

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 18px;
    font-size: 13px;
    color: rgba(255,255,255,.92);
}
.grid-card-half .hero-meta { font-size: 12px; gap: 4px 12px; }
.meta-item { display: inline-flex; align-items: center; gap: 6px; }
.meta-item .icon { width: 14px; height: 14px; }

.hero-arrow {
    position: absolute;
    right: 18px;
    bottom: 18px;
    width: 36px; height: 36px;
    border: 1.5px solid rgba(255,255,255,.9);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 16px;
    background: rgba(255,255,255,.08);
    z-index: 1;
    transition: background .2s ease, color .2s ease;
}
.hero-card:hover .hero-arrow { background: #fff; color: #0f1f4b; }
.grid-card-half .hero-arrow { width: 30px; height: 30px; right: 14px; bottom: 14px; font-size: 14px; }
.grid-card-half .hero-overlay { padding: 16px 52px 14px 18px; gap: 8px; }

/* =========================================================
   SECTION HEAD (ribbon)
   ========================================================= */
.section-latest { margin-top: 34px; }

.section-head {
    display: flex;
    align-items: center;
    gap: 0;
    margin-bottom: 18px;
}

.ribbon-title {
    display: flex;
    align-items: stretch;
    height: 40px;
    margin: 0;
    flex: 0 0 auto;
}
.ribbon-pattern {
    width: 62px;
    background: url('assets/ajrak-pattern.svg') center / 32px 32px repeat;
    clip-path: polygon(0 0, 100% 0, calc(100% - 10px) 100%, 0 100%);
}
.ribbon-text {
    display: inline-flex;
    align-items: center;
    margin-left: -6px;
    padding: 0 44px 0 34px;
    background: var(--red);
    color: #fff;
    font-family: var(--font-serif);
    font-size: 21px;
    font-weight: 800;
    letter-spacing: 1px;
    clip-path: polygon(0 0, 100% 0, calc(100% - 16px) 100%, 0 100%);
}

.section-line {
    flex: 1 1 auto;
    height: 1px;
    background: #aab2c4;
    margin: 0 18px;
}

.view-all-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 700;
    color: var(--red);
    white-space: nowrap;
}
.view-all-link:hover { color: var(--ink); }

/* =========================================================
   ARTICLE CARDS
   ========================================================= */
.article-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.article-card {
    display: flex;
    flex-direction: column;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 6px;
    overflow: hidden;
    transition: box-shadow .25s ease, transform .25s ease;
}
.article-card:hover { box-shadow: 0 10px 26px rgba(11,26,58,.12); transform: translateY(-3px); }

.article-thumb {
    aspect-ratio: 1.72 / 1;
    background: var(--navy) url('assets/ajrak-pattern.svg') center / 48px repeat;
    overflow: hidden;
}
.article-thumb { position: relative; }
.article-thumb img { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; object-fit: cover; display: block; }

.article-body { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 16px 16px 18px; flex: 1 1 auto; }

.article-title {
    margin: 0;
    font-size: 18px;
    line-height: 1.3;
    font-weight: 700;
}
.article-title a { color: var(--ink); }
.article-title a:hover { color: var(--red); }

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 12px;
    font-size: 12px;
    color: var(--muted);
}
.article-meta .meta-item .icon { width: 13px; height: 13px; }

.article-excerpt {
    margin: 0;
    font-size: 13.5px;
    line-height: 1.55;
    color: var(--text-soft);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.read-more {
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13.5px;
    font-weight: 700;
    color: var(--red);
}
.read-more:hover { color: var(--ink); gap: 9px; }

/* =========================================================
   EXPLORE SINDH
   ========================================================= */
.section-explore { margin-top: 40px; }

.explore-head {
    display: flex;
    align-items: center;
}
.explore-head .section-line { margin: 0 22px; background: #8f98ae; }
.explore-head h2 {
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 28px;
    font-weight: 700;
    white-space: nowrap;
}
.explore-head .orn { width: 22px; height: 22px; color: var(--ink); }

.explore-sub { text-align: center; margin: 8px 0 20px; color: var(--text-soft); font-size: 14px; }

.explore-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }

.explore-card {
    position: relative;
    min-height: 205px;
    border-radius: var(--radius);
    overflow: hidden;
    background-color: var(--ink);
    background-size: cover;
    background-position: center;
    color: #fff;
    display: flex;
}
.explore-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(8,18,45,.92), rgba(8,18,45,.55));
}
.explore-card.explore-history:not(.has-img) { background-image: linear-gradient(135deg, #8a6a3d, #3b2d1c); }
.explore-card.explore-culture:not(.has-img) { background-image: url('assets/ajrak-pattern.svg'); background-size: 70px; }
.explore-card.explore-culture:not(.has-img)::before { background: linear-gradient(to top, rgba(8,18,45,.95), rgba(8,18,45,.72)); }
.explore-card.explore-tourism:not(.has-img) { background-image: linear-gradient(135deg, #1d4f7c, #0b1a3a); }

.explore-inner {
    position: relative;
    z-index: 1;
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 36px 22px 22px;
    width: 100%;
    align-self: flex-end;
}
.explore-icon {
    flex: 0 0 54px;
    width: 54px; height: 54px;
    border-radius: 50%;
    background: var(--green);
    border: 2px solid rgba(255,255,255,.85);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}
.explore-copy h3 { margin: 0 0 6px; color: #fff; font-size: 23px; font-weight: 700; }
.explore-copy p { margin: 0 0 14px; font-size: 13.5px; line-height: 1.5; color: rgba(255,255,255,.94); }
.explore-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    background: var(--green);
    color: #fff;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    transition: background .2s ease, gap .2s ease;
}
.explore-btn:hover { background: var(--red); color: #fff; gap: 11px; }

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer {
    position: relative;
    overflow: hidden;
    margin-top: 44px;
    background: var(--navy-deep);
    color: #fff;
}
.footer-inner, .footer-bottom {
    width: calc(100% - (var(--gutter) * 2));
    max-width: var(--container);
    margin-left: auto;
    margin-right: auto;
}
.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 26px 0 18px;
}
.footer-brand img { display: block; height: 44px; width: auto; }

.footer-links { display: flex; flex-wrap: wrap; justify-content: center; }
.footer-links a {
    color: #fff;
    font-size: 13px;
    padding: 0 16px;
    border-left: 1px solid rgba(255,255,255,.4);
    line-height: 14px;
}
.footer-links a:first-child { border-left: 0; }
.footer-links a:hover { color: #f3b6b9; }

.footer-follow { display: flex; align-items: center; gap: 8px; }
.follow-label { font-size: 13px; margin-right: 6px; }
.social-btn {
    width: 30px; height: 30px;
    border: 1px solid rgba(255,255,255,.65);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 14px;
    transition: background .2s ease, color .2s ease;
}
.social-btn:hover { background: #fff; color: #0f1f4b; }

.footer-bottom {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 16px 0 20px;
    border-top: 1px solid rgba(255,255,255,.18);
}
.footer-copyright { grid-column: 2; margin: 0; font-size: 12px; color: rgba(255,255,255,.92); }
.footer-motto {
    grid-column: 3;
    justify-self: end;
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-serif);
    font-size: 15px;
    color: #fff;
}
.footer-motto em { font-style: italic; }
.motto-diamond { color: var(--red-bright); width: 22px; height: 22px; }
.motto-dot { color: rgba(255,255,255,.7); }

.footer-ajrak {
    position: absolute;
    left: 0; bottom: 0;
    width: 92px; height: 92px;
    background: url('assets/ajrak-pattern.svg') left bottom / 34px 34px repeat;
    clip-path: polygon(0 12%, 100% 100%, 0 100%);
    opacity: .95;
    pointer-events: none;
}

/* =========================================================
   INNER PAGES (single, category, search, page, archive, etc.)
   These templates carry their own inline styles; the rules below
   give them the same container, fonts and colours.
   ========================================================= */
.post-content img, .page-content img { height: auto; }

/* =========================================================
   INNER PAGE PARTS
   ========================================================= */
.site-main > :first-child:not(.hero-area) { margin-top: 0; }
.site-main { padding-top: 0; }

.breadcrumbs { font-size: 13px; color: var(--muted); margin: 18px 0 12px; display: flex; flex-wrap: wrap; align-items: center; gap: 2px; }
.breadcrumbs a { color: var(--ink); font-weight: 500; }
.breadcrumbs a:hover { color: var(--red); }
.crumb-sep { font-style: normal; margin: 0 7px; opacity: .5; }

.page-banner { margin-bottom: 22px; }
.page-banner-row { display: flex; align-items: center; min-width: 0; }
.banner-title { max-width: 70%; min-width: 0; font-size: inherit; }
.banner-title .ribbon-text { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; text-transform: uppercase; }
.banner-kicker { font-size: 13px; font-weight: 700; color: var(--red); letter-spacing: .5px; text-transform: uppercase; white-space: nowrap; }
.banner-desc { margin-top: 12px; max-width: 760px; color: var(--text-soft); font-size: 15px; }
.banner-desc p { margin: 0; }

.article-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.content-layout .article-grid, .content-layout .article-grid.cols-3 { grid-template-columns: repeat(2, 1fr); }
.article-thumb { display: block; }

.pagination { margin: 32px 0 8px; }
.pagination ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 14px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    color: var(--ink);
}
.pagination a.page-numbers:hover { background: var(--red); border-color: var(--red); color: #fff; }
.pagination .page-numbers.current { background: var(--navy); border-color: var(--ink); color: #fff; }
.pagination .dots { border: 0; background: transparent; }

.no-results { text-align: center; padding: 50px 20px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.no-results p { margin: 0 0 16px; font-size: 16px; color: var(--text-soft); }

/* WordPress default search form */
.search-form { display: flex; max-width: 460px; margin: 0 auto; }
.search-form label { flex: 1 1 auto; display: block; }
.search-form .screen-reader-text { position: absolute; left: -9999px; }
.search-form .search-field { width: 100%; height: 42px; padding: 0 14px; border: 1px solid #cfd5e1; border-right: 0; border-radius: 6px 0 0 6px; font: inherit; font-size: 14px; outline: none; background: var(--card); }
.search-form .search-field:focus { border-color: var(--ink); }
.search-form .search-submit { height: 42px; padding: 0 20px; border: 0; background: var(--navy); color: #fff; font: inherit; font-weight: 600; border-radius: 0 6px 6px 0; cursor: pointer; }
.search-form .search-submit:hover { background: var(--red); }

/* Layout with sidebar (single posts) */
.content-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 34px; align-items: start; margin-top: 4px; }
.content-main { min-width: 0; }

.sidebar { display: flex; flex-direction: column; gap: 22px; align-self: start; margin-top: 18px; min-width: 0; }
.sidebar .search-form { max-width: none; margin: 0; }
.sidebar .search-form .search-submit { padding: 0 14px; }
.widget-search .widget-title { margin-bottom: 12px; }
.widget { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.widget-title { margin: 0 0 14px; padding-bottom: 10px; font-size: 18px; border-bottom: 3px solid var(--red); display: inline-block; }
.widget-posts, .widget-cats { list-style: none; margin: 0; padding: 0; }
.widget-posts li { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.widget-posts li:last-child { border-bottom: 0; padding-bottom: 0; }
.wp-thumb { flex: 0 0 76px; width: 76px; height: 58px; border-radius: 6px; overflow: hidden; background: var(--navy) url('assets/ajrak-pattern.svg') center / 30px repeat; }
.wp-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wp-title { display: block; font-family: var(--font-serif); font-size: 15px; font-weight: 700; line-height: 1.3; color: var(--ink); }
.wp-title:hover { color: var(--red); }
.wp-date { display: block; margin-top: 3px; font-size: 12px; color: var(--muted); }
.widget-cats a { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; font-weight: 500; }
.widget-cats li:last-child a { border-bottom: 0; }
.widget-cats a span { min-width: 26px; text-align: center; padding: 0 8px; background: var(--cream); border-radius: 999px; font-size: 12px; color: var(--muted); }
.widget-cats a:hover span { background: var(--red); color: #fff; }

/* Static page */
.page-content { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 32px; min-width: 0; }
.entry-thumb { margin-bottom: 20px; border-radius: 8px; overflow: hidden; }
.entry-thumb img { display: block; width: 100%; height: auto; }

/* Author header */
.author-card { display: flex; align-items: center; gap: 18px; padding: 20px; background: var(--card); border: 1px solid var(--line); border-left: 5px solid var(--red); border-radius: var(--radius); }
.author-card .author-avatar { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; flex: 0 0 auto; }
.author-card .author-info { flex: 1 1 auto; min-width: 0; }
.author-card h1 { margin: 0 0 4px; font-size: 26px; }
.author-card p { margin: 0; color: var(--text-soft); font-size: 14px; }
.author-count { flex: 0 0 auto; padding: 6px 14px; background: var(--navy); color: #fff; border-radius: 999px; font-size: 13px; font-weight: 600; }

/* 404 */
.error-page { text-align: center; padding: 56px 16px 40px; }
.error-code { display: block; font-family: var(--font-serif); font-size: 96px; line-height: 1; font-weight: 800; color: var(--red); }
.error-page h1 { margin: 6px 0 10px; font-size: 32px; }
.error-page p { max-width: 520px; margin: 0 auto 22px; color: var(--text-soft); }
.error-home { margin-top: 20px; }

/* Sticky nav (desktop), back to top, reading progress */
@media (min-width: 901px) {
    .nav-bar { position: sticky; top: 0; }
    .admin-bar .nav-bar { top: 32px; }
}
.back-top {
    position: fixed;
    right: 20px;
    bottom: 22px;
    z-index: 60;
    width: 44px; height: 44px;
    border: 0;
    border-radius: 50%;
    background: var(--red);
    color: #fff;
    box-shadow: 0 6px 18px rgba(11,26,58,.3);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity .25s ease, transform .25s ease, visibility .25s;
}
.back-top .icon { transform: rotate(-90deg); }
.back-top.show { opacity: 1; visibility: visible; transform: none; }
.back-top:hover { background: var(--navy); }

.read-progress { position: fixed; left: 0; top: 0; width: 100%; height: 4px; z-index: 100; background: transparent; }
.admin-bar .read-progress { top: 32px; }
.read-progress span { display: block; height: 100%; width: 0; background: var(--red); }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1100px) {
    .nav-item { padding: 0 10px; font-size: 12.5px; }
    .article-grid.cols-3 { grid-template-columns: repeat(2, 1fr); }
    .content-layout { grid-template-columns: minmax(0, 1fr) 280px; gap: 24px; }
    .nav-item { padding: 0 12px; font-size: 13px; }
    .nav-ajrak { flex-basis: 44px; }
    .article-grid { grid-template-columns: repeat(2, 1fr); }
    .hero-main .hero-title { font-size: 28px; }
}

@media (max-width: 900px) {
    :root { --gutter: 16px; }
    .content-layout { grid-template-columns: minmax(0, 1fr); }
    .sidebar { margin-top: 10px; }
    .read-progress { display: none; }
    .banner-title { max-width: 100%; }
    .banner-kicker { display: none; }
    .page-banner-row .section-line { display: none; }
    .page-content { padding: 20px; }
    .author-card { flex-wrap: wrap; }

    .top-social { display: none; }
    .top-date { border-right: 0; }

    .main-header { flex-wrap: wrap; gap: 12px; align-items: center; }
    .site-logo { order: 1; flex: 1 1 auto; min-width: 0; }
    .site-logo img.custom-logo { height: auto; width: 100%; max-width: 270px; }
    .nav-toggle { order: 2; display: inline-flex; flex: 0 0 auto; }
    .header-search { order: 3; flex: 1 1 100%; margin: 0; }
    .auth-links { display: none; }
    .nav-bar .nav-auth-li { display: flex; border-top: 1px solid rgba(255,255,255,.25); background: rgba(0,0,0,.12); }
    .nav-auth-li .nav-item { flex: 1 1 50%; justify-content: center; }
    .content-layout .article-grid, .content-layout .article-grid.cols-3 { grid-template-columns: repeat(2, 1fr); }

    .nav-bar {
        display: none;
        height: auto;
        flex-direction: column;
        border-radius: 8px;
        overflow: hidden;
    }
    .nav-bar.open { display: flex; }
    .nav-ajrak { display: none; }
    .nav-list { flex-direction: column; }
    .nav-list { width: 100%; }
    .nav-li { display: block; border-top: 1px solid rgba(255,255,255,.12); }
    .nav-item { display: flex; align-items: center; padding: 14px 18px; font-size: 15px; }
    .nav-item .chev { width: 34px; height: 34px; padding: 10px; margin: -8px -10px -8px auto; opacity: .9; border-radius: 50%; transition: transform .2s ease, background .2s ease; }
    .nav-item .chev:active { background: rgba(255,255,255,.15); }
    .has-dropdown.open > .nav-item .chev { transform: rotate(180deg); }
    .has-dropdown.open > .nav-item { background: rgba(255,255,255,.08); }

    .dropdown {
        display: none;
        position: static;
        min-width: 0;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border-top: 0;
        border-radius: 0;
        padding: 4px 0 8px;
        background: rgba(0,0,0,.22);
    }
    .has-dropdown.open .dropdown { display: block; }
    .has-dropdown:hover .dropdown, .has-dropdown:focus-within .dropdown { transform: none; }
    .dropdown a { color: #e6ebf5; padding: 10px 18px 10px 30px; font-size: 14px; border-left: 0; }
    .dropdown a:hover { background: rgba(255,255,255,.08); color: #fff; }
    .dropdown .dropdown-all { color: #fff; border-bottom: 1px solid rgba(255,255,255,.14); }

    .hero-area { grid-template-columns: 1fr; height: auto; }
    .hero-main { height: 360px; }
    .hero-grid-right { grid-template-rows: 220px 190px; }

    .explore-grid { grid-template-columns: 1fr; }

    .footer-inner { flex-direction: column; text-align: center; gap: 20px; padding: 24px 0 14px; }
    .footer-brand img { height: 44px; width: auto; max-width: 100%; margin: 0 auto; }
    .footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 8px; }
    .footer-links a { border: 1px solid rgba(255,255,255,.28); border-radius: 999px; padding: 6px 14px; line-height: 1.3; font-size: 13px; white-space: nowrap; }
    .footer-links a:first-child { border-left: 1px solid rgba(255,255,255,.28); }
    .footer-links a:hover { background: rgba(255,255,255,.1); color: #fff; }
    .footer-follow { justify-content: center; }
    .footer-bottom { grid-template-columns: 1fr; justify-items: center; gap: 10px; padding: 16px 0 72px; text-align: center; }
    .footer-copyright, .footer-motto { grid-column: 1; justify-self: center; }
    .footer-ajrak { width: 64px; height: 64px; }
    .back-top { right: 14px; bottom: 16px; width: 40px; height: 40px; }
}

@media (max-width: 600px) {
    .content-layout .article-grid, .content-layout .article-grid.cols-3 { grid-template-columns: 1fr; }
    .top-date { padding: 0 10px; font-size: 12px; }
    .breaking-badge { padding: 0 12px 0 10px; }
    .hero-main { height: 320px; }
    .hero-main .hero-title { font-size: 24px; }
    .grid-card-full .hero-title { font-size: 20px; }
    .hero-grid-right { grid-template-columns: 1fr; grid-template-rows: 210px 200px 200px; }
    .grid-card-half .hero-title { font-size: 18px; }

    .ribbon-text { font-size: 17px; padding: 0 34px 0 26px; }
    .ribbon-pattern { width: 40px; }
    .section-line { display: none; }
    .section-head { justify-content: space-between; }
    .article-grid, .article-grid.cols-3 { grid-template-columns: 1fr; }
    .error-code { font-size: 72px; }
    .explore-head .section-line { display: block; margin: 0 12px; }
    .explore-head h2 { font-size: 22px; gap: 8px; }
    .explore-head .orn { width: 16px; height: 16px; }
}

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; animation: none !important; }
}


/* =========================================================
   SIDEBAR WIDGETS (Hijri calendar, Did you know, topics)
   ========================================================= */
.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 200; padding: 8px 14px; background: var(--navy); color: #fff; border-radius: 4px; }
.skip-link:focus { left: 8px; color: #fff; }

.wp-rank {
    flex: 0 0 24px;
    width: 24px; height: 24px;
    margin-top: 2px;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--navy); color: #fff;
    border-radius: 50%;
    font-size: 12px; font-weight: 700;
}
.widget-posts li:nth-child(1) .wp-rank { background: var(--red); }

/* --- Hijri calendar --- */
.widget-hijri { padding: 0; overflow: hidden; border: 0; box-shadow: 0 10px 28px rgba(11,26,58,.16); background: var(--card); }
.hijri-head {
    height: 14px;
    background: url('assets/ajrak-pattern.svg') center / 28px 28px repeat-x;
}
.hijri-fallback { padding: 20px; text-align: center; color: var(--ink); }
.hijri-fallback strong { display: block; font-family: var(--font-serif); font-size: 22px; }

.hj-today {
    position: relative;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 18px 16px;
    color: #fff;
    background: linear-gradient(135deg, #0b1a3a 0%, #17306b 100%);
}
.hj-today::after {
    content: '';
    position: absolute; right: -26px; top: -26px;
    width: 120px; height: 120px;
    background: url('assets/ajrak-pattern.svg') center / 30px;
    opacity: .16;
    transform: rotate(12deg);
}
.hj-daybox {
    position: relative;
    flex: 0 0 74px; width: 74px; height: 74px;
    display: flex; align-items: center; justify-content: center;
    background: var(--red);
    border: 2px solid rgba(255,255,255,.85);
    border-radius: 14px;
    font-family: var(--font-serif);
    font-size: 40px; font-weight: 800; line-height: 1;
    box-shadow: 0 6px 16px rgba(0,0,0,.3);
}
.hj-meta { position: relative; min-width: 0; }
.hj-kicker { display: block; font-size: 10.5px; letter-spacing: 1.4px; text-transform: uppercase; color: #f3b6b9; font-weight: 700; margin-bottom: 2px; }
.hj-month { display: block; font-family: var(--font-serif); font-size: 21px; font-weight: 700; line-height: 1.2; }
.hj-arabic { display: block; font-size: 20px; line-height: 1.3; direction: rtl; font-family: 'Noto Naskh Arabic', 'Amiri', 'Traditional Arabic', serif; color: #ffd9db; }
.hj-greg { display: block; margin-top: 4px; font-size: 12.5px; color: rgba(255,255,255,.88); }

.hj-nav { display: flex; align-items: center; justify-content: space-between; padding: 12px 12px 6px; gap: 8px; }
.hj-nav-title { text-align: center; min-width: 0; line-height: 1.25; }
.hj-nav-title strong { display: block; font-family: var(--font-serif); font-size: 16px; color: var(--ink); }
.hj-nav-title small { display: block; font-size: 11px; color: var(--muted); }
.hj-btn {
    width: 32px; height: 32px; flex: 0 0 auto;
    border: 1px solid var(--line); border-radius: 50%;
    background: var(--card); color: var(--ink);
    font-size: 18px; line-height: 1; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
    transition: background .2s, color .2s;
}
.hj-btn:hover { background: var(--navy); color: #fff; }

.hj-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; padding: 4px 12px 8px; }
.hj-dow { text-align: center; font-size: 11px; font-weight: 700; color: var(--muted); padding: 4px 0; }
.hj-dow.is-fri { color: var(--green); }
.hj-cell {
    position: relative;
    aspect-ratio: 1 / 1.08;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    border-radius: 8px;
    background: #faf7f2;
    line-height: 1.1;
    color: var(--ink);
}
.hj-cell b { font-size: 14px; font-weight: 700; }
.hj-cell small { font-size: 9.5px; color: var(--muted); margin-top: 2px; }
.hj-cell.is-fri b { color: var(--green); }
.hj-cell.is-today { background: var(--red); color: #fff; box-shadow: 0 4px 10px rgba(179,20,27,.35); }
.hj-cell.is-today b, .hj-cell.is-today small { color: #fff; }
.hj-cell.is-blank { background: transparent; }
.hj-foot { display: flex; justify-content: center; padding: 2px 12px 14px; }
.hj-today-btn { border: 0; background: transparent; color: var(--red); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.hj-today-btn:hover { color: var(--ink); }

/* --- Did you know --- */
.widget-fact { padding: 0; overflow: hidden; border: 0; background: var(--navy-deep); color: #fff; }
.fact-pattern { height: 14px; background: url('assets/ajrak-pattern.svg') center / 28px 28px repeat-x; }
.fact-body { padding: 18px 20px 18px; }
.fact-kicker { display: inline-block; padding: 4px 10px; background: var(--green); border-radius: 4px; font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; }
.fact-slide { display: none; }
.fact-slide.is-active { display: block; animation: factIn .35s ease; }
.fact-slide h4 { margin: 12px 0 6px; color: #fff; font-size: 20px; }
.fact-slide p { margin: 0; font-size: 14px; line-height: 1.6; color: rgba(255,255,255,.9); }
.fact-next { margin-top: 14px; display: inline-flex; align-items: center; gap: 7px; padding: 7px 14px; border: 1px solid rgba(255,255,255,.6); border-radius: 999px; background: transparent; color: #fff; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.fact-next:hover { background: #fff; color: #0f1f4b; }
@keyframes factIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* --- Topics --- */
.topic-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.topic-cloud a { padding: 5px 12px; background: var(--cream); border: 1px solid var(--line); border-radius: 999px; font-size: 13px; color: var(--ink); }
.topic-cloud a:hover { background: var(--red); border-color: var(--red); color: #fff; }

/* Single post image placeholder */
.single-thumb { position: relative; min-height: 180px; background: var(--navy) url('assets/ajrak-pattern.svg') center / 56px repeat; }
.single-thumb img { position: relative; z-index: 1; }
.single-thumb figcaption { position: relative; z-index: 2; }
.wp-thumb { background: var(--navy) url('assets/ajrak-pattern.svg') center / 30px repeat; }
.wp-thumb img { position: relative; }

/* Menu fit: 9 items must always fit on one line */
@media (min-width: 901px) and (max-width: 1260px) {
    .nav-item { padding: 0 12px; font-size: 13.5px; gap: 4px; }
    .nav-ajrak { flex-basis: 48px; }
}
@media (min-width: 901px) and (max-width: 1100px) {
    .nav-item { padding: 0 9px; font-size: 12.5px; }
    .nav-ajrak { flex-basis: 28px; }
}

/* =========================================================
   POLISH: motion, focus, selection, scrollbars
   ========================================================= */
html { scroll-behavior: smooth; }
::selection { background: var(--red); color: #fff; }
:focus-visible { outline: 3px solid #e8767c; outline-offset: 2px; border-radius: 3px; }
.nav-item:focus-visible, .nav-toggle:focus-visible { outline-color: #fff; outline-offset: -3px; }
input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 0; border-color: var(--red) !important; box-shadow: 0 0 0 3px rgba(179,20,27,.18); }
* { scrollbar-width: thin; scrollbar-color: #9aa4ba transparent; }

/* Cards, images and buttons feel alive */
.article-thumb img, .hero-img, .wp-thumb img, .pg-item img { transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.article-card:hover .article-thumb img { transform: scale(1.06); }
.article-card { transition: box-shadow .3s ease, transform .3s ease, border-color .3s ease; }
.article-card:hover { border-color: rgba(179,20,27,.35); }
.explore-card { transition: transform .35s ease, box-shadow .35s ease; }
.explore-card:hover { transform: translateY(-5px); box-shadow: 0 16px 34px rgba(11,26,58,.28); }
.cat-badge, .explore-btn, .wc-btn, .share-btn, .social-btn, .hj-btn, .read-more, .view-all-link { transition: background .25s ease, color .25s ease, transform .2s ease, box-shadow .25s ease, gap .25s ease; }
.explore-btn:active, .wc-btn:active, .share-btn:active, .fact-next:active, .hj-btn:active { transform: scale(.96); }
.widget { transition: box-shadow .3s ease; }
.widget:hover { box-shadow: 0 8px 22px rgba(11,26,58,.08); }
.post-content a { text-decoration-thickness: 1px; transition: color .2s ease, text-decoration-color .2s ease; }

/* Loading shimmer behind images (hidden once the picture appears) */
.article-thumb::after, .hero-card::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.22) 50%, transparent 70%);
    background-size: 220% 100%;
    animation: shimmer 1.8s linear infinite;
    pointer-events: none;
}
@keyframes shimmer { from { background-position: 120% 0; } to { background-position: -120% 0; } }

/* Gentle reveal on scroll (only when JavaScript is running) */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.in { opacity: 1; transform: none; }

/* =========================================================
   THEME TOGGLE + LOGO SWAP + LIVE SEARCH
   ========================================================= */
.theme-toggle {
    flex: 0 0 auto;
    width: 30px; height: 30px;
    margin: 0 6px 0 0;
    border: 1px solid rgba(255,255,255,.35);
    border-radius: 50%;
    background: transparent;
    color: #fff;
    display: inline-flex; align-items: center; justify-content: center;
    cursor: pointer;
    font-size: 15px;
    transition: background .25s ease, transform .3s ease;
}
.theme-toggle:hover { background: rgba(255,255,255,.18); transform: rotate(18deg); }
.theme-toggle .ico-sun { display: none; }
html[data-theme="dark"] .theme-toggle .ico-sun { display: inline-block; }
html[data-theme="dark"] .theme-toggle .ico-moon { display: none; }

.logo-on-dark { display: none !important; }
html[data-theme="dark"] .logo-on-dark { display: block !important; }
html[data-theme="dark"] .logo-on-light { display: none !important; }

.header-search { position: relative; }
.search-suggest {
    position: absolute;
    top: calc(100% + 4px); left: 0; right: 0;
    z-index: 80;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 16px 32px rgba(11,26,58,.2);
    overflow: hidden;
}
.search-suggest[hidden] { display: none; }
.search-suggest a { display: block; padding: 10px 16px; font-size: 14px; color: var(--text); border-bottom: 1px solid var(--line); line-height: 1.35; }
.search-suggest a:last-child { border-bottom: 0; }
.search-suggest a:hover, .search-suggest a.is-active { background: rgba(179,20,27,.08); color: var(--red); }
.search-suggest .ss-all { font-weight: 700; color: var(--red); }
.search-suggest .ss-empty { padding: 12px 16px; font-size: 13.5px; color: var(--muted); }

/* =========================================================
   TODAY IN SINDH dashboard + new widgets
   ========================================================= */
.dash-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: stretch; }
.dash-grid > .widget { margin: 0; height: 100%; }
.widget-hijri, .widget-fact { height: auto; }

.pw-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.pw-head .widget-title { margin: 0; }
.pw-city { max-width: 130px; height: 34px; padding: 0 28px 0 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--card); color: var(--text); font: inherit; font-size: 13px; cursor: pointer; }
.pw-next { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 10px; padding: 14px 16px; margin-bottom: 8px; border-radius: 10px; color: #fff; background: linear-gradient(135deg, #0b1a3a 0%, #17306b 100%); }
.pw-next-label { font-size: 12px; letter-spacing: .8px; text-transform: uppercase; color: #f3b6b9; font-weight: 700; }
.pw-next-time { grid-row: 1 / span 2; grid-column: 2; font-family: var(--font-serif); font-size: 26px; }
.pw-next-in { font-size: 12.5px; color: rgba(255,255,255,.85); }
.pw-list { list-style: none; margin: 0; padding: 0; }
.pw-list li { display: flex; align-items: center; justify-content: space-between; padding: 8px 10px; border-radius: 8px; font-size: 14px; }
.pw-list li:nth-child(odd) { background: rgba(15,31,75,.04); }
html[data-theme="dark"] .pw-list li:nth-child(odd) { background: rgba(255,255,255,.04); }
.pw-list li.is-next { background: var(--red) !important; color: #fff; }
.pw-list li.is-next .pw-name em { color: rgba(255,255,255,.85); }
.pw-name em { font-style: normal; margin-left: 8px; font-size: 13px; color: var(--muted); font-family: var(--font-arabic), serif; }
.pw-time { font-variant-numeric: tabular-nums; }
.pw-note { margin: 10px 0 0; font-size: 11.5px; color: var(--muted); line-height: 1.5; }

.ww-list { list-style: none; margin: 0; padding: 0; }
.ww-list li { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 10px; padding: 9px 4px; border-bottom: 1px solid var(--line); font-size: 14px; }
.ww-list li:last-child { border-bottom: 0; }
.ww-city { font-weight: 600; color: var(--ink); }
.ww-cond { font-size: 13px; color: var(--muted); white-space: nowrap; }
.ww-temp { min-width: 46px; text-align: right; font-family: var(--font-serif); font-size: 18px; color: var(--ink); }

.widget-channel { display: flex; flex-direction: column; gap: 12px; padding: 20px; border: 0; color: #fff; background: linear-gradient(135deg, #128c7e 0%, #075e54 100%); position: relative; overflow: hidden; }
.widget-channel::after { content: ''; position: absolute; right: -30px; bottom: -30px; width: 130px; height: 130px; background: url('assets/ajrak-pattern.svg') center / 30px; opacity: .12; transform: rotate(14deg); pointer-events: none; }
.wc-icon { width: 46px; height: 46px; border-radius: 50%; background: #fff; color: #128c7e; display: inline-flex; align-items: center; justify-content: center; font-size: 26px; }
.wc-text h3 { margin: 0 0 4px; color: #fff; font-size: 19px; }
.wc-text p { margin: 0; font-size: 13.5px; line-height: 1.5; color: rgba(255,255,255,.92); }
.wc-btn { align-self: flex-start; position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 8px; padding: 9px 18px; border-radius: 999px; background: #fff; color: #075e54; font-size: 13.5px; font-weight: 700; }
.wc-btn:hover { background: #e8fff4; color: #075e54; gap: 11px; }
.widget-channel.is-wide { flex-direction: row; align-items: center; gap: 18px; margin: 34px 0 0; padding: 22px 26px; }
.widget-channel.is-wide .wc-text { flex: 1 1 auto; }
.widget-channel.is-wide .wc-btn { align-self: center; flex: 0 0 auto; }

.widget-otd { position: relative; overflow: hidden; padding-top: 30px; }
.widget-otd::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 12px; background: url('assets/ajrak-pattern.svg') center / 24px 24px repeat-x; }
.otd-kicker { display: inline-block; padding: 3px 10px; background: var(--red); color: #fff; border-radius: 4px; font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; }
.otd-date { display: flex; align-items: baseline; gap: 8px; margin: 12px 0 6px; font-family: var(--font-serif); color: var(--ink); }
.otd-day { font-size: 46px; font-weight: 800; line-height: 1; color: var(--red); }
.otd-month { font-size: 20px; font-weight: 700; text-transform: uppercase; }
.otd-year { font-size: 16px; color: var(--muted); }
.otd-text { margin: 0; font-size: 14.5px; line-height: 1.6; color: var(--text-body); }
.otd-when { display: block; margin-top: 8px; color: var(--green); font-weight: 600; font-size: 12.5px; }

.widget-quote { position: relative; overflow: hidden; background: linear-gradient(135deg, #fff8ee 0%, #f6ead6 100%); border-color: #ecd9b8; }
html[data-theme="dark"] .widget-quote { background: linear-gradient(135deg, #1b2440 0%, #141c31 100%); border-color: var(--line); }
.quote-mark { position: absolute; right: 14px; top: -8px; font-family: var(--font-serif); font-size: 120px; line-height: 1; color: rgba(179,20,27,.14); pointer-events: none; }
.quote-kicker { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--red); }
.quote-text { margin: 10px 0 12px; padding: 0; border: 0; background: transparent; font-family: var(--font-serif); font-size: 18px; line-height: 1.5; font-style: italic; color: var(--ink); }
.quote-author { display: block; font-style: normal; font-size: 13px; font-weight: 700; color: var(--text-soft); }
.quote-author::before { content: '\2014\00a0'; }

.pg-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.pg-item { position: relative; display: block; aspect-ratio: 1; overflow: hidden; border-radius: 6px; background: var(--navy) url('assets/ajrak-pattern.svg') center / 30px repeat; }
.pg-item img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pg-item:hover img { transform: scale(1.1); }
.pg-strip { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.pg-strip .pg-item { aspect-ratio: 4 / 3; border-radius: 8px; }

.lb { position: fixed; inset: 0; z-index: 400; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 20px; background: rgba(5,10,25,.94); animation: lbIn .25s ease; }
@keyframes lbIn { from { opacity: 0; } to { opacity: 1; } }
.lb-img { max-width: min(1100px, 100%); max-height: 74vh; object-fit: contain; border-radius: 8px; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.lb-cap { max-width: 760px; text-align: center; color: #e8edf8; font-size: 15px; }
.lb-cap a { display: inline-block; margin-top: 6px; color: #ff9ca1; font-weight: 700; }
.lb-btn { position: absolute; width: 46px; height: 46px; border: 1px solid rgba(255,255,255,.4); border-radius: 50%; background: rgba(255,255,255,.08); color: #fff; font-size: 22px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.lb-btn:hover { background: rgba(255,255,255,.22); }
.lb-close { top: 16px; right: 16px; }
.lb-prev { left: 14px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 14px; top: 50%; transform: translateY(-50%); }

/* =========================================================
   ADS
   ========================================================= */
.ad-slot { margin: 20px auto; text-align: center; max-width: 100%; overflow: hidden; }
.ad-header { width: calc(100% - (var(--gutter) * 2)); max-width: var(--container); margin: 14px auto 0; }
.ad-label { display: block; margin-bottom: 4px; font-size: 10.5px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--muted); }
.ad-inner { min-height: 90px; }
.ad-sidebar { margin: 0; }

/* =========================================================
   RECIPE CARD
   ========================================================= */
.recipe-jump { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 18px; padding: 8px 18px; background: var(--green); color: #fff; border-radius: 999px; font-size: 14px; font-weight: 700; }
.recipe-jump:hover { background: var(--red); color: #fff; }
.recipe-card { margin: 32px 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: 0 10px 28px rgba(11,26,58,.08); scroll-margin-top: 80px; }
.recipe-head { position: relative; padding: 34px 22px 18px; background: linear-gradient(135deg, #0b1a3a, #17306b); color: #fff; }
.recipe-head::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 14px; background: url('assets/ajrak-pattern.svg') center / 28px 28px repeat-x; }
.recipe-kicker { font-size: 11px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: #f3b6b9; }
.recipe-head h2 { margin: 4px 0 0; padding: 0; border: 0; color: #fff; font-size: 26px; }
.recipe-print { position: absolute; right: 18px; bottom: 16px; padding: 7px 14px; border: 1px solid rgba(255,255,255,.55); border-radius: 999px; background: transparent; color: #fff; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.recipe-print:hover { background: #fff; color: #0f1f4b; }
.recipe-chips { list-style: none; margin: 0; padding: 14px 22px; display: flex; flex-wrap: wrap; gap: 10px; border-bottom: 1px solid var(--line); background: var(--cream); }
.recipe-chips li { display: flex; flex-direction: column; min-width: 78px; padding: 8px 14px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; }
.recipe-chips span { font-size: 11px; text-transform: uppercase; letter-spacing: .8px; color: var(--muted); }
.recipe-chips b { font-size: 15px; color: var(--ink); }
.recipe-body { display: grid; grid-template-columns: 1fr 1.3fr; gap: 28px; padding: 22px; }
.recipe-col h3 { margin: 0 0 12px; padding-bottom: 8px; font-size: 20px; border-bottom: 3px solid var(--red); display: inline-block; }
.recipe-ingredients { list-style: none; margin: 0; padding: 0; }
.recipe-ingredients li { padding: 7px 0; border-bottom: 1px dashed var(--line); margin: 0; }
.recipe-ingredients label { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; font-size: 16px; line-height: 1.5; }
.recipe-ingredients input { margin-top: 5px; accent-color: var(--green); width: 17px; height: 17px; flex: 0 0 auto; }
.recipe-ingredients input:checked + span { text-decoration: line-through; opacity: .55; }
.recipe-steps { margin: 0; padding: 0; list-style: none; counter-reset: step; }
.recipe-steps li { position: relative; margin: 0 0 14px; padding: 2px 0 2px 46px; counter-increment: step; font-size: 16px; line-height: 1.7; min-height: 34px; }
.recipe-steps li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 32px; height: 32px; border-radius: 50%; background: var(--red); color: #fff; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; font-size: 15px; }

/* =========================================================
   COMMENTS
   ========================================================= */
.screen-reader-text { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.paksindh-comments { margin-top: 34px; }
.paksindh-comments-title { margin: 0 0 18px; padding-bottom: 10px; font-size: 24px; border-bottom: 3px solid var(--red); display: inline-block; }
.paksindh-comments-list, .paksindh-comments-list ol { list-style: none; margin: 0; padding: 0; }
.paksindh-comments-list ol { margin-left: 26px; padding-left: 18px; border-left: 2px solid var(--line); }
.paksindh-comment { margin: 0 0 16px; }
.paksindh-comment-body { display: flex; gap: 14px; padding: 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.paksindh-comment-avatar img { width: 48px; height: 48px; border-radius: 50%; display: block; }
.paksindh-comment-content { min-width: 0; flex: 1 1 auto; }
.paksindh-comment-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-bottom: 6px; }
.paksindh-comment-author { font-family: var(--font-serif); font-size: 17px; font-weight: 700; color: var(--ink); }
.paksindh-comment-badge { padding: 2px 8px; background: var(--green); color: #fff; border-radius: 4px; font-size: 10.5px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; }
.paksindh-comment-date { font-size: 12.5px; color: var(--muted); }
.paksindh-comment-pending { margin: 0 0 8px; padding: 6px 10px; background: #fff4d6; color: #7a5b00; border-radius: 6px; font-size: 13px; }
.paksindh-comment-text { font-size: 15.5px; line-height: 1.7; color: var(--text-body); overflow-wrap: anywhere; }
.paksindh-comment-text p { margin: 0 0 .8em; }
.paksindh-comment-text p:last-child { margin-bottom: 0; }
.paksindh-comment-reply a { display: inline-block; margin-top: 8px; font-size: 13px; font-weight: 700; color: var(--red); }
.paksindh-comment-reply a:hover { color: var(--ink); }
.paksindh-comment-pagination { margin: 18px 0; display: flex; gap: 8px; flex-wrap: wrap; }
.paksindh-comment-pagination .page-numbers { padding: 6px 12px; background: var(--card); border: 1px solid var(--line); border-radius: 6px; font-weight: 600; }
.paksindh-comment-pagination .current { background: var(--navy); color: #fff; border-color: var(--navy); }
.paksindh-comments-closed { padding: 14px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); color: var(--muted); }

.paksindh-comment-form { margin-top: 30px; padding: 22px; background: var(--card); border: 1px solid var(--line); border-top: 4px solid var(--red); border-radius: var(--radius); }
.paksindh-comment-form-title { margin: 0 0 14px; font-size: 22px; }
.paksindh-comment-form-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.paksindh-comment-form-inner p { margin: 0; }
.paksindh-comment-form-inner .comment-form-comment,
.paksindh-comment-form-inner .comment-form-url,
.paksindh-comment-form-inner .comment-form-cookies-consent,
.paksindh-comment-form-inner .form-submit,
.paksindh-comment-form-inner .comment-notes,
.paksindh-comment-form-inner .logged-in-as { grid-column: 1 / -1; }
.paksindh-comment-form-inner input[type="text"],
.paksindh-comment-form-inner input[type="email"],
.paksindh-comment-form-inner input[type="url"],
.paksindh-comment-form-inner textarea { width: 100%; padding: 12px 14px; font: inherit; font-size: 15px; color: var(--text); background: var(--cream); border: 1px solid var(--line); border-radius: 8px; outline: none; }
.paksindh-comment-form-inner textarea { min-height: 130px; resize: vertical; }
.comment-form-cookies-consent { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: var(--muted); }
.comment-form-cookies-consent input { margin-top: 3px; accent-color: var(--red); }
.paksindh-comment-form-inner input[type="submit"] { border: 0; cursor: pointer; font: inherit; font-weight: 700; padding: 11px 26px; background: var(--red); color: #fff; border-radius: 999px; }
.paksindh-comment-form-inner input[type="submit"]:hover { background: var(--navy); }

/* =========================================================
   DARK MODE
   ========================================================= */
html[data-theme="dark"] {
    color-scheme: dark;
    --cream: #0c1221;
    --card: #141c31;
    --line: #26314d;
    --text: #dde3f0;
    --muted: #98a4bf;
    --ink: #e9eef9;
    --text-body: #d3dbec;
    --text-soft: #a9b4cb;
    --border-color: #26314d;
    --primary: #e9eef9;
    --text-dark: #dde3f0;
    --text-muted: #98a4bf;
    --bg-light: #141c31;
    --card-bg: #141c31;
}
html[data-theme="dark"] body { background: var(--cream); color: var(--text); }
html[data-theme="dark"] .hj-cell { background: var(--cream); }
html[data-theme="dark"] .hj-cell.is-today { background: var(--red); }
html[data-theme="dark"] .section-line { background: #3a4668; }
html[data-theme="dark"] .header-search input[type="search"],
html[data-theme="dark"] .search-form .search-field { border-color: #33405f; color: var(--text); }
html[data-theme="dark"] .post-content a,
html[data-theme="dark"] .read-more,
html[data-theme="dark"] .view-all-link,
html[data-theme="dark"] .paksindh-comment-reply a,
html[data-theme="dark"] .banner-kicker,
html[data-theme="dark"] .breadcrumbs a:hover { color: #ff7f86; }
html[data-theme="dark"] .post-nav a span, html[data-theme="dark"] .otd-day { color: #ff7f86; }
html[data-theme="dark"] .toc { border-left-color: var(--green); }
html[data-theme="dark"] .wp-rank { background: #2a3a66; }
html[data-theme="dark"] .widget-posts li:nth-child(1) .wp-rank { background: var(--red); }
html[data-theme="dark"] .paksindh-comment-pending { background: #3a3010; color: #ffd98a; }
html[data-theme="dark"] .dropdown a:hover { background: rgba(255,255,255,.06); }
html[data-theme="dark"] .pagination .page-numbers.current { background: var(--red); border-color: var(--red); }
html[data-theme="dark"] img { filter: brightness(.92); }
html[data-theme="dark"] .logo-on-dark, html[data-theme="dark"] .site-footer img { filter: none; }

/* =========================================================
   URDU / SINDHI TEXT
   ========================================================= */
[dir="auto"] { text-align: start; }
.post-content :is(p, li, h2, h3, h4, blockquote)[dir="auto"] { font-family: inherit; }

/* =========================================================
   PRINT
   ========================================================= */
@media print {
    body { background: #fff !important; color: #000 !important; font-size: 12pt; }
    .top-bar, .main-header, .nav-bar, .sidebar, .site-footer, .post-share, .post-nav, .related-section,
    .paksindh-comments, .back-top, .read-progress, .ad-slot, .recipe-print, .recipe-jump, .skip-link, .breadcrumbs, .toc { display: none !important; }
    .content-layout { display: block; }
    .post-content, .post-content p { color: #000 !important; font-size: 12pt; line-height: 1.6; }
    .post-content a { color: #000; text-decoration: none; }
    .post-content a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt; color: #555; word-break: break-all; }
    .single-thumb img { max-height: 9cm; width: auto; }
    .recipe-card { box-shadow: none; page-break-inside: avoid; }
    body.print-recipe .single-article > *:not(.recipe-card),
    body.print-recipe .related-section, body.print-recipe .site-main > .content-layout > .sidebar { display: none !important; }
}

/* =========================================================
   RESPONSIVE (new components)
   ========================================================= */
@media (max-width: 1100px) {
    .dash-grid { grid-template-columns: repeat(2, 1fr); }
    .pg-strip { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
    .recipe-body { grid-template-columns: 1fr; gap: 18px; }
    .widget-channel.is-wide { flex-direction: column; align-items: flex-start; }
    .widget-channel.is-wide .wc-btn { align-self: flex-start; }
    .theme-toggle { margin-right: 10px; }
}
@media (max-width: 700px) {
    .dash-grid { grid-template-columns: 1fr; }
    .paksindh-comment-form-inner { grid-template-columns: 1fr; }
    .recipe-print { position: static; margin-top: 12px; }
    .recipe-head { padding-bottom: 20px; }
    .paksindh-comments-list ol { margin-left: 10px; padding-left: 10px; }
    .paksindh-comment-body { padding: 12px; gap: 10px; }
}
@media (max-width: 520px) {
    .pg-strip { grid-template-columns: repeat(2, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
    .js .reveal { opacity: 1 !important; transform: none !important; }
    html { scroll-behavior: auto; }
}


/* =========================================================
   DASHBOARD CARD POLISH (Today in Sindh)
   ========================================================= */
.dash-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.dash-grid > .widget { display: flex; flex-direction: column; }

/* every card gets the same Ajrak ribbon on top */
.widget-prayer, .widget-weather, .widget-quote, .widget-otd { position: relative; overflow: hidden; padding-top: 32px; }
.widget-prayer::before, .widget-weather::before, .widget-quote::after {
    content: '';
    position: absolute; left: 0; right: 0; top: 0; height: 12px;
    background: url('assets/ajrak-pattern.svg') center / 24px 24px repeat-x;
}

/* prayer and weather lists stretch to fill the card, no empty gaps */
.widget-prayer .pw-list, .widget-weather .ww-list { flex: 1 1 auto; display: flex; flex-direction: column; justify-content: space-between; }
.widget-prayer .pw-list li { flex: 1 1 auto; }
.widget-weather .ww-list li { flex: 1 1 auto; }

.pw-next { background: linear-gradient(135deg, #0b1a3a 0%, #17306b 100%); box-shadow: 0 6px 16px rgba(11,26,58,.25); }
.pw-next-time { white-space: nowrap; }

/* weather hero */
.ww-hero { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 4px 0 10px; padding: 14px 16px; border-radius: 10px; color: #fff; background: linear-gradient(135deg, #1d4f7c 0%, #0b1a3a 100%); box-shadow: 0 6px 16px rgba(11,26,58,.25); }
.ww-hero-main { display: flex; align-items: center; gap: 10px; }
.ww-hero-icon { font-size: 34px; line-height: 1; }
.ww-hero-temp { font-family: var(--font-serif); font-size: 34px; line-height: 1; color: #fff; }
.ww-hero-meta { text-align: right; line-height: 1.35; }
.ww-hero-city { display: block; font-size: 16px; color: #fff; }
.ww-hero-cond { display: block; font-size: 12.5px; color: rgba(255,255,255,.85); }
.widget-weather .ww-list li { padding: 8px 4px; }

/* second row cards: content centred vertically */
.widget-otd, .widget-quote { justify-content: center; }
.widget-fact .fact-body { flex: 1 1 auto; display: flex; flex-direction: column; justify-content: center; }
.widget-hijri { justify-content: flex-start; }
.widget-hijri .hijri-cal { flex: 1 1 auto; }

.otd-kicker, .quote-kicker, .fact-kicker { align-self: flex-start; }
