/* Public Lifestory (روایت) pages */
.saja-lifestory {
    --ls-green: #14633c;
    --ls-green-deep: #0f4a2e;
    --ls-green-soft: #e8f3ec;
    --ls-line: #e4e8e5;
    max-width: 1120px;
    margin: 0 auto;
    padding: 0.5rem 1rem 2.75rem;
}

.saja-ls-hero {
    position: relative;
    text-align: center;
    padding: 1.25rem 0.5rem 0.35rem;
    margin-bottom: 1.15rem;
    overflow: hidden;
}

.saja-ls-hero__mark {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.07;
    pointer-events: none;
}

.saja-ls-hero__mark svg,
.saja-ls-hero__mark img {
    width: 140px;
    height: 140px;
}

.saja-ls-hero__title {
    position: relative;
    font-size: clamp(1.35rem, 3.2vw, 1.85rem);
    font-weight: 800;
    margin: 0 0 0.45rem;
    color: #1a1d1a;
}

.saja-ls-hero__sub {
    position: relative;
    margin: 0 auto;
    max-width: 36rem;
    color: #6b746e;
    font-size: 0.95rem;
    line-height: 1.85;
}

.saja-ls-search-form { margin-bottom: 1.5rem; }

.saja-ls-search {
    display: flex;
    align-items: stretch;
    border: 1px solid #d7ddd9;
    border-radius: 999px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 8px 24px rgba(15, 74, 46, 0.06);
    margin-bottom: 0.85rem;
}

.saja-ls-search input {
    flex: 1;
    border: 0;
    background: transparent;
    padding: 0.85rem 1.2rem;
    font-size: 0.95rem;
    min-width: 0;
}

.saja-ls-search input:focus {
    outline: none;
}

.saja-ls-search__btn {
    width: 3.15rem;
    border: 0;
    background: var(--ls-green);
    color: #fff;
    cursor: pointer;
    font-size: 1rem;
}

.saja-ls-search__btn:hover { background: var(--ls-green-deep); }

.saja-ls-filters {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.65rem;
}

.saja-ls-filter {
    display: flex;
    flex-direction: column;
    gap: 0.28rem;
    margin: 0;
}

.saja-ls-filter span {
    font-size: 0.78rem;
    color: #6b746e;
}

.saja-ls-filter select {
    width: 100%;
    border: 1px solid #d7ddd9;
    border-radius: 0.55rem;
    background: #fff;
    padding: 0.5rem 0.7rem;
    font-size: 0.88rem;
    color: #243028;
}

.saja-ls-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.35rem;
    align-items: start;
}

.saja-ls-layout.has-faces {
    grid-template-columns: minmax(0, 1fr) 250px;
}

.saja-ls-section-title {
    font-size: 1.12rem;
    font-weight: 700;
    margin: 0 0 1rem;
    color: #1a1d1a;
}

.saja-ls-count {
    font-weight: 400;
    color: #6b746e;
    font-size: 0.92rem;
}

.saja-ls-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.9rem;
}

.saja-ls-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    border: 1px solid var(--ls-line);
    border-radius: 1rem;
    padding: 1.15rem 0.95rem 1rem;
    background: #fff;
    min-height: 100%;
    box-shadow: 0 6px 18px rgba(16, 24, 20, 0.04);
}

.saja-ls-card__doc {
    position: absolute;
    top: 0.7rem;
    left: 0.75rem;
    color: var(--ls-green);
    font-size: 0.95rem;
}

.saja-ls-card__photo {
    width: 78px;
    height: 78px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0.15rem auto 0.7rem;
    border: 2px solid #dce8e0;
    background: var(--ls-green-soft);
    display: flex;
    align-items: center;
    justify-content: center;
}

.saja-ls-card__photo-fallback { color: var(--ls-green); font-size: 1.45rem; }

.saja-ls-card__photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.saja-ls-card__body { width: 100%; }

.saja-ls-card__name {
    font-size: 1rem;
    font-weight: 800;
    margin: 0 0 0.35rem;
    line-height: 1.45;
}

.saja-ls-card__meta {
    margin: 0 0 0.18rem;
    font-size: 0.82rem;
    color: #6b746e;
}

