/* ==============================================================================
   pkpoint.com - Custom Design & Interactive Enhancements
   Modern Pakistani Portal Aesthetics: Emerald, Slate, Rich Gold, Glassmorphism
   ============================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@500;600;700;800&display=swap');

/* Base Layout Resets & FOUC / Dimension Safety Fallbacks */
*, ::before, ::after { box-sizing: border-box; }
html {
    max-width: 100vw;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
}
body {
    max-width: 100vw;
    overflow-x: hidden;
    position: relative;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    transition: background-color 0.3s ease, color 0.3s ease;
}
img, svg, video { max-width: 100%; height: auto; }
img { vertical-align: middle; }
header img, .site-logo img, [class*="logo"] img {
    max-width: 48px;
    max-height: 48px;
    object-fit: contain;
}
.overflow-x-auto {
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
}
p, span, h1, h2, h3, h4, h5, h6, a {
    overflow-wrap: break-word;
}

h1, h2, h3, h4, h5, h6, .font-heading {
    font-family: 'Outfit', sans-serif;
}

/* Glassmorphism Classes */
.glass-panel {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(229, 231, 235, 0.7);
}

.dark .glass-panel {
    background: rgba(17, 24, 39, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(55, 65, 81, 0.5);
}

/* Custom Gradient Backgrounds */
.hero-gradient {
    background: linear-gradient(135deg, #064e3b 0%, #065f46 45%, #0f766e 100%);
}

.portal-badge {
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.2);
}

/* Star Rating Hover Effects */
.star-rating .star-btn {
    transition: color 0.15s ease, transform 0.15s ease;
}
.star-rating .star-btn:hover {
    transform: scale(1.25);
}

/* Pulsing Badge for Pending Moderation */
@keyframes pulse-subtle {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.85;
        transform: scale(1.08);
    }
}
.pulse-badge {
    animation: pulse-subtle 2s infinite ease-in-out;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: #f1f5f9;
}
.dark ::-webkit-scrollbar-track {
    background: #0f172a;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}
.dark ::-webkit-scrollbar-thumb {
    background: #334155;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Mobile Drawer Transition */
#mobile-menu {
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}

/* Card Hover Micro-interactions */
.hover-lift {
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px -10px rgba(0, 0, 0, 0.15);
}

/* Prose Styling for Article Content */
.prose-content {
    line-height: 1.85;
    word-wrap: break-word;
    overflow-wrap: break-word;
}
.prose-content p {
    margin-top: 0.85rem;
    margin-bottom: 1.25rem;
    line-height: 1.85;
}
.prose-content h1 {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.25;
    margin-top: 2.25rem;
    margin-bottom: 1rem;
    color: #0f172a;
}
.dark .prose-content h1 {
    color: #f8fafc;
}
.prose-content h2 {
    font-size: 1.65rem;
    font-weight: 800;
    line-height: 1.35;
    margin-top: 2rem;
    margin-bottom: 0.85rem;
    color: #0f172a;
}
.dark .prose-content h2 {
    color: #f8fafc;
}
.prose-content h3 {
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.4;
    margin-top: 1.75rem;
    margin-bottom: 0.75rem;
    color: #1e293b;
}
.dark .prose-content h3 {
    color: #f1f5f9;
}
.prose-content h4 {
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.45;
    margin-top: 1.35rem;
    margin-bottom: 0.5rem;
    color: #334155;
}
.dark .prose-content h4 {
    color: #e2e8f0;
}
.prose-content h5 {
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.5;
    margin-top: 1.15rem;
    margin-bottom: 0.45rem;
    color: #475569;
}
.dark .prose-content h5 {
    color: #cbd5e1;
}
.prose-content h6 {
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.5;
    margin-top: 1rem;
    margin-bottom: 0.45rem;
    color: #64748b;
}
.dark .prose-content h6 {
    color: #94a3b8;
}

/* Bullet & Numbered Lists */
.prose-content ul {
    list-style-type: disc !important;
    margin: 1rem 0 1.25rem 0 !important;
    padding-left: 2rem !important;
}
.prose-content ol {
    list-style-type: decimal !important;
    margin: 1rem 0 1.25rem 0 !important;
    padding-left: 2rem !important;
}
.prose-content[dir="rtl"] ul,
.prose-content.font-urdu ul,
.prose-content .urdu-content ul {
    padding-left: 0 !important;
    padding-right: 2rem !important;
}
.prose-content[dir="rtl"] ol,
.prose-content.font-urdu ol,
.prose-content .urdu-content ol {
    padding-left: 0 !important;
    padding-right: 2rem !important;
}
.prose-content li {
    margin: 0.45rem 0 !important;
    line-height: 1.8 !important;
}
.prose-content ul ul,
.prose-content ol ul {
    list-style-type: circle !important;
    margin: 0.35rem 0 !important;
}
.prose-content ol ol,
.prose-content ul ol {
    list-style-type: lower-alpha !important;
    margin: 0.35rem 0 !important;
}

/* Links */
.prose-content a {
    color: #059669;
    text-decoration: underline;
    text-underline-offset: 3px;
    font-weight: 600;
    transition: color 0.15s ease, opacity 0.15s ease;
}
.prose-content a:hover {
    color: #047857;
    opacity: 0.9;
}
.dark .prose-content a {
    color: #34d399;
}
.dark .prose-content a:hover {
    color: #6ee7b7;
}

/* Inline Styles & Text Formatting */
.prose-content strong,
.prose-content b {
    font-weight: 700;
    color: inherit;
}
.prose-content em,
.prose-content i {
    font-style: italic;
}
.prose-content u {
    text-decoration: underline;
    text-underline-offset: 2px;
}
.prose-content mark {
    background-color: #fef08a;
    color: #713f12;
    padding: 0.15rem 0.4rem;
    border-radius: 0.25rem;
    font-weight: 500;
}
.dark .prose-content mark {
    background-color: #854d0e;
    color: #fef9c3;
}
.prose-content code {
    background-color: #f1f5f9;
    color: #e11d48;
    padding: 0.2rem 0.45rem;
    border-radius: 0.375rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.875em;
    font-weight: 600;
}
.dark .prose-content code {
    background-color: #1e293b;
    color: #fb7185;
}
.prose-content pre {
    background-color: #0f172a;
    color: #f8fafc;
    padding: 1rem 1.25rem;
    border-radius: 0.75rem;
    overflow-x: auto;
    margin: 1.5rem 0;
    font-size: 0.875rem;
    line-height: 1.6;
}
.prose-content pre code {
    background-color: transparent;
    color: inherit;
    padding: 0;
    border-radius: 0;
    font-size: inherit;
    font-weight: normal;
}
.prose-content hr {
    margin: 2rem 0;
    border: 0;
    border-top: 1px solid #e2e8f0;
}
.dark .prose-content hr {
    border-top-color: #334155;
}
.prose-content img {
    max-width: 100%;
    height: auto;
    border-radius: 0.75rem;
    margin: 1.5rem auto;
    display: block;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.08);
}
.prose-content figure {
    margin: 1.75rem auto;
    text-align: center;
}
.prose-content figcaption {
    font-size: 0.85rem;
    color: #64748b;
    margin-top: 0.5rem;
    font-style: italic;
}
.dark .prose-content figcaption {
    color: #94a3b8;
}

