/*
Theme Name: Matahari Timoer Editorial
Theme URI: https://mataharitimoer.com
Author: Redaksi Matahari Timoer
Description: Tema WordPress Block (Full Site Editing) bergaya buku/e-reader dengan beranda berbentuk Daftar Isi, rekomendasi artikel terkait otomatis di tengah tulisan, indeks lanjut baca di bawah tombol share, serta fitur berbagi ke WhatsApp, Instagram, Threads, X, LinkedIn, Facebook, dan Substack.
Requires at least: 6.4
Tested up to: 7.1.3
Requires PHP: 8.0
Version: 1.4.0
License: GPL v2 or later
Text Domain: mataharitimoer
*/

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}

.wp-block-post-content p {
    margin-bottom: 1.65em;
}

/* Gaya Daftar Isi (Book Table of Contents) di Halaman Utama */
.mt-toc-list {
    counter-reset: toc-counter;
    list-style: none !important;
    padding-left: 0 !important;
}
.mt-toc-item {
    counter-increment: toc-counter;
    position: relative;
    padding: 0.95rem 0;
    border-bottom: 1px solid rgba(120, 120, 120, 0.18);
    transition: padding-left 0.15s ease;
}
.mt-toc-item:hover {
    padding-left: 0.35rem;
}
.mt-toc-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
}
.mt-toc-row::before {
    content: counter(toc-counter, decimal-leading-zero) ".";
    font-family: monospace;
    font-size: 0.8rem;
    color: var(--wp--preset--color--accent);
    opacity: 0.75;
    flex-shrink: 0;
}
.mt-toc-item .wp-block-post-title {
    margin: 0 !important;
    flex-grow: 1;
    font-size: 1.12rem !important;
    line-height: 1.4 !important;
}
.mt-toc-item .wp-block-post-title a {
    text-decoration: none !important;
}
.mt-toc-item .wp-block-post-title a:hover {
    text-decoration: underline !important;
}
.mt-toc-item .wp-block-post-date {
    flex-shrink: 0;
    font-family: var(--wp--preset--font-family--ui-sans);
    font-size: 0.78rem !important;
    white-space: nowrap;
}

.mt-social-share-box {
    margin: 2.5rem 0;
    padding: 1.25rem;
    border-radius: 14px;
    background: var(--wp--preset--color--surface);
}
.mt-share-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 0.6rem;
    margin-top: 0.75rem;
}
.mt-share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.65rem 0.75rem;
    border-radius: 10px;
    font-family: var(--wp--preset--font-family--ui-sans);
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none !important;
    background: var(--wp--preset--color--base);
    color: var(--wp--preset--color--contrast) !important;
    border: 1px solid rgba(120,120,120,0.2);
    cursor: pointer;
}

/* Boks Rekomendasi Artikel Terkait di Tengah Tulisan */
.mt-inline-related-box {
    margin: 2.25rem 0;
    padding: 1.25rem 1.4rem;
    border-radius: 12px;
    background: var(--wp--preset--color--surface);
    border: 1px solid rgba(120, 120, 120, 0.18);
    border-left: 4px solid var(--wp--preset--color--accent);
    font-family: var(--wp--preset--font-family--ui-sans);
}
.mt-inline-related-label {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--wp--preset--color--accent);
    margin-bottom: 0.6rem;
}
.mt-inline-related-list {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}
.mt-inline-related-list li {
    padding: 0.45rem 0;
    border-top: 1px solid rgba(120, 120, 120, 0.14);
}
.mt-inline-related-list li:first-child {
    border-top: none;
    padding-top: 0.15rem;
}
.mt-inline-related-list a {
    font-family: var(--wp--preset--font-family--body-serif);
    font-weight: 600;
    font-size: 0.98rem;
    color: var(--wp--preset--color--contrast) !important;
    text-decoration: none !important;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.75rem;
}
.mt-inline-related-list a:hover {
    text-decoration: underline !important;
}

/* Indeks Lanjut Baca di Bawah Tombol Share */
.mt-bottom-index-box {
    margin: 2.5rem 0 1.5rem 0;
    padding: 1.5rem;
    border-radius: 16px;
    border: 1px solid rgba(120, 120, 120, 0.22);
    background: var(--wp--preset--color--base);
}
.mt-bottom-index-header {
    border-bottom: 2px solid var(--wp--preset--color--contrast);
    padding-bottom: 0.75rem;
    margin-bottom: 0.5rem;
}
.mt-bottom-index-kicker {
    display: block;
    font-family: var(--wp--preset--font-family--ui-sans);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--wp--preset--color--accent);
}
.mt-bottom-index-title {
    margin: 0.2rem 0 0 0 !important;
    font-size: 1.25rem !important;
}
.mt-bottom-index-list {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    counter-reset: bottom-toc;
}
.mt-bottom-index-list li {
    counter-increment: bottom-toc;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(120, 120, 120, 0.16);
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.85rem;
}
.mt-bottom-index-list li:last-child {
    border-bottom: none;
}
.mt-bottom-index-list li::before {
    content: counter(bottom-toc, decimal-leading-zero) ".";
    font-family: monospace;
    font-size: 0.78rem;
    color: var(--wp--preset--color--accent);
    opacity: 0.75;
    flex-shrink: 0;
}
.mt-bottom-index-list a {
    flex-grow: 1;
    font-family: var(--wp--preset--font-family--body-serif);
    font-weight: 600;
    font-size: 1.02rem;
    color: var(--wp--preset--color--contrast) !important;
    text-decoration: none !important;
}
.mt-bottom-index-list a:hover {
    text-decoration: underline !important;
}
.mt-bottom-index-date {
    font-family: var(--wp--preset--font-family--ui-sans);
    font-size: 0.75rem;
    color: var(--wp--preset--color--muted);
    white-space: nowrap;
    flex-shrink: 0;
}