/* ==========================================================================
   SAVEN LEGACY LAW CORPORATION - EDITORIAL ARTICLES STYLESHEET (article.css)
   Shared styles for all editorial articles & interactive diagnostic tools (loaded via $extraCss = "/article.css")
   WCAG 2.1/2.2 Level AA Compliant | Desktop, Tablet & Mobile
   ========================================================================== */

/* Ensure sticky sidebar card works reliably by overriding overflow-x: hidden with clip */
html, body {
    overflow-x: clip !important;
}

/* Main Reading Canvas & Editorial Grid */
.article-reading-canvas {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3.5rem 2rem 5.5rem 2rem;
}

.back-to-articles-bar {
    margin-bottom: 1.75rem;
}

.back-to-articles-bar .inline-resource-link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
}

.article-editorial-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 2.75rem;
    align-items: start;
}

/* Primary Article Body Card */
.article-body-card {
    background-color: #FFFFFF;
    border: 1px solid rgba(182, 155, 105, 0.45);
    border-top: 6px solid var(--brass);
    border-radius: 8px;
    padding: 3.25rem 3.5rem;
    box-shadow: 0 8px 28px rgba(36, 74, 64, 0.04);
    text-align: left;
}

.article-body-card h1 {
    font-size: 2.15rem;
    line-height: 1.26;
    margin-bottom: 1rem;
}

.article-published-date {
    font-size: 0.92rem;
    color: var(--text-muted);
    margin-top: -0.35rem;
    margin-bottom: 1.75rem;
}

.article-lead-callout {
    font-size: 1.15rem;
    line-height: 1.68;
    color: var(--forest);
    background-color: rgba(245, 240, 230, 0.65);
    border-left: 5px solid var(--brass);
    padding: 1.35rem 1.5rem;
    border-radius: 0 6px 6px 0;
    margin-bottom: 2rem;
}

.article-body-card h2 {
    font-size: 1.8rem;
    line-height: 1.28;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.45rem;
    border-bottom: 1px solid rgba(182, 155, 105, 0.35);
}

.article-body-card p {
    font-family: 'Arial', 'Aptos', sans-serif;
    font-size: 1.06rem;
    line-height: 1.72;
    color: var(--text-dark);
    margin-bottom: 1.35rem;
}

.article-body-card p:last-child {
    margin-bottom: 0;
}

.article-feature-list {
    list-style: none;
    padding: 0;
    margin: 0 0 1.35rem 0;
}

.article-feature-list li {
    position: relative;
    padding-left: 1.55rem;
    margin-bottom: 0.75rem;
    font-size: 1.02rem;
    line-height: 1.58;
    color: var(--text-dark);
}

.article-feature-list li:last-child {
    margin-bottom: 0;
}

.article-feature-list li::before {
    content: "◆":
    font-family: 'Arial', sans-serif;
    position: absolute;
    left: 0;
    top: 1px;
    color: var(--brass);
    font-size: 0.85rem;
}

/* Inline Centered CTA inside Article Card */
.article-inline-cta {
    display: flex;
    justify-content: center;
    margin: 1.75rem 0 0.5rem 0;
    text-align: center;
}

/* Uniform Lower-Section Cards (Notes & Statutory References and Educational Notice) */
.lower-section-card {
    background-color: #FFFFFF;
    border: 1px solid rgba(182, 155, 105, 0.45);
    border-top: 6px solid var(--brass);
    border-radius: 8px;
    padding: 2rem 2.25rem;
    margin-top: 1.65rem;
    margin-bottom: 1.65rem;
    box-shadow: 0 8px 28px rgba(36, 74, 64, 0.04);
    text-align: left;
}

.lower-section-card + .lower-section-card {
    margin-top: 0;
}

.lower-section-card:last-child {
    margin-bottom: 0;
}

.lower-section-card h2 {
    font-family: 'Batang', 'Georgia', serif;
    font-weight: normal;
    font-size: 1.45rem;
    line-height: 1.28;
    text-transform: none;
    letter-spacing: normal;
    color: var(--forest);
    margin-top: 0;
    margin-bottom: 1rem;
    padding-bottom: 0.45rem;
    border-bottom: 1px solid rgba(182, 155, 105, 0.35);
}