/* Blockquotes */
.prose-content blockquote {
    border-left: 4px solid #10b981;
    padding: 0.85rem 1.25rem;
    font-style: italic;
    margin: 1.5rem 0;
    color: #475569;
    background: rgba(16, 185, 129, 0.05);
    border-radius: 0 0.75rem 0.75rem 0;
}
.dark .prose-content blockquote {
    color: #94a3b8;
    background: rgba(16, 185, 129, 0.1);
}
.prose-content[dir="rtl"] blockquote,
.prose-content.font-urdu blockquote,
.prose-content .urdu-content blockquote {
    border-left: none;
    border-right: 4px solid #10b981;
    border-radius: 0.75rem 0 0 0.75rem;
    padding-left: 0;
    padding-right: 1.25rem;
}

/* Tables (Standard HTML & .article-table) */
.prose-content table,
.prose-content .article-table {
    width: 100%;
    margin: 1.5rem 0;
    border-collapse: collapse;
    font-size: 0.925rem;
    line-height: 1.6;
    border: 1px solid #cbd5e1;
    border-radius: 0.75rem;
    overflow: hidden;
}
.dark .prose-content table,
.dark .prose-content .article-table {
    border-color: #334155;
}
.prose-content table th,
.prose-content table td,
.prose-content .article-table th,
.prose-content .article-table td {
    border: 1px solid #cbd5e1;
    padding: 0.75rem 1rem;
    text-align: inherit;
    vertical-align: top;
}
.dark .prose-content table th,
.dark .prose-content table td,
.dark .prose-content .article-table th,
.dark .prose-content .article-table td {
    border-color: #334155;
}
.prose-content table th,
.prose-content .article-table th {
    background-color: #f1f5f9;
    font-weight: 700;
    color: #0f172a;
}
.dark .prose-content table th,
.dark .prose-content .article-table th {
    background-color: #1e293b;
    color: #f8fafc;
}
.prose-content table tr:nth-child(even) td,
.prose-content .article-table tr:nth-child(even) td {
    background-color: rgba(241, 245, 249, 0.45);
}
.dark .prose-content table tr:nth-child(even) td,
.dark .prose-content .article-table tr:nth-child(even) td {
    background-color: rgba(30, 41, 59, 0.45);
}
.prose-content table tr:hover td,
.prose-content .article-table tr:hover td {
    background-color: rgba(16, 185, 129, 0.05);
}
.table-responsive-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 1.5rem 0;
    border-radius: 0.75rem;
}

