/* ============================================
   Ciptora Blog — blog.css
   Typography & layout for article pages
   ============================================ */

/* Article Body Typography */
.article-body {
    font-size: 1.0625rem;
    line-height: 1.85;
    color: #334155;
}

.article-body > * + * {
    margin-top: 1.5rem;
}

.article-body h2 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.75rem;
    font-weight: 700;
    color: #0F172A;
    margin-top: 2.75rem;
    margin-bottom: 1rem;
    line-height: 1.3;
    scroll-margin-top: 100px;
}

.article-body h3 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.35rem;
    font-weight: 700;
    color: #0F172A;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    line-height: 1.4;
    scroll-margin-top: 100px;
}

.article-body h4 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.125rem;
    font-weight: 700;
    color: #0F172A;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.article-body p {
    margin: 0;
}

.article-body a {
    color: #1E40AF;
    font-weight: 500;
    text-decoration: underline;
    text-decoration-color: #BFDBFE;
    text-underline-offset: 3px;
    transition: all 0.2s ease;
}

.article-body a:hover {
    color: #F97316;
    text-decoration-color: #F97316;
}

.article-body strong {
    color: #0F172A;
    font-weight: 600;
}

.article-body ul,
.article-body ol {
    padding-left: 1.5rem;
    margin: 0;
}

.article-body ul {
    list-style: none;
    padding-left: 0;
}

.article-body ul li {
    position: relative;
    padding-left: 1.75rem;
    margin-top: 0.5rem;
}

.article-body ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.7rem;
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: linear-gradient(135deg, #1E40AF 0%, #F97316 100%);
}

.article-body ol {
    list-style: decimal;
}

.article-body ol li {
    margin-top: 0.5rem;
    padding-left: 0.5rem;
}

.article-body ol li::marker {
    color: #F97316;
    font-weight: 700;
}

.article-body blockquote {
    border-left: 4px solid #F97316;
    background: linear-gradient(90deg, #FFF7ED 0%, transparent 100%);
    padding: 1.25rem 1.5rem;
    border-radius: 0.5rem;
    margin: 0;
    font-style: italic;
    color: #475569;
}

.article-body blockquote p {
    margin: 0;
}

.article-body code {
    background: #F1F5F9;
    color: #1E40AF;
    padding: 0.15rem 0.4rem;
    border-radius: 0.3rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9em;
}

.article-body pre {
    background: #0F172A;
    color: #E2E8F0;
    padding: 1.25rem;
    border-radius: 0.75rem;
    overflow-x: auto;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.875rem;
    line-height: 1.6;
    margin: 0;
}

.article-body img {
    width: 100%;
    height: auto;
    border-radius: 1rem;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    margin: 0;
}

.article-body figure {
    margin: 0;
}

.article-body figcaption {
    font-size: 0.85rem;
    color: #64748B;
    text-align: center;
    margin-top: 0.75rem;
    font-style: italic;
}

/* Inline CTA card inside article */
.article-cta {
    background: linear-gradient(135deg, #EFF6FF 0%, #FFF7ED 100%);
    border: 1px solid #BFDBFE;
    border-radius: 1.25rem;
    padding: 2rem;
    text-align: center;
    margin: 2.5rem 0;
}

.article-cta h3 {
    margin-top: 0;
}

/* Article cover */
.article-cover {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 1.5rem;
    background: #F1F5F9;
    margin-bottom: 2rem;
}

.article-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Article header */
.article-header {
    margin-bottom: 2.5rem;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.875rem;
    color: #64748B;
    margin-bottom: 1rem;
}

.article-meta .dot {
    width: 3px;
    height: 3px;
    border-radius: 999px;
    background: #CBD5E1;
}

/* Reading progress bar */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, #1E40AF 0%, #F97316 100%);
    z-index: 60;
    transition: width 0.1s linear;
    pointer-events: none;
}

/* Table of contents */
.toc {
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    border-radius: 1rem;
    padding: 1.5rem;
    margin: 2rem 0;
}

.toc-title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 700;
    color: #0F172A;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
}

.toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.toc-list li {
    margin-top: 0.5rem;
}

.toc-list a {
    color: #475569;
    font-size: 0.9rem;
    text-decoration: none;
    transition: color 0.2s ease;
}

.toc-list a:hover {
    color: #1E40AF;
}

.toc-list .toc-h3 {
    padding-left: 1rem;
    font-size: 0.85rem;
}