.lower-section-card p {
    font-family: 'Arial', 'Aptos', sans-serif;
    font-size: 0.95rem;
    line-height: 1.58;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.lower-section-card p:last-child {
    margin-bottom: 0;
}

/* Superscript Footnote References & Footnotes List */
.footnote-ref,
sup.fn-ref {
    font-size: 0.78em;
    line-height: 0;
    vertical-align: super;
    margin-left: 1px;
}

.footnote-ref a,
sup.fn-ref a {
    color: var(--forest);
    font-weight: bold;
    text-decoration: underline;
    text-decoration-color: var(--brass);
    padding: 0 2px;
}

.footnote-ref a:hover,
.footnote-ref a:focus,
sup.fn-ref a:hover,
sup.fn-ref a:focus {
    color: var(--brass-dark);
    text-decoration-color: var(--forest);
}

.footnotes-list {
    margin: 0.4rem 0 0 1.35rem;
    padding: 0;
}

.footnotes-list li {
    font-size: 0.95rem;
    line-height: 1.58;
    color: var(--text-muted);
    margin-bottom: 0.7rem;
    padding-left: 0.35rem;
}

.footnotes-list li:last-child {
    margin-bottom: 0;
}

.footnote-backref,
.footnote-backlink {
    color: var(--forest);
    font-weight: bold;
    text-decoration: none;
    margin-left: 0.35rem;
}

.footnote-backref:hover,
.footnote-backref:focus,
.footnote-backlink:hover,
.footnote-backlink:focus {
    color: var(--brass-dark);
    text-decoration: underline;
}

/* Right-Hand Sidebar (Author Bio + Sticky Consultation CTA Card) */
.article-sidebar {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    position: static;
    align-self: stretch;
}

.author-sidebar-card {
    background-color: #FFFFFF;
    border: 1px solid rgba(182, 155, 105, 0.45);
    border-top: 6px solid var(--brass);
    border-radius: 8px;
    padding: 2rem 1.75rem;
    box-shadow: 0 8px 24px rgba(36, 74, 64, 0.05);
    text-align: center;
}

.author-sidebar-photo {
    width: 190px;
    height: 190px;
    border-radius: 8px;
    border: 4px solid var(--brass);
    object-fit: cover;
    object-position: center 15%;
    display: block;
    margin: 0 auto 1.25rem auto;
    box-shadow: 0 8px 20px rgba(36, 74, 64, 0.14);
}

.author-sidebar-card h2 {
    font-size: 1.45rem;
    margin-bottom: 0.85rem;
}

.author-sidebar-card p {
    font-size: 0.96rem;
    line-height: 1.62;
    text-align: left;
    margin-bottom: 1.15rem;
}

.sidebar-consult-card {
    position: -webkit-sticky;
    position: sticky;
    top: 105px;
    background: linear-gradient(155deg, #163029 0%, var(--forest) 65%, #2B594D 100%);
    border-top: 5px solid var(--brass);
    border-radius: 8px;
    padding: 2rem 1.75rem;
    color: #FFFFFF;
    text-align: left;
    box-shadow: 0 8px 24px rgba(36, 74, 64, 0.12);
}

.sidebar-consult-card h2 {
    font-size: 1.45rem;
    line-height: 1.28;
    color: #FFFFFF;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.25);
    margin-bottom: 1rem;
}

.sidebar-consult-card p {
    font-size: 0.96rem;
    line-height: 1.65;
    color: #FFFFFF;
    opacity: 0.98;
    margin-bottom: 1.5rem;
}

.sidebar-consult-card .btn {
    width: 100%;
}

.sidebar-consult-card .btn:focus {
    outline: 3px solid var(--brass-light) !important;
    outline-offset: 3px;
}

/* Responsive Media Queries */
@media (max-width: 1024px) {
    .article-editorial-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
    .sidebar-consult-card {
        position: static;
    }
    .author-sidebar-card {
        display: grid;
        grid-template-columns: 180px 1fr;
        gap: 1.75rem;
        text-align: left;
        align-items: center;
    }
    .author-sidebar-photo {
        width: 180px;
        height: 180px;
        margin: 0;
    }
}

@media (max-width: 650px) {
    .article-reading-canvas {
        padding: 2.75rem 1.25rem 4rem 1.25rem;
    }
    .key-takeaways-panel {
        padding: 1.85rem 1.5rem;
    }
    .article-body-card,
    .lower-section-card {
        padding: 2rem 1.5rem;
    }
    .author-sidebar-card {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .author-sidebar-photo {
        margin: 0 auto 1rem auto;
    }
}

@media (max-width: 600px) {
    .article-inline-cta .btn {
        width: 100%;
    }
}
