/* HAKIM Theme — Blog Styles */
/* Loaded only on single blog posts (is_singular('post')). */

/* ==========================================================================
   1. Reading Progress Bar
   ========================================================================== */

.hk-reading-progress {
    position: fixed;
    top: 0;
    inset-inline-start: 0;
    width: 100%;
    height: 2px;
    z-index: var(--hk-z-overlay);
    background: transparent;
    pointer-events: none;
}

.hk-reading-progress__bar {
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, var(--hk-gold), var(--hk-gold-light));
    transform: scaleX(0);
    transform-origin: inline-start;
    transition: transform var(--hk-motion-hover) linear;
}

/* ==========================================================================
   2. Article Header
   ========================================================================== */

.hk-article__header {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding-top: 160px; /* fixed header clearance (80px) + own top padding (80px) */
    padding-bottom: 60px;
    margin-top: -80px; /* slide under sticky header */
    background: var(--hk-navy);
    color: var(--hk-white);
    text-align: center;
}

.hk-article__header.has-image {
    /* background-image now rendered by layered DOM (.hk-thumb-stack--cover) */
}

/* The cover image div is a positioned sibling of the ::before overlay; without
   an explicit z-index, tree-order rules paint it ABOVE the overlay, which
   defeats the overlay entirely. Pin it to z-index 0 and lift the overlay to
   z-index 1 so the image sits behind the readability gradient. The header
   establishes its own stacking context via `isolation: isolate`, so this does
   not leak into the rest of the page. */
.hk-article__header.has-image .hk-article__header-bg.hk-thumb-stack--cover {
    z-index: 0;
}

.hk-article__header.has-image::before {
    content: '';
    position: absolute;
    inset: 0;
    /* Flat navy overlay — uniform across the whole banner, no gradient.
       Tuned light enough that the image stays visible; the text-shadow
       on the H1 and meta below carries the readability load. */
    background: rgba(27, 42, 74, 0.45);
    z-index: 1;
}

/* Geometric pattern overlay */
.hk-article__header::after {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 30px,
        rgba(200, 169, 110, 0.08) 30px,
        rgba(200, 169, 110, 0.08) 31px
    );
    opacity: 0.03;
    pointer-events: none;
    z-index: 1;
}

.hk-article__header .hk-container--narrow {
    position: relative;
    z-index: 2;
}

.hk-article__category {
    margin-bottom: 1rem;
}

.hk-article__category a {
    display: inline-block;
    padding: 4px 14px;
    border: 1px solid var(--hk-teal);
    background: transparent;
    color: var(--hk-teal);
    font-family: var(--hk-font-body);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-radius: 999px;
    text-decoration: none;
    transition: var(--hk-transition);
}

.hk-article__category a:hover {
    background: var(--hk-gold);
    color: var(--hk-heading);
}

.hk-article__header h1 {
    color: var(--hk-white);
    font-size: clamp(26px, 4vw, 42px);
    max-width: 720px;
    margin: 0 auto 0;
    line-height: 1.25;
    /* Safety layer: keeps the title legible even if a cover image is unusually
       bright in the centre. The navy gradient overlay above does most of the
       work; this is a last-resort cushion. */
    text-shadow: 0 2px 14px rgba(0, 0, 0, 0.45), 0 1px 2px rgba(0, 0, 0, 0.35);
}

.hk-article__header.has-image .hk-article__meta {
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
}

.hk-article__meta {
    margin-top: 1.5rem;
    font-family: var(--hk-font-body);
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0;
}

.hk-article__meta-sep {
    margin: 0 0.5rem;
    opacity: 0.5;
}

.hk-article__meta a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color var(--hk-motion-hover);
}

.hk-article__meta a:hover {
    color: var(--hk-gold-light);
}

/* ==========================================================================
   3. Key Takeaways Box
   ========================================================================== */

