/* Custom Header Builder - Single Post Styles */

.chb-single-post-wrap {
    direction: rtl;
    text-align: right;
}

/* פריסה דו-טורית: תוכן מימין (בזכות RTL), תמונה נדבקת משמאל */
.chb-sp-columns {
    display: flex;
    align-items: flex-start;
    gap: 40px;
    margin-bottom: 28px;
}

.chb-sp-col-content {
    flex: 1 1 55%;
    min-width: 0;
}

.chb-sp-col-image {
    flex: 1 1 45%;
    align-self: stretch;
}

/* התמונה נדבקת (sticky) ונגללת יחד עם המשתמש עד לסוף עמודת התוכן */
.chb-sp-sticky-image {
    position: sticky;
    top: 100px;
}

.chb-sp-image-wrap {
    width: 100%;
    height: 480px;
    border-radius: 14px;
    overflow: hidden;
    background: #f0f0f0;
}

.chb-sp-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.chb-sp-cat {
    display: inline-block;
    background: #2e9e2e;
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    padding: 5px 14px;
    border-radius: 20px;
    margin-bottom: 14px;
}

.chb-sp-title {
    margin: 0 0 14px;
    font-size: 32px;
    font-weight: 800;
    line-height: 1.3;
    color: #1a1a1a;
}

.chb-sp-meta {
    font-size: 13px;
    color: #999999;
    margin-bottom: 20px;
}

@media (max-width: 782px) {
    .chb-sp-columns {
        flex-direction: column;
        gap: 20px;
    }

    .chb-sp-col-image {
        order: -1;
        width: 100%;
        align-self: auto;
    }

    .chb-sp-sticky-image {
        position: static;
    }

    .chb-sp-image-wrap {
        height: 220px;
    }
}

.chb-sp-content {
    font-size: 16px;
    line-height: 1.9;
    color: #333333;
}

.chb-sp-content p {
    margin: 0 0 20px;
}

.chb-sp-content h2 {
    font-size: 24px;
    font-weight: 700;
    margin: 32px 0 14px;
    color: #1a1a1a;
}

.chb-sp-content h3 {
    font-size: 19px;
    font-weight: 700;
    margin: 26px 0 12px;
    color: #1a1a1a;
}

.chb-sp-content img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    margin: 10px 0;
}

.chb-sp-content a {
    color: #2e9e2e;
    text-decoration: underline;
}

.chb-sp-content ul,
.chb-sp-content ol {
    margin: 0 0 20px;
    padding-right: 22px;
}

.chb-sp-content blockquote {
    border-right: 4px solid #2e9e2e;
    padding: 10px 18px;
    margin: 20px 0;
    background: #f7faf7;
    color: #444444;
    font-style: italic;
    border-radius: 6px;
}

.chb-sp-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 26px 0;
}

.chb-sp-tag {
    background: #f2f2f2;
    color: #555555;
    font-size: 12.5px;
    padding: 6px 14px;
    border-radius: 20px;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.chb-sp-tag:hover {
    background: #e5e5e5;
}

.chb-sp-share {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0 10px;
}

.chb-sp-share-label {
    font-size: 13px;
    font-weight: 600;
    color: #555555;
    margin-left: 4px;
}

.chb-sp-share a {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #2e9e2e;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s ease;
}

.chb-sp-share a:hover {
    opacity: 0.85;
}

.chb-sp-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 30px;
    padding-top: 24px;
    border-top: 1px solid #ececec;
}

.chb-sp-nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: #333333;
    font-size: 14px;
    font-weight: 600;
    padding: 12px 16px;
    border: 1px solid #ececec;
    border-radius: 10px;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.chb-sp-nav-link:hover {
    border-color: #2e9e2e;
    background: #f7faf7;
}

.chb-sp-nav-next {
    justify-content: flex-start;
    text-align: left;
}

.chb-sp-nav-prev {
    justify-content: flex-end;
    text-align: right;
    grid-column: 2;
}

.chb-sp-nav-arrow {
    flex-shrink: 0;
    font-size: 16px;
}

.chb-sp-nav-title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* מאמרים קשורים */
.chb-sp-related {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #ececec;
}

.chb-sp-related-title {
    margin: 0 0 18px;
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
}

.chb-sp-related-track {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 8px;
    scroll-snap-type: x proximity;
}

.chb-sp-related-track::-webkit-scrollbar {
    height: 5px;
}

.chb-sp-related-track::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.15);
    border-radius: 4px;
}

.chb-sp-related-card {
    flex: 0 0 auto;
    width: 220px;
    scroll-snap-align: start;
    text-decoration: none;
    color: inherit;
    border: 1px solid #ececec;
    border-radius: 12px;
    overflow: hidden;
    transition: box-shadow 0.25s ease, transform 0.25s ease;
    background: #ffffff;
}

.chb-sp-related-card:hover {
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}

.chb-sp-related-image {
    width: 100%;
    height: 130px;
    background: #f0f0f0;
    overflow: hidden;
}

.chb-sp-related-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.chb-sp-related-title-text {
    padding: 10px 12px;
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.4;
    color: #1a1a1a;
}

/* כפתור חזרה לעמוד הבית */
.chb-sp-back-home-wrap {
    margin-top: 34px;
    text-align: center;
}

.chb-sp-back-home {
    display: inline-block;
    background: #2e9e2e;
    color: #ffffff;
    text-decoration: none;
    font-size: 15px;
    font-weight: 700;
    padding: 13px 32px;
    border-radius: 8px;
    transition: filter 0.2s ease;
}

.chb-sp-back-home:hover {
    filter: brightness(0.92);
}

@media (max-width: 600px) {
    .chb-sp-title {
        font-size: 24px;
    }

    .chb-sp-image-wrap {
        height: 220px;
    }

    .chb-sp-nav {
        grid-template-columns: 1fr;
    }

    .chb-sp-nav-prev {
        grid-column: 1;
    }
}