/* Urdu & Arabic Typography in Prose */
.prose-content .font-urdu,
.prose-content[dir="rtl"],
.prose-content .urdu-content {
    font-family: 'Jameel Noori Nastaleeq', 'Urdu Typesetting', Tahoma, sans-serif !important;
    text-align: right !important;
    line-height: 2.3 !important;
}
.prose-content .font-arabic,
.prose-content .font-quran,
.prose-content [lang="ar"],
.prose-content .arabic-block {
    font-family: 'Muhammadi Quranic', '1 MUHAMMADI QURANIC', 'Al Qalam Quran Majeed', 'Al Mushaf', 'Amiri Quran', 'Scheherazade New', 'Traditional Arabic', serif !important;
    direction: rtl !important;
    line-height: 2.6 !important;
    text-rendering: optimizeLegibility !important;
}
.prose-content .arabic-block {
    font-size: 1.4rem;
    text-align: center;
}
.prose-content span.font-arabic,
.prose-content span[lang="ar"] {
    font-size: 1.25rem !important;
    display: inline-block;
    padding: 0 0.25rem;
}
.prose-content .arabic-dua-card {
    border-radius: 1.25rem;
    padding: 1.5rem;
    margin: 1.75rem 0;
    background: linear-gradient(135deg, rgba(6,78,59,0.12) 0%, rgba(13,148,136,0.1) 100%);
    border: 1px solid rgba(16,185,129,0.4);
    text-align: center;
}

/* Out-of-the-Box Article Component Cards */
.prose-content .hadith-card {
    background: linear-gradient(135deg, rgba(6, 78, 59, 0.08) 0%, rgba(2, 44, 34, 0.12) 100%);
    border: 1px solid rgba(16, 185, 129, 0.35);
    border-radius: 1.25rem;
    padding: 1.5rem;
    margin: 1.75rem 0;
    box-shadow: 0 4px 15px -3px rgba(0, 0, 0, 0.05);
}
.dark .prose-content .hadith-card {
    background: linear-gradient(135deg, rgba(6, 78, 59, 0.25) 0%, rgba(2, 44, 34, 0.45) 100%);
    border-color: rgba(16, 185, 129, 0.4);
}
.prose-content .key-points-card {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.08) 0%, rgba(3, 105, 161, 0.1) 100%);
    border: 1px solid rgba(14, 165, 233, 0.3);
    border-radius: 1.25rem;
    padding: 1.5rem;
    margin: 1.75rem 0;
}
.dark .prose-content .key-points-card {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.18) 0%, rgba(3, 105, 161, 0.28) 100%);
    border-color: rgba(14, 165, 233, 0.35);
}
.prose-content .alert-card {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.08) 0%, rgba(180, 83, 9, 0.1) 100%);
    border: 1px solid rgba(245, 158, 11, 0.35);
    border-radius: 1.25rem;
    padding: 1.5rem;
    margin: 1.75rem 0;
}
.dark .prose-content .alert-card {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.18) 0%, rgba(180, 83, 9, 0.28) 100%);
    border-color: rgba(245, 158, 11, 0.4);
}
.prose-content .info-card {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, rgba(67, 56, 202, 0.1) 100%);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 1.25rem;
    padding: 1.5rem;
    margin: 1.75rem 0;
}
.dark .prose-content .info-card {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.18) 0%, rgba(67, 56, 202, 0.28) 100%);
    border-color: rgba(99, 102, 241, 0.35);
}
.prose-content .article-table {
    width: 100%;
    margin: 1.5rem 0;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 1rem;
    overflow: hidden;
    border: 1px solid rgba(156, 163, 175, 0.3);
}
.prose-content .article-table th {
    background-color: rgba(16, 185, 129, 0.15);
    padding: 0.75rem 1rem;
    font-weight: 700;
    text-align: inherit;
    border-bottom: 1px solid rgba(156, 163, 175, 0.3);
}
.prose-content .article-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(156, 163, 175, 0.15);
}
.prose-content .article-table tr:last-child td {
    border-bottom: none;
}
.prose-content .hadith-ref {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    font-size: 0.75rem;
    font-weight: 700;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    border-radius: 9999px;
    background: rgba(16, 185, 129, 0.15);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.3);
}
.dark .prose-content .hadith-ref {
    background: rgba(16, 185, 129, 0.25);
    color: #6ee7b7;
}
.prose-content mark {
    background-color: #fef08a;
    color: #854d0e;
    padding: 0.15rem 0.4rem;
    border-radius: 0.375rem;
}
.dark .prose-content mark {
    background-color: #713f12;
    color: #fef08a;
}
.prose-content .figure-card {
    margin: 1.75rem 0;
    text-align: center;
}
.prose-content .figure-card img {
    border-radius: 1rem;
    margin: 0 auto;
    max-height: 480px;
    object-fit: cover;
    box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.1);
}
.prose-content .figure-card figcaption {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: #6b7280;
}
.dark .prose-content .figure-card figcaption {
    color: #9ca3af;
}