.hk-takeaways {
    margin: 3rem 0;
    padding: 2rem;
    background: var(--hk-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: var(--hk-glass-border);  /* Spec B1 — Family 3 full border shorthand */
    border-inline-start: 3px solid var(--hk-teal);
    border-radius: 8px;
}

.hk-takeaways h3 {
    font-family: var(--hk-font-heading);
    color: var(--hk-heading);
    font-size: 18px;
    margin-bottom: 1rem;
    margin-top: 0;
}

.hk-takeaways__content {
    font-family: var(--hk-font-body);
    color: var(--hk-body);
    font-size: 15px;
    line-height: 1.7;
}

.hk-takeaways__content ul {
    margin: 0;
    padding-inline-start: 1.25rem;
}

.hk-takeaways__content li {
    margin-bottom: 0.5em;
}

/* ==========================================================================
   4. Article Layout — Content + ToC Grid
   ========================================================================== */

.hk-article__layout {
    display: grid;
    max-width: calc(var(--hk-container, 1200px) + 300px);
    margin: 0 auto;
    padding: 3rem 1.5rem;
    gap: 3rem;
    align-items: start;
}

@media (min-width: 1201px) {
    .hk-article__layout {
        grid-template-columns: 250px 1fr;
    }
}

@media (max-width: 1200px) {
    .hk-article__layout {
        grid-template-columns: 1fr;
        padding: 2rem 1.5rem;
    }
}

/* ==========================================================================
   5. Floating Table of Contents
   ========================================================================== */

@media (min-width: 1201px) {
    .hk-toc {
        position: sticky;
        top: 100px;
        align-self: start;
        max-height: calc(100vh - 140px);
        overflow-y: auto;
        opacity: 0.5;
        transition: opacity var(--hk-motion-hover) var(--hk-ease-out);
    }

    .hk-toc:hover,
    .hk-toc:focus-within {
        opacity: 1;
    }
}

@media (max-width: 1200px) {
    .hk-toc {
        position: static;
        margin-bottom: 2rem;
        padding: 1.5rem 1.5rem 1.5rem 2rem;
    }
}

.hk-toc h4 {
    font-family: var(--hk-font-body);
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--hk-body);
    margin-top: 0;
    margin-bottom: 1rem;
}

.hk-toc__list {
    list-style: none;
    padding: 0;
    margin: 0;
    position: relative;
}

/* Thin gold vertical line connecting all items */
.hk-toc__list::before {
    content: '';
    position: absolute;
    inset-inline-start: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--hk-gold);
    opacity: 0.3;
    border-radius: 1px;
}

.hk-toc__item {
    margin-bottom: 0.5rem;
}

.hk-toc__item--h3 {
    padding-inline-start: 1rem;
}

.hk-toc__item a {
    display: block;
    position: relative;
    font-family: var(--hk-font-body);
    font-size: 14px;
    color: var(--hk-body);
    text-decoration: none;
    padding: 4px 0 4px 16px;
    line-height: 1.4;
    transition: color var(--hk-motion-hover) var(--hk-ease-out);
}

/* Navy dot indicator for active heading */
.hk-toc__item a::before {
    content: '';
    position: absolute;
    left: -3px;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--hk-navy);
    opacity: 0;
    transition: opacity var(--hk-motion-hover) var(--hk-ease-out);
    z-index: 1;
}

.hk-toc__item a:hover {
    color: var(--hk-heading);
}

.hk-toc__item a.is-active {
    color: var(--hk-heading);
}

.hk-toc__item a.is-active::before {
    opacity: 1;
}

/* ==========================================================================
   6. Article Content Typography
   ========================================================================== */

.hk-article__content {
    line-height: 1.8;
    position: relative;
    font-family: var(--hk-font-body);
    color: var(--hk-body);
    font-size: 17px;
}

.hk-article__content p {
    margin-bottom: 1.5em;
}

.hk-article__content h2 {
    font-family: var(--hk-font-heading);
    color: var(--hk-heading);
    margin-top: 2.5em;
    margin-bottom: 0.75em;
    font-size: 26px;
    line-height: 1.3;
}

.hk-article__content h3 {
    font-family: var(--hk-font-heading);
    color: var(--hk-heading);
    margin-top: 2em;
    margin-bottom: 0.5em;
    font-size: 21px;
    line-height: 1.3;
}

.hk-article__content h4 {
    font-family: var(--hk-font-heading);
    color: var(--hk-heading);
    margin-top: 1.5em;
    margin-bottom: 0.4em;
    font-size: 18px;
}

.hk-article__content ul {
    list-style: disc;
    padding-inline-start: 1.5rem;
    margin-bottom: 1.5em;
}

