/*
 * SloganIndex — Single Slogan Related Slogans FA
 * Version: 1.2.1 VISIBILITY FIXED
 * Folder: includes/single-slogan-related-fa/
 */

body.single-slogan .si-ss-related-fa-section,
body.single-slogan .si-ss-related-fa-section * {
    box-sizing: border-box;
}

body.single-slogan .si-ss-related-fa-section {
    width: min(1280px, calc(100% - 40px));
    margin: 36px auto 24px;
    padding: clamp(18px, 3vw, 32px);
    direction: rtl;
    text-align: right;
    font-family: var(--si-font-fa, 'SI Vazirmatn', Vazirmatn, Tahoma, Arial, sans-serif);
    background:
        radial-gradient(circle at 92% 0%, rgba(37, 99, 235, .08), transparent 34%),
        linear-gradient(180deg, #ffffff, #f8fafc);
    border: 1px solid rgba(226, 232, 240, .96);
    box-shadow: 0 18px 46px rgba(15, 23, 42, .07);
}

body.single-slogan .si-ss-related-fa-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 20px;
}

body.single-slogan .si-ss-related-fa-eyebrow {
    display: inline-flex;
    width: fit-content;
    margin-bottom: 8px;
    padding: 5px 8px;
    color: #1d4ed8;
    background: rgba(37, 99, 235, .08);
    border: 1px solid rgba(37, 99, 235, .18);
    font-size: .74rem;
    line-height: 1.4;
    font-weight: 900;
}

body.single-slogan .si-ss-related-fa-head h2 {
    margin: 0;
    color: #0f172a;
    font-size: clamp(1.25rem, 2.4vw, 2rem);
    line-height: 1.55;
    font-weight: 950;
}

body.single-slogan .si-ss-related-fa-head p {
    max-width: 720px;
    margin: 8px 0 0;
    color: #475569;
    font-size: .94rem;
    line-height: 1.9;
    font-weight: 650;
}

body.single-slogan .si-ss-related-fa-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

body.single-slogan .si-ss-related-fa-card {
    position: relative;
    min-height: 260px;
    overflow: hidden;
    background: #0f172a;
    border: 1px solid rgba(148, 163, 184, .24);
    box-shadow: 0 14px 34px rgba(15, 23, 42, .11);
}

body.single-slogan .si-ss-related-fa-card-link {
    position: relative;
    z-index: 2;
    min-height: inherit;
    display: flex;
    align-items: stretch;
    color: inherit;
    text-decoration: none !important;
}

body.single-slogan .si-ss-related-fa-card-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    background-image: var(--si-related-bg);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: .86;
}

body.single-slogan .si-ss-related-fa-card.has-no-image .si-ss-related-fa-card-bg {
    background:
        radial-gradient(circle at 22% 0%, rgba(37, 99, 235, .38), transparent 38%),
        linear-gradient(135deg, #0f172a, #1e293b);
    opacity: 1;
}

body.single-slogan .si-ss-related-fa-card-link::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background:
        linear-gradient(180deg, rgba(2, 6, 23, .22), rgba(2, 6, 23, .68)),
        linear-gradient(90deg, rgba(2, 6, 23, .78), rgba(2, 6, 23, .24));
}

body.single-slogan .si-ss-related-fa-card-body {
    position: relative;
    z-index: 2;
    width: 100%;
    min-height: inherit;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 8px;
    padding: 18px;
}

body.single-slogan .si-ss-related-fa-kicker {
    width: fit-content;
    padding: 4px 7px;
    color: #bfdbfe;
    background: rgba(37, 99, 235, .30);
    border: 1px solid rgba(191, 219, 254, .26);
    font-size: .68rem;
    line-height: 1.35;
    font-weight: 900;
}