html[dir="rtl"] .prose-content ul,
html[dir="rtl"] .prose-content ol,
.prose-content[dir="rtl"] ul,
.prose-content[dir="rtl"] ol,
.prose-content.font-urdu ul,
.prose-content.font-urdu ol {
    margin-right: 1.75rem;
    margin-left: 0;
    text-align: right;
}

/* ==============================================================================
   pkpoint.com - Dual-Script Typography: Authentic Arabic Naskh & Urdu Nastaleeq
   ============================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Amiri:ital,wght@0,400;0,700;1,400;1,700&family=Amiri+Quran&family=Noto+Nastaliq+Urdu:wght@400;700&family=Scheherazade+New:wght@400;700&display=swap');

/* Global Urdu Nastaleeq Typography */
.font-urdu:not([class*="fa-"]):not(i),
.urdu-text:not([class*="fa-"]):not(i),
[lang="ur"]:not([class*="fa-"]):not(i),
:lang(ur):not([class*="fa-"]):not(i),
html[lang="ur"] body:not([class*="fa-"]):not(i),
.reader-font-nastaliq:not([class*="fa-"]):not(i) {
    font-family: 'Jameel Noori Nastaleeq', 'Noto Nastaliq Urdu', 'Nafees Web Nasta\'leeq', 'Urdu Typesetting', serif !important;
    letter-spacing: 0 !important;
    word-spacing: normal !important;
    line-height: 2.2 !important;
    text-rendering: optimizeLegibility !important;
    font-feature-settings: "kern" 1, "liga" 1, "clig" 1, "calt" 1 !important;
    direction: rtl;
    unicode-bidi: isolate;
}

/* Explicitly preserve FontAwesome icon fonts across all language & RTL wrappers */
.fa, .fas, .far, .fal, .fad, .fab,
.fa-solid, .fa-regular, .fa-brands,
[class^="fa-"], [class*=" fa-"],
i[class*="fa-"] {
    font-family: var(--fa-style-family, "Font Awesome 6 Free") !important;
}
.fa-brands, [class*="fa-brands"],
i.fa-brands {
    font-family: "Font Awesome 6 Brands" !important;
}

/* Ensure headings never apply synthetic 900 bold or negative tracking to Nastaliq */
h1.font-urdu, h2.font-urdu, h3.font-urdu, h4.font-urdu,
.font-urdu h1, .font-urdu h2, .font-urdu h3, .font-urdu h4,
.font-urdu.font-black, .font-urdu.font-extrabold {
    font-weight: 700 !important;
    letter-spacing: 0 !important;
}

/* Global Classical Arabic Naskh & Quranic Typography (Muhammadi Quranic Primary) */
.font-arabic,
.font-quran,
.arabic-text,
.quran-ayah,
.hadith-arabic,
.dua-arabic,
.ayah-arabic,
.arabic-quran,
.quran-text,
[lang="ar"],
:lang(ar),
.reader-font-naskh {
    font-family: 'Muhammadi Quranic', '1 MUHAMMADI QURANIC', 'Al Qalam Quran Majeed', 'Al Mushaf', 'Amiri Quran', 'Scheherazade New', 'Traditional Arabic', serif !important;
    letter-spacing: 0 !important;
    word-spacing: 1px !important;
    line-height: 2.3 !important;
    font-size: 1.15em;
    text-rendering: optimizeLegibility !important;
    font-feature-settings: "kern" 1, "liga" 1, "clig" 1, "calt" 1 !important;
    direction: rtl;
    unicode-bidi: isolate;
}