.hk-article__content ol {
    list-style: decimal;
    padding-inline-start: 1.5rem;
    margin-bottom: 1.5em;
}

.hk-article__content li {
    margin-bottom: 0.5em;
}

.hk-article__content a {
    color: var(--hk-teal);
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color var(--hk-motion-hover);
}

.hk-article__content a:hover {
    color: var(--hk-heading);
}

.hk-article__content img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 1.5em 0;
}

.hk-article__content figure {
    margin: 2em 0;
}

.hk-article__content figcaption {
    font-size: 14px;
    color: rgba(74, 85, 104, 0.7);
    text-align: center;
    margin-top: 0.5em;
    font-style: italic;
}

/* Premium ordered list — mirrors .hk-pv-results card design.
   Outer glass card with gold left bar; inner items are stacked sub-cards
   with their own subtle glass; gold serif numerals (decimal-leading-zero). */
.hk-premium-list {
    list-style: none;
    counter-reset: premium-counter;
    margin: 2.5rem 0;
    padding: 1.75rem 2rem;
    background: var(--hk-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(200, 169, 110, 0.22);
    border-inline-start: 3px solid var(--hk-gold);
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(27, 42, 74, 0.06);
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.hk-premium-list li {
    counter-increment: premium-counter;
    display: flex;
    align-items: baseline;
    gap: 1.1rem;
    padding: 0.85rem 1rem;
    background: rgba(255, 255, 255, 0.55);
    border: none;
    border-radius: 8px;
    font-family: var(--hk-font-body);
    font-size: 1.02rem;
    line-height: 1.5;
    color: var(--hk-body);
    margin: 0;
}

.hk-premium-list li::before {
    content: counter(premium-counter, decimal-leading-zero);
    font-family: var(--hk-font-heading);
    font-size: 1.4rem;
    font-weight: 500;
    color: var(--hk-gold);
    flex-shrink: 0;
    min-width: 2.2rem;
    line-height: 1;
}

@media (max-width: 768px) {
    .hk-premium-list {
        padding: 1.25rem 1.25rem;
    }
}

/* Premium article infographic */
.hk-article-infographic {
    margin: 3rem auto;
    max-width: 540px;
    position: relative;
}

.hk-article-infographic__frame {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background: var(--hk-navy);
    padding: 3px;
    box-shadow:
        0 8px 32px rgba(27, 42, 74, 0.12),
        0 2px 8px rgba(27, 42, 74, 0.06);
}

.hk-article-infographic__frame img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 13px;
}

.hk-article-infographic__accent {
    display: none;
}

.hk-article-infographic__caption {
    text-align: center;
    margin-top: 1.25rem;
    font-family: var(--hk-font-body);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--hk-gold);
}

@media (max-width: 768px) {
    .hk-article-infographic {
        max-width: 100%;
        margin: 2rem auto;
    }

    .hk-article-infographic__frame {
        border-radius: 12px;
    }
}

/* ==========================================================================
   7. Differentiated Blockquotes
   ========================================================================== */