/* Share buttons */
.share-buttons {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.share-btn {
    width: 38px;
    height: 38px;
    border-radius: 0.625rem;
    background: #F1F5F9;
    color: #475569;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
}

.share-btn:hover {
    background: #1E40AF;
    color: #FFFFFF;
    transform: translateY(-2px);
}

.share-btn.whatsapp:hover {
    background: #25D366;
}

.share-btn.facebook:hover {
    background: #1877F2;
}

.share-btn.twitter:hover {
    background: #000000;
}

.share-btn.linkedin:hover {
    background: #0A66C2;
}

/* Related articles */
.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
    margin-top: 1.5rem;
}

.related-card {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 1rem;
    overflow: hidden;
    transition: all 0.3s ease;
}

.related-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
    border-color: #BFDBFE;
}

.related-cover {
    aspect-ratio: 16 / 10;
    background: linear-gradient(135deg, #DBEAFE 0%, #FED7AA 100%);
    overflow: hidden;
}

.related-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.related-body {
    padding: 1.25rem;
}

.related-cat {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #F97316;
    margin-bottom: 0.4rem;
}

.related-title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    color: #0F172A;
    line-height: 1.35;
    margin-bottom: 0.5rem;
}

.related-title a {
    color: inherit;
    text-decoration: none;
}

.related-title a:hover {
    color: #1E40AF;
}

.related-meta {
    font-size: 0.8rem;
    color: #64748B;
}

/* Article footer */
.article-footer {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #E2E8F0;
}

.author-box {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    background: #F8FAFC;
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.author-avatar {
    width: 64px;
    height: 64px;
    border-radius: 999px;
    background: linear-gradient(135deg, #1E40AF 0%, #3B82F6 100%);
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 800;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.author-name {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 700;
    color: #0F172A;
    margin-bottom: 0.25rem;
}

.author-bio {
    font-size: 0.9rem;
    color: #64748B;
    line-height: 1.6;
}

/* Blog index cards */
.blog-card {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 1.25rem;
    overflow: hidden;
    transition: all 0.35s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.08);
    border-color: #BFDBFE;
}

.blog-card-cover {
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: linear-gradient(135deg, #DBEAFE 0%, #FED7AA 100%);
    position: relative;
}

.blog-card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.blog-card:hover .blog-card-cover img {
    transform: scale(1.05);
}

.blog-card-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 999px;
    letter-spacing: 0.02em;
}

.blog-card-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.blog-card-cat {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
}

.blog-card-title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.125rem;
    font-weight: 700;
    color: #0F172A;
    line-height: 1.35;
    margin-bottom: 0.6rem;
}

.blog-card-title a {
    color: inherit;
    text-decoration: none;
}

.blog-card-title a:hover {
    color: #1E40AF;
}

.blog-card-excerpt {
    font-size: 0.875rem;
    color: #64748B;
    line-height: 1.6;
    margin-bottom: 1rem;
    flex-grow: 1;
}

.blog-card-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.8rem;
    color: #64748B;
}

.blog-card-meta .dot {
    width: 3px;
    height: 3px;
    border-radius: 999px;
    background: #CBD5E1;
}

/* Featured post (large) */
.blog-card-featured {
    grid-column: span 2;
}

.blog-card-featured .blog-card-cover {
    aspect-ratio: 21 / 9;
}

@media (max-width: 768px) {
    .blog-card-featured {
        grid-column: span 1;
    }
    .blog-card-featured .blog-card-cover {
        aspect-ratio: 16 / 10;
    }
}

/* Filter chips */
.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.filter-chip {
    padding: 0.5rem 1rem;
    background: #F1F5F9;
    color: #475569;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-chip:hover {
    background: #E2E8F0;
}

.filter-chip.active {
    background: #1E40AF;
    color: #FFFFFF;
    border-color: #1E40AF;
}

/* Search box */
.blog-search {
    position: relative;
    max-width: 420px;
    margin-left: auto;
}

.blog-search input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.75rem;
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 0.75rem;
    font-size: 0.9rem;
    color: #0F172A;
    transition: all 0.2s ease;
    font-family: inherit;
}

.blog-search input:focus {
    outline: none;
    border-color: #1E40AF;
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

.blog-search ion-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94A3B8;
    font-size: 1.1rem;
}

/* Print article */
@media print {
    .reading-progress,
    #navbar,
    #backToTop,
    .share-buttons,
    .article-cta,
    nav[aria-label="Article"] {
        display: none !important;
    }
}