body.single-slogan .si-ss-related-fa-title {
    display: block;
    color: #ffffff;
    font-size: clamp(1rem, 1.5vw, 1.28rem);
    line-height: 1.85;
    font-weight: 950;
    text-shadow: 0 1px 2px rgba(0,0,0,.68);
}

body.single-slogan .si-ss-related-fa-excerpt {
    display: block;
    color: rgba(241, 245, 249, .90);
    font-size: .82rem;
    line-height: 1.85;
    font-weight: 650;
}

body.single-slogan .si-ss-related-fa-labels {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 2px;
}

body.single-slogan .si-ss-related-fa-labels em {
    display: inline-flex;
    max-width: 100%;
    padding: 4px 6px;
    color: #dbeafe;
    background: rgba(15, 23, 42, .52);
    border: 1px solid rgba(219, 234, 254, .20);
    font-style: normal;
    font-size: .67rem;
    line-height: 1.35;
    font-weight: 850;
}

body.single-slogan .si-ss-related-fa-date {
    display: inline-flex;
    width: fit-content;
    margin-top: 2px;
    color: rgba(226, 232, 240, .86);
    font-size: .72rem;
    line-height: 1.4;
    font-weight: 780;
}

body.single-slogan .si-ss-related-fa-card:hover .si-ss-related-fa-card-bg,
body.single-slogan .si-ss-related-fa-card:focus-within .si-ss-related-fa-card-bg {
    transform: scale(1.035);
}

body.single-slogan .si-ss-related-fa-card-bg {
    transition: transform .22s ease, opacity .22s ease;
}

@media (max-width: 1024px) {
    body.single-slogan .si-ss-related-fa-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    body.single-slogan .si-ss-related-fa-section {
        width: min(100% - 24px, 720px);
        margin-top: 24px;
        padding: 14px;
    }

    body.single-slogan .si-ss-related-fa-grid {
        grid-template-columns: 1fr;
    }

    body.single-slogan .si-ss-related-fa-card {
        min-height: 230px;
    }

    body.single-slogan .si-ss-related-fa-card-body {
        padding: 15px;
    }
}


/* v1.2.0 - Empty state */
body.single-slogan .si-ss-related-fa-section.is-empty {
    border-style: dashed;
}

body.single-slogan .si-ss-related-fa-section.is-empty .si-ss-related-fa-head {
    margin-bottom: 0;
}


/* --------------------------------------------------------------------------
   v1.2.1 - Related Section Visibility Fix
   Root cause:
   The external related section previously used .si-ss-v063-reveal.
   The main single-page animation CSS can keep .si-ss-v063-reveal invisible
   until JS adds .is-visible. Since the related component is external, it must
   not depend on that scene animation pipeline.
   -------------------------------------------------------------------------- */

/* Hard visibility guard: related section must never stay hidden by old reveal CSS. */
body.single-slogan .si-ss-related-fa-section,
body.single-slogan .si-ss-related-fa-section.si-ss-v063-reveal,
body.single-slogan .si-ss-related-fa-section.si-ss-related-fa-visible {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
}

/* Match the dark single slogan page instead of creating a blank white block. */
body.single-slogan .si-ss-related-fa-section {
    color: #f8fafc !important;
    background:
        radial-gradient(circle at 88% 0%, rgba(56, 189, 248, .12), transparent 34%),
        radial-gradient(circle at 12% 100%, rgba(254, 40, 162, .10), transparent 36%),
        linear-gradient(135deg, rgba(2, 8, 23, .98), rgba(6, 25, 54, .96)) !important;
    border-color: rgba(148, 163, 184, .22) !important;
    box-shadow: 0 24px 70px rgba(0, 0, 0, .28) !important;
}

body.single-slogan .si-ss-related-fa-head h2 {
    color: #ffffff !important;
}

body.single-slogan .si-ss-related-fa-head p {
    color: rgba(226, 232, 240, .82) !important;
}

body.single-slogan .si-ss-related-fa-section.is-empty {
    border-style: dashed !important;
}