/* Blockquote wrapper — glass card base */
.hk-blockquote-wrap {
    margin: 2em 0;
    padding: 1.5rem 2rem;
    background: var(--hk-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: var(--hk-glass-border);  /* Spec B1 — Family 3 full border shorthand */
    border-radius: 8px;
    position: relative;
}

.hk-blockquote-wrap blockquote {
    margin: 0;
    padding: 0;
    border: none;
    background: none;
    font-style: italic;
    line-height: 1.75;
}

/* Quran — premium styles now in style.css (sitewide) */

/* Hadith — teal top border + teal-tinted glass */
.hk-blockquote--hadith {
    border-top: 3px solid var(--hk-teal);
    background: rgba(91, 138, 154, 0.05);
}

/* Standard — parchment-dark top border */
.hk-blockquote--standard {
    border-top: 3px solid var(--hk-parchment-dark);
}

/* Scholar — premium styles now in style.css (sitewide) */

/* Class-based blockquote styling (i18n-friendly, mirrors wrapper type classes) */
blockquote.hk-quran {
    border-inline-start-color: var(--hk-gold);
}
blockquote.hk-hadith {
    border-inline-start-color: var(--hk-teal);
}
blockquote.hk-scholar {
    border-inline-start-color: var(--hk-navy);
}

/* Default for unclassified blockquotes in content */
.hk-article__content blockquote:not([class]) {
    margin: 2em 0;
    padding: 1.5rem 2rem;
    border-inline-start: 4px solid var(--hk-parchment-dark);
    background: var(--hk-parchment);
    border-radius: 0 8px 8px 0;
    font-style: italic;
    line-height: 1.75;
}

/* Attribution styling */
.hk-blockquote-wrap blockquote cite {
    font-family: var(--hk-font-heading);
    font-style: italic;
}

blockquote p:last-child,
.hk-article__content blockquote p:last-child {
    margin-bottom: 0;
}

/* ==========================================================================
   8. Footnotes
   ========================================================================== */

.hk-footnote-ref {
    line-height: 0;
    vertical-align: super;
    font-size: 0.75em;
}

.hk-footnote-ref a {
    color: var(--hk-teal);
    font-weight: 600;
    text-decoration: none;
    font-family: var(--hk-font-body);
    transition: color var(--hk-motion-hover);
}

.hk-footnote-ref a:hover {
    color: var(--hk-heading);
}

.hk-footnotes {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid var(--hk-parchment-dark);
}

.hk-footnotes h3 {
    font-family: var(--hk-font-heading);
    font-size: 18px;
    color: var(--hk-heading);
    margin-top: 0;
    margin-bottom: 1rem;
}

.hk-footnotes ol {
    padding-inline-start: 1.5rem;
    list-style: decimal;
    margin: 0;
}

.hk-footnotes li {
    margin-bottom: 0.75rem;
    font-size: 15px;
    color: var(--hk-body);
    line-height: 1.6;
}

.hk-footnote-back {
    margin-inline-start: 0.5rem;
    color: var(--hk-teal);
    text-decoration: none;
    font-size: 13px;
    transition: color var(--hk-motion-hover);
}

.hk-footnote-back:hover {
    color: var(--hk-heading);
}

/* ==========================================================================
   10. Author Box
   ========================================================================== */

.hk-author-box {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    padding: 2rem;
    margin: 3rem 0;
    background: var(--hk-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: var(--hk-glass-border);  /* Spec B1 — Family 3 full border shorthand */
    border-radius: 8px;
    width: 100%;
}

.hk-author-box__avatar {
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background-image: linear-gradient(var(--hk-navy), var(--hk-navy)), var(--hk-gold-gradient);
    background-origin: border-box;
    background-clip: padding-box, border-box;
    border: 3px solid transparent;
    color: var(--hk-white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--hk-font-heading);
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0.02em;
    user-select: none;
}

.hk-author-box__info h4 {
    font-family: var(--hk-font-heading);
    color: var(--hk-heading);
    font-size: 18px;
    margin-top: 0;
    margin-bottom: 0.25rem;
}

.hk-author-box__info p {
    font-family: var(--hk-font-body);
    font-size: 15px;
    color: var(--hk-body);
    margin-bottom: 0;
    line-height: 1.6;
}

.hk-author-box__info a.hk-author-box__link {
    color: var(--hk-gold);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--hk-motion-hover);
}

.hk-author-box__info a.hk-author-box__link:hover {
    color: var(--hk-gold-light);
}

/* ==========================================================================
   11. References / Bibliography
   ========================================================================== */

.hk-references {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid var(--hk-parchment-dark);
}

.hk-references h3 {
    font-family: var(--hk-font-heading);
    font-size: 18px;
    color: var(--hk-heading);
    margin-top: 0;
    margin-bottom: 1rem;
}

.hk-references__content {
    font-family: var(--hk-font-body);
    font-size: 15px;
    color: var(--hk-body);
    line-height: 1.7;
}

.hk-references__content p {
    margin-bottom: 0.75em;
}

/* ==========================================================================
   12. Newsletter CTA (in-post compact)
   ========================================================================== */

.hk-newsletter-cta {
    position: relative;
    margin: 3rem 0;
    padding: 2rem;
    padding-top: calc(2rem + 3px);
    background: var(--hk-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: var(--hk-glass-border);  /* Spec B1 — Family 3 full border shorthand */
    border-radius: 8px;
    text-align: center;
    overflow: hidden;
}

.hk-newsletter-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--hk-gold-gradient);
}

