/* ================================================================
   NEWS CSS — MAN 2 PARIGI
   Untuk halaman /berita (index) dan /berita/[slug] (show)
   ================================================================ */

/* ── COMMON ── */
.news-page-wrap {
    padding-top: calc(var(--navbar-height, 120px) + 1.5rem);
    min-height: 100vh;
}
@media (max-width: 991.98px) {
    .news-page-wrap { padding-top: calc(var(--navbar-height, 60px) + 1rem); }
}

/* Breadcrumb */
.news-breadcrumb {
    padding: .75rem 0 .75rem;
    border-bottom: 1px solid #f1f5f9;
    margin-bottom: 1.75rem;
}
.news-breadcrumb .breadcrumb { margin: 0; background: transparent; }
.news-breadcrumb .breadcrumb-item a { color: #64748b; font-size: .82rem; font-weight: 600; text-decoration: none; }
.news-breadcrumb .breadcrumb-item a:hover { color: #008080; }
.news-breadcrumb .breadcrumb-item.active { color: #008080; font-size: .82rem; font-weight: 700; }
.news-breadcrumb .breadcrumb-item+.breadcrumb-item::before { color: #cbd5e1; }

/* Sidebar sticky */
.news-sidebar { position: sticky; top: calc(var(--navbar-height, 120px) + 1rem); }
.sidebar-widget {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.25rem;
    box-shadow: 0 2px 8px rgba(0,0,0,.04);
}
.sidebar-widget-title {
    font-weight: 800;
    font-size: .85rem;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: #0f172a;
    padding-left: .85rem;
    border-left: 3px solid #008080;
    margin-bottom: 1rem;
}

/* ── NEWS INDEX ── */

/* Hero headline card */
.news-hero-card {
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    background: #000;
    text-decoration: none;
    display: block;
}
.news-hero-card img {
    width: 100%; height: 380px;
    object-fit: cover;
    transition: transform .5s ease;
    opacity: .85;
}
.news-hero-card:hover img { transform: scale(1.04); }
.news-hero-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,.92) 0%, rgba(0,0,0,.4) 55%, transparent 100%);
}
.news-hero-body {
    position: absolute; bottom: 0; left: 0; right: 0;
    padding: 1.5rem 1.75rem;
}
.news-hero-body .cat-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 100px;
    background: #008080;
    color: #fff;
    font-size: .68rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: .6rem;
}
.news-hero-body h2 {
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    font-weight: 800;
    color: #fff;
    line-height: 1.3;
    margin-bottom: .4rem;
    text-shadow: 0 1px 4px rgba(0,0,0,.4);
}
.news-hero-body .meta { font-size: .73rem; color: rgba(255,255,255,.7); }

