/* ── Article content ─────────────────────────────── */
.article-content h2 { color: #143259; margin-top: 2rem; margin-bottom: .75rem; }
.article-content h3 { color: #143259; margin-top: 1.5rem; margin-bottom: .5rem; }
.article-content p  { color: #444; line-height: 1.8; text-align: justify; }
.article-content pre { background: #f4f6f8; border-radius: 6px; padding: 1rem; overflow-x: auto; }
.article-content code { font-size: .9em; }
.article-content ul,
.article-content ol  { color: #444; line-height: 1.8; text-align: justify; }
.article-content { overflow-wrap: break-word; word-wrap: break-word; }
.article-content img,
.article-content video,
.article-content iframe,
.article-content picture,
.article-content embed,
.article-content object,
.article-content svg,
.article-content figure,
.article-content .e-img-caption,
.article-content .e-rte-image {
    max-width: 100% !important;
    height: auto !important;
    box-sizing: border-box;
}
.article-content iframe { width: 100%; aspect-ratio: 16 / 9; height: auto; }
.article-content table { display: block; overflow-x: auto; max-width: 100%; }

.article-main-col { min-width: 0; max-width: 100%; overflow-x: hidden; }

/* ── Author card (sidebar) ───────────────────────── */
.author-card {
    position: relative;
    margin-top: 1.75rem;
    padding: 1.25rem;
    background: #fff;
    border: 1px solid #edf1f7;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 1px 2px rgba(20,50,89,.04);
    transition: box-shadow 180ms ease, transform 180ms ease, border-color 180ms ease;
}
.author-card.author-card-clickable:hover {
    box-shadow: 0 8px 28px rgba(20,50,89,.1);
    transform: translateY(-2px);
    border-color: #d6e0ee;
}
.author-card.author-card-clickable:hover .author-card-name { color: #3071F2; }
.author-card-name { transition: color 150ms ease; }
.author-card-links { position: relative; z-index: 2; }
.author-card-avatar {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto .85rem;
    display: block;
    border: 3px solid #fff;
    box-shadow: 0 0 0 2px #89C2D9;
}
.author-card-avatar-initials {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: #e8f0fe;
    color: #3071F2;
    font-size: 2rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto .85rem;
    border: 3px solid #fff;
    box-shadow: 0 0 0 2px #89C2D9;
}
.author-card-name {
    font-size: 1.05rem;
    font-weight: 700;
    color: #143259;
    margin-bottom: .5rem;
    line-height: 1.25;
}
.author-card-bio {
    font-size: .85rem;
    color: #5a6a7e;
    line-height: 1.55;
    margin: 0 0 .75rem;
    text-align: justify;
}
.author-card-links {
    display: flex;
    justify-content: center;
    gap: .5rem;
}
.author-card-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(20,50,89,.05);
    border: 1px solid rgba(20,50,89,.1);
    color: #143259;
    font-size: .9rem;
    text-decoration: none;
    transition: background .15s, color .15s, border-color .15s;
    min-height: 32px;
}
.author-card-link:hover {
    background: rgba(48,113,242,.1);
    border-color: rgba(48,113,242,.25);
    color: #3071F2;
}

/* ── Share hover/colours (ATF reservation lives inline) ── */
.share-btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
    box-shadow: 0 5px 16px rgba(0,0,0,.2);
    text-decoration: none;
    color: inherit;
}
.share-btn-linkedin  { background: #0A66C2; color: #fff; }
.share-btn-whatsapp  { background: #25D366; color: #fff; }
.share-btn-facebook  { background: #1877F2; color: #fff; }
.share-btn-x         { background: #000;    color: #fff; }
.share-btn-instagram {
    background: linear-gradient(135deg, #f58529 0%, #dd2a7b 50%, #515bd4 100%);
    color: #fff;
}

/* ── Sidebar ─────────────────────────────────────── */
.sidebar-heading {
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: #8a9bb0;
    margin-bottom: 1rem;
    padding-bottom: .65rem;
    border-bottom: 2px solid #edf1f7;
}
.recent-item {
    position: relative;
    display: flex;
    gap: .65rem;
    align-items: flex-start;
    padding: .85rem 0;
    border-bottom: 1px solid #f0f4f8;
    transition: background 150ms ease;
}
.recent-item:hover { background: #f8fbff; }
.recent-item:last-child { border-bottom: none; padding-bottom: 0; }
.recent-thumb {
    width: 54px;
    height: 54px;
    border-radius: 7px;
    object-fit: cover;
    flex-shrink: 0;
    display: block;
}
.recent-thumb-placeholder {
    width: 54px;
    height: 54px;
    border-radius: 7px;
    background: #edf1f7;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.recent-body { min-width: 0; }
.recent-link {
    font-size: .84rem;
    font-weight: 600;
    color: #143259;
    text-decoration: none;
    line-height: 1.35;
    display: block;
    margin-bottom: .3rem;
    transition: color 140ms ease;
}
.recent-link:hover { color: #3071F2; }
.recent-meta { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.recent-cat {
    font-size: .6rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    padding: .12rem .5rem;
    border-radius: 100px;
    background: #eef3fe;
    color: #3071F2;
    border: 1px solid rgba(48,113,242,.15);
}
.recent-date { font-size: .7rem; color: #8a9bb0; }

/* ── Mobile sidebar → horizontal scroll strip ─────── */
@media (max-width: 991.98px) {
    .article-sidebar-col { position: static; }
    .recent-articles-mobile {
        display: flex;
        gap: .85rem;
        overflow-x: auto;
        padding-bottom: .5rem;
        scrollbar-width: thin;
        scrollbar-color: #dde4ee transparent;
    }
    .recent-articles-mobile::-webkit-scrollbar { height: 4px; }
    .recent-articles-mobile::-webkit-scrollbar-thumb { background: #dde4ee; border-radius: 4px; }
    .recent-card-mobile {
        position: relative;
        flex: 0 0 200px;
        background: #fff;
        border: 1px solid #edf1f7;
        border-radius: 10px;
        overflow: hidden;
        display: flex;
        flex-direction: column;
        transition: box-shadow 180ms ease, transform 180ms ease;
    }
    .recent-card-mobile:hover {
        box-shadow: 0 6px 20px rgba(20,50,89,.08);
        transform: translateY(-2px);
    }
    .recent-card-thumb {
        width: 100%;
        height: 90px;
        object-fit: cover;
        display: block;
        flex-shrink: 0;
    }
    .recent-card-thumb-placeholder {
        width: 100%;
        height: 90px;
        background: #edf1f7;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
    }
    .recent-card-body {
        padding: .75rem .85rem .8rem;
        border-left: 3px solid #3071F2;
        flex: 1;
    }
    .recent-item { display: none; }
    .recent-articles-desktop { display: none !important; }
}
@media (min-width: 992px) {
    .recent-articles-mobile { display: none; }
    .recent-articles-desktop { display: block; }
    .article-sidebar-col { align-self: flex-start; }
    .article-sidebar { position: sticky; top: 1.25rem; }
}

/* ── Mobile: content overrides ─────────────────────── */
@media (max-width: 767.98px) {
    .article-content * { max-width: 100% !important; }
    .article-content img,
    .article-content picture,
    .article-content video,
    .article-content iframe,
    .article-content svg,
    .article-content .e-img-caption,
    .article-content .e-rte-image {
        width: auto !important;
        height: auto !important;
    }
    .article-content figure,
    .article-content p,
    .article-content span,
    .article-content div { box-sizing: border-box !important; }
}

/* ── Very small phones: icon-only share buttons ───── */
@media (max-width: 389px) {
    .share-btn-text { display: none; }
    .share-btn { padding: .5rem .7rem; }
}

/* ── Summary button ──────────────────────────────── */
.summary-btn {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .55rem 1.1rem;
    border-radius: 100px;
    background: #CAF2C9;
    border: 1.5px solid #CAF2C9;
    color: #143259;
    font-size: .8rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 130ms ease, border-color 130ms ease, transform 130ms ease, box-shadow 130ms ease;
    min-height: 44px;
    line-height: 1;
}
.summary-btn:hover {
    background: #b5e8b4;
    border-color: #b5e8b4;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(202,242,201,.5);
}

/* ── Summary Modal ───────────────────────────────── */
.summary-modal {
    position: fixed;
    inset: 0;
    z-index: 9000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 2rem 1rem;
    overflow-y: auto;
}
.summary-modal[hidden] { display: none; }
.summary-overlay {
    position: fixed;
    inset: 0;
    background: rgba(20,50,89,.78);
    backdrop-filter: blur(3px);
}
.summary-panel {
    position: relative;
    z-index: 1;
    background: #fff;
    border-radius: 16px;
    width: min(96vw, 680px);
    max-height: calc(100vh - 4rem);
    display: flex;
    flex-direction: column;
    box-shadow: 0 24px 64px rgba(20,50,89,.22);
    overflow: hidden;
}
.summary-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.2rem 1.5rem 1rem;
    border-bottom: 1px solid #edf1f7;
    flex-shrink: 0;
}
.summary-panel-title {
    font-size: 1rem;
    font-weight: 700;
    color: #143259;
    margin: 0;
    display: flex;
    align-items: center;
    gap: .45rem;
}
.summary-panel-title i { color: #3071F2; }
.summary-close-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #CAF2C9;
    border: none;
    color: #143259;
    cursor: pointer;
    font-size: .9rem;
    transition: background 130ms ease;
    flex-shrink: 0;
    min-height: 36px;
}
.summary-close-btn:hover { background: #b5e8b4; }
.summary-panel-body {
    padding: 1.25rem 1.5rem 1.5rem;
    overflow-y: auto;
    flex: 1;
}
.summary-loading {
    display: flex;
    align-items: center;
    gap: .75rem;
    color: #5a6a7e;
    font-size: .9rem;
    padding: .75rem 0;
}
.summary-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2.5px solid #edf1f7;
    border-top-color: #3071F2;
    border-radius: 50%;
    animation: summ-spin .7s linear infinite;
    flex-shrink: 0;
}
@keyframes summ-spin { to { transform: rotate(360deg); } }
.summary-error { color: #c0392b; font-size: .88rem; padding: .5rem 0; }
.summary-text { font-size: .96rem; line-height: 1.75; color: #2c3e50; margin: 0 0 1.25rem; }
.summary-tts-wrap { margin-top: 0; }
.d-flex > .tts-container { margin: 0; display: flex; align-items: center; }

/* ── YouTube button ──────────────────────────────── */
.youtube-btn {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .55rem 1.1rem;
    border-radius: 100px;
    background: #FF0000;
    border: 1.5px solid #FF0000;
    color: #fff;
    font-size: .8rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 130ms ease, border-color 130ms ease, transform 130ms ease, box-shadow 130ms ease;
    min-height: 44px;
    line-height: 1;
}
.youtube-btn:hover {
    background: #cc0000;
    border-color: #cc0000;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(255,0,0,.35);
}
.youtube-btn i { font-size: 1rem; }

/* ── Video Modal ─────────────────────────────────── */
.video-modal {
    position: fixed;
    inset: 0;
    z-index: 9500;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}
.video-modal[hidden] { display: none; }
.video-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.92);
    backdrop-filter: blur(4px);
}
.video-panel {
    position: relative;
    z-index: 1;
    width: min(96vw, 1280px);
    max-height: calc(100vh - 3rem);
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 24px 64px rgba(0,0,0,.5);
}
.video-panel iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}
.video-close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(0,0,0,.65);
    border: 1.5px solid rgba(255,255,255,.35);
    color: #fff;
    cursor: pointer;
    font-size: 1.1rem;
    transition: background 130ms ease, transform 130ms ease, border-color 130ms ease;
    min-height: 44px;
}
.video-close-btn:hover {
    background: #FF0000;
    border-color: #FF0000;
    transform: scale(1.05);
}
@media (max-width: 575.98px) {
    .video-modal { padding: .5rem; }
    .video-close-btn { top: .5rem; right: .5rem; width: 40px; height: 40px; }
}

/* ── Reactions ───────────────────────────────────── */
.reactions-section { margin: .75rem 0 0; padding-top: .75rem; border-top: 1px solid #edf1f7; }
.reactions-bar { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.reaction-wrap { position: relative; display: inline-flex; }
.reaction-btn {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .4rem .7rem;
    border-radius: 100px;
    font-size: .9rem;
    background: #f6f9fc;
    border: 1.5px solid #e8edf4;
    color: #143259;
    cursor: pointer;
    transition: transform 130ms ease, background 130ms ease, border-color 130ms ease, box-shadow 130ms ease;
    min-height: 40px;
    line-height: 1;
    user-select: none;
}
.reaction-btn:hover {
    background: #eef3fe;
    border-color: rgba(48,113,242,.35);
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(20,50,89,.08);
}
.reaction-btn.active {
    background: #eef3fe;
    border-color: #3071F2;
    color: #3071F2;
}
.reaction-emoji { font-size: 1.15rem; line-height: 1; }
.reaction-count { font-size: .8rem; font-weight: 700; color: #5a6a7e; }
.reaction-btn.active .reaction-count { color: #3071F2; }
.reactions-total {
    font-size: .8rem;
    color: #8a9bb0;
    margin-left: auto;
    white-space: nowrap;
}
.reaction-login-tip {
    position: absolute;
    bottom: calc(100% + 7px);
    left: 50%;
    transform: translateX(-50%);
    background: #143259;
    color: #fff;
    border-radius: 8px;
    padding: .35rem .75rem;
    font-size: .75rem;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 150ms ease;
    z-index: 20;
}
.reaction-login-tip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #143259;
}
.reaction-wrap:hover .reaction-login-tip {
    opacity: 1;
    pointer-events: auto;
}
.reaction-login-tip a { color: #89C2D9; font-weight: 600; text-decoration: none; }
.reaction-login-tip a:hover { text-decoration: underline; }
@media (max-width: 479px) {
    .reactions-total { width: 100%; text-align: right; margin-left: 0; }
}

/* ── Comment design tokens ─────────────────────── */
:root {
    --cmnt-bg:           #ffffff;
    --cmnt-bg-subtle:    #f6f9fc;
    --cmnt-border:       #e8edf4;
    --cmnt-shadow:       0 1px 3px rgba(20,50,89,.06), 0 2px 10px rgba(20,50,89,.04);
    --cmnt-shadow-hover: 0 2px 8px rgba(20,50,89,.10), 0 6px 20px rgba(20,50,89,.06);
    --cmnt-text:         #143259;
    --cmnt-body:         #3d4f63;
    --cmnt-muted:        #8a9bb0;
    --cmnt-accent:       #3071F2;
    --cmnt-accent-bg:    #eef3fe;
    --cmnt-reply-line:   #89C2D9;
    --cmnt-radius:       12px;
    --cmnt-radius-sm:    8px;
}

/* ── Comments ────────────────────────────────────── */
.comments-section { border-top: 2px solid #edf1f7; padding-top: 2.5rem; }
.comments-heading {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--cmnt-text);
    margin-bottom: 1.75rem;
    letter-spacing: -.01em;
}
.comment-form-card {
    background: var(--cmnt-bg-subtle);
    border: 1px solid var(--cmnt-border);
    border-radius: var(--cmnt-radius);
    padding: 1.5rem;
}
.comment-form-title {
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--cmnt-text);
    margin-bottom: 1rem;
}
.comment-form-card .form-label { color: var(--cmnt-text); }
.comment-form-card .text-muted  { color: var(--cmnt-muted) !important; }
.reply-indicator {
    display: none;
    font-size: .82rem;
    color: var(--cmnt-accent);
    margin-bottom: .75rem;
    align-items: center;
    gap: .5rem;
    padding: .45rem .75rem;
    background: var(--cmnt-accent-bg);
    border-radius: 6px;
    border-left: 3px solid var(--cmnt-accent);
}
.reply-indicator.active { display: flex; }
.commenting-as {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .5rem .85rem;
    background: var(--cmnt-accent-bg);
    border: 1px solid rgba(48,113,242,.18);
    border-radius: 8px;
    color: var(--cmnt-text);
    font-size: .88rem;
}
.commenting-as i { color: var(--cmnt-accent); }
.reply-indicator-cancel {
    cursor: pointer;
    color: var(--cmnt-muted);
    font-size: .78rem;
    text-decoration: underline;
    background: none;
    border: none;
    padding: 0;
    margin-left: auto;
}

/* ── Comment list ─────────────────────────────── */
.comments-list { display: flex; flex-direction: column; gap: 1rem; }

/* ── Comment card ─────────────────────────────── */
.comment-item {
    background: var(--cmnt-bg);
    border: 1px solid var(--cmnt-border);
    border-radius: var(--cmnt-radius);
    padding: 1.25rem 1.5rem;
    box-shadow: var(--cmnt-shadow);
    transition: box-shadow 200ms ease, border-color 200ms ease;
}
.comment-item:hover { box-shadow: var(--cmnt-shadow-hover); border-color: #d0d9e8; }

/* ── Comment header (avatar + meta row) ──────── */
.comment-header {
    display: flex;
    align-items: center;
    gap: .75rem;
    flex-wrap: nowrap;
    margin-bottom: .9rem;
}

/* ── Avatar ───────────────────────────────────── */
.comment-avatar {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .82rem;
    font-weight: 700;
    flex-shrink: 0;
    user-select: none;
}
.comment-avatar--sm { width: 32px; height: 32px; min-width: 32px; font-size: .72rem; }

/* ── Author block ─────────────────────────────── */
.comment-author-block { display: flex; flex-direction: column; gap: .1rem; min-width: 0; flex: 1; }
.comment-author { font-size: .9rem; font-weight: 600; color: var(--cmnt-text); line-height: 1.25; }
.comment-date  { font-size: .72rem; color: var(--cmnt-muted); line-height: 1.3; }

.comment-admin-tools { display: flex; align-items: center; gap: .4rem; margin-left: auto; flex-shrink: 0; }
.comment-email-admin {
    font-size: .68rem;
    color: var(--cmnt-muted);
    font-style: italic;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 160px;
}

/* ── Body ─────────────────────────────────────── */
.comment-content { font-size: 1rem; color: var(--cmnt-body); margin: 0 0 .75rem; line-height: 1.7; word-break: break-word; text-align: justify; }

/* ── Actions ──────────────────────────────────── */
.comment-actions { display: flex; align-items: center; gap: .5rem; }
.btn-reply {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .3rem .75rem;
    background: var(--cmnt-accent-bg);
    border: 1px solid rgba(48,113,242,.18);
    border-radius: 100px;
    font-size: .78rem;
    font-weight: 600;
    color: var(--cmnt-accent);
    cursor: pointer;
    transition: background 150ms ease, border-color 150ms ease, transform 120ms ease;
    min-height: 32px;
    line-height: 1;
}
.btn-reply:hover { background: #dce8fd; border-color: rgba(48,113,242,.35); transform: translateY(-1px); text-decoration: none; }
.btn-reply:focus-visible { outline: 2px solid var(--cmnt-accent); outline-offset: 2px; }
.btn-reply i { font-size: .8rem; }

.btn-delete-comment {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background: none;
    border: none;
    padding: 0;
    color: var(--cmnt-muted);
    cursor: pointer;
    font-size: .8rem;
    border-radius: 6px;
    transition: background 140ms ease, color 140ms ease;
    flex-shrink: 0;
}
.btn-delete-comment:hover { background: #fde8e8; color: #c0392b; }

/* ── Replies ──────────────────────────────────── */
.comment-replies { margin-top: 1rem; display: flex; flex-direction: column; gap: .65rem; }
.comment-reply {
    background: var(--cmnt-bg-subtle);
    border: 1px solid var(--cmnt-border);
    border-left: 3px solid var(--cmnt-reply-line);
    border-radius: var(--cmnt-radius-sm);
    padding: .9rem 1.1rem;
    margin-left: 1rem;
}
@media (max-width: 479px) {
    .comment-reply { margin-left: .25rem; }
    .comment-item  { padding: 1rem; }
}
.comments-pagination { padding-top: 1rem; }

/* ── Print / Export to PDF ───────────────────────── */
@media print {
    .site-navbar, .site-footer,
    .newsletter-band,
    .article-sidebar-col,
    .share-section,
    .tts-container,
    #summaryBtn, #pdfBtn,
    .reactions-section,
    .comments-section,
    .mb-3 > a[href] { display: none !important; }

    body { background: #fff !important; color: #000 !important; font-size: 11pt; }
    .article-hero { max-height: 260px; border-radius: 4px; }
    .article-title { font-size: 20pt; color: #000 !important; }
    .article-dateline { color: #555 !important; }
    .article-summary { color: #333 !important; }
    .article-content h2,
    .article-content h3 { color: #000 !important; }
    .article-content p,
    .article-content ul,
    .article-content ol { color: #000 !important; }
    .article-content pre { background: #f4f4f4 !important; border: 1px solid #ccc; }
    .article-main-col { width: 100% !important; max-width: 100% !important; flex: none !important; }
    .row { display: block !important; }
    a { color: #000 !important; text-decoration: none !important; }
}