.hk-newsletter-cta h3 {
    font-family: var(--hk-font-heading);
    color: var(--hk-heading);
    font-size: 24px;
    font-weight: 500;
    margin-top: 0;
    margin-bottom: 0.5rem;
}

.hk-newsletter-cta p {
    color: var(--hk-body);
    font-size: 15px;
    margin-bottom: 1rem;
    font-family: var(--hk-font-body);
}

/* ──────────────────────────────────────────────────────────────────────────
 * Newsletter form embedded in single-article aside.
 * Scoped under .hk-newsletter-cta--form so the homepage form (dark glass,
 * styled in homepage.css) is unaffected. Light-theme variant for parchment
 * background + readable contrast against the article's reading flow.
 * ────────────────────────────────────────────────────────────────────────── */
.hk-newsletter-cta--form { padding: 2.5rem 2rem; }
.hk-newsletter-cta--form h3 { margin-bottom: 0.4rem; }
.hk-newsletter-cta--form p { margin-bottom: 1.4rem; }

.hk-newsletter-cta--form .hk-newsletter-form__row {
    display: flex;
    gap: 8px;
    max-width: 480px;
    margin: 0 auto;
}
.hk-newsletter-cta--form .hk-newsletter-form__input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid rgba(27, 42, 74, 0.18);
    border-radius: 8px;
    background: #fff;
    color: var(--hk-navy);
    font-family: var(--hk-font-body);
    font-size: 15px;
}
.hk-newsletter-cta--form .hk-newsletter-form__input::placeholder { color: rgba(74, 85, 104, 0.55); }
.hk-newsletter-cta--form .hk-newsletter-form__input:focus-visible {
    outline: 2px solid var(--hk-gold);
    outline-offset: 2px;
    border-color: var(--hk-gold);
    box-shadow: 0 0 0 3px rgba(200, 169, 110, 0.18);
}
.hk-newsletter-cta--form .hk-newsletter-form__btn { white-space: nowrap; }

.hk-newsletter-cta--form .hk-newsletter-form__consent {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 12px auto 0;
    max-width: 480px;
    font-size: 12px;
    color: var(--hk-body);
    cursor: pointer;
    text-align: left;
}
.hk-newsletter-cta--form .hk-newsletter-form__consent input[type="checkbox"] {
    margin-top: 2px;
    accent-color: var(--hk-gold);
}
.hk-newsletter-cta--form .hk-newsletter-form__consent a {
    color: var(--hk-teal);
    text-decoration: underline;
}

.hk-newsletter-cta--form .hk-newsletter-form__magnet-promise {
    max-width: 480px;
    margin: 12px auto 0;
    padding: 10px 14px;
    border-left: 2px solid var(--hk-gold);
    background: rgba(200, 169, 110, 0.08);
    color: var(--hk-body);
    font-size: 13px;
    line-height: 1.55;
    text-align: left;
    border-radius: 0 6px 6px 0;
}
.hk-newsletter-cta--form .hk-newsletter-form__magnet-promise strong {
    color: var(--hk-navy);
    font-weight: 600;
}

.hk-newsletter-cta--form .hk-newsletter-form__message {
    margin: 12px auto 0;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 14px;
    max-width: 480px;
}
.hk-newsletter-cta--form .hk-newsletter-form__message--success {
    background: rgba(25, 135, 84, 0.12);
    color: #198754;
}
.hk-newsletter-cta--form .hk-newsletter-form__message--error {
    background: rgba(220, 53, 69, 0.12);
    color: #b02a37;
}

/* On submission, hide the form fields and reveal the success card. */
.hk-newsletter-cta--form .hk-newsletter-form.is-submitted .hk-newsletter-form__row,
.hk-newsletter-cta--form .hk-newsletter-form.is-submitted .hk-newsletter-form__consent,
.hk-newsletter-cta--form .hk-newsletter-form.is-submitted .hk-newsletter-form__magnet-promise,
.hk-newsletter-cta--form .hk-newsletter-form.is-submitted .hk-newsletter-form__message,
.hk-newsletter-cta--form .hk-newsletter-form.is-submitted .cf-turnstile {
    display: none;
}

