/* =========================================================
   GOOGLE FONTS — dimuat via <link> di layout
   ========================================================= */

/* =========================================================
   CSS VARIABLES — Design Tokens
   ========================================================= */
:root {
    --bs-font-sans-serif: 'Inter', system-ui, -apple-system, sans-serif;
    --bs-body-font-family: var(--bs-font-sans-serif);

    /* Primary: Navy Blue */
    --color-primary:       #1e3a8a;
    --color-primary-dark:  #1e2d6e;
    --color-primary-light: #3b5fc0;
    --color-primary-rgb:   30, 58, 138;

    /* Accent: Gold / Amber */
    --color-accent:        #f59e0b;
    --color-accent-dark:   #d97706;
    --color-accent-light:  #fbbf24;

    /* Bootstrap override variables */
    --bs-primary:          var(--color-primary);
    --bs-primary-rgb:      var(--color-primary-rgb);

    /* Surface */
    --color-surface:       #ffffff;
    --color-surface-alt:   #f8fafc;
    --color-border:        #e2e8f0;

    /* Text */
    --color-text:          #0f172a;
    --color-text-muted:    #64748b;

    /* Semantic */
    --color-success:       #10b981;
    --color-danger:        #ef4444;
    --color-warning:       #f59e0b;

    /* Typography */
    --font-body:           'Inter', system-ui, sans-serif;
    --font-heading:        'Merriweather', Georgia, serif;

    /* Radius */
    --radius-sm:   0.375rem;
    --radius-md:   0.5rem;
    --radius-lg:   0.75rem;
    --radius-xl:   1rem;
    --radius-full: 9999px;

    /* Shadow */
    --shadow-sm:  0 1px 3px rgba(0,0,0,.06);
    --shadow-md:  0 4px 12px rgba(0,0,0,.08);
    --shadow-lg:  0 10px 25px rgba(0,0,0,.1);
}

/* Dark mode */
[data-bs-theme="dark"] {
    --color-surface:     #0f172a;
    --color-surface-alt: #1e293b;
    --color-border:      #334155;
    --color-text:        #f1f5f9;
    --color-text-muted:  #94a3b8;
}

/* =========================================================
   BASE
   ========================================================= */
html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    background-color: var(--color-surface);
    color: var(--color-text);
    -webkit-font-smoothing: antialiased;
    overflow-x: clip;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--color-text);
}

a { transition: color .15s ease; }
img { max-width: 100%; height: auto; }

/* =========================================================
   BOOTSTRAP OVERRIDES
   ========================================================= */
.btn-primary {
    --bs-btn-bg:                 var(--color-primary);
    --bs-btn-border-color:       var(--color-primary);
    --bs-btn-hover-bg:           var(--color-primary-dark);
    --bs-btn-hover-border-color: var(--color-primary-dark);
    --bs-btn-active-bg:          var(--color-primary-dark);
    --bs-btn-color:              #fff;
    --bs-btn-hover-color:        #fff;
}

.btn-accent {
    background-color: var(--color-accent);
    border-color: var(--color-accent);
    color: #0f172a;
    font-weight: 600;
}
.btn-accent:hover {
    background-color: var(--color-accent-dark);
    border-color: var(--color-accent-dark);
    color: #0f172a;
}

.btn-outline-primary {
    --bs-btn-color:        var(--color-primary);
    --bs-btn-border-color: var(--color-primary);
    --bs-btn-hover-bg:     var(--color-primary);
    --bs-btn-hover-color:  #fff;
}

/* Navbar */
.navbar-brand {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--color-primary) !important;
}
.navbar {
    border-bottom: 1px solid var(--color-border);
    background-color: var(--color-surface) !important;
    box-shadow: var(--shadow-sm);
    overflow: visible !important;
}

