/**
 * صندوق موحّد أسفل المقال — Google · مشاركة · كاتب · وسوم
 */

.article-post-hub {
    position: relative;
    margin: 0;
    border-radius: 20px;
    border: 1.5px solid #bae6fd;
    background: #fff;
    box-shadow:
        0 14px 44px rgba(12, 74, 110, 0.1),
        0 2px 0 rgba(255, 255, 255, 0.9) inset;
    overflow: hidden;
}

/* داخل مربع المقال الموحّد */
.article-flow--sheet .article-post-hub--in-sheet,
.article-body-card--sheet .article-post-hub--in-sheet {
    border: none;
    border-radius: 0;
    box-shadow: none;
    border-top: 1px solid rgba(186, 230, 253, 0.65);
}

.article-flow--sheet .article-post-hub--in-sheet .article-post-hub__accent,
.article-body-card--sheet .article-post-hub--in-sheet .article-post-hub__accent {
    display: none;
}

.article-post-hub__accent {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(
        90deg,
        #0c4a6e 0%,
        var(--color-primary, #0ea5e9) 35%,
        #38bdf8 65%,
        #0c4a6e 100%
    );
    pointer-events: none;
    z-index: 2;
}

.article-post-hub__zone {
    position: relative;
    padding: 0;
}

.article-post-hub__zone + .article-post-hub__zone,
.article-post-hub__zone + .article-post-hub__bundle,
.article-post-hub__bundle + .article-post-hub__zone {
    border-top: 1px solid rgba(186, 230, 253, 0.55);
}

/* كاتب + مشاركة — كتلة واحدة بحواف مدمجة */
.article-post-hub__bundle--author-share {
    overflow: hidden;
    background: #fff;
}

.article-post-hub__bundle--author-share .article-post-hub__zone--author + .article-post-hub__zone--share {
    border-top: none;
}

.article-post-hub__bundle--author-share .article-post-hub__zone--author {
    position: relative;
    background: linear-gradient(180deg, #f8fcff 0%, #fff 100%);
}

.article-post-hub__bundle--author-share .article-post-hub__zone--author::after {
    content: '';
    position: absolute;
    left: 20px;
    right: 20px;
    bottom: 0;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(186, 230, 253, 0.7) 15%,
        rgba(186, 230, 253, 0.7) 85%,
        transparent
    );
    pointer-events: none;
}

.article-post-hub__bundle--author-share:not(:has(.article-post-hub__zone--author)) .article-post-hub__zone--share {
    border-top: none;
}

.article-post-hub__bundle--author-share .article-post-hub__zone--author + .article-post-hub__zone--share .share-panel {
    border-radius: 0;
}

.article-post-hub__bundle--author-share .article-post-hub__zone--share {
    background: transparent;
}

/* ——— Google Follow ——— */
.article-post-hub__zone--follow {
    padding: 16px 18px 14px;
    background: linear-gradient(180deg, #f8fcff 0%, #fff 100%);
}

.article-post-hub .google-follow {
    margin: 0;
    gap: 12px;
}

.article-post-hub .google-follow__card {
    min-height: 58px;
    padding: 10px 12px;
    border-radius: 14px;
    border: 1.5px solid #bae6fd;
    background: #fff;
    box-shadow: 0 4px 16px rgba(14, 165, 233, 0.08);
}

.article-post-hub .google-follow__card:hover {
    border-color: #7dd3fc;
    box-shadow: 0 8px 22px rgba(14, 165, 233, 0.14);
    transform: translateY(-1px);
}

.article-post-hub .google-follow__card--search {
    border-color: #cbd5e1;
}

.article-post-hub .google-follow__card--news {
    border-color: #bae6fd;
    background: linear-gradient(135deg, #fff 0%, #f0f9ff 100%);
}

.article-post-hub .google-follow__cta {
    padding: 7px 14px;
    font-size: 12px;
    border-radius: 10px;
}

/* ——— Share (dark band) ——— */
.article-post-hub__zone--share {
    padding: 0;
    background: transparent;
    border-top-color: rgba(255, 255, 255, 0.08);
}

.article-post-hub .share-panel {
    margin: 0;
    padding: 18px 20px 20px;
    border-radius: 0;
    background: linear-gradient(145deg, #0f172a 0%, #1e293b 48%, #0c4a6e 100%);
    box-shadow: none;
}

.article-post-hub .share-panel__intro {
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.article-post-hub .share-panel__actions {
    gap: 8px;
}

/* ——— Author ——— */
.article-post-hub__zone--author {
    padding: 0;
    background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
}

.article-post-hub__bundle--author-share .article-post-hub__zone--author .author-card__inner {
    padding-bottom: 16px;
}

.article-post-hub .author-card {
    margin: 0;
    border-radius: 0;
    overflow: visible;
}

.article-post-hub .author-card__ribbon {
    display: none;
}

.article-post-hub .author-card__inner {
    padding: 18px 20px;
    border: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.article-post-hub .author-card__icon.user-avatar--sm {
    width: 56px;
    height: 56px;
    font-size: 22px;
    border-radius: 50%;
}

.article-post-hub .author-card__icon.user-avatar--sm img {
    border-radius: 50%;
}

.article-post-hub .author-card__icon-ring {
    inset: -5px;
    border-radius: 50%;
}

/* ——— Tags ——— */
.article-post-hub__zone--tags {
    padding: 0;
    background: #fff;
}

.article-post-hub .article-tags {
    margin: 0;
    padding: 16px 20px 18px;
    border: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.article-post-hub .article-tags::before {
    display: none;
}

.article-post-hub .article-tags__head {
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px dashed rgba(14, 165, 233, 0.22);
}

/* ——— Admin ——— */
.article-post-hub__zone--admin {
    display: flex;
    justify-content: flex-end;
    padding: 12px 18px 16px;
    background: #f8fafc;
}

.article-post-hub .article-admin-bar {
    margin: 0;
    padding: 0;
    border: none;
}

.article-post-hub .article-admin-bar__btn {
    margin: 0;
}

/* Dark mode */
html.site-dark .article-post-hub {
    background: #1e293b;
    border-color: #334155;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.35);
}

html.site-dark .article-post-hub__zone + .article-post-hub__zone,
html.site-dark .article-post-hub__zone + .article-post-hub__bundle,
html.site-dark .article-post-hub__bundle + .article-post-hub__zone {
    border-top-color: #334155;
}

html.site-dark .article-post-hub__bundle--author-share {
    background: #1e293b;
}

html.site-dark .article-post-hub__bundle--author-share .article-post-hub__zone--author {
    background: linear-gradient(180deg, #1e293b 0%, #141c2e 100%);
}

html.site-dark .article-post-hub__bundle--author-share .article-post-hub__zone--author::after {
    background: linear-gradient(
        90deg,
        transparent,
        rgba(51, 65, 85, 0.9) 15%,
        rgba(51, 65, 85, 0.9) 85%,
        transparent
    );
}

html.site-dark .article-post-hub__zone--follow {
    background: linear-gradient(180deg, #141c2e 0%, #1e293b 100%);
}

html.site-dark .article-post-hub .google-follow__card {
    background: #0f172a;
    border-color: #334155;
}

html.site-dark .article-post-hub__zone--author {
    background: linear-gradient(180deg, #1e293b 0%, #141c2e 100%);
}

html.site-dark .article-post-hub .author-card__inner {
    background: transparent;
}

html.site-dark .article-post-hub .article-tags {
    background: transparent;
}

html.site-dark .article-post-hub__zone--admin {
    background: #141c2e;
}

@media (max-width: 640px) {
    .article-post-hub {
        border-radius: 16px;
    }

    .article-post-hub__zone--follow {
        padding: 14px 12px 12px;
    }

    .article-post-hub .google-follow--duo {
        grid-template-columns: 1fr;
    }

    .article-post-hub .share-panel {
        padding: 16px 14px 18px;
    }

    .article-post-hub .author-card__inner {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 16px 14px;
    }

    .article-post-hub .author-card__email {
        width: 100%;
        justify-content: center;
    }

    .article-post-hub .author-card__link {
        display: inline-flex;
        justify-content: center;
    }

    .article-post-hub .article-tags {
        padding: 14px 14px 16px;
    }

    .article-post-hub__zone--admin {
        justify-content: stretch;
    }

    .article-post-hub .article-admin-bar__btn {
        width: 100%;
        justify-content: center;
    }
}