/* News card horizontal */
.news-card-row {
    display: flex; gap: 1rem; align-items: stretch;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    overflow: hidden;
    transition: transform .25s, box-shadow .25s;
    text-decoration: none;
    color: inherit;
}
.news-card-row:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0,128,128,.1);
    border-color: rgba(0,128,128,.2);
}
.news-card-row .thumb {
    width: 130px; flex-shrink: 0;
    overflow: hidden;
}
.news-card-row .thumb img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
}
.news-card-row:hover .thumb img { transform: scale(1.05); }
.news-card-row .body { padding: 1rem 1.25rem 1rem 0; display: flex; flex-direction: column; justify-content: center; }
.news-card-row .cat { font-size: .68rem; font-weight: 700; color: #008080; text-transform: uppercase; margin-bottom: .3rem; }
.news-card-row .title { font-size: .92rem; font-weight: 700; line-height: 1.4; color: #0f172a; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: .3rem; }
.news-card-row:hover .title { color: #008080; }
.news-card-row .meta { font-size: .72rem; color: #94a3b8; }
@media (max-width: 575.98px) { .news-card-row .thumb { width: 95px; } }

/* News card grid */
.news-card-grid {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    overflow: hidden;
    transition: transform .25s, box-shadow .25s;
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
}
.news-card-grid:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 40px rgba(0,128,128,.1);
    border-color: rgba(0,128,128,.25);
}
.news-card-grid .thumb {
    overflow: hidden;
    height: 190px;
    background: #f1f5f9;
}
.news-card-grid .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.news-card-grid:hover .thumb img { transform: scale(1.05); }
.news-card-grid .body { padding: 1rem 1.25rem 1.25rem; }
.news-card-grid .cat { font-size: .68rem; font-weight: 700; color: #008080; text-transform: uppercase; margin-bottom: .4rem; display: block; }
.news-card-grid .title { font-size: .9rem; font-weight: 700; line-height: 1.4; color: #0f172a; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: .5rem; }
.news-card-grid:hover .title { color: #008080; }
.news-card-grid .meta { font-size: .7rem; color: #94a3b8; }

/* Trending list */
.trending-item {
    display: flex; align-items: center; gap: .85rem;
    padding: .6rem 0;
    border-bottom: 1px solid #f1f5f9;
    text-decoration: none;
    color: inherit;
    transition: .2s;
}
.trending-item:last-child { border-bottom: none; }
.trending-item:hover { transform: translateX(3px); }
.trending-item:hover .trending-title { color: #008080; }
.trending-num {
    width: 26px; height: 26px; border-radius: 8px;
    background: rgba(0,128,128,.1); color: #008080;
    font-size: .72rem; font-weight: 900;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.trending-item:first-child .trending-num { background: #008080; color: #fff; }
.trending-thumb {
    width: 70px; height: 54px; border-radius: 10px;
    overflow: hidden; flex-shrink: 0; background: #f1f5f9;
}
.trending-thumb img { width: 100%; height: 100%; object-fit: cover; }
.trending-title { font-size: .83rem; font-weight: 700; color: #0f172a; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.trending-meta { font-size: .68rem; color: #94a3b8; margin-top: .15rem; }

/* Category pills */
.cat-pill {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 5px 12px;
    border-radius: 100px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    font-size: .75rem;
    font-weight: 700;
    color: #475569;
    text-decoration: none;
    transition: .2s;
}
.cat-pill:hover { background: #008080; color: #fff; border-color: #008080; }
.cat-pill .count {
    background: #e2e8f0; color: #64748b;
    font-size: .65rem; font-weight: 700;
    padding: 1px 6px; border-radius: 100px;
    transition: .2s;
}
.cat-pill:hover .count { background: rgba(255,255,255,.25); color: #fff; }

/* Pagination */
.news-pagination .page-link {
    border-radius: 10px !important;
    width: 38px; height: 38px;
    display: flex; align-items: center; justify-content: center;
    margin: 0 3px; border: 1.5px solid #e2e8f0;
    font-weight: 700; font-size: .85rem; color: #475569;
    background: #fff; transition: .2s;
}
.news-pagination .page-item.active .page-link { background: #008080; border-color: #008080; color: #fff; }
.news-pagination .page-link:hover { background: rgba(0,128,128,.08); border-color: rgba(0,128,128,.3); color: #008080; }

/* ── NEWS SHOW / ARTICLE ── */

/* Article header */
.article-wrap { max-width: 100%; }
.article-cat-badge {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 100px;
    background: rgba(0,128,128,.1);
    color: #008080;
    font-size: .72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .06em;
    margin-bottom: .75rem;
}
.article-title {
    font-size: clamp(1.6rem, 4vw, 2.4rem);
    font-weight: 900;
    line-height: 1.2;
    color: #0f172a;
    letter-spacing: -.025em;
    margin-bottom: 1rem;
}
.article-meta {
    display: flex; align-items: center; gap: .75rem; flex-wrap: wrap;
    font-size: .8rem; color: #64748b; margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #f1f5f9;
}
.article-meta-author { font-weight: 700; color: #008080; }

/* Share bar */
.article-share-bar {
    display: flex; align-items: center; gap: .6rem; flex-wrap: wrap;
    margin-bottom: 1.5rem;
}
.share-btn-n {
    width: 36px; height: 36px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: .8rem;
    text-decoration: none; transition: .2s; border: none;
    cursor: pointer;
}
.share-btn-n:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,.18); color: #fff; }
.sb-fb { background: #1877f2; }
.sb-tw { background: #1da1f2; }
.sb-wa { background: #25d366; }
.sb-cp { background: #64748b; }
.share-views { font-size: .78rem; color: #94a3b8; margin-left: .25rem; }

/* Featured image */
.article-featured-img-wrap {
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 2rem;
    position: relative;
    box-shadow: 0 8px 30px rgba(0,0,0,.1);
}
.article-featured-img-wrap img {
    width: 100%; height: auto; display: block;
    transition: transform .5s ease;
}
.article-featured-img-wrap:hover img { transform: scale(1.02); }
.zoom-btn {
    position: absolute; bottom: 12px; right: 12px;
    background: rgba(0,0,0,.65);
    color: #fff; border: 1px solid rgba(255,255,255,.25);
    padding: 6px 14px; border-radius: 100px;
    font-size: .78rem; font-weight: 600;
    cursor: pointer; backdrop-filter: blur(4px);
    transition: .2s; border: none;
    display: flex; align-items: center; gap: 6px;
}
.zoom-btn:hover { background: rgba(0,0,0,.82); transform: scale(1.04); color: #fff; }
.article-caption { text-align: center; font-size: .8rem; color: #94a3b8; font-style: italic; margin-top: .5rem; margin-bottom: 1.5rem; }

/* Article content */
.article-content {
    font-size: 1.08rem;
    line-height: 1.85;
    color: #334155;
    font-family: 'Georgia', 'Times New Roman', serif;
}
.article-content p { margin-bottom: 1.5rem; }
.article-content h2, .article-content h3, .article-content h4 {
    font-family: inherit; color: #0f172a; font-weight: 800;
    margin-top: 2rem; margin-bottom: .75rem;
    font-family: -apple-system, 'Segoe UI', sans-serif;
}
.article-content img {
    max-width: 100%; height: auto !important;
    border-radius: 14px; margin: 1.5rem auto;
    box-shadow: 0 4px 14px rgba(0,0,0,.08);
    display: block;
}
.article-content ul, .article-content ol { margin-bottom: 1.5rem; padding-left: 1.5rem; }
.article-content li { margin-bottom: .4rem; }
.article-content blockquote {
    border-left: 4px solid #40E0D0;
    padding: .75rem 1.25rem;
    background: rgba(0,128,128,.05);
    border-radius: 0 10px 10px 0;
    margin: 1.5rem 0;
    font-style: italic; color: #475569;
}

/* Baca juga inline */
.inline-read-also {
    padding: .85rem 1.25rem;
    border-left: 4px solid #008080;
    background: rgba(0,128,128,.05);
    border-radius: 0 12px 12px 0;
    margin: 1.75rem 0;
}
.inline-read-also .label { font-size: .72rem; font-weight: 800; color: #008080; text-transform: uppercase; letter-spacing: .06em; margin-bottom: .25rem; }
.inline-read-also a { font-size: .95rem; font-weight: 700; color: #0f172a; text-decoration: none; line-height: 1.4; }
.inline-read-also a:hover { color: #008080; text-decoration: underline; }

/* Tags */
.article-tag { display: inline-flex; align-items: center; padding: 4px 12px; border-radius: 100px; background: #f1f5f9; border: 1px solid #e2e8f0; font-size: .75rem; font-weight: 700; color: #475569; text-decoration: none; transition: .2s; }
.article-tag:hover { background: #008080; color: #fff; border-color: #008080; }

/* Author box */
.article-author-box {
    display: flex; align-items: center; gap: 1rem;
    background: linear-gradient(135deg, #f0fdfc 0%, #e6fafa 100%);
    border: 1px solid rgba(0,128,128,.15);
    border-radius: 16px;
    padding: 1.25rem 1.5rem;
    margin: 2rem 0;
}
.article-author-avatar { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; border: 3px solid #fff; box-shadow: 0 3px 10px rgba(0,0,0,.1); flex-shrink: 0; }
.article-author-name { font-weight: 800; color: #0f172a; margin-bottom: .1rem; }
.article-author-desc { font-size: .78rem; color: #64748b; margin: 0; line-height: 1.5; }

/* Comments */
.comment-form-wrap { background: #f8fafc; border-radius: 16px; padding: 1.25rem 1.5rem; border: 1px solid #e2e8f0; }
.comment-form-wrap .form-control { border: 1.5px solid #e2e8f0; border-radius: 10px; font-size: .88rem; }
.comment-form-wrap .form-control:focus { border-color: #008080; box-shadow: 0 0 0 3px rgba(0,128,128,.1); }
.comment-item { display: flex; gap: .85rem; padding: .85rem 0; border-bottom: 1px solid #f1f5f9; }
.comment-item:last-child { border-bottom: none; }
.comment-avatar { width: 38px; height: 38px; border-radius: 50%; background: linear-gradient(135deg,#008080,#40E0D0); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: .88rem; flex-shrink: 0; }
.comment-name { font-weight: 700; font-size: .85rem; color: #0f172a; }
.comment-time { font-size: .72rem; color: #94a3b8; margin-left: .5rem; }
.comment-text { font-size: .88rem; color: #334155; margin: .25rem 0 0; line-height: 1.55; }

/* Related news (bottom) */
.related-card {
    background: #fff; border: 1px solid #e2e8f0; border-radius: 14px;
    overflow: hidden; transition: .25s; text-decoration: none; color: inherit;
    display: block; height: 100%;
}
.related-card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(0,128,128,.1); border-color: rgba(0,128,128,.2); }
.related-card .thumb { height: 160px; overflow: hidden; background: #f1f5f9; }
.related-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: .4s; }
.related-card:hover .thumb img { transform: scale(1.05); }
.related-card .body { padding: .85rem 1rem 1rem; }
.related-card .cat { font-size: .65rem; font-weight: 700; color: #008080; text-transform: uppercase; margin-bottom: .3rem; }
.related-card .title { font-size: .85rem; font-weight: 700; color: #0f172a; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.35; margin-bottom: .3rem; }
.related-card:hover .title { color: #008080; }
.related-card .meta { font-size: .68rem; color: #94a3b8; }

/* Press release notice */
.press-notice {
    background: #fef3c7; border: 1px solid #fbbf24;
    border-radius: 14px; padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    display: flex; align-items: center; gap: 1rem;
    flex-wrap: wrap;
}

/* Section heading in article page */
.news-section-heading {
    font-weight: 800; font-size: 1.1rem; color: #0f172a;
    padding-left: .85rem; border-left: 3px solid #008080;
    margin-bottom: 1.25rem;
}

/* Mobile */
@media (max-width: 767.98px) {
    .article-title { font-size: 1.5rem; }
    .article-content { font-size: 1rem; }
    .article-author-box { flex-direction: column; text-align: center; }
}

/* ── TTS / AI BACA BERITA ────────────────────────── */
.tts-bar {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    border-radius: 16px;
    padding: .9rem 1.25rem;
    margin: 1rem 0 1.5rem;
    box-shadow: 0 4px 20px rgba(0,0,0,.15);
    flex-wrap: wrap;
    position: relative;
    overflow: hidden;
}
.tts-bar::before {
    content: "";
    position: absolute; inset: 0;
    background: linear-gradient(90deg, rgba(0,128,128,.15) 0%, transparent 60%);
    pointer-events: none;
}
.tts-bar-left {
    display: flex;
    align-items: center;
    gap: .85rem;
    flex-grow: 1;
    min-width: 0;
}
.tts-icon-wrap {
    width: 44px; height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, #008080, #40E0D0);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 14px rgba(0,128,128,.45);
}
.tts-icon-wrap.playing {
    animation: ttsPulse 1.5s ease-in-out infinite;
}
@keyframes ttsPulse {
    0%, 100% { box-shadow: 0 4px 14px rgba(0,128,128,.45); transform: scale(1); }
    50%       { box-shadow: 0 6px 22px rgba(64,224,208,.7); transform: scale(1.06); }
}
.tts-icon-wrap i { color: #fff; font-size: 1.1rem; }
.tts-info { min-width: 0; }
.tts-label {
    font-size: .82rem;
    font-weight: 800;
    color: #f1f5f9;
    white-space: nowrap;
}
.tts-sublabel {
    font-size: .72rem;
    color: #94a3b8;
    margin-top: .1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

/* Progress bar saat playing */
.tts-progress-wrap {
    width: 100%;
    order: 10;
    display: none;
}
.tts-progress-wrap.show { display: block; }
.tts-progress-track {
    height: 3px;
    background: rgba(255,255,255,.12);
    border-radius: 100px;
    overflow: hidden;
    margin-top: .5rem;
}
.tts-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #008080, #40E0D0);
    border-radius: 100px;
    width: 0%;
    transition: width .3s linear;
}

/* Controls */
.tts-controls {
    display: flex;
    align-items: center;
    gap: .5rem;
}
.tts-btn {
    width: 36px; height: 36px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,.12);
    background: rgba(255,255,255,.08);
    color: #e2e8f0;
    display: flex; align-items: center; justify-content: center;
    font-size: .8rem;
    cursor: pointer;
    transition: .2s;
}
.tts-btn:hover { background: rgba(255,255,255,.16); color: #fff; }
.tts-btn-main {
    width: 42px; height: 42px;
    border-radius: 12px;
    background: #008080;
    border-color: #008080;
    color: #fff;
    font-size: .9rem;
    box-shadow: 0 4px 12px rgba(0,128,128,.4);
}
.tts-btn-main:hover { background: #006666; color: #fff; }
.tts-btn-stop { color: #f87171; border-color: rgba(248,113,113,.25); }
.tts-btn-stop:hover { background: rgba(248,113,113,.15); color: #f87171; }

/* Start button (sebelum mulai) */
.tts-start-btn {
    display: inline-flex;
    align-items: center;
    padding: .5rem 1.2rem;
    border-radius: 100px;
    background: linear-gradient(135deg, #008080, #40E0D0);
    color: #fff;
    font-size: .82rem;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: .25s;
    white-space: nowrap;
    box-shadow: 0 4px 14px rgba(0,128,128,.35);
    flex-shrink: 0;
}
.tts-start-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(0,128,128,.5);
    color: #fff;
}

/* Wave animation saat reading */
.tts-wave {
    display: flex;
    align-items: center;
    gap: 3px;
    height: 20px;
}
.tts-wave span {
    display: block;
    width: 3px;
    border-radius: 3px;
    background: #40E0D0;
    animation: ttsWave 1.2s ease-in-out infinite;
}
.tts-wave span:nth-child(1) { height: 8px;  animation-delay: 0s; }
.tts-wave span:nth-child(2) { height: 14px; animation-delay: .15s; }
.tts-wave span:nth-child(3) { height: 20px; animation-delay: .3s; }
.tts-wave span:nth-child(4) { height: 14px; animation-delay: .45s; }
.tts-wave span:nth-child(5) { height: 8px;  animation-delay: .6s; }
@keyframes ttsWave {
    0%, 100% { transform: scaleY(1); opacity: .7; }
    50%       { transform: scaleY(.4); opacity: 1; }
}

@media (max-width: 575.98px) {
    .tts-bar { padding: .75rem 1rem; gap: .75rem; }
    .tts-sublabel { max-width: 140px; }
}
