:root {
    --post-radius: 22px;
    --post-card-shadow: 0 14px 34px rgba(34, 34, 34, 0.10);
}

.post-page {
    min-height: 60vh;
    direction: rtl;
    text-align: right;
}

.post-hero {
    padding: 3.75rem 0 2.25rem;
    background: var(--primary-bg);
}

.post-hero-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 1.5rem;
    align-items: center;
    direction: rtl;
}

.post-hero-content {
    grid-column: span 7;
}

.post-back {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 0.85rem;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 900;
    color: var(--primary-dark);
    background: rgba(204, 31, 40, 0.10);
    transition: transform 180ms ease, background-color 180ms ease;
    direction: rtl;
}

.post-back:hover {
    transform: translateY(-1px);
    background: rgba(204, 31, 40, 0.16);
    color: var(--primary-dark);
}

.post-kicker {
    margin-top: 0.9rem;
    display: inline-flex;
    align-items: center;
    padding: 0.45rem 0.95rem;
    border-radius: 999px;
    background: rgba(204, 31, 40, 0.10);
    color: rgb(204, 31, 40);
    font-weight: 900;
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    direction: rtl;
}

.post-title {
    margin: 0.9rem 0 0.75rem;
    font-weight: 900;
    letter-spacing: -0.02em;
    line-height: 1.15;
    text-align: right;
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.65rem;
    color: var(--text-light);
    font-weight: 700;
    direction: rtl;
}

.post-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.7rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(204, 31, 40, 0.14);
    direction: rtl;
}

.post-excerpt {
    margin: 1rem 0 0;
    max-width: 62ch;
    color: var(--text-light);
    font-weight: 650;
    text-align: right;
}

.post-hero-media {
    grid-column: span 5;
    border-radius: var(--post-radius);
    overflow: hidden;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(204, 31, 40, 0.16);
    box-shadow: var(--post-card-shadow);
    direction: rtl;
}

.post-hero-media img {
    display: block;
    width: 100%;
    height: 360px;
    object-fit: cover;
}

.post-body {
    padding: 2.75rem 0 4.5rem;
    background: #ffffff;
    direction: rtl;
}

.post-layout {
    max-width: 900px;
    margin: 0 auto;
}

.post-article {
    display: grid;
    gap: 1.25rem;
}

.post-card {
    border-radius: var(--post-radius);
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(204, 31, 40, 0.16);
    box-shadow: var(--post-card-shadow);
    padding: 1.15rem 1.15rem 1.25rem;
    direction: rtl;
}

.post-card-title {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 900;
    color: var(--text-dark);
    margin-bottom: 0.8rem;
}

.post-card-title--toggle {
    width: 100%;
    justify-content: space-between;
}

.post-card-title-left {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
}

.toc-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-radius: 999px;
    border: 1px solid rgba(204, 31, 40, 0.18);
    background: rgba(204, 31, 40, 0.10);
    color: var(--primary-dark);
    font-weight: 900;
    cursor: pointer;
    transition: transform 180ms ease, background-color 180ms ease, border-color 180ms ease;
}

.toc-toggle:hover {
    transform: translateY(-1px);
    background: rgba(204, 31, 40, 0.14);
    border-color: rgba(204, 31, 40, 0.28);
}

.toc-toggle-icon {
    transition: transform 200ms ease;
}

.post-card--toc.is-open .toc-toggle-icon {
    transform: rotate(180deg);
}

.post-card-title i {
    width: 38px;
    height: 38px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: rgba(204, 31, 40, 0.12);
    color: var(--primary-dark);
}

.post-toc-note {
    color: var(--text-light);
    font-weight: 650;
    margin-bottom: 0.75rem;
    text-align: right;
}

.post-toc-list {
    display: grid;
    gap: 0.35rem;
}

.post-toc-link {
    display: flex;
    gap: 0.55rem;
    align-items: baseline;
    padding: 0.55rem 0.7rem;
    border-radius: 14px;
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 800;
    transition: background-color 180ms ease, transform 180ms ease, color 180ms ease;
    direction: rtl;
}

.post-toc-link:hover {
    background: rgba(204, 31, 40, 0.10);
    color: var(--primary-dark);
    transform: translateX(-2px);
}

.post-toc-link.is-sub {
    padding-inline-start: 1.1rem;
    font-weight: 750;
    color: var(--text-light);
}

.post-toc-bullet {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    margin-top: 0.45rem;
    background: rgb(204, 31, 40);
    flex: 0 0 auto;
}

.post-content {
    border-radius: var(--post-radius);
    background: #fff;
    border: 1px solid rgba(204, 31, 40, 0.12);
    box-shadow: 0 10px 28px rgba(34, 34, 34, 0.08);
    padding: 1.4rem 1.25rem;
    direction: rtl;
}