.saja-ls-card__btn {
    display: block;
    width: 100%;
    margin-top: 0.85rem;
    padding: 0.48rem 0.7rem;
    border-radius: 0.55rem;
    background: var(--ls-green);
    color: #fff !important;
    text-decoration: none;
    font-size: 0.86rem;
    font-weight: 700;
}

.saja-ls-card__btn:hover { background: var(--ls-green-deep); }

.saja-ls-faces {
    background: linear-gradient(180deg, #14633c 0%, #0f4a2e 100%);
    color: #fff;
    border-radius: 1.05rem;
    padding: 1.15rem 1rem 1.05rem;
    box-shadow: 0 12px 28px rgba(15, 74, 46, 0.22);
}

.saja-ls-faces__title {
    font-size: 1rem;
    font-weight: 800;
    margin: 0 0 1rem;
    text-align: center;
    color: #fff;
}

.saja-ls-faces__row {
    display: flex;
    justify-content: space-between;
    gap: 0.4rem;
}

.saja-ls-face {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    color: #fff;
    text-decoration: none;
    min-width: 0;
}

.saja-ls-face:hover { color: #e8f3ec; }

.saja-ls-face__photo {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.75);
    background: rgba(255, 255, 255, 0.12);
    margin-bottom: 0.4rem;
}

.saja-ls-face__photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.saja-ls-face__name {
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.4;
}

.saja-ls-face__sub {
    font-size: 0.68rem;
    opacity: 0.8;
}

.saja-ls-faces__btn {
    display: block;
    margin-top: 1rem;
    padding: 0.48rem 0.7rem;
    border-radius: 0.55rem;
    background: #fff;
    color: var(--ls-green-deep) !important;
    text-align: center;
    text-decoration: none;
    font-size: 0.86rem;
    font-weight: 800;
}

.saja-ls-faces__btn:hover { background: #e8f3ec; }

.saja-ls-empty { text-align: center; padding: 2rem 1rem; color: var(--bs-secondary-color, #6c757d); }

.saja-ls-pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    justify-content: center;
    margin-top: 1.5rem;
}

.saja-ls-pagination a {
    display: inline-block;
    min-width: 2rem;
    padding: 0.25rem 0.5rem;
    text-align: center;
    border: 1px solid var(--bs-border-color, #dee2e6);
    border-radius: 0.35rem;
    text-decoration: none;
    color: inherit;
    font-size: 0.9rem;
}

.saja-ls-pagination a.is-active {
    background: #1b6b42;
    border-color: #1b6b42;
    color: #fff;
}

.saja-ls-breadcrumb {
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
    color: var(--bs-secondary-color, #6c757d);
}

.saja-ls-breadcrumb a { color: #1b6b42; text-decoration: none; }

.saja-ls-toolbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 1rem;
    padding: 0.55rem 0.75rem;
    background: #f8faf9;
    border: 1px solid rgba(27, 107, 66, 0.12);
    border-radius: 0.5rem;
    font-size: 0.85rem;
}

.saja-ls-views { color: var(--bs-secondary-color, #6c757d); }

.saja-ls-font-controls {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.saja-ls-font-btn {
    border: 1px solid var(--bs-border-color, #dee2e6);
    background: #fff;
    border-radius: 0.35rem;
    min-width: 2rem;
    height: 2rem;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.78rem;
}

.saja-ls-font-btn.is-active {
    background: #1b6b42;
    border-color: #1b6b42;
    color: #fff;
}

.saja-ls-article__profile {
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
}

.saja-ls-article__photo {
    flex: 0 0 148px;
    width: 148px;
    height: 148px;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 10px 28px rgba(13, 74, 45, 0.18);
    border: 3px solid #fff;
    outline: 1px solid rgba(27, 107, 66, 0.2);
}

.saja-ls-article__photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.saja-ls-article__intro { flex: 1; min-width: 0; }

.saja-ls-article__kicker {
    margin: 0 0 0.35rem;
    font-size: 0.85rem;
    color: #1b6b42;
    font-weight: 600;
}

.saja-ls-article__name {
    font-size: clamp(1.4rem, 4vw, 1.95rem);
    font-weight: 800;
    margin: 0 0 0.35rem;
    line-height: 1.35;
}

.saja-ls-article__title {
    font-size: 1.05rem;
    color: var(--bs-secondary-color, #6c757d);
    margin: 0 0 0.75rem;
}

.saja-ls-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem 1.25rem;
    margin: 0;
    padding: 0.65rem 0.85rem;
    background: var(--bs-light, #f8f9fa);
    border-radius: 0.5rem;
    border: 1px solid rgba(27, 107, 66, 0.12);
}

.saja-ls-facts__row { display: flex; gap: 0.35rem; align-items: baseline; margin: 0; }
.saja-ls-facts dt { margin: 0; font-size: 0.82rem; color: var(--bs-secondary-color, #6c757d); font-weight: 500; }
.saja-ls-facts dt::after { content: ':'; }
.saja-ls-facts dd { margin: 0; font-weight: 600; font-size: 0.95rem; }

.saja-ls-article__summary {
    font-size: 1rem;
    line-height: 1.7;
    margin: 1rem 0 0;
    padding: 0.75rem 1rem;
    background: var(--bs-light, #f8f9fa);
    border-radius: 0.35rem;
}

.saja-ls-toc {
    margin: 1.25rem 0;
    padding: 0.85rem 1rem;
    background: #fff;
    border: 1px solid rgba(27, 107, 66, 0.15);
    border-radius: 0.65rem;
}

.saja-ls-toc__title {
    font-size: 0.95rem;
    margin: 0 0 0.5rem;
    font-weight: 700;
}

.saja-ls-toc__list {
    margin: 0;
    padding-right: 1.25rem;
    font-size: 0.9rem;
}

.saja-ls-toc__list a {
    color: #1b6b42;
    text-decoration: none;
}

.saja-ls-toc__list a:hover { text-decoration: underline; }

.saja-ls-article__body {
    line-height: 1.9;
    font-size: 1rem;
}

.saja-ls-h2 {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 1.75rem 0 0.85rem;
    scroll-margin-top: 4.5rem;
}

.saja-ls-h3 {
    font-size: 1.05rem;
    font-weight: 600;
    margin: 1.25rem 0 0.5rem;
}

.saja-ls-p {
    margin: 0 0 1rem;
    text-align: justify;
    text-justify: inter-word;
}

.saja-ls-ul {
    margin: 0 0 1rem;
    padding-right: 1.25rem;
}

.saja-ls-link,
.saja-ls-name {
    color: #1b6b42;
}

.saja-ls-link { text-decoration: underline; }
.saja-ls-wiki,
.saja-ls-ext {
    color: #1d4ed8;
    text-decoration: underline;
}
.saja-ls-name { font-weight: 700; }

.saja-ls-works {
    margin-top: 2rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--bs-border-color, #dee2e6);
}

.saja-ls-works__title {
    font-size: 1.15rem;
    margin: 0 0 0.85rem;
}

.saja-ls-works__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.85rem;
}

.saja-ls-work {
    border: 1px solid var(--bs-border-color, #dee2e6);
    border-radius: 0.65rem;
    overflow: hidden;
    background: #fff;
}

.saja-ls-work__img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    display: block;
}

.saja-ls-work h3 {
    font-size: 0.92rem;
    margin: 0;
    padding: 0.55rem 0.65rem 0;
}

.saja-ls-work p {
    font-size: 0.82rem;
    margin: 0;
    padding: 0.35rem 0.65rem 0.65rem;
    color: var(--bs-secondary-color, #6c757d);
}

.saja-ls-article__foot {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--bs-border-color, #dee2e6);
}

@media (max-width: 991px) {
    .saja-ls-layout.has-faces { grid-template-columns: 1fr; }
    .saja-ls-faces { order: -1; }
    .saja-ls-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 575px) {
    .saja-ls-filters { grid-template-columns: 1fr 1fr; }
    .saja-ls-grid { grid-template-columns: 1fr; gap: 0.7rem; }
    .saja-ls-card {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        text-align: start;
        padding: 0.85rem 0.85rem 0.75rem;
        gap: 0 0.75rem;
    }
    .saja-ls-card__doc { display: none; }
    .saja-ls-card__photo {
        width: 64px;
        height: 64px;
        margin: 0;
        order: 1;
    }
    .saja-ls-card__body {
        flex: 1;
        min-width: 0;
        order: 2;
        text-align: start;
    }
    .saja-ls-card__btn {
        flex: 1 1 100%;
    }
    .saja-ls-card__name { font-size: 0.98rem; }
    .saja-ls-card__btn { order: 3; margin-top: 0.65rem; }
    .saja-ls-facts { flex-direction: column; gap: 0.5rem; }
    .saja-ls-article__profile { flex-direction: column; align-items: center; text-align: center; }
    .saja-ls-article__photo { flex-basis: auto; }
}

/* Single narrative — desktop sidebar + mobile stack */
.saja-lifestory-view .saja-ls-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
}

.saja-ls-toolbar__tools {
    display: flex;
    gap: 0.35rem;
}

.saja-ls-tool {
    width: 2rem;
    height: 2rem;
    border: 1px solid var(--ls-line);
    background: #fff;
    border-radius: 0.4rem;
    color: var(--ls-green);
    cursor: pointer;
}

.saja-ls-tool.is-on {
    background: var(--ls-green-soft);
    border-color: var(--ls-green);
}

.saja-ls-view-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(240px, 300px);
    gap: 1.15rem;
    align-items: start;
}

.saja-ls-profile-card {
    position: relative;
    display: flex;
    gap: 1.1rem;
    align-items: flex-start;
    padding: 1.15rem 1.15rem 1.05rem;
    background: #fff;
    border: 1px solid var(--ls-line);
    border-radius: 1rem;
    box-shadow: 0 10px 28px rgba(16, 24, 40, 0.06);
    overflow: hidden;
    margin-bottom: 1rem;
}

.saja-ls-profile-card__mark {
    position: absolute;
    inset-inline-end: 0.5rem;
    top: 0.25rem;
    opacity: 0.07;
    pointer-events: none;
}

.saja-ls-profile-card__mark svg,
.saja-ls-profile-card__mark img {
    width: 140px;
    height: auto;
}

.saja-ls-profile-card__photo {
    flex: 0 0 132px;
    width: 132px;
    height: 132px;
    border-radius: 0.85rem;
    overflow: hidden;
    box-shadow: 0 10px 24px rgba(13, 74, 45, 0.16);
    border: 3px solid #fff;
    outline: 1px solid rgba(20, 99, 60, 0.18);
}

.saja-ls-profile-card__photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.saja-ls-profile-card__intro { flex: 1; min-width: 0; position: relative; }

.saja-ls-profile-card__name {
    margin: 0 0 0.25rem;
    font-size: clamp(1.35rem, 3vw, 1.85rem);
    font-weight: 800;
    line-height: 1.35;
}

.saja-ls-profile-card__father {
    margin: 0 0 0.7rem;
    color: #5b6b62;
    font-size: 0.95rem;
}

.saja-ls-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.saja-ls-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.28rem 0.7rem;
    border-radius: 999px;
    background: var(--ls-green-soft);
    color: var(--ls-green-deep);
    font-size: 0.78rem;
    font-weight: 600;
}

.saja-ls-badge--story {
    background: var(--ls-green);
    color: #fff;
}

.saja-ls-bio-card,
.saja-ls-side-card {
    background: #fff;
    border: 1px solid var(--ls-line);
    border-radius: 1rem;
    box-shadow: 0 8px 22px rgba(16, 24, 40, 0.05);
    padding: 1.1rem 1.15rem 1.2rem;
}

.saja-ls-bio-card { margin-bottom: 1rem; }

.saja-ls-bio-card__title,
.saja-ls-side-card__title {
    margin: 0 0 0.85rem;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--ls-green-deep);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.saja-ls-specs__list { margin: 0; }
.saja-ls-specs__list > div {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.45rem 0;
    border-bottom: 1px solid #f0f2f1;
    font-size: 0.88rem;
}
.saja-ls-specs__list > div:last-child { border-bottom: 0; }
.saja-ls-specs__list dt { margin: 0; color: #6b7a72; font-weight: 500; }
.saja-ls-specs__list dd { margin: 0; font-weight: 600; text-align: start; }

.saja-ls-quick-list { display: flex; flex-direction: column; gap: 0.35rem; }
.saja-ls-quick-list a,
.saja-ls-quick-list button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.15rem;
    color: #244336;
    text-decoration: none;
    background: none;
    border: 0;
    text-align: start;
    font-size: 0.9rem;
    cursor: pointer;
}
.saja-ls-quick-list a:hover,
.saja-ls-quick-list button:hover { color: var(--ls-green); }
.saja-ls-quick-list i { color: var(--ls-green); width: 1.1rem; }

.saja-ls-related { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.65rem; }
.saja-ls-related a,
.saja-ls-related div {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    text-decoration: none;
    color: inherit;
}
.saja-ls-related__photo {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    overflow: hidden;
    flex: 0 0 42px;
    background: var(--ls-green-soft);
}
.saja-ls-related__photo img { width: 100%; height: 100%; object-fit: cover; }
.saja-ls-related__meta { display: flex; flex-direction: column; min-width: 0; }
.saja-ls-related__meta strong { font-size: 0.88rem; }
.saja-ls-related__meta span { font-size: 0.75rem; color: #6b7a72; }

.saja-ls-quote {
    margin: 1rem 0 0;
    padding: 0.85rem 1rem;
    background: var(--ls-green-soft);
    border-radius: 0.75rem;
    color: #1d3d2c;
    font-size: 0.95rem;
}

.saja-ls-article__body .saja-ls-h1,
.saja-ls-h1 {
    font-size: 1.05rem;
    font-weight: 800;
    margin: 1.6rem 0 0.75rem;
    padding: 0.5rem 0.8rem;
    background: var(--ls-green-soft);
    color: var(--ls-green-deep);
    border-radius: 0.65rem;
}
.saja-ls-h4 { font-size: 1rem; font-weight: 700; margin: 1rem 0 0.4rem; }
.saja-ls-h5 { font-size: 0.95rem; font-weight: 700; margin: 0.85rem 0 0.35rem; }
.saja-ls-h6 { font-size: 0.9rem; font-weight: 700; margin: 0.75rem 0 0.3rem; }

.saja-ls-article__body.is-clamped {
    max-height: 22rem;
    overflow: hidden;
    position: relative;
}
.saja-ls-article__body.is-clamped::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 4rem;
    background: linear-gradient(transparent, #fff);
}
.saja-ls-more {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.75rem;
    border: 0;
    background: none;
    color: var(--ls-green);
    font-weight: 700;
    cursor: pointer;
}

.saja-ls-specs--mobile,
.saja-ls-quick--mobile { display: none; }

.saja-ls-quick--mobile {
    display: none;
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
    margin-bottom: 1rem;
}
.saja-ls-quick--mobile a,
.saja-ls-quick--mobile button {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    padding: 0.85rem 0.5rem;
    background: #fff;
    border: 1px solid var(--ls-line);
    border-radius: 0.85rem;
    color: #244336;
    text-decoration: none;
    font-size: 0.78rem;
    box-shadow: 0 6px 16px rgba(16, 24, 40, 0.05);
}
.saja-ls-quick--mobile i { color: var(--ls-green); font-size: 1.05rem; }

.saja-ls-specs--mobile { margin-bottom: 1rem; }
.saja-ls-specs--mobile summary {
    cursor: pointer;
    font-weight: 700;
    color: var(--ls-green-deep);
    list-style: none;
}
.saja-ls-specs--mobile summary::-webkit-details-marker { display: none; }
.saja-ls-specs--mobile summary::after {
    content: '▾';
    float: left;
    color: var(--ls-green);
}

@media (max-width: 991px) {
    .saja-ls-view-layout { grid-template-columns: 1fr; }
    .saja-ls-view-aside { display: none; }
    .saja-ls-specs--mobile,
    .saja-ls-quick--mobile { display: grid; }
    .saja-ls-specs--mobile { display: block; }
}

@media (max-width: 575px) {
    .saja-ls-profile-card {
        flex-direction: row;
        align-items: center;
        padding: 0.9rem;
    }
    .saja-ls-profile-card__photo {
        width: 84px;
        height: 84px;
        flex-basis: 84px;
    }
    .saja-ls-profile-card__name { font-size: 1.15rem; }
    .saja-ls-badges { display: none; }
}

@media print {
    .saja-ls-toolbar,
    .saja-ls-more,
    .saja-ls-quick--mobile,
    .saja-app-bottom-nav,
    .saja-site-topbar { display: none !important; }
    .saja-ls-view-aside { display: block; }
    .saja-ls-article__body.is-clamped { max-height: none; overflow: visible; }
    .saja-ls-article__body.is-clamped::after { display: none; }
}
