/* ============================================================
   SHARE SHEET  (redesigned v2)
   Bottom-sheet style on mobile, centred modal on desktop.
   ============================================================ */

.share-modal {
    align-items: flex-end !important;
    /* sheet slides up from bottom on mobile */
    padding: 0 !important;
}

@media (min-width: 600px) {
    .share-modal {
        align-items: center !important;
        padding: 1rem !important;
    }
}

/* The sheet itself */
.share-sheet {
    background: var(--navy-900, #0f1e35);
    border: 1px solid rgba(148, 163, 184, .14);
    border-radius: 24px 24px 0 0;
    width: 100%;
    max-width: 520px;
    padding: 0 0 calc(env(safe-area-inset-bottom) + 1.5rem);
    box-shadow: 0 -8px 48px rgba(0, 0, 0, .5);
    animation: sheetSlideUp .22s cubic-bezier(.32, 1.01, .68, .99);
    position: relative;
    z-index: 2;
}

@media (min-width: 600px) {
    .share-sheet {
        border-radius: 18px;
        animation: sheetFadeIn .18s ease;
    }
}

@keyframes sheetSlideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes sheetFadeIn {
    from {
        transform: scale(.96);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Drag handle */
.share-sheet__handle {
    width: 40px;
    height: 4px;
    background: rgba(148, 163, 184, .25);
    border-radius: 2px;
    margin: 14px auto 0;
}

/* Article preview */
.share-sheet__preview {
    display: flex;
    align-items: flex-start;
    gap: .85rem;
    padding: 1.1rem 1.4rem .9rem;
    border-bottom: 1px solid rgba(148, 163, 184, .1);
    position: relative;
}

.share-sheet__preview-icon {
    font-size: 1.4rem;
    flex-shrink: 0;
    margin-top: .1rem;
}

.share-sheet__preview-text {
    flex: 1;
    min-width: 0;
}

.share-sheet__preview-title {
    font-size: .95rem;
    font-weight: 700;
    color: var(--text-primary, #e8f0fe);
    margin: 0 0 .25rem;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.share-sheet__preview-excerpt {
    font-size: .8rem;
    color: var(--text-muted, #8899aa);
    margin: 0;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.share-sheet__close {
    flex-shrink: 0;
    background: rgba(148, 163, 184, .1);
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: var(--text-muted);
    cursor: pointer;
    line-height: 1;
    transition: background .15s;
}

.share-sheet__close:hover {
    background: rgba(148, 163, 184, .2);
}

/* Native share button */
.share-sheet__native {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .6rem;
    width: calc(100% - 2.8rem);
    margin: 1.1rem 1.4rem .2rem;
    padding: .8rem 1.2rem;
    background: #00BFA5;
    color: #fff;
    font-weight: 700;
    font-size: .95rem;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: background .15s, transform .1s;
}

.share-sheet__native:hover {
    background: #009e87;
}

.share-sheet__native:active {
    transform: scale(.98);
}

.share-sheet__native-icon {
    font-size: 1.1rem;
    font-style: normal;
}

/* Platform grid */
.share-sheet__platforms {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: .6rem;
    padding: 1rem 1.4rem;
}

.share-platform {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .45rem;
    padding: .75rem .4rem .65rem;
    border: 1px solid rgba(148, 163, 184, .13);
    border-radius: 14px;
    background: rgba(148, 163, 184, .05);
    cursor: pointer;
    transition: background .15s, border-color .15s, transform .1s;
    color: var(--text-secondary, #94a3b8);
}

.share-platform:hover {
    background: rgba(148, 163, 184, .1);
    border-color: rgba(148, 163, 184, .25);
}

.share-platform:active {
    transform: scale(.95);
}

.share-platform__icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.share-platform.whatsapp .share-platform__icon {
    background: #25D366;
    color: #fff;
}

.share-platform.twitter .share-platform__icon {
    background: #000;
    color: #fff;
}

.share-platform.linkedin .share-platform__icon {
    background: #0A66C2;
    color: #fff;
}

.share-platform.email .share-platform__icon {
    background: rgba(148, 163, 184, .15);
}

.share-platform__label {
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .01em;
    color: var(--text-muted, #8899aa);
}

/* Copy link row */
.share-sheet__copy-row {
    display: flex;
    align-items: center;
    gap: .6rem;
    margin: 0 1.4rem .4rem;
    padding: .7rem .9rem;
    background: rgba(148, 163, 184, .06);
    border: 1px solid rgba(148, 163, 184, .12);
    border-radius: 12px;
}

.share-sheet__url-wrap {
    display: flex;
    align-items: center;
    gap: .45rem;
    flex: 1;
    min-width: 0;
}

.share-sheet__url-icon {
    font-size: .95rem;
    flex-shrink: 0;
}

.share-sheet__url-input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    color: var(--text-secondary);
    font-size: .82rem;
    min-width: 0;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
}

.share-sheet__copy-btn {
    flex-shrink: 0;
    padding: .42rem .85rem;
    background: #00BFA5;
    color: #fff;
    font-weight: 700;
    font-size: .8rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background .15s;
    white-space: nowrap;
}

.share-sheet__copy-btn:hover {
    background: #009e87;
}


/* ============================================================
   ARTICLE SHARE STRIP
   Sits at the bottom of the article body, above comments.
   ============================================================ */

.article-share-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .8rem;
    margin: 2.2rem 0 1.4rem;
    padding: 1rem 1.2rem;
    background: rgba(0, 191, 165, .04);
    border: 1px solid rgba(0, 191, 165, .15);
    border-radius: 12px;
}

.article-share-strip__label {
    font-size: .88rem;
    font-weight: 600;
    color: var(--text-muted);
}

.article-share-strip__btns {
    display: flex;
    gap: .55rem;
    flex-wrap: wrap;
}

.article-share-btn {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .45rem .9rem;
    border: 1px solid rgba(148, 163, 184, .18);
    border-radius: 8px;
    background: rgba(148, 163, 184, .06);
    color: var(--text-secondary);
    font-size: .82rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s, border-color .15s;
    white-space: nowrap;
}

.article-share-btn:hover {
    background: rgba(148, 163, 184, .12);
    border-color: rgba(148, 163, 184, .3);
}

.article-share-btn.whatsapp {
    border-color: rgba(37, 211, 102, .35);
}

.article-share-btn.whatsapp:hover {
    background: rgba(37, 211, 102, .1);
    border-color: rgba(37, 211, 102, .55);
    color: #25D366;
}

.article-share-btn.twitter {
    border-color: rgba(148, 163, 184, .18);
}

.article-share-btn.twitter:hover {
    background: rgba(0, 0, 0, .15);
    border-color: rgba(255, 255, 255, .25);
    color: #fff;
}

.article-share-btn.copy-link {
    border-color: rgba(0, 191, 165, .25);
}

.article-share-btn.copy-link:hover {
    background: rgba(0, 191, 165, .1);
    border-color: #00BFA5;
    color: #00BFA5;
}

.article-share-btn.open-share {
    color: var(--text-muted);
}

.article-share-btn.open-share:hover {
    background: rgba(148, 163, 184, .1);
    color: var(--text-primary);
}

@media (max-width: 520px) {
    .article-share-strip {
        flex-direction: column;
        align-items: flex-start;
    }

    .article-share-strip__btns {
        width: 100%;
    }

    .article-share-btn {
        flex: 1;
        justify-content: center;
    }
}


/* ============================================================
   BROWSE / CONTENT CARD  (redesigned v2)
   ============================================================ */

.content-card {
    border-left: 3px solid var(--card-accent, var(--brand, #00BFA5));
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.content-card:hover {
    transform: translateY(-4px);
    box-shadow:
        0 12px 32px rgba(0, 0, 0, .3),
        0 0 0 1px var(--card-accent, #00BFA5),
        0 0 18px color-mix(in srgb, var(--card-accent, #00BFA5) 30%, transparent);
}

/* Image / fallback — constrained height */
.content-image {
    position: relative;
    height: 160px;
    overflow: hidden;
    border-radius: 10px 10px 0 0;
}

.content-image-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s ease;
}

.content-card:hover .content-image-img {
    transform: scale(1.04);
}

.content-image-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, .4), transparent 60%);
}

.content-image-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 160px;
}

.content-image-icon {
    font-size: 2.8rem;
    opacity: .6;
    user-select: none;
}

/* Card body */
.content-body {
    padding: 1rem 1.1rem 1rem;
    display: flex;
    flex-direction: column;
    gap: .5rem;
    flex: 1;
}

.content-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: .25rem 0 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Footer: stats left, read button right */
.content-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: .6rem;
    border-top: 1px solid rgba(148, 163, 184, .08);
}

/* Read button — replaces the old text link */
.content-read-btn {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .38rem .85rem;
    background: var(--card-accent, #00BFA5);
    color: #fff;
    font-size: .8rem;
    font-weight: 700;
    border: none;
    border-radius: 7px;
    cursor: pointer;
    transition: opacity .15s, transform .1s;
    white-space: nowrap;
    flex-shrink: 0;
}

.content-read-btn:hover {
    opacity: .88;
}

.content-read-btn:active {
    transform: scale(.97);
}

@media (max-width: 480px) {

    .content-image,
    .content-image-fallback {
        height: 130px;
    }
}


/* ============================================================
   CARD ACTION BUTTONS  (v2 — labelled, larger tap targets)
   Replaces the tiny emoji-only .action-btn inside .content-card
   ============================================================ */

.content-card .content-actions {
    display: flex;
    align-items: center;
    gap: .3rem;
}

/* Base pill button */
.card-action-btn {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .32rem .65rem;
    border-radius: 7px;
    border: 1px solid rgba(148, 163, 184, .15);
    background: rgba(148, 163, 184, .07);
    color: var(--text-muted);
    font-size: .78rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s, border-color .15s, color .15s;
    white-space: nowrap;
    line-height: 1;
}

.card-action-btn__icon {
    font-size: .9rem;
    line-height: 1;
}

.card-action-btn__label {
    font-size: .75rem;
}

/* Admin-only buttons (edit/delete) — icon-only, smaller */
.card-action-btn.edit-btn,
.card-action-btn.delete-btn {
    padding: .32rem .45rem;
    font-size: .85rem;
}

.card-action-btn.edit-btn .card-action-btn__label,
.card-action-btn.delete-btn .card-action-btn__label {
    display: none;
}

/* Hover states */
.card-action-btn:hover {
    background: rgba(148, 163, 184, .14);
    border-color: rgba(148, 163, 184, .3);
    color: var(--text-primary);
}

.card-action-btn.bookmark-btn:hover,
.card-action-btn.bookmark-btn.active {
    background: rgba(251, 191, 36, .12);
    border-color: rgba(251, 191, 36, .35);
    color: #fbbf24;
}

.card-action-btn.share-btn:hover {
    background: rgba(0, 191, 165, .1);
    border-color: rgba(0, 191, 165, .35);
    color: #00BFA5;
}

.card-action-btn.edit-btn:hover {
    color: var(--sky-300, #7dd3fc);
}

.card-action-btn.delete-btn:hover {
    color: #f87171;
}

/* On very small screens — hide labels, keep icons */
@media (max-width: 420px) {
    .card-action-btn__label {
        display: none;
    }

    .card-action-btn {
        padding: .35rem .5rem;
    }
}


/* ============================================================
   BROWSE CARD IMAGE — taller
   ============================================================ */

.content-image,
.content-image-fallback {
    height: 200px !important;
    /* was 160px — more visual weight */
}

@media (max-width: 480px) {

    .content-image,
    .content-image-fallback {
        height: 170px !important;
    }
}


/* ============================================================
   ARTICLE TOP SHARE BAR
   Compact variant of the bottom share strip — sits right after
   the article header divider before the article body begins.
   ============================================================ */

.article-share-strip--top {
    margin: .6rem 0 1.4rem;
    padding: .65rem 1rem;
    background: rgba(148, 163, 184, .04);
    border-color: rgba(148, 163, 184, .1);
    justify-content: flex-start;
    gap: 0;
}

.article-share-strip--top .article-share-strip__btns {
    gap: .45rem;
}

.article-share-strip--top .article-share-strip__label {
    /* no label on the top strip — keep it compact */
    display: none;
}

/* Top strip buttons slightly smaller */
.article-share-strip--top .article-share-btn {
    padding: .36rem .75rem;
    font-size: .79rem;
}

/* ============================================================
   PRE-COMMENTS SHARE STRIP
   Sits between the article body and the comments section.
   Visually distinct — acts as a natural transition rather than
   a repeated CTA.
   ============================================================ */

.article-share-strip--pre-comments {
    margin: 0;
    padding: .9rem 1.2rem;
    background: rgba(0, 191, 165, .04);
    border: 1px solid rgba(0, 191, 165, .14);
    border-radius: 12px 12px 0 0;
    border-bottom: none;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .6rem;
}

.article-share-strip--pre-comments .article-share-strip__label {
    font-size: .82rem;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: .02em;
    display: flex;
    align-items: center;
    gap: .4rem;
}

.article-share-strip--pre-comments .article-share-strip__label::before {
    content: '↗';
    font-size: .9rem;
    color: #00BFA5;
}

.article-share-strip--pre-comments .article-share-strip__btns {
    gap: .45rem;
}

.article-share-strip--pre-comments .article-share-btn {
    padding: .38rem .75rem;
    font-size: .8rem;
}

/* Comments section connects flush below the strip */
.article-share-strip--pre-comments+.comments-section {
    border-top: 1px solid rgba(0, 191, 165, .14);
    border-radius: 0 0 12px 12px;
    padding-top: 1.2rem;
    margin-top: 0;
}

@media (max-width: 520px) {
    .article-share-strip--pre-comments {
        flex-direction: column;
        align-items: flex-start;
        border-radius: 10px 10px 0 0;
    }

    .article-share-strip--pre-comments .article-share-strip__btns {
        width: 100%;
    }

    .article-share-strip--pre-comments .article-share-btn {
        flex: 1;
        justify-content: center;
    }
}