/* =========================================
   TOHED ENGLISH — overrides on top of the ported tohed.com CSS
   (header/footer/home/single-post were flipped RTL→LTR with rtlcss;
   this file re-tunes typography for Latin text and styles the
   English-only pieces.) Loaded last.
   ========================================= */

html[lang] body {
    font-family: var(--font-body);
    direction: ltr;
    text-align: left;
}

/* Mobile logo sizing (was the inline #mobile-fix block on tohed.com) */
@media (max-width: 576px) {
    .tohed-logo-image { height: 80px !important; width: 80px !important; }
    .tohed-logo { order: 2; width: 100%; justify-content: center; }
    .tohed-header-content { flex-wrap: wrap; justify-content: center; }
    .tohed-mobile-toggle { display: flex; }
}
@media (max-width: 768px) {
    .tohed-logo-image { height: 105px; width: 105px; }
}

/* ── Headings: Playfair Display like the EN hadith/tafsir pages ── */
.section-title,
.archive-title,
.article-title,
.tohed-404-title,
.ub-hero-title,
.ub-category-title,
.section-heading h2,
.whatsapp-cta-content h2,
.adb-title {
    font-family: var(--font-heading) !important;
    letter-spacing: 0;
    line-height: 1.3;
}

/* Nastaliq needed tall line-heights + big sizes; Latin does not */
.article-card-title,
.archive-article-link .article-title,
.post-nav-title,
.card-title,
.card-title a,
.resource-title,
.tohed-category-tag .category-name,
.tohed-nav-link,
.tohed-dropdown-item,
.tohed-mobile-nav-link,
.tohed-mobile-submenu-link,
.tohed-footer-links a,
.tohed-footer-title {
    font-family: var(--font-body) !important;
    line-height: 1.45;
}
.article-card-title { font-size: 1rem; font-weight: 500; }
.archive-article-link .article-title { font-size: 1.02rem; }
.tohed-nav-link { font-size: 0.95rem; }
.section-subtitle,
.archive-description,
.resource-desc,
.tohed-footer-about-text,
.tohed-notice-banner p {
    font-family: var(--font-body) !important;
    line-height: 1.6;
}