/* RTL typography & layout adjustments */
html[dir="rtl"] .font-urdu {
    letter-spacing: 0;
}

html[dir="rtl"] .prose-content blockquote {
    border-left: none;
    border-right: 4px solid #10b981;
    padding-left: 0;
    padding-right: 1.25rem;
}

/* Completely Hide Raw Google Translate Artifacts & Banner */
.goog-te-banner-frame.skiptranslate,
.goog-te-banner-frame,
iframe.goog-te-banner-frame {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    width: 0 !important;
}
body {
    top: 0px !important;
}
.goog-tooltip,
.goog-tooltip:hover,
#goog-gt-tt,
.goog-te-balloon-frame {
    display: none !important;
    visibility: hidden !important;
}
.goog-text-highlight {
    background-color: transparent !important;
    box-shadow: none !important;
}
#google_translate_element {
    position: absolute !important;
    left: -9999px !important;
    top: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Cross-Browser Scrollbar Hiding for Clean Navigation Strips */
.no-scrollbar::-webkit-scrollbar,
.scrollbar-none::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}
.no-scrollbar,
.scrollbar-none {
    -ms-overflow-style: none !important;
    scrollbar-width: none !important;
}

/* Visual Attraction & Micro-Interaction Utility Classes */
.card-hover-lift {
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease;
}
.card-hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 16px 32px -10px rgba(0, 0, 0, 0.15);
}

.card-hover-glow {
    transition: box-shadow 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}
.card-hover-glow:hover {
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.35);
    border-color: rgba(16, 185, 129, 0.6);
    transform: translateY(-2px);
}

/* Print Optimization for Recipe Modal and Reader */
@media print {
    header, footer, nav, #back-to-top, .portal-badge, button {
        display: none !important;
    }
    #recipeModal {
        position: static !important;
        background: white !important;
        display: block !important;
        padding: 0 !important;
    }
    #recipeModal > div {
        max-width: 100% !important;
        max-height: none !important;
        box-shadow: none !important;
        border: none !important;
    }
}

.card-hover-scale {
    transition: transform 0.25s ease;
}
.card-hover-scale:hover {
    transform: scale(1.025);
}

/* Micro-Floating & Live Pulse Animations */
@keyframes float-subtle {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-3px);
    }
}
.theme-float {
    animation: float-subtle 3s infinite ease-in-out;
}

@keyframes pulse-ring {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6);
    }
    70% {
        box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}
.theme-pulse {
    animation: pulse-ring 2s infinite cubic-bezier(0.4, 0, 0.6, 1);
}

/* Bulletproof HTML5 Visibility & Modal Utility Rules */
[hidden] {
    display: none !important;
}

/* Ensure main content container is always a block element */
main {
    display: block;
    width: 100%;
}

#mobile-backdrop.hidden,
#mobile-backdrop[hidden],
#mobile-menu.hidden,
#mobile-menu[hidden],
#language-modal.hidden,
#language-modal[hidden] {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Interactive Language Modal Animations */
#language-modal {
    transition: opacity 0.2s ease, visibility 0.2s ease;
}
#language-modal:not(.hidden):not([hidden]) {
    display: flex !important;
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
}
#language-modal-content {
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
}
#language-modal.hidden #language-modal-content,
#language-modal[hidden] #language-modal-content {
    transform: scale(0.95) translateY(10px);
    opacity: 0;
}
#language-modal:not(.hidden):not([hidden]) #language-modal-content {
    transform: scale(1) translateY(0);
    opacity: 1;
}

/* Daily Islamic Reflection Banner - Spacious Showcase & Adaptive Contrast (Light & Dark) */
#daily-reflection-banner {
    display: block !important;
}

html:not(.dark) #daily-reflection-banner {
    background: linear-gradient(135deg, #ECFDF5 0%, #D1FAE5 50%, #F0FDF4 100%) !important;
    border-color: #A7F3D0 !important;
    box-shadow: 0 10px 20px -3px rgba(16, 185, 129, 0.12) !important;
}

html:not(.dark) #daily-reflection-banner .daily-banner-identity h3 {
    color: #064E3B !important;
    font-weight: 800 !important;
}