.hk-newsletter-cta--form .hk-newsletter-form__success {
    margin: 0 auto;
    padding: 24px 28px;
    max-width: 520px;
    text-align: center;
    background: #fff;
    border: 1px solid rgba(200, 169, 110, 0.4);
    border-radius: 12px;
    box-shadow: 0 4px 18px rgba(27, 42, 74, 0.06);
}
.hk-newsletter-cta--form .hk-newsletter-form__success-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    margin: 0 auto 14px;
    border-radius: 50%;
    background: rgba(200, 169, 110, 0.16);
    color: var(--hk-gold);
}
.hk-newsletter-cta--form .hk-newsletter-form__success-icon svg { width: 26px; height: 26px; }
.hk-newsletter-cta--form .hk-newsletter-form__success h4 {
    font-family: var(--hk-font-heading);
    font-size: 24px;
    font-weight: 500;
    color: var(--hk-navy);
    margin: 0 0 10px;
    letter-spacing: -0.01em;
}
.hk-newsletter-cta--form .hk-newsletter-form__success p {
    margin: 0 0 8px;
    font-size: 14.5px;
    line-height: 1.65;
    color: var(--hk-body);
}
.hk-newsletter-cta--form .hk-newsletter-form__success-tip {
    font-size: 12.5px !important;
    color: rgba(74, 85, 104, 0.7) !important;
    font-style: italic;
}
.hk-newsletter-cta--form .hk-newsletter-form__success-magnet {
    margin-top: 16px !important;
    padding-top: 14px;
    border-top: 1px solid rgba(200, 169, 110, 0.28);
}
.hk-newsletter-cta--form .hk-newsletter-form__success-magnet strong {
    color: var(--hk-navy);
}

@media (max-width: 480px) {
    .hk-newsletter-cta--form .hk-newsletter-form__row { flex-direction: column; }
}

/* ==========================================================================
   13. Social Share Bar
   ========================================================================== */