/* Pastikan dropdown navbar tidak ter-clip oleh sticky container */
.navbar .dropdown-menu {
    position: absolute !important;
    z-index: 9999 !important;
    margin-top: .25rem !important;
}
/* Container navbar tidak clip konten yang overflow */
.navbar > .container,
.navbar > .container-fluid {
    overflow: visible !important;
    position: relative;
}
@media (max-width: 991.98px) {
    .navbar > .container {
        flex-wrap: wrap;
        gap: .5rem;
    }
    .navbar-brand {
        min-width: 0;
        max-width: calc(100% - 132px);
        margin-right: 0;
    }
    .navbar-brand-text {
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .navbar-mobile-btn {
        width: 36px;
        height: 36px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 0;
        border: 1px solid var(--color-border);
        border-radius: var(--radius-md);
        background: var(--color-surface-alt);
        color: var(--color-text-muted);
        transition: background .15s, color .15s;
    }
    .navbar-mobile-btn:hover,
    .navbar-mobile-btn:focus {
        color: var(--color-primary);
        background: var(--color-surface-alt);
    }
    .navbar-collapse {
        flex-basis: 100%;
    }
    .navbar-collapse .nav-link {
        padding: .6rem .85rem !important;
    }
    .navbar-collapse .nav-link.active {
        background-color: rgba(var(--color-primary-rgb), .08);
    }
    [data-bs-theme="dark"] .navbar-collapse .nav-link.active {
        background-color: rgba(147, 197, 253, .12);
    }
}
.nav-link {
    font-weight: 500;
    color: var(--color-text-muted) !important;
    transition: color .15s;
}
.nav-link:hover, .nav-link.active {
    color: var(--color-primary) !important;
}

/* Card */
.card {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    background-color: var(--color-surface);
    box-shadow: var(--shadow-sm);
    transition: box-shadow .2s, transform .2s;
}
.card-hover:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

/* Badge category */
.badge-category {
    background-color: rgba(30, 58, 138, .1);
    color: var(--color-primary);
    font-weight: 500;
    border-radius: var(--radius-full);
    padding: .25rem .75rem;
    font-size: .75rem;
    display: inline-block;
}

/* Forms */
.form-control, .form-select {
    border-color: var(--color-border);
    border-radius: var(--radius-md);
    color: var(--color-text);
    background-color: var(--color-surface);
}
.form-control:focus, .form-select:focus {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 .2rem rgba(245, 158, 11, .25);
    background-color: var(--color-surface);
    color: var(--color-text);
}
.form-label { font-weight: 500; color: var(--color-text); }

/* =========================================================
   LAYOUT UTILITIES
   ========================================================= */
.section-padding    { padding: 5rem 0; }
.section-padding-sm { padding: 3rem 0; }

@media (max-width: 767.98px) {
    .section-padding    { padding: 3rem 0; }
    .section-padding-sm { padding: 2rem 0; }
    .section-subtitle   { font-size: .95rem; margin-bottom: 1.75rem; }
}

.section-title {
    font-family: var(--font-heading);
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: .75rem;
}
.section-subtitle {
    color: var(--color-text-muted);
    font-size: 1.1rem;
    margin-bottom: 2.5rem;
}

.divider-accent {
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
    border-radius: var(--radius-full);
    margin: 1rem auto 2rem;
}
.divider-accent.left { margin-left: 0; }

/* =========================================================
   ADMIN LAYOUT — SIDEBAR + TOPBAR + MAIN
   ========================================================= */

/* Body admin — tidak ada scroll di body, scroll di .admin-main */
.admin-body {
    overflow: hidden;
    height: 100vh;
}

/* ── Sidebar ────────────────────────────────────────────── */
.admin-sidebar {
    width: 260px;
    height: 100vh;
    background-color: #1e2d6e; /* navy gelap */
    color: #fff;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1035;
    display: flex;
    flex-direction: column;
    transition: transform .28s cubic-bezier(.4,0,.2,1);
    overflow: hidden;
}

/* Desktop: default terbuka */
.admin-sidebar.show { transform: translateX(0); }

/* Desktop lg+: selalu terlihat */
@media (min-width: 992px) {
    .admin-sidebar { transform: translateX(0); }
    .admin-sidebar.closed { transform: translateX(-100%); }
}

/* Mobile: tersembunyi, muncul dengan class show */
@media (max-width: 991.98px) {
    .admin-sidebar { transform: translateX(-100%); }
    .admin-sidebar.show { transform: translateX(0); }
}

/* Brand */
.admin-sidebar .sidebar-brand {
    display: flex !important;
    align-items: center;
    gap: .625rem;
    padding: 1rem 1.25rem;
    text-decoration: none;
    flex-shrink: 0;
    border-bottom: 1px solid rgba(255,255,255,.1);
    min-height: 64px;
}
.admin-sidebar .sidebar-brand img {
    max-height: 34px;
    width: auto;
    object-fit: contain;
    flex-shrink: 0;
    /* Tidak difilter — logo warna asli tampil di atas navy */
    filter: none;
}
.admin-sidebar .sidebar-brand .brand-text {
    font-family: var(--font-heading);
    font-size: .9rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
    min-width: 0;
    overflow: hidden;
}
.admin-sidebar .sidebar-brand .brand-sub {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: .65rem;
    opacity: .45;
    display: block;
    margin-top: 1px;
}

/* Nav area (scrollable) */
.admin-sidebar .sidebar-nav {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    /* Tidak butuh padding-bottom — footer sudah di flex bawah */
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,.15) transparent;
}
.admin-sidebar .sidebar-nav::-webkit-scrollbar { width: 4px; }
.admin-sidebar .sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.15); border-radius: 2px; }