html:not(.dark) #daily-reflection-banner .daily-banner-sacred {
    background-color: rgba(255, 255, 255, 0.78) !important;
    border-color: #A7F3D0 !important;
}

html:not(.dark) #daily-reflection-banner .daily-banner-sacred p.font-quran,
html:not(.dark) #daily-reflection-banner .daily-banner-sacred p.font-arabic,
html:not(.dark) #daily-reflection-banner .daily-banner-sacred p.font-urdu {
    color: #064E3B !important;
    font-weight: 500 !important;
    font-family: 'Muhammadi Quranic', '1 MUHAMMADI QURANIC', 'Al Qalam Quran Majeed', serif !important;
}

html:not(.dark) #daily-reflection-banner .daily-banner-sacred p.italic {
    color: #1E3A2F !important;
    font-weight: 500 !important;
}

html:not(.dark) #daily-reflection-banner a.daily-btn-primary {
    background-color: #059669 !important;
    color: #FFFFFF !important;
    border: none !important;
}
html:not(.dark) #daily-reflection-banner a.daily-btn-primary:hover {
    background-color: #047857 !important;
    color: #FFFFFF !important;
}

html:not(.dark) #daily-reflection-banner a.daily-btn-secondary {
    background-color: #FFFFFF !important;
    color: #065F46 !important;
    border: 1.5px solid #6EE7B7 !important;
}
html:not(.dark) #daily-reflection-banner a.daily-btn-secondary:hover {
    background-color: #ECFDF5 !important;
    color: #047857 !important;
    border-color: #10B981 !important;
}




/* ============================================================================
   MULTI-DEVICE RESPONSIVE ARCHITECTURE (320px Mobile -> 4K / Smart TV 1920px+)
   ============================================================================ */
:root {
    --color-accent: #10B981;
}

/* D-Pad / Spatial Navigation & Keyboard Accessibility */
:focus-visible {
    outline: 3px solid var(--color-accent);
    outline-offset: 4px;
    transform: scale(1.02);
    transition: transform 150ms ease, outline-offset 150ms ease;
}

/* Smart TV & 4K Displays (1920px+) */
@media (min-width: 1920px) {
    html {
        font-size: clamp(16px, 1vw, 22px);
    }
    .max-w-7xl,
    .pk-container-cap {
        max-width: 1640px !important;
        margin-inline: auto !important;
    }
}

/* Mobile (320px - 639px): Swipe Chips, 44px Touch Targets & Bottom App Bar */
.pk-swipe-chips {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 0.5rem;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.25rem;
}
.pk-swipe-chips::-webkit-scrollbar {
    display: none;
}
.pk-swipe-chips > * {
    flex: 0 0 auto;
    scroll-snap-align: start;
}

@media (max-width: 639px) {
    .pk-touch-target,
    #mobile-bottom-nav a,
    #mobile-bottom-nav button,
    .pk-swipe-chips a,
    .pk-swipe-chips button {
        min-width: 44px;
        min-height: 44px;
    }
    body.has-bottom-nav {
        padding-bottom: calc(56px + env(safe-area-inset-bottom, 0px));
    }
}

/* Mobile Fixed Bottom App Navigation (56px + Safe Area) */
#mobile-bottom-nav {
    height: calc(56px + env(safe-area-inset-bottom, 0px));
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

/* Tablet (640px - 1023px): 2-Column Adaptive Grid */
@media (min-width: 640px) and (max-width: 1023px) {
    .pk-tablet-2col {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

/* Logical Off-Canvas Slide-Over Drawer (LTR & RTL safe) */
#mobile-menu {
    inset-inline-end: 0;
    transform: translateX(100%);
    transition: transform 240ms cubic-bezier(0.22, 1, 0.36, 1);
}
html[dir="rtl"] #mobile-menu {
    transform: translateX(-100%);
}
#mobile-menu.is-open {
    transform: translateX(0) !important;
}

/* Article & Guide Reading Layout (68ch / 760px max + 320px sticky sidebar on Desktop) */
@media (min-width: 1024px) {
    .pk-guide-layout {
        display: grid;
        grid-template-columns: minmax(0, 760px) 320px;
        justify-content: space-between;
        gap: 2.5rem;
        align-items: start;
    }
    .pk-guide-main {
        max-width: 68ch;
        width: 100%;
    }
    .pk-guide-sidebar {
        width: 320px;
        position: sticky;
        top: 6.75rem;
    }
}