/* ── Header search (native WP search instead of Google CSE) ── */
.tohed-search-form {
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: 999px;
    padding: 4px 4px 4px 18px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.12);
    width: 100%;
}
.tohed-search-form input[type="search"] {
    flex: 1;
    border: 0;
    outline: 0;
    background: transparent;
    font: 400 1rem var(--font-body);
    color: #1f2d2d;
    min-width: 0;
    padding: 10px 0;
}
.tohed-search-form button {
    border: 0;
    border-radius: 999px;
    background: #0d4a4a;
    color: #fff;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    cursor: pointer;
}
.tohed-search-form button:hover { background: #0a3a3a; }
.tohed-mobile-search .tohed-search-form { box-shadow: none; border: 1px solid #d8e3e3; }

/* ── Article body ── */
.article-content {
    font-family: var(--font-body);
    font-size: 1.08rem;
    line-height: 1.8;
    color: #1f2933;
    text-align: left;
}
.article-content p { margin-bottom: 1.1em; }
.article-content h2,
.article-content h3,
.article-content h4 {
    font-family: var(--font-heading);
    line-height: 1.35;
    margin: 1.6em 0 0.6em;
    text-align: left;
}
.article-content ul,
.article-content ol { padding-left: 1.4em; padding-right: 0; }
.article-content blockquote {
    border-left: 4px solid #c9a227;
    border-right: 0;
    background: #faf7ee;
    padding: 12px 18px;
    margin: 1.2em 0;
    border-radius: 0 8px 8px 0;
}
.article-content table { width: 100%; margin: 1.2em 0; border-collapse: collapse; }
.article-content th,
.article-content td { border: 1px solid #dfe6e6; padding: 8px 10px; text-align: left; vertical-align: top; }
.article-content img { max-width: 100%; height: auto; border-radius: 8px; }

/* Arabic quotations (were [ARABIC] BBCode on XenForo) */
.article-content .arabic-text,
.article-content [lang="ar"] {
    font-family: var(--font-arabic, 'Naskh Musaad', 'Amiri', serif);
    direction: rtl;
    unicode-bidi: isolate;
    font-size: 1.45em;
    line-height: 2;
    color: #0d4a4a;
}
.article-content div.arabic-text,
.article-content p.arabic-block {
    display: block;
    text-align: right;
    margin: 0.8em 0;
}

/* References (were [REF] BBCode) */
.article-content .en-ref {
    font-size: 0.92em;
    color: #444;
    margin: 6px 0 14px;
    padding: 8px 12px;
    border-left: 4px solid #9bb0b0;
    background: #f5f8f8;
    border-radius: 0 6px 6px 0;
}
.article-content .en-ref strong:first-child { color: #0d4a4a; }

/* Author / source box (was [AUTHOR] BBCode) — LTR twin of tohed.com's .btahreer */
.article-content .author-attribution {
    position: relative;
    overflow: hidden;
    margin: 0 0 25px;
    padding: 18px 22px 18px 54px;
    font-family: var(--font-body);
    font-size: 17px;
    font-weight: 500;
    line-height: 1.65;
    color: var(--primary-dark, #0d4a4a);
    text-align: left;
    background: linear-gradient(135deg, #f0f9f8 0%, #e8f5f4 50%, #e0f2f1 100%);
    border: 1px solid rgba(26, 95, 90, 0.25);
    border-left: 5px solid var(--accent-gold, #c9a227);
    border-radius: 10px;
    box-shadow: 0 3px 12px rgba(26, 95, 90, 0.1), 0 1px 3px rgba(26, 95, 90, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}
.article-content .author-attribution::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary, #1a5f5a) 0%, var(--accent-gold, #c9a227) 50%, var(--primary, #1a5f5a) 100%);
}
.article-content .author-attribution::after {
    content: "📌";
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    line-height: 1;
    filter: saturate(1.2);
    opacity: 0.95;
    pointer-events: none;
}
.article-content .author-attribution a {
    color: var(--primary, #1a5f5a);
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: var(--accent-gold, #c9a227);
    text-underline-offset: 4px;
}
.article-content .author-attribution a:hover {
    color: var(--primary-dark, #0d4a4a);
    text-decoration-color: var(--primary, #1a5f5a);
}
@media (max-width: 576px) {
    .article-content .author-attribution { font-size: 16px; padding: 14px 16px 14px 46px; }
    .article-content .author-attribution::after { left: 14px; font-size: 18px; }
}

/* ── Actions bar: Urdu pill + share ── */
.tohed-lang-pill,
.tohed-share-btn,
.tohed-copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 999px;
    padding: 7px 14px;
    font: 500 0.9rem var(--font-body);
    border: 1px solid #cfe0e0;
    background: #fff;
    color: #0d4a4a;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s ease;
}
.tohed-lang-pill { background: #0d4a4a; color: #fff; border-color: #0d4a4a; }
.tohed-lang-pill span { font-family: 'Noto Nastaliq Urdu', 'Jameel Noori Nastaleeq', serif; line-height: 1.6; }
.tohed-lang-pill:hover { background: #0a3a3a; color: #fff; }
.tohed-share-btn:hover,
.tohed-copy-btn:hover { background: #eef5f5; }

/* Category hero: Urdu pill under the title */
.archive-hero .tohed-lang-pill { margin-top: 12px; }

/* ── Books page ── */
.ub-book-byline {
    display: block;
    font-size: 0.85rem;
    color: #5f6f6f;
    margin-top: 2px;
}
.ub-badge-new { font-family: var(--font-body); font-size: 0.72rem; }
.ub-counter-label,
.ub-stat-label { font-family: var(--font-body) !important; }

/* Last nav item ("More") — dropdown opens leftwards so it stays inside the page */
.tohed-nav-item:last-child .tohed-dropdown-menu { left: auto; right: 0; }

/* ﷺ / honorific ligatures: Inter has no glyph — use the Arabic face at a readable size */
@font-face {
    font-family: 'Tohed Honorific';
    src: url('../webfonts/amiri-v30-arabic-700.woff2') format('woff2');
    unicode-range: U+FDFA, U+FDFB, U+FD3E, U+FD3F;
    font-display: swap;
}
:root { --font-body: 'Tohed Honorific', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; }

/* Paragraphs/lists: the Urdu sheet sets 23px + Nastaliq line-height + justify */
.article-content p,
.article-content li,
.article-content blockquote p {
    font-size: 18px;
    line-height: 1.8;
    text-align: left;
}
.article-content li { margin-bottom: 0.35em; }
.article-content a { color: #0f6b6b; text-decoration: underline; text-decoration-color: rgba(15, 107, 107, 0.35); text-underline-offset: 3px; }
.article-content a:hover { text-decoration-color: currentColor; }
@media (max-width: 576px) {
    .article-content p, .article-content li, .article-content blockquote p { font-size: 17px; line-height: 1.75; }
}

/* Archive / listing pages: their inline <style> (printed in the body) still carries Nastaliq sizing */
body .archive-articles-list .archive-article-link .article-title,
body .tohed-articles-list .article-title {
    font-family: var(--font-body) !important;
    font-size: 1.02rem !important;
    line-height: 1.5 !important;
}

/* Keep the header search centred when the right-hand app icons are hidden (TOHED_EN_SHOW_APP_LINKS) */
@media (min-width: 577px) {
    .tohed-header-content .tohed-header-actions { min-width: 130px; justify-content: flex-end; }
}

/* ── Makkah / Madinah live pages ([holy_live]) ── */
.tohed-live { max-width: 900px; margin: 40px auto; padding: 0 16px; text-align: center; font-family: var(--font-body); }
.tohed-live-title { font-family: var(--font-heading); font-size: 2.1rem; color: #1a5f5a; margin: 0 0 6px; }
.tohed-live-sub { font-size: 1.1rem; color: #5f6f6f; margin: 0 0 22px; }
.tohed-live-player { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; border-radius: 14px; background: #000; box-shadow: 0 6px 24px rgba(0, 0, 0, 0.18); }
.tohed-live-player video { position: absolute; inset: 0; width: 100%; height: 100%; background: #000; }
.tohed-live-channel { margin: 16px 0 4px; font-size: 0.95rem; color: #6b7b7b; }
.tohed-live-note { margin: 0 0 18px; font-size: 0.88rem; color: #8a9999; }
.tohed-live-other { display: inline-flex; align-items: center; gap: 8px; padding: 10px 20px; border-radius: 999px; background: #0d4a4a; color: #fff; text-decoration: none; font-weight: 600; }
.tohed-live-other:hover { background: #0a3a3a; color: #fff; }

/* ── SEO guide + FAQ under app pages (inc/page-seo-copy.php) — same look as /hadith/ /tafsir/ guides ── */
.tohed-seo-copy { max-width: 860px; margin: 48px auto 24px; padding: 28px 30px; background: #fffdf8; border: 1px solid #ece6d6; border-radius: 14px; font-family: var(--font-body); font-size: 1.02rem; line-height: 1.75; color: #2b3a3a; text-align: left; }
.tohed-seo-copy h2 { font-family: var(--font-heading); font-size: 1.45rem; color: #1a5f5a; margin: 28px 0 10px; line-height: 1.3; }
.tohed-seo-copy h2:first-child { margin-top: 0; }
.tohed-seo-copy p { margin: 0 0 14px; }
.tohed-seo-copy ul { margin: 0 0 16px; padding-left: 22px; }
.tohed-seo-copy li { margin-bottom: 8px; }
.tohed-seo-copy a { color: #0f6b6b; text-decoration: none; border-bottom: 1px solid rgba(15, 107, 107, 0.3); }
.tohed-seo-copy a:hover { border-bottom-color: #0f6b6b; }
.tohed-seo-copy .saw { font-family: 'Amiri', 'Naskh Musaad', serif; font-size: 1.2em; line-height: 1; }
.tohed-seo-faq details { background: #fff; border: 1px solid #e6efee; border-radius: 10px; padding: 12px 16px; margin-bottom: 10px; }
.tohed-seo-faq summary { cursor: pointer; font-weight: 600; color: #1c2a2c; }
.tohed-seo-faq details[open] summary { margin-bottom: 8px; }
.tohed-seo-faq details p { margin: 0; }
@media (max-width: 576px) { .tohed-seo-copy { padding: 20px 16px; margin-top: 32px; font-size: 1rem; } }

/* PDF button (actions bar) */
.tohed-pdf-btn { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 7px 14px; font: 500 0.9rem var(--font-body); border: 1px solid #cfe0e0; background: #fff; color: #0d4a4a; cursor: pointer; }
.tohed-pdf-btn i { color: #b3261e; }
.tohed-pdf-btn:hover { background: #eef5f5; }

/* =========================================
   EN / UR LANGUAGE SWITCH (2026-10-22) — top bar, phone menu, footer
   Same component on en.tohed.com (theme tohed-en en.css + standalone/chrome.css)
   ========================================= */
.tohed-top-bar-end { display: flex; align-items: center; gap: 14px; }
.tohed-lang-switch { display: inline-flex; align-items: stretch; border: 1px solid rgba(230, 198, 90, .65); border-radius: 999px; overflow: hidden; line-height: 1; flex-shrink: 0; }
.tohed-lang-opt { display: inline-flex; align-items: center; padding: 3px 12px; font: 600 13px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif; color: #e6c65a; text-decoration: none; white-space: nowrap; }
.tohed-lang-opt[lang="ur"] { font-family: 'Mehr', 'Jameel Noori Nastaleeq', serif; font-size: 15px; line-height: 1.6; padding-top: 0; padding-bottom: 2px; }
.tohed-lang-opt.is-active { background: #c9a227; color: #0d3b37; }
a.tohed-lang-opt:hover, a.tohed-lang-opt:focus { background: rgba(230, 198, 90, .18); color: #fff; }
.tohed-lang-switch--light { display: flex; width: max-content; margin: 4px auto 14px; border-color: #1a5f5a; }
.tohed-lang-switch--light .tohed-lang-opt { color: #1a5f5a; padding: 5px 16px; }
.tohed-lang-switch--light .tohed-lang-opt.is-active { background: #1a5f5a; color: #fff; }
.tohed-lang-switch--light a.tohed-lang-opt:hover { background: rgba(26, 95, 90, .1); color: #1a5f5a; }
.tohed-footer-bottom-links .tohed-lang-switch { margin-inline-end: 6px; }

/* ── Article body: tohed.com (Urdu) look for references + Arabic (single-post.css .ref / .uarabic1w) ── */
.article-content .ref { color: #c9302c; font-weight: 700; font-size: .95em; font-family: var(--font-body); direction: ltr; unicode-bidi: isolate; line-height: inherit; }
.article-content .ref .arabic-text { color: inherit; font-size: 1.15em; }
.article-content .arabic-text,
.article-content [lang="ar"] { color: #4a2882; font-family: 'Naskh Musaad', 'Amiri', 'Traditional Arabic', serif; font-weight: 400; }
.article-content p.arabic-block,
.article-content div.arabic-text { font-size: 26px; line-height: 1.75; }
.article-content strong .arabic-text, .article-content .arabic-text strong { font-weight: 400; }
/* [REF] boxes from the forum → same red bracketed citation, no grey box or "Reference:" label */
.article-content .en-ref { background: none; border: 0; padding: 0; margin: 4px 0 14px; border-radius: 0; color: #c9302c; font-weight: 700; font-size: .92em; }
.article-content .en-ref > strong:first-child { display: none; }
.article-content .en-ref::before { content: "["; }
.article-content .en-ref::after { content: "]"; }
@media (max-width: 576px) { .article-content p.arabic-block, .article-content div.arabic-text { font-size: 23px; } }