/* Section title */
.admin-sidebar .nav-section-title {
    font-size: .65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: rgba(255,255,255,.35);
    padding: 1.1rem 1.25rem .35rem;
}

/* Nav links */
.admin-sidebar .nav-link {
    color: rgba(255,255,255,.65) !important;
    padding: .55rem 1.25rem;
    display: flex !important;
    align-items: center;
    gap: .75rem;
    font-size: .875rem;
    font-weight: 500;
    border-radius: 0;
    transition: background .15s, color .15s;
    text-decoration: none;
    white-space: nowrap;
}
.admin-sidebar .nav-link i {
    font-size: 1rem;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}
.admin-sidebar .nav-link:hover {
    color: #fff !important;
    background-color: rgba(255,255,255,.1);
}
.admin-sidebar .nav-link.active {
    color: #fff !important;
    background-color: rgba(255,255,255,.18);
    border-left: 3px solid var(--color-accent, #f59e0b);
}

/* Footer logout — flex item di bawah (bukan absolute) */
.admin-sidebar .sidebar-footer {
    flex-shrink: 0;        /* tidak menyusut */
    position: relative;    /* bukan absolute */
    bottom: auto;
    left: auto;
    right: auto;
    padding: .875rem 1rem;
    border-top: 1px solid rgba(255,255,255,.1);
    background-color: #1a2660;
}
.admin-sidebar .sidebar-footer .user-info {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-bottom: .5rem;
    padding: 0 .25rem;
}
.admin-sidebar .sidebar-footer .user-avatar {
    width: 28px;
    height: 28px;
    min-width: 28px;
    border-radius: 50%;
    background: rgba(255,255,255,.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .7rem;
    font-weight: 700;
    color: #fff;
}
.admin-sidebar .sidebar-footer .user-name {
    font-size: .8rem;
    color: rgba(255,255,255,.8);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.admin-sidebar .sidebar-footer .btn-logout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    width: 100%;
    padding: .4rem .75rem;
    font-size: .8rem;
    font-weight: 600;
    background: rgba(239,68,68,.15);
    color: #fca5a5;
    border: 1px solid rgba(239,68,68,.3);
    border-radius: var(--radius-md, .5rem);
    cursor: pointer;
    transition: background .15s, color .15s;
}
.admin-sidebar .sidebar-footer .btn-logout:hover {
    background: rgba(239,68,68,.3);
    color: #fff;
}

/* Overlay mobile */
.admin-sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 1034;
}
.admin-sidebar-overlay.show { display: block; }

/* ── Main area ───────────────────────────────────────────── */
.admin-main {
    margin-left: 260px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: var(--color-surface-alt);
    transition: margin-left .28s cubic-bezier(.4,0,.2,1);
    overflow: hidden;
}

@media (min-width: 992px) {
    .admin-main.sidebar-closed { margin-left: 0; }
}

@media (max-width: 991.98px) {
    .admin-main { margin-left: 0; }
    .admin-content { padding: 1rem; }
}

/* ── Topbar ──────────────────────────────────────────────── */
.admin-topbar {
    height: 60px;
    min-height: 60px;
    flex-shrink: 0;
    background-color: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
    display: flex;
    align-items: center;
    padding: 0 1rem 0 .75rem;
    gap: .5rem;
    position: sticky;
    top: 0;
    z-index: 1030;
    overflow: visible;
}
.admin-topbar .dropdown {
    position: relative;
}
.admin-topbar .dropdown-menu {
    z-index: 1055;
}

/* Tombol-tombol di topbar */
.admin-topbar-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .35rem;
    min-width: 36px;
    height: 36px;
    padding: 0 .6rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md, .5rem);
    background: var(--color-surface-alt);
    color: var(--color-text-muted);
    cursor: pointer;
    transition: background .15s, color .15s, border-color .15s;
    text-decoration: none;
    font-size: .875rem;
    white-space: nowrap;
}
.admin-topbar-btn:hover {
    background: var(--color-border);
    color: var(--color-text);
    border-color: var(--color-border);
}

