/* ============================================
   BLOG CSS — Restorasi Institute
   Semua style blog terpusat di sini
   ============================================ */

/* ---------- POST CARD ---------- */
.post-card {
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(15, 35, 69, 0.07);
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(16, 41, 79, 0.10);
    border-color: transparent;
}

.post-card-image {
    display: block;
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/10;
    background: #f1f5f9;
}

.post-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.post-card:hover .post-card-image img {
    transform: scale(1.05);
}

.post-card-cat {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 12px;
    background: #1e4fa3;
    color: #fff;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 600;
    z-index: 2;
}

.post-card-body {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.post-card-title {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 10px;
}

.post-card-title a {
    color: #0f2345;
    text-decoration: none;
}

.post-card-title a:hover {
    color: #1e4fa3;
}

.post-card-excerpt {
    color: #64748b;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 16px;
    flex: 1;
}

.post-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 14px;
    border-top: 1px solid #f1f5f9;
}

/* ---------- SIDEBAR ---------- */
.sidebar-card {
    background: #fff;
    border: 1px solid rgba(15, 35, 69, 0.07);
    border-radius: 14px;
    padding: 20px;
}

.sidebar-cat-item {
    display: flex;
    align-items: center;
    padding: 10px 0;
    color: #1f2937;
    text-decoration: none;
    border-bottom: 1px solid #f1f5f9;
    font-size: 14px;
    transition: all 0.2s;
}

.sidebar-cat-item:last-child {
    border-bottom: 0;
}

.sidebar-cat-item:hover {
    color: #1e4fa3;
    padding-left: 4px;
}

.sidebar-post-item {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    text-decoration: none;
    color: #1f2937;
    border-bottom: 1px solid #f1f5f9;
    transition: all 0.2s;
}

.sidebar-post-item:last-child {
    border-bottom: 0;
}

.sidebar-post-item:hover {
    color: #1e4fa3;
    padding-left: 4px;
}

.sidebar-post-number {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #1e4fa3, #13a8d8);
    color: #fff;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
    font-size: 14px;
}

/* ---------- ARTICLE DETAIL ---------- */
.article-detail {
    background: #fff;
    border-radius: 14px;
    padding: 40px;
    border: 1px solid rgba(15, 35, 69, 0.07);
}

.article-title {
    font-size: clamp(24px, 3.5vw, 40px);
    font-weight: 800;
    line-height: 1.2;
    color: #0f2345;
    margin-bottom: 16px;
}

.article-lead {
    font-size: 18px;
    line-height: 1.6;
    color: #64748b;
    margin-bottom: 24px;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 0;
    border-top: 1px solid #f1f5f9;
    border-bottom: 1px solid #f1f5f9;
    margin-bottom: 24px;
}

.article-featured-image {
    width: 100%;
    border-radius: 12px;
    margin-bottom: 24px;
}

.article-content {
    font-size: 17px;
    line-height: 1.85;
    color: #1f2937;
}

.article-content h2 {
    font-size: 26px;
    font-weight: 700;
    margin-top: 36px;
    margin-bottom: 16px;
    color: #0f2345;
}

.article-content h3 {
    font-size: 22px;
    font-weight: 700;
    margin-top: 28px;
    margin-bottom: 12px;
    color: #0f2345;
}

.article-content p {
    margin-bottom: 20px;
}

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

.article-content blockquote {
    border-left: 4px solid #1e4fa3;
    padding: 12px 20px;
    background: #f8fafc;
    border-radius: 0 10px 10px 0;
    margin: 24px 0;
    font-style: italic;
    color: #475569;
}

.article-content pre {
    background: #0f172a;
    color: #e2e8f0;
    padding: 20px;
    border-radius: 10px;
    overflow-x: auto;
    margin: 24px 0;
}

.article-content a {
    color: #1e4fa3;
    text-decoration: underline;
}

.article-content table {
    border-collapse: collapse;
    width: 100%;
    margin: 20px 0;
}

.article-content table td,
.article-content table th {
    border: 1px solid #e2e8f0;
    padding: 10px 14px;
}