.hk-share {
    display: none;
    align-items: center;
    gap: 12px;
    margin: 2rem 0;
    padding: 8px 16px;
    background: var(--hk-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: var(--hk-glass-border);  /* Spec B1 — Family 3 full border shorthand */
    border-radius: 40px;
}

.hk-share__label {
    font-family: var(--hk-font-body);
    font-weight: 600;
    color: var(--hk-heading);
    font-size: 14px;
}

.hk-share__btn {
    background: none;
    color: var(--hk-heading);
    border: none;
    padding: 4px;
    border-radius: 4px;
    cursor: pointer;
    transition: color var(--hk-motion-hover);
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hk-share__btn:hover {
    color: var(--hk-gold);
}

.hk-share__btn--copy.is-copied {
    color: var(--hk-teal);
}

/* Toast notification for copy */
.hk-share__toast {
    background: var(--hk-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: var(--hk-glass-border);  /* Spec B1 — Family 3 full border shorthand */
    border-radius: 8px;
}

/* ==========================================================================
   14. Back to Top Button
   ========================================================================== */

.hk-back-to-top {
    position: fixed;
    bottom: 2rem;
    inset-inline-end: 2rem;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--hk-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: var(--hk-glass-border);  /* Spec B1 — Family 3 full border shorthand */
    color: var(--hk-gold);
    font-size: 20px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--hk-motion-scroll), visibility var(--hk-motion-scroll), box-shadow var(--hk-motion-hover), transform var(--hk-motion-hover);
    z-index: var(--hk-z-sticky);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--hk-glass-shadow);
}

.hk-back-to-top.is-visible {
    opacity: 1;
    visibility: visible;
}

.hk-back-to-top:hover {
    box-shadow: 0 0 20px rgba(200, 169, 110, 0.4);
    transform: translateY(-2px);
}

/* ==========================================================================
   15. PDF Download
   ========================================================================== */

.hk-pdf-download {
    text-align: center;
    margin: 2rem 0;
}

/* ==========================================================================
   16. Responsive — 768px
   ========================================================================== */

@media (max-width: 768px) {
    .hk-article__header {
        padding-top: 140px;
        padding-bottom: 40px;
    }

    .hk-article__header h1 {
        font-size: 24px;
    }

    .hk-article__meta {
        font-size: 13px;
        gap: 0;
    }

    .hk-article__layout {
        padding: 1.5rem 1rem;
    }

    .hk-article__content {
        font-size: 16px;
    }

    .hk-author-box {
        flex-direction: column;
        text-align: center;
    }

    .hk-author-box__avatar {
        margin: 0 auto;
    }

    .hk-share {
        gap: 8px;
        padding: 6px 12px;
    }

    .hk-back-to-top {
        bottom: 1.25rem;
        inset-inline-end: 1.25rem;
        width: 42px;
        height: 42px;
        font-size: 18px;
    }
}

/* ==========================================================================
   17. Responsive — 480px
   ========================================================================== */

@media (max-width: 480px) {
    .hk-article__header {
        padding-top: 120px;
        padding-bottom: 30px;
    }

    .hk-article__header h1 {
        font-size: 21px;
    }

    .hk-article__content {
        font-size: 15px;
    }

    .hk-article__content h2 {
        font-size: 21px;
    }

    .hk-article__content h3 {
        font-size: 18px;
    }

    .hk-takeaways,
    .hk-author-box,
    .hk-newsletter-cta {
        padding: 1.25rem;
    }

    .hk-share {
        gap: 8px;
    }
}

/* ==========================================================================
   Footnote Tooltips (JS-generated)
   ========================================================================== */

.hk-footnote-tooltip {
    position: fixed;
    background: var(--hk-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: var(--hk-glass-border);  /* Spec B1 — Family 3 full border shorthand */
    color: var(--hk-heading);
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 13px;
    max-width: 300px;
    z-index: var(--hk-z-overlay);
    pointer-events: none;
    box-shadow: var(--hk-glass-shadow);
}

/* Drop cap — decorative first letter */
.hk-drop-cap::first-letter {
    float: inline-start;
    font-family: var(--hk-font-heading);
    font-size: 3.5em;
    line-height: 0.8;
    padding-inline-end: 8px;
    padding-top: 4px;
    color: var(--hk-gold);
    font-weight: 600;
}

/* Arabic calligraphy styling for Quran/Hadith/Scholar citations */
.hk-blockquote--quran .hk-arabic,
.hk-blockquote--hadith .hk-arabic,
.hk-blockquote--scholar .hk-arabic {
    font-family: var(--hk-font-arabic);
    font-size: 1.4rem;
    line-height: 2;
    text-align: center;
    direction: rtl;
    display: block;
    margin-bottom: 12px;
    color: var(--hk-heading);
}

/* === Dark Mode Overrides === */

:root[data-theme="dark"] .hk-premium-list {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(200, 169, 110, 0.3);
}

:root[data-theme="dark"] .hk-premium-list li {
    background: rgba(255, 255, 255, 0.04);
}

:root[data-theme="dark"] .hk-article__content blockquote:not([class]) {
    background: rgba(14, 23, 38, 0.5);
    border-inline-start-color: rgba(200, 169, 110, 0.3);
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .hk-premium-list {
        background: rgba(255, 255, 255, 0.04);
        border-color: rgba(200, 169, 110, 0.3);
    }
    :root:not([data-theme="light"]) .hk-premium-list li {
        background: rgba(255, 255, 255, 0.04);
    }
    :root:not([data-theme="light"]) .hk-article__content blockquote:not([class]) {
        background: rgba(14, 23, 38, 0.5);
        border-inline-start-color: rgba(200, 169, 110, 0.3);
    }
}

/* -------- Article tables (matrix/comparison) -------- */
.hk-article-table-wrap {
    margin: 2.5rem 0;
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid rgba(27, 42, 74, 0.08);
    background: var(--hk-parchment, #F7F4EE);
}
.hk-article-table {
    width: 100%;
    border-collapse: collapse;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    color: var(--hk-body, #4A5568);
}
.hk-article-table thead {
    background: var(--hk-navy, #1B2A4A);
    color: #fff;
}
.hk-article-table th {
    text-align: start;
    padding: 0.85rem 1rem;
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.hk-article-table td {
    padding: 0.85rem 1rem;
    border-top: 1px solid rgba(27, 42, 74, 0.06);
    vertical-align: top;
    line-height: 1.55;
}
.hk-article-table tr:nth-child(even) td {
    background: rgba(200, 169, 110, 0.04);
}
.hk-article-table caption {
    caption-side: top;
    text-align: start;
    padding: 0 0 0.75rem;
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.1rem;
    color: var(--hk-navy, #1B2A4A);
    border-bottom: 2px solid var(--hk-gold, #C8A96E);
    margin-bottom: 0.5rem;
}

.hk-article__image-attribution {
    margin: 0.75rem 0 1.25rem;
    color: var(--hk-body, #4A5568);
    opacity: 0.8;
    font-size: 0.85rem;
    font-style: italic;
}

/* ========================================================================
   Weitere Artikel — related-articles grid on single.php
   Mirror of hk-pv-related with teal category badge (vs gold thema badge).
   Note: dark/light thumbnail layer swap is handled globally in style.css
   via opacity on .hk-thumb-stack__layer--{light,dark}; no overrides here.
   ======================================================================== */

.hk-article-related {
    margin-block-start: var(--hk-space-2xl);
    padding-block: var(--hk-space-2xl);
    background: var(--hk-parchment);
    border-block-start: 1px solid rgba(200, 169, 110, 0.2);
}

.hk-article-related__header {
    text-align: center;
    margin-block-end: var(--hk-space-xl);
}

.hk-article-related__header .hk-overline {
    color: var(--hk-gold);
    margin-block-end: var(--hk-space-xs);
}

.hk-article-related__header h2 {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 400;
    color: var(--hk-navy);
    margin: 0 0 var(--hk-space-md);
}

.hk-article-related__divider {
    width: 60px;
    height: 1px;
    background: var(--hk-gold);
    margin: 0 auto;
}

.hk-article-related__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--hk-space-lg);
    margin-block-end: var(--hk-space-xl);
}

@media (max-width: 1024px) {
    .hk-article-related__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .hk-article-related__grid { grid-template-columns: 1fr; }
}

.hk-article-related__card {
    display: block;
    background: #FFFFFF;
    border: 1px solid rgba(200, 169, 110, 0.15);
    text-decoration: none;
    color: inherit;
    transition: transform 220ms var(--hk-ease), box-shadow 220ms var(--hk-ease);
    overflow: hidden;
}

.hk-article-related__card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(27, 42, 74, 0.08);
}

.hk-article-related__card-img {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--hk-navy);
}

.hk-article-related__card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 600ms var(--hk-ease);
}

.hk-article-related__card:hover .hk-article-related__card-img img {
    transform: scale(1.04);
}

.hk-article-related__card-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 60%, rgba(27, 42, 74, 0.45) 100%);
    pointer-events: none;
}

.hk-article-related__card-cat {
    position: absolute;
    inset-block-start: var(--hk-space-md);
    inset-inline-start: var(--hk-space-md);
    background: var(--hk-teal);
    color: #FFFFFF;
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 6px 12px;
}

.hk-article-related__card-content {
    padding: var(--hk-space-md);
}

.hk-article-related__card-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.4rem;
    font-weight: 400;
    line-height: 1.25;
    color: var(--hk-navy);
    margin: 0 0 var(--hk-space-xs);
}

.hk-article-related__card:hover .hk-article-related__card-title {
    color: var(--hk-teal);
}

.hk-article-related__card-meta {
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    color: var(--hk-body);
    margin: 0 0 var(--hk-space-sm);
    display: flex;
    gap: var(--hk-space-xs);
    align-items: center;
}

.hk-article-related__card-date::before {
    content: "·";
    margin-inline-end: var(--hk-space-xs);
    opacity: 0.6;
}

.hk-article-related__card-cta {
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--hk-teal);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.hk-article-related__footer {
    text-align: center;
}

/* Dark mode — adjust card surface; thumbnail swap handled globally */
[data-theme="dark"] .hk-article-related {
    background: var(--hk-navy-darker, #0F1A2E);
}

[data-theme="dark"] .hk-article-related__card {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(200, 169, 110, 0.2);
}

[data-theme="dark"] .hk-article-related__card-title {
    color: var(--hk-heading, #F7F4EE);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .hk-article-related__card,
    .hk-article-related__card-img img {
        transition: none;
    }
}