/* User button */
.admin-topbar-user-btn {
    display: flex;
    align-items: center;
    gap: .4rem;
    height: 36px;
    padding: 0 .625rem 0 .4rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md, .5rem);
    background: var(--color-surface-alt);
    color: var(--color-text);
    cursor: pointer;
    transition: background .15s;
    font-size: .825rem;
    font-weight: 500;
}
.admin-topbar-user-btn:hover { background: var(--color-border); }

.admin-topbar-avatar {
    width: 26px;
    height: 26px;
    min-width: 26px;
    border-radius: 50%;
    background: var(--color-primary, #1e3a8a);
    color: #fff;
    font-size: .7rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}
.admin-topbar-username {
    max-width: 130px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Breadcrumb */
.admin-topbar .breadcrumb {
    font-size: .8rem;
}
.admin-topbar .breadcrumb-item + .breadcrumb-item::before { color: var(--color-text-muted); }
.admin-topbar .breadcrumb-item a {
    color: var(--color-text-muted);
    text-decoration: none;
}
.admin-topbar .breadcrumb-item a:hover { color: var(--color-primary); }
.admin-topbar .breadcrumb-item.active  { color: var(--color-text); }

/* ── Content ─────────────────────────────────────────────── */
.admin-content {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

/* ── Dark mode admin ─────────────────────────────────────── */
[data-bs-theme="dark"] .admin-sidebar       { background-color: #0e1a3f; }
[data-bs-theme="dark"] .admin-sidebar .sidebar-footer { background-color: #0b1535; }
[data-bs-theme="dark"] .admin-main          { background-color: #0f172a; }
[data-bs-theme="dark"] .admin-topbar        { background-color: #1e293b; border-bottom-color: #334155; }
[data-bs-theme="dark"] .admin-topbar-btn    { background: #1e293b; border-color: #334155; color: #94a3b8; }
[data-bs-theme="dark"] .admin-topbar-btn:hover { background: #334155; color: #f1f5f9; }
[data-bs-theme="dark"] .admin-topbar-user-btn { background: #1e293b; border-color: #334155; color: #f1f5f9; }
[data-bs-theme="dark"] .admin-topbar-user-btn:hover { background: #334155; }
[data-bs-theme="dark"] .admin-content       { background-color: #0f172a; }

/* =========================================================
   FLOATING WHATSAPP
   ========================================================= */
.wa-float {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 1050;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background-color: #25D366;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(37,211,102,.4);
    transition: transform .2s, box-shadow .2s;
    text-decoration: none;
}
.wa-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(37,211,102,.5);
}
.wa-float svg { width: 30px; height: 30px; fill: #fff; }
.wa-float::before {
    content: '';
    position: absolute;
    width: 100%; height: 100%;
    border-radius: 50%;
    background-color: #25D366;
    opacity: .4;
    animation: wa-pulse 2s infinite;
}
@keyframes wa-pulse {
    0%   { transform: scale(1);   opacity: .4; }
    70%  { transform: scale(1.4); opacity: 0;  }
    100% { transform: scale(1.4); opacity: 0;  }
}

@media (max-width: 575.98px) {
    .wa-float {
        bottom: 1rem;
        right: 1rem;
        width: 48px;
        height: 48px;
    }
    .wa-float svg { width: 24px; height: 24px; }
}

/* =========================================================
   DARK MODE TOGGLE
   ========================================================= */
.theme-toggle {
    width: 36px;
    height: 36px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-surface-alt);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--color-text-muted);
    transition: background .15s, color .15s;
    padding: 0;
    line-height: 1;
}
.theme-toggle:hover { color: var(--color-primary); }

/* =========================================================
   PROSE
   ========================================================= */
.prose {
    color: var(--color-text);
    line-height: 1.8;
    font-size: 1rem;
    /* Prevent content from overflowing its container */
    overflow-wrap: break-word;
    word-break: break-word;
    min-width: 0;
    max-width: 100%;
}
.prose h2, .prose h3, .prose h4 {
    font-family: var(--font-heading);
    margin-top: 2rem;
    margin-bottom: .75rem;
    color: var(--color-text);
    overflow-wrap: break-word;
    word-break: break-word;
}
.prose p {
    margin-bottom: 1.25rem;
    overflow-wrap: break-word;
    word-break: break-word;
}
.prose blockquote {
    border-left: 4px solid var(--color-accent);
    padding-left: 1rem;
    font-style: italic;
    color: var(--color-text-muted);
    margin: 1.5rem 0;
}
.prose img {
    border-radius: var(--radius-lg);
    margin: 1.5rem auto;
    display: block;
    max-width: 100%;
    height: auto;
}
.prose a {
    color: var(--color-primary);
    overflow-wrap: break-word;
    word-break: break-all;
}
.prose code {
    background: var(--color-surface-alt);
    padding: .1rem .3rem;
    border-radius: var(--radius-sm);
    font-size: .875em;
    word-break: break-all;
}
.prose pre {
    overflow-x: auto;
    max-width: 100%;
}
.prose table {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.prose ul, .prose ol {
    padding-left: 1.5rem;
    margin-bottom: 1.25rem;
}
.prose li { margin-bottom: .4rem; }
.prose iframe, .prose embed, .prose video {
    max-width: 100%;
}

/* Article figcaption: caption & source below thumbnail */
.article-figcaption-text {
    font-size: .8rem;
    color: var(--color-text-muted);
    font-style: italic;
    line-height: 1.4;
}
.article-figcaption-source {
    font-size: .75rem;
    color: var(--color-text-muted);
    opacity: .75;
    white-space: nowrap;
}
[data-bs-theme="dark"] .article-figcaption-text,
[data-bs-theme="dark"] .article-figcaption-source {
    color: #94a3b8;
}

/* Article layout: ensure columns don't overflow */
.article-main-col {
    min-width: 0;
    overflow: hidden;
}
.article-sidebar-col {
    min-width: 0;
}
.article-title {
    font-family: var(--font-heading);
    line-height: 1.3;
    overflow-wrap: break-word;
    word-break: break-word;
}
.article-excerpt {
    background: rgba(30,58,138,.06);
    border-left: 4px solid var(--color-primary);
}
.article-prose {
    /* Extra guard so TinyMCE/WYSIWYG content doesn't blow out */
    overflow: hidden;
}
/* Sidebar inner: prevent overflow on small viewports */
.article-sidebar-inner {
    min-width: 0;
    overflow: hidden;
}
/* On mobile: unpin the sidebar so it flows naturally */
@media (max-width: 991.98px) {
    .article-sidebar-inner {
        position: static !important;
    }
}

/* Share icon buttons */
.share-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    text-decoration: none;
    line-height: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,.18);
    transition: transform .18s ease, box-shadow .18s ease;
    flex-shrink: 0;
}
.share-icon-btn svg {
    display: block;
}
.share-icon-btn:hover {
    transform: translateY(-2px) scale(1.07);
    box-shadow: 0 6px 16px rgba(0,0,0,.26);
}

/* =========================================================
   SKELETON
   ========================================================= */
.skeleton {
    background: linear-gradient(90deg, var(--color-surface-alt) 25%, var(--color-border) 50%, var(--color-surface-alt) 75%);
    background-size: 200% 100%;
    animation: skeleton-pulse 1.5s infinite;
    border-radius: var(--radius-md);
}
@keyframes skeleton-pulse {
    0%   { background-position: 200%  0; }
    100% { background-position: -200% 0; }
}

/* =========================================================
   MISC
   ========================================================= */
:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--color-surface-alt); }
::-webkit-scrollbar-thumb { background: var(--color-border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--color-text-muted); }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        transition-duration: .01ms !important;
    }
}

/* =========================================================
   NAVBAR ACTIVE STATE (dark mode)
   ========================================================= */
[data-bs-theme="dark"] .navbar {
    background-color: #0f172a !important;
    border-bottom-color: #334155 !important;
}
[data-bs-theme="dark"] .navbar-brand {
    color: #93c5fd !important;
}
[data-bs-theme="dark"] .nav-link {
    color: rgba(255,255,255,.65) !important;
}
[data-bs-theme="dark"] .nav-link:hover,
[data-bs-theme="dark"] .nav-link.active {
    color: #fff !important;
}
[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-select {
    background-color: #1e293b;
    border-color: #334155;
    color: #f1f5f9;
}
[data-bs-theme="dark"] .form-control:focus,
[data-bs-theme="dark"] .form-select:focus {
    background-color: #1e293b;
    color: #f1f5f9;
}
[data-bs-theme="dark"] .input-group-text {
    background-color: #1e293b;
    border-color: #334155;
    color: #94a3b8;
}
[data-bs-theme="dark"] .card {
    background-color: #1e293b;
    border-color: #334155;
}
[data-bs-theme="dark"] .table {
    --bs-table-bg: #1e293b;
    --bs-table-border-color: #334155;
    color: #f1f5f9;
}
[data-bs-theme="dark"] .dropdown-menu {
    background-color: #1e293b;
    border-color: #334155;
}
[data-bs-theme="dark"] .dropdown-item {
    color: #f1f5f9;
}
[data-bs-theme="dark"] .dropdown-item:hover {
    background-color: #334155;
}
[data-bs-theme="dark"] .breadcrumb-item a {
    color: #93c5fd;
}
[data-bs-theme="dark"] .text-muted {
    color: #94a3b8 !important;
}
/* dark mode admin — sudah dihandle di blok ADMIN LAYOUT di atas */
[data-bs-theme="dark"] .theme-toggle {
    background: #1e293b;
    border-color: #334155;
    color: #94a3b8;
}
[data-bs-theme="dark"] body {
    background-color: #0f172a;
    color: #f1f5f9;
}
[data-bs-theme="dark"] h1,
[data-bs-theme="dark"] h2,
[data-bs-theme="dark"] h3,
[data-bs-theme="dark"] h4,
[data-bs-theme="dark"] h5,
[data-bs-theme="dark"] h6 {
    color: #f1f5f9;
}
[data-bs-theme="dark"] .alert-secondary,
[data-bs-theme="dark"] .alert-light {
    background-color: #1e293b;
    border-color: #334155;
    color: #f1f5f9;
}

/* =========================================================
   ARTICLE CARD
   ========================================================= */
.article-card {
    transition: transform .2s, box-shadow .2s;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    background-color: var(--color-surface);
    height: 100%;
    display: flex;
    flex-direction: column;
}
.article-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}
.article-card .article-thumbnail {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    background-color: var(--color-surface-alt);
}
.article-card .article-thumbnail-placeholder {
    width: 100%;
    aspect-ratio: 16/9;
    background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,.4);
    font-size: 2.5rem;
}
.article-card .card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 1.25rem;
}
.article-card .card-title a {
    color: var(--color-text);
    text-decoration: none;
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.35;
    transition: color .15s;
}
.article-card .card-title a:hover {
    color: var(--color-primary);
}
.article-card .card-meta {
    font-size: .78rem;
    color: var(--color-text-muted);
}
.article-card .card-excerpt {
    font-size: .875rem;
    color: var(--color-text-muted);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* =========================================================
   HERO SECTION
   ========================================================= */
.hero-section {
    padding-top: 2rem;
    padding-bottom: 0;
    min-height: 85vh;
    display: flex;
    align-items: center;
}
.hero-photo {
    width: 260px;
    height: 260px;
    object-fit: cover;
    border: 5px solid rgba(255,255,255,.2);
}
.hero-photo-placeholder {
    width: 260px;
    height: 260px;
    border: 5px solid rgba(255,255,255,.2);
    background: rgba(255,255,255,.1);
}
.hero-wave svg {
    display: block;
    width: 100%;
    height: 60px;
}

@media (max-width: 991.98px) {
    .hero-section {
        min-height: auto;
        padding-top: 1.5rem;
        padding-bottom: 2.5rem;
    }
    .hero-photo,
    .hero-photo-placeholder {
        width: 190px;
        height: 190px;
    }
}

@media (max-width: 575.98px) {
    .hero-photo,
    .hero-photo-placeholder {
        width: 156px;
        height: 156px;
    }
    .hero-ring-outer {
        display: none;
    }
    .hero-wave svg {
        height: 36px;
    }
    .article-card .card-body {
        padding: 1rem;
    }
}


/* Admin stat card & tabs mobile */
.admin-stat-icon {
    width: 52px;
    height: 52px;
}
@media (max-width: 575.98px) {
    .admin-stat-icon {
        width: 40px;
        height: 40px;
    }
    .admin-stat-icon .bi {
        font-size: 1.1rem !important;
    }
    .nav-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        scrollbar-width: none;
    }
    .nav-tabs::-webkit-scrollbar { display: none; }
    .nav-tabs .nav-link { white-space: nowrap; }
}

/* Dark mode: wave SVG --*/
[data-bs-theme="dark"] .hero-section svg path {
    fill: #0f172a;
}

/* Bidang praktik card icon hover */
.card-hover .bi {
    transition: transform .2s ease;
}
.card-hover:hover .bi {
    transform: scale(1.15);
}

/* CTA section dark mode */
[data-bs-theme="dark"] .btn-accent {
    background-color: var(--color-accent);
    border-color: var(--color-accent);
    color: #0f172a;
}

/* Section alt dark mode */
[data-bs-theme="dark"] section[style*="surface-alt"] {
    background-color: #1e293b !important;
}

/* =========================================================
   ADMIN TABLE
   ========================================================= */
.table th {
    font-size: .78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--color-text-muted);
    border-bottom: 2px solid var(--color-border) !important;
    background-color: var(--color-surface-alt);
    padding: .75rem 1rem;
    white-space: nowrap;
}
.table td {
    padding: .75rem 1rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--color-border);
    color: var(--color-text);
    font-size: .875rem;
}
.table tbody tr:last-child td { border-bottom: none; }
.table-hover tbody tr:hover td { background-color: var(--color-surface-alt); }

[data-bs-theme="dark"] .table th { background-color: #1e293b; }
[data-bs-theme="dark"] .table-hover tbody tr:hover td { background-color: #334155; }

/* =========================================================
   ADMIN BREADCRUMB
   ========================================================= */
.admin-topbar .breadcrumb-item + .breadcrumb-item::before {
    color: var(--color-text-muted);
}
.admin-topbar .breadcrumb-item a {
    color: var(--color-text-muted);
    text-decoration: none;
}
.admin-topbar .breadcrumb-item a:hover { color: var(--color-primary); }
.admin-topbar .breadcrumb-item.active { color: var(--color-text); }

/* =========================================================
   ADMIN FORM
   ========================================================= */
.admin-content .form-label {
    font-size: .85rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: .35rem;
}
.admin-content .form-control,
.admin-content .form-select {
    font-size: .875rem;
}
.admin-content .form-text {
    font-size: .78rem;
    color: var(--color-text-muted);
}

/* =========================================================
   ADMIN CARD SECTION
   ========================================================= */
.admin-section-title {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 1.25rem;
    padding-bottom: .75rem;
    border-bottom: 2px solid var(--color-border);
}

/* =========================================================
   LOGO / BRAND
   ========================================================= */
.navbar-brand img {
    max-height: 40px;
    width: auto;
    object-fit: contain;
    transition: opacity .15s;
}
.navbar-brand:hover img { opacity: .85; }

/* Footer logo — putih via CSS filter */
footer .footer-logo {
    max-height: 44px;
    width: auto;
    filter: brightness(0) invert(1);
    opacity: .9;
}

/* Footer social app icons */
.footer-social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    text-decoration: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, .26);
    transition: transform .18s ease, box-shadow .18s ease, opacity .18s ease;
}
.footer-social-icon svg {
    display: block;
}
a.footer-social-icon:hover {
    transform: translateY(-2px) scale(1.04);
    box-shadow: 0 8px 18px rgba(0, 0, 0, .38);
}
.footer-social-icon--placeholder {
    cursor: default;
    opacity: .92;
}

/* Admin sidebar logo */
.admin-sidebar .sidebar-brand img {
    max-height: 36px;
    width: auto;
    filter: brightness(0) invert(1);
}

/* Auth login logo */
.auth-logo {
    max-height: 56px;
    width: auto;
}

/* =========================================================
   NAVBAR BRAND — logo + nama web
   ========================================================= */
.navbar-logo {
    height: 36px;
    width: auto;
    object-fit: contain;
    display: block;
    flex-shrink: 0;
}

.navbar-brand-text {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-primary);
    letter-spacing: -.01em;
    white-space: nowrap;
    line-height: 1;
    transition: color .15s;
}

/* Pemisah vertikal tipis antara logo dan teks */
.navbar-brand::after {
    content: '';
    display: none; /* aktifkan bila ingin garis pemisah */
}

/* Hover effect */
.navbar-brand:hover .navbar-brand-text {
    color: var(--color-accent);
}
.navbar-brand:hover .navbar-logo {
    opacity: .88;
}

/* Dark mode */
[data-bs-theme="dark"] .navbar-brand-text {
    color: #93c5fd;
}
[data-bs-theme="dark"] .navbar-brand:hover .navbar-brand-text {
    color: var(--color-accent-light, #fbbf24);
}

/* Mobile: sedikit lebih kecil */
@media (max-width: 575.98px) {
    .navbar-logo         { height: 30px; }
    .navbar-brand-text   { font-size: .95rem; }
}