.article-tags {
    margin-top: 32px;
    padding-top: 20px;
    border-top: 1px solid #f1f5f9;
}

.article-share {
    margin-top: 24px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.share-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-decoration: none;
    border: 0;
    cursor: pointer;
    transition: 0.2s;
}

.share-btn:hover {
    transform: translateY(-2px);
    color: #fff;
}

.share-btn.facebook { background: #1877f2; }
.share-btn.twitter { background: #1da1f2; }
.share-btn.whatsapp { background: #25d366; }
.share-btn.copy { background: #64748b; }
.share-btn.copied { background: #10b981; }

/* ---------- PAGE HEADER (Category/Tag/Search) ---------- */
.page-header-card {
    background: linear-gradient(135deg, #f8fafc 0%, #eef4ff 100%);
    border-radius: 14px;
    padding: 32px;
    border: 1px solid rgba(15, 35, 69, 0.07);
    margin-bottom: 24px;
}

.page-header-icon {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(30, 79, 163, 0.10);
    flex-shrink: 0;
}

.page-header-title {
    font-size: 28px;
    font-weight: 800;
    color: #0f2345;
    margin-bottom: 6px;
}

/* ---------- HERO SLIDER ---------- */
.hero-slider {
    position: relative;
    min-height: 540px;
    background: #0b1220;
    overflow: hidden;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.8s ease;
    display: flex;
    align-items: center;
}

.hero-slide.active {
    opacity: 1;
}

.hero-slide-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transform: scale(1.05);
    transition: transform 6s ease;
}

.hero-slide.active .hero-slide-bg {
    transform: scale(1);
}

.hero-slide-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(11, 18, 32, 0.4) 0%, rgba(11, 18, 32, 0.85) 100%);
}

.hero-slide-content {
    position: relative;
    z-index: 2;
    color: #fff;
    padding: 80px 0;
}

.hero-slider-indicators {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.hero-slider-indicators button {
    width: 40px;
    height: 4px;
    border-radius: 2px;
    border: 0;
    background: rgba(255, 255, 255, 0.3);
    transition: 0.3s;
}

.hero-slider-indicators button.active {
    background: #fff;
    width: 60px;
}

.hero-slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    color: #fff;
    border: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: 0.2s;
}

.hero-slider-arrow:hover {
    background: rgba(255, 255, 255, 0.3);
}

.hero-slider-arrow.prev { left: 24px; }
.hero-slider-arrow.next { right: 24px; }

.hero-badge {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(30, 79, 163, 0.9);
    border-radius: 50px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.hero-title {
    font-size: clamp(28px, 4vw, 52px);
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 16px;
}

.hero-title a {
    color: #fff;
    text-decoration: none;
}

.hero-title a:hover {
    color: #f7b500;
}

.hero-excerpt {
    font-size: 17px;
    line-height: 1.6;
    opacity: 0.9;
    max-width: 700px;
    margin-bottom: 24px;
}

.hero-meta {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ---------- SECTION TITLE ---------- */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 28px;
}

.section-title {
    font-size: 26px;
    font-weight: 800;
    color: #0f2345;
    margin-bottom: 4px;
    position: relative;
    padding-left: 16px;
}

.section-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 28px;
    background: linear-gradient(180deg, #1e4fa3, #13a8d8);
    border-radius: 2px;
}

.section-subtitle {
    color: #64748b;
    font-size: 14px;
    margin: 0;
}

/* ---------- POPULAR LIST (HOME) ---------- */
.popular-list-item {
    display: flex;
    gap: 14px;
    padding: 14px;
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition: 0.2s;
    border: 1px solid transparent;
}

.popular-list-item:hover {
    background: #f8fafc;
    border-color: #e2e8f0;
    color: inherit;
}

.popular-list-thumb {
    width: 80px;
    height: 80px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
}

.popular-list-title {
    font-size: 15px;
    font-weight: 700;
    color: #0f2345;
    line-height: 1.35;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.popular-list-meta {
    font-size: 12px;
    color: #94a3b8;
}

/* ---------- PAGINATION ---------- */
.pagination {
    gap: 6px;
}

.pagination .page-link {
    border-radius: 8px !important;
    border: 1px solid #e2e8f0;
    color: #1f2937;
    padding: 8px 14px;
    font-weight: 600;
}

.pagination .page-item.active .page-link {
    background: linear-gradient(135deg, #1e4fa3, #13a8d8);
    border-color: transparent;
}

.pagination .page-link:hover {
    background: #eef4ff;
    color: #1e4fa3;
}

/* ---------- DARK MODE ---------- */
html[data-bs-theme="dark"] .post-card,
html[data-bs-theme="dark"] .sidebar-card,
html[data-bs-theme="dark"] .article-detail,
html[data-bs-theme="dark"] .page-header-card {
    background: #111827 !important;
    border-color: rgba(148, 163, 184, 0.15) !important;
    color: #e5e7eb;
}

html[data-bs-theme="dark"] .page-header-card {
    background: linear-gradient(135deg, #1a2332 0%, #1e2d4a 100%) !important;
}

html[data-bs-theme="dark"] .post-card-title a,
html[data-bs-theme="dark"] .article-title,
html[data-bs-theme="dark"] .section-title,
html[data-bs-theme="dark"] .page-header-title {
    color: #f8fafc !important;
}

html[data-bs-theme="dark"] .article-content {
    color: #e5e7eb;
}

html[data-bs-theme="dark"] .article-content h2,
html[data-bs-theme="dark"] .article-content h3 {
    color: #f8fafc;
}

html[data-bs-theme="dark"] .post-card-meta,
html[data-bs-theme="dark"] .article-meta,
html[data-bs-theme="dark"] .sidebar-cat-item,
html[data-bs-theme="dark"] .sidebar-post-item {
    border-color: rgba(148, 163, 184, 0.15) !important;
}

html[data-bs-theme="dark"] .sidebar-cat-item,
html[data-bs-theme="dark"] .sidebar-post-item,
html[data-bs-theme="dark"] .popular-list-title,
html[data-bs-theme="dark"] .popular-list-item {
    color: #e5e7eb;
}

html[data-bs-theme="dark"] .popular-list-item:hover {
    background: #1a2332;
    border-color: rgba(148, 163, 184, 0.15);
}

html[data-bs-theme="dark"] .pagination .page-link {
    background: #111827;
    border-color: rgba(148, 163, 184, 0.2);
    color: #e5e7eb;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 768px) {
    .article-detail {
        padding: 24px 20px;
    }

    .page-header-card {
        padding: 24px;
    }

    .hero-slider {
        min-height: 460px;
    }

    .hero-slide-content {
        padding: 60px 0;
    }

    .hero-slider-arrow {
        width: 40px;
        height: 40px;
    }

    .hero-slider-arrow.prev { left: 12px; }
    .hero-slider-arrow.next { right: 12px; }

    .section-title {
        font-size: 22px;
    }
}

/* ============================================
   BREAKING NEWS TICKER
   ============================================ */
.breaking-ticker {
    background: #fff;
    border-bottom: 1px solid #f1f5f9;
    padding: 12px 0;
    overflow: hidden;
}

.breaking-label {
    background: linear-gradient(135deg, #dc2626, #ef4444);
    color: #fff;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.5px;
    white-space: nowrap;
    flex-shrink: 0;
    animation: breaking-pulse 2s infinite;
}

@keyframes breaking-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.75; }
}

.breaking-track {
    flex: 1;
    overflow: hidden;
    position: relative;
    min-width: 0;
}

.breaking-content {
    display: flex;
    gap: 40px;
    white-space: nowrap;
    animation: breaking-scroll 40s linear infinite;
}

.breaking-content:hover {
    animation-play-state: paused;
}

@keyframes breaking-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.breaking-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #1f2937;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: color 0.2s;
}

.breaking-item:hover {
    color: #1e4fa3;
}

.breaking-dot {
    width: 6px;
    height: 6px;
    background: #dc2626;
    border-radius: 50%;
    flex-shrink: 0;
    animation: breaking-pulse 2s infinite;
}

@media (max-width: 768px) {
    .breaking-content { animation-duration: 25s; }
    .breaking-item { font-size: 13px; }
}