.post-content h2 {
    margin: 1.1rem 0 0.6rem;
    font-weight: 900;
    letter-spacing: -0.01em;
}

.post-content h3 {
    margin: 1rem 0 0.45rem;
    font-weight: 900;
    color: var(--primary-dark);
}

.post-content p {
    margin: 0 0 0.9rem;
    color: var(--text-light);
    font-weight: 600;
    line-height: 1.75;
    text-align: right;
}

.post-related-simple {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(204, 31, 40, 0.12);
}

.post-related-simple-title {
    font-weight: 900;
    color: var(--text-dark);
    margin-bottom: 0.7rem;
}

.post-related-simple-list {
    display: grid;
    gap: 0.4rem;
}

.post-related-simple-link {
    position: relative;
    display: inline-block;
    width: fit-content;
    text-decoration: none;
    font-weight: 800;
    color: var(--primary-dark);
    padding: 0.35rem 0;
}

.post-related-simple-link::after {
    content: '';
    position: absolute;
    inset-inline-start: 0;
    inset-inline-end: 0;
    bottom: 0.15rem;
    height: 2px;
    background: var(--brand-primary);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 220ms ease;
    opacity: 0.95;
}

.post-related-simple-link:hover {
    color: var(--text-dark);
}

.post-related-simple-link:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

.post-faq {
    margin-top: 1.25rem;
}

.post-card--faq {
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 0;
}

.post-faq-header {
    display: grid;
    gap: 0.35rem;
    margin-bottom: 0.85rem;
}

.post-faq-grid {
    display: grid;
    gap: 0.6rem;
}

.faq-item {
    border-radius: 18px;
    border: 1px solid rgba(204, 31, 40, 0.12);
    background: rgba(255, 255, 255, 0.92);
    overflow: hidden;
    box-shadow: 0 10px 26px rgba(34, 34, 34, 0.08);
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.faq-item:hover {
    transform: translateY(-1px);
    border-color: rgba(204, 31, 40, 0.30);
    box-shadow: 0 14px 34px rgba(34, 34, 34, 0.10);
}

.faq-question {
    width: 100%;
    text-align: right;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 0.75rem;
    padding: 0.9rem 0.95rem;
    border: 0;
    background: transparent;
    cursor: pointer;
    color: var(--text-dark);
    direction: rtl;
}

.faq-pill {
    min-width: 40px;
    height: 40px;
    padding: 0 0.75rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 950;
    color: var(--primary-dark);
    border: 1px solid rgba(204, 31, 40, 0.18);
    background: rgba(204, 31, 40, 0.10);
}

.faq-q {
    font-weight: 900;
    letter-spacing: -0.01em;
}

.faq-icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(204, 31, 40, 0.16);
    background: rgba(204, 31, 40, 0.10);
    color: rgb(204, 31, 40);
}

.faq-item.is-open .faq-icon i {
    transform: rotate(180deg);
}

.faq-icon i {
    transition: transform 200ms ease;
}

.faq-answer {
    border-top: 1px solid rgba(204, 31, 40, 0.12);
    background: transparent;
}

.faq-answer-inner {
    padding: 0.95rem 0.95rem 1.05rem;
    color: var(--text-light);
    font-weight: 650;
    line-height: 1.75;
}

.faq-answer-inner p {
    margin: 0 0 0.85rem;
}

.faq-answer-inner p:last-child {
    margin-bottom: 0;
}

.post-related-section {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid #e2e8f0;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 24px;
    margin-top: 24px;
}

.related-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(34, 34, 34, 0.08);
    border: 1px solid rgba(204, 31, 40, 0.12);
    transition: transform 0.2s, box-shadow 0.2s;
    direction: rtl;
}

.related-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 18px rgba(34, 34, 34, 0.12);
    border-color: rgba(204, 31, 40, 0.30);
}

.related-image {
    height: 160px;
    object-fit: cover;
    width: 100%;
    background: #f8fafc;
}

.related-content {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    direction: rtl;
}

.related-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.4;
    color: var(--text-dark);
    display: -webkit-box;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-align: right;
}

.related-date {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-top: auto;
    text-align: right;
}

@media (max-width: 992px) {
    .post-hero-content {
        grid-column: span 12;
    }

    .post-hero-media {
        grid-column: span 12;
    }

    .post-hero-media img {
        height: 320px;
    }

    .post-related-simple {
        padding-top: 0.9rem;
    }
}

@media (max-width: 576px) {
    .post-hero {
        padding: 3.25rem 0 2rem;
    }

    .post-body {
        padding: 2.25rem 0 3.75rem;
    }

    .post-content {
        padding: 1.2rem 1.05rem;
    }

    .post-related-simple-list {
        gap: 0.35rem;
    }
}