/* ======================================================
   MUI Mobile v2 — Lightweight App-like CSS
   Target: Android Chrome, < 15KB
   ====================================================== */

/* --- Design Tokens --- */
:root {
    --m-green:       #20995c;
    --m-green-dark:  #176d40;
    --m-green-light: #e8f7ef;
    --m-text:        #1a1a2e;
    --m-text-muted:  #6b7280;
    --m-bg:          #f5f6f8;
    --m-white:       #ffffff;
    --m-border:      #e5e7eb;
    --m-radius-sm:   6px;
    --m-radius:      10px;
    --m-radius-lg:   14px;
    --m-shadow:      0 2px 8px rgba(0,0,0,.08);
    --m-shadow-md:   0 4px 16px rgba(0,0,0,.10);
    --m-bottom-nav-h: 60px;
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    background: var(--m-bg);
    color: var(--m-text);
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Noto Sans', sans-serif;
    font-size: 15px;
    line-height: 1.6;
    margin: 0;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--m-green); text-decoration: none; }
a:hover { text-decoration: none; }

/* --- Safe Area (Android gesture + iPhone notch) --- */
.m-safe-bottom {
    padding-bottom: calc(var(--m-bottom-nav-h) + env(safe-area-inset-bottom, 0px));
}

/* ======================================================
   HEADER MOBILE (bersih, pakai header_mobile.blade.php)
   ====================================================== */
.m-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--m-white);
    border-bottom: 1px solid var(--m-border);
    height: 56px;
    display: flex;
    align-items: center;
    padding: 0 12px;
    gap: 10px;
}
.m-header__back {
    width: 36px; height: 36px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: var(--m-radius-sm);
    border: 1px solid var(--m-border);
    color: var(--m-text);
    background: var(--m-white);
    flex-shrink: 0;
    font-size: 14px;
}
.m-header__logo-wrap {
    flex: 1;
    text-align: center;
}
.m-header__logo {
    max-height: 36px;
    width: auto;
    display: inline-block;
}
.m-header__menu-btn {
    width: 36px; height: 36px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: var(--m-radius-sm);
    border: 1px solid var(--m-border);
    background: var(--m-white);
    color: var(--m-text);
    flex-shrink: 0;
    font-size: 16px;
}

/* ======================================================
   BOTTOM NAVIGATION
   ====================================================== */
.m-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--m-bottom-nav-h);
    background: var(--m-white);
    border-top: 1px solid var(--m-border);
    display: flex;
    align-items: center;
    z-index: 200;
    padding-bottom: env(safe-area-inset-bottom, 0px);
}
.m-bottom-nav__item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 600;
    color: var(--m-text-muted);
    gap: 3px;
    text-decoration: none;
    padding: 6px 4px;
    -webkit-tap-highlight-color: transparent;
}
.m-bottom-nav__item.active {
    color: var(--m-green);
}
.m-bottom-nav__item i {
    font-size: 20px;
    line-height: 1;
}

/* ======================================================
   MAIN CONTENT WRAPPER
   ====================================================== */
.m-content {
    min-height: 100vh;
    padding-bottom: calc(var(--m-bottom-nav-h) + 16px + env(safe-area-inset-bottom, 0px));
}
.m-container {
    max-width: 640px;
    margin: 0 auto;
    padding: 0 14px;
}
.m-container.m-container--full {
    max-width: 100%;
    padding-left: 0;
    padding-right: 0;
}
.m-container.m-container--full .m-article {
    border-radius: 0;
}

/* ======================================================
   ARTICLE / DETAIL PAGE
   ====================================================== */
.m-article {
    background: var(--m-white);
    border-radius: var(--m-radius);
    margin-top: 12px;
    overflow: hidden;
}
.m-article__inner {
    padding: 16px 14px 20px;
}
.m-article__category {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--m-green);
    margin-bottom: 8px;
}
.m-article__title {
    font-size: 20px;
    font-weight: 800;
    line-height: 1.35;
    color: var(--m-text);
    margin: 0 0 10px;
}
.m-article__meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--m-text-muted);
    margin-bottom: 14px;
    flex-wrap: wrap;
}
.m-article__meta i { font-size: 12px; }
.m-article__thumb {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    display: block;
    border-radius: var(--m-radius-sm);
    margin-bottom: 14px;
}
.m-article__thumb--fullbleed {
    width: calc(100% + 28px);
    max-width: none;
    margin-left: -14px;
    margin-right: -14px;
    border-radius: 0;
}
.m-article__caption {
    font-size: 12px;
    line-height: 1.3;
    color: var(--m-text-muted);
    font-style: italic;
    margin-top: -10px;
    margin-bottom: 14px;
}
.m-article__body {
    font-size: 15px;
    line-height: 1.75;
    color: #2d2d2d;
    word-break: break-word;
}
.m-article__body p { margin: 0 0 14px; }
.m-article__body h2 { font-size: 1.15rem; font-weight: 700; margin: 20px 0 8px; }
.m-article__body h3 { font-size: 1.05rem; font-weight: 700; margin: 16px 0 6px; }
.m-article__body img { border-radius: var(--m-radius-sm); margin: 10px 0; }
.m-article__body blockquote {
    border-left: 3px solid var(--m-green);
    margin: 14px 0;
    padding: 8px 12px;
    background: var(--m-green-light);
    border-radius: 0 var(--m-radius-sm) var(--m-radius-sm) 0;
    font-style: italic;
    color: #374151;
}
.m-article__body table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    margin: 10px 0;
    overflow-x: auto;
    display: block;
}
.m-article__body th, .m-article__body td {
    border: 1px solid var(--m-border);
    padding: 6px 8px;
}
.m-article__body iframe {
    max-width: 100%;
    border-radius: var(--m-radius-sm);
}

/* ======================================================
   TIM REDAKSI PILL (standard non opini/khutbah)
   ====================================================== */
.m-redaksi-pill-wrap {
    position: relative;
    margin: 14px 0;
}
.m-redaksi-pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border: 1px solid var(--m-border);
    border-radius: 999px;
    background: var(--m-white);
    max-width: 100%;
    cursor: pointer;
    text-align: left;
}
.m-redaksi-avatar-group {
    display: flex;
    align-items: center;
}
.m-redaksi-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--m-border);
    margin-left: -8px;
}
.m-redaksi-avatar:first-child {
    margin-left: 0;
}
.m-redaksi-info {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
    min-width: 0;
}
.m-redaksi-names {
    font-size: 13px;
    font-weight: 600;
    color: var(--m-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.m-redaksi-names a {
    color: inherit;
    text-decoration: none;
}
.m-redaksi-label {
    font-size: 11px;
    color: var(--m-text-muted);
}
.m-redaksi-dropdown {
    position: absolute;
    left: 0;
    top: calc(100% + 8px);
    width: min(100%, 320px);
    border: 1px solid var(--m-border);
    border-radius: 14px;
    background: var(--m-white);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
    padding: 12px 12px 10px;
    z-index: 10;
    display: none;
}
.m-redaksi-dropdown.active {
    display: block;
}
.m-redaksi-close {
    position: absolute;
    top: 6px;
    right: 8px;
    border: 0;
    background: transparent;
    font-size: 20px;
    line-height: 1;
    color: #9ca3af;
    cursor: pointer;
}
.m-redaksi-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 10px;
}
.m-redaksi-item:last-child {
    margin-bottom: 0;
}
.m-redaksi-item-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--m-border);
}
.m-redaksi-item-info h4 {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: var(--m-text);
    line-height: 1.25;
}
.m-redaksi-item-info h4 a {
    color: inherit;
    text-decoration: none;
}
.m-redaksi-item-info span {
    display: block;
    margin-top: 2px;
    font-size: 13px;
    color: var(--m-text-muted);
}

/* ======================================================
   AUTHOR BLOCK (opini/khutbah style)
   ====================================================== */
.m-author {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--m-border);
    border-radius: var(--m-radius);
    background: var(--m-white);
    margin: 14px 0;
}
.m-author__photo {
    width: 64px;
    height: 64px;
    min-width: 64px;
    border-radius: 6px;
    object-fit: cover;
    border: 1px solid var(--m-border);
}
.m-author__label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--m-text-muted);
    font-weight: 600;
    margin-bottom: 3px;
}
.m-author__name {
    font-size: 15px;
    font-weight: 700;
    color: var(--m-text);
    margin: 0 0 4px;
}
.m-author__bio {
    font-size: 13px;
    color: var(--m-text-muted);
    line-height: 1.5;
    margin: 0;
}
.m-author__footer {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--m-border);
    font-size: 12px;
    color: var(--m-text-muted);
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.m-author__editor-photo {
    width: 20px; height: 20px;
    border-radius: 50%;
    object-fit: cover;
    display: inline;
    vertical-align: middle;
}

/* ======================================================
   SOCIAL SHARE BAR
   ====================================================== */
.m-share {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 0 6px;
    flex-wrap: wrap;
}
.m-share__label {
    font-size: 13px;
    color: var(--m-text-muted);
    font-weight: 600;
    margin-right: 2px;
}
.m-share__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px; height: 36px;
    border-radius: 50%;
    color: #fff;
    font-size: 14px;
    -webkit-tap-highlight-color: transparent;
    transition: opacity .15s;
}
.m-share__btn:active { opacity: .75; }
.m-share__btn.fb  { background: #1877f2; }
.m-share__btn.tw  { background: #1da1f2; }
.m-share__btn.wa  { background: #25d366; }
.m-share__btn.cp  { background: #475569; }
.m-share__btn.dl  { background: #dc2626; }

/* ======================================================
   CARD ITEM (Listing / Related)
   ====================================================== */
.m-card {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--m-border);
    -webkit-tap-highlight-color: transparent;
}
.m-card:last-child { border-bottom: none; }
.m-card__thumb {
    width: 86px;
    height: 86px;
    min-width: 86px;
    border-radius: var(--m-radius-sm);
    object-fit: cover;
    background: var(--m-border);
}
.m-card__body { flex: 1; min-width: 0; }
.m-card__cat {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--m-green);
    margin-bottom: 4px;
}
.m-card__title {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
    color: var(--m-text);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0 0 6px;
}
.m-card__meta {
    font-size: 11px;
    color: var(--m-text-muted);
}

/* ======================================================
   SECTION HEADER
   ====================================================== */
.m-section-hd {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0 8px;
}
.m-section-hd__title {
    font-size: 16px;
    font-weight: 800;
    color: var(--m-text);
    margin: 0;
    position: relative;
    padding-left: 10px;
}
.m-section-hd__title::before {
    content: '';
    position: absolute;
    left: 0; top: 2px; bottom: 2px;
    width: 3px;
    background: var(--m-green);
    border-radius: 2px;
}
.m-section-hd__more {
    font-size: 12px;
    font-weight: 600;
    color: var(--m-green);
}

/* ======================================================
   PANEL (White box)
   ====================================================== */
.m-panel {
    background: var(--m-white);
    border-radius: var(--m-radius);
    padding: 14px;
    margin-bottom: 12px;
    box-shadow: var(--m-shadow);
}
.m-panel--flush-y {
    padding-top: 0;
    padding-bottom: 0;
}

/* ======================================================
   ARCHIVE PAGE (mobile)
   ====================================================== */
.m-archive-search {
    display: flex;
    gap: 8px;
    align-items: center;
}
.m-archive-search__input {
    flex: 1;
    height: 38px;
    border: 1px solid #dbe2ea;
    border-radius: 8px;
    padding: 0 12px;
    font-size: 14px;
    color: #1f2937;
    background: #fff;
}
.m-archive-search__btn {
    height: 38px;
    border: 0;
    border-radius: 8px;
    padding: 0 14px;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    background: #20995c;
}
.m-archive-featured {
    overflow: hidden;
    padding: 0;
}
.m-archive-featured__img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    display: block;
}
.m-archive-featured__body {
    padding: 12px;
}
.m-archive-featured__title {
    margin: 4px 0 8px;
    font-size: 18px;
    line-height: 1.35;
    font-weight: 800;
}
.m-archive-featured__title a {
    color: #1f2937;
}

/* ======================================================
   ARCHIVE PAGINATION (mobile)
   ====================================================== */
.m-pagination {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 8px;
}
.m-pagination__btn {
    min-height: 34px;
    border: 1px solid #dbe2ea;
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 700;
    color: #1f2937;
    background: #fff;
    text-align: center;
}
.m-pagination__btn.is-disabled {
    opacity: .45;
    pointer-events: none;
}
.m-pagination__nums {
    display: flex;
    gap: 6px;
    justify-content: center;
    align-items: center;
    overflow-x: auto;
    padding: 2px;
}
.m-pagination__num,
.m-pagination__dots {
    min-width: 32px;
    min-height: 32px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #1f2937;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
}
.m-pagination__num.is-active {
    color: #fff;
    background: #20995c;
    border-color: #20995c;
}

/* ======================================================
   TAGS
   ====================================================== */
.m-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px 0;
}
.m-tag {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 50px;
    background: var(--m-green-light);
    color: var(--m-green-dark);
}

/* ======================================================
   UTILITIES (minimal)
   ====================================================== */
.m-divider { height: 1px; background: var(--m-border); margin: 10px 0; }
.text-green { color: var(--m-green); }
.fw-700 { font-weight: 700; }
.fw-800 { font-weight: 800; }
.fs-12 { font-size: 12px; }
.fs-13 { font-size: 13px; }
.mt-8 { margin-top: 8px; }
.mb-8 { margin-bottom: 8px; }
.pt-8 { padding-top: 8px; }
