/* ==========================================================================
   NEXT LEVEL STUDY - COMPLETE ULTRA-HIGH CONTRAST DARK THEME ENGINE
   ========================================================================== */

:root {
    --theme-transition: background-color 0.25s ease, border-color 0.25s ease, color 0.2s ease, box-shadow 0.25s ease;
}

html, body {
    overflow-x: hidden;
    max-width: 100vw;
}

img, video, iframe {
    max-width: 100%;
}

body {
    transition: var(--theme-transition);
}

/* ==========================================================================
   DARK THEME BASE & DOCUMENT
   ========================================================================== */

html.dark {
    color-scheme: dark;
}

html.dark body {
    background-color: #0b132b !important;
    color: #e2e8f0 !important;
}

html.dark main {
    background-color: #0b132b !important;
}

/* ==========================================================================
   1. SECTIONS & BACKGROUND CONTAINERS
   ========================================================================== */

html.dark section,
html.dark .bg-surface,
html.dark .bg-surface-bright,
html.dark .bg-surface-cream,
html.dark .bg-surface-container-lowest,
html.dark .bg-surface-container-low,
html.dark .bg-surface-container,
html.dark .bg-surface-container-high,
html.dark .bg-surface-container-highest,
html.dark .bg-slate-50,
html.dark .bg-slate-100,
html.dark .bg-gray-50,
html.dark .bg-gray-100,
html.dark section[class*="bg-[linear-gradient"],
html.dark section[class*="bg-gradient-to"],
html.dark div[class*="bg-gradient-to-b from-[#F0F7FF]"],
html.dark div[class*="bg-gradient-to-b from-surface"] {
    background-color: #0b132b !important;
    background-image: none !important;
    border-color: #1e293b !important;
}

/* Alternating Section Background for rich depth */
html.dark section:nth-of-type(even),
html.dark #bimbel,
html.dark #testimoni,
html.dark #keunggulan,
html.dark #faq {
    background-color: #0f182e !important;
}

/* ==========================================================================
   2. CARDS & ELEVATED SURFACES
   ========================================================================== */

html.dark .tonal-card,
html.dark .elevated-card,
html.dark .card,
html.dark .glass-card,
html.dark .bg-white:not(.partner-logo-card):not(.keep-white),
html.dark .shadow-sm.bg-white,
html.dark .shadow-md.bg-white,
html.dark .shadow-lg.bg-white,
html.dark .rounded-2xl.border,
html.dark .rounded-xl.border,
html.dark .rounded-3xl.border,
html.dark [class*="p-6 rounded"],
html.dark [class*="p-8 rounded"],
html.dark .bg-emerald-50\/60,
html.dark .bg-blue-50\/50,
html.dark .bg-blue-50\/60,
html.dark .bg-amber-50\/60 {
    background-color: #131d38 !important;
    border-color: #2a3a5a !important;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.5) !important;
}

/* Glass Overlays on Top of Images */
html.dark .bg-white\/90,
html.dark .bg-white\/80,
html.dark .bg-white\/70,
html.dark .bg-white\/95 {
    background-color: rgba(19, 29, 56, 0.92) !important;
    backdrop-filter: blur(16px) !important;
    border: 1px solid rgba(51, 65, 85, 0.8) !important;
}

/* Hover effects on dark mode cards */
html.dark .tonal-card:hover,
html.dark .elevated-card:hover,
html.dark .card:hover,
html.dark .bg-white:hover {
    border-color: #0284c7 !important;
    box-shadow: 0 20px 30px -10px rgba(0, 0, 0, 0.7), 0 0 15px rgba(2, 132, 199, 0.2) !important;
}

/* ==========================================================================
   3. TYPOGRAPHY & TEXT (CRISP, SHARP & HIGH CONTRAST)
   ========================================================================== */

/* All Headings & Primary Titles -> Crisp Pure White */
html.dark h1,
html.dark h2,
html.dark h3,
html.dark h4,
html.dark h5,
html.dark h6,
html.dark .text-deep-navy,
html.dark .text-on-surface,
html.dark .text-on-background,
html.dark .text-gray-900,
html.dark .text-slate-900,
html.dark .text-slate-800 {
    color: #ffffff !important;
}

/* Subheadings & Body Text -> High Contrast Silver / Slate-200 */
html.dark p:not(.text-primary):not([class*="text-primary-"]):not([class*="text-emerald"]):not([class*="text-amber"]):not([class*="text-rose"]):not([class*="text-orange"]):not([class*="text-cyan"]),
html.dark .text-on-surface-variant,
html.dark .text-gray-600,
html.dark .text-gray-700,
html.dark .text-slate-600,
html.dark .text-slate-700 {
    color: #cbd5e1 !important;
}

/* Muted / Secondary Text */
html.dark .text-gray-500,
html.dark .text-slate-500,
html.dark .text-slate-400 {
    color: #94a3b8 !important;
}

/* Brand Primary Accents in Dark Mode -> Vibrant Sky Blue */
html.dark .text-primary,
html.dark .text-primary-container,
html.dark .text-action-blue,
html.dark a.text-primary {
    color: #38bdf8 !important;
}

html.dark a.text-primary:hover {
    color: #7dd3fc !important;
}

/* Vibrant Badges & Accents in Dark Mode */
html.dark .text-success-teal {
    color: #2dd4bf !important;
}

html.dark .text-secondary-container {
    color: #fb923c !important;
}

html.dark .text-tertiary-container {
    color: #2dd4bf !important;
}

/* Checkmark icons in features list */
html.dark .icon-\[mdi--check-circle\],
html.dark .icon-\[mdi--check\] {
    color: #2dd4bf !important;
}

/* ==========================================================================
   4. PILLS, HERO BADGES & CATEGORY TAGS (HIGH-CONTRAST FIX)
   ========================================================================== */

/* Hero Badge: Bimbel #1 Persiapan OSN & SNBT (bg-primary-fixed) */
html.dark .bg-primary-fixed,
html.dark .bg-primary-fixed-dim {
    background-color: rgba(14, 165, 233, 0.2) !important;
    border: 1px solid rgba(56, 189, 248, 0.4) !important;
    color: #38bdf8 !important;
}

html.dark .bg-primary-fixed *,
html.dark .bg-primary-fixed-dim * {
    color: #38bdf8 !important;
}

/* Category OSN Pill */
html.dark span.bg-primary,
html.dark .bg-primary:not(button):not(a):not(div.w-12):not(div.w-10):not(div.w-16) {
    background-color: #0284c7 !important;
    color: #ffffff !important;
}

html.dark .bg-primary *,
html.dark .text-on-primary {
    color: #ffffff !important;
}

/* Category SNBT Pill */
html.dark span.bg-secondary-container,
html.dark .bg-secondary-container,
html.dark .bg-secondary-fixed,
html.dark .text-on-secondary-container.bg-secondary-container {
    background-color: #ea580c !important;
    color: #ffffff !important;
}

html.dark .bg-secondary-container *,
html.dark .text-on-secondary-container {
    color: #ffffff !important;
}

/* Category TKA Pill */
html.dark span.bg-tertiary-container,
html.dark .bg-tertiary-container,
html.dark .bg-tertiary-fixed,
html.dark .text-on-tertiary-container.bg-tertiary-container {
    background-color: #0d9488 !important;
    color: #ffffff !important;
}

html.dark .bg-tertiary-container *,
html.dark .text-on-tertiary-container {
    color: #ffffff !important;
}

/* Live Badge / Community Icon Box */
html.dark .bg-primary-container {
    background-color: rgba(14, 165, 233, 0.2) !important;
    border: 1px solid rgba(56, 189, 248, 0.4) !important;
    color: #38bdf8 !important;
}

html.dark .bg-primary-container *,
html.dark .text-on-primary-container {
    color: #38bdf8 !important;
}

/* Emerald Pill / Badges */
html.dark .bg-emerald-50,
html.dark .bg-emerald-100 {
    background-color: rgba(6, 78, 59, 0.4) !important;
    border: 1px solid rgba(5, 150, 105, 0.6) !important;
    color: #6ee7b7 !important;
}
html.dark .bg-emerald-50 *,
html.dark .bg-emerald-100 * {
    color: #6ee7b7 !important;
}

/* Rose Pill / Badges */
html.dark .bg-rose-50,
html.dark .bg-rose-100 {
    background-color: rgba(136, 19, 55, 0.4) !important;
    border: 1px solid rgba(225, 29, 72, 0.6) !important;
    color: #fda4af !important;
}
html.dark .bg-rose-50 *,
html.dark .bg-rose-100 * {
    color: #fda4af !important;
}

/* Blue & Sky Pill / Badges */
html.dark .bg-blue-50,
html.dark .bg-blue-100,
html.dark .bg-sky-50,
html.dark .bg-sky-100 {
    background-color: rgba(30, 58, 138, 0.4) !important;
    border: 1px solid rgba(37, 99, 235, 0.6) !important;
    color: #93c5fd !important;
}
html.dark .bg-blue-50 *,
html.dark .bg-blue-100 * {
    color: #93c5fd !important;
}

/* Amber & Yellow Pill / Badges */
html.dark .bg-amber-50,
html.dark .bg-amber-100,
html.dark .bg-yellow-50 {
    background-color: rgba(120, 53, 15, 0.4) !important;
    border: 1px solid rgba(217, 119, 6, 0.6) !important;
    color: #fde047 !important;
}
html.dark .bg-amber-50 *,
html.dark .bg-amber-100 * {
    color: #fde047 !important;
}

/* Purple Pill / Badges */
html.dark .bg-purple-50,
html.dark .bg-purple-100 {
    background-color: rgba(88, 28, 135, 0.4) !important;
    border: 1px solid rgba(147, 51, 234, 0.6) !important;
    color: #d8b4fe !important;
}
html.dark .bg-purple-50 *,
html.dark .bg-purple-100 * {
    color: #d8b4fe !important;
}

/* ==========================================================================
   5. NAVIGATION & DROPDOWNS
   ========================================================================== */

html.dark nav,
html.dark header,
html.dark .fixed.top-0,
html.dark .sticky.top-0 {
    background-color: rgba(11, 19, 43, 0.96) !important;
    border-color: rgba(51, 65, 85, 0.8) !important;
}

/* Desktop Dropdown Mega-Menu */
html.dark .absolute.bg-white,
html.dark [x-show="activeDesktopMenu"] {
    background-color: #131d38 !important;
    border-color: #334155 !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8) !important;
}

html.dark [x-show="activeDesktopMenu"] a:hover {
    background-color: rgba(30, 41, 59, 0.8) !important;
}

/* Mobile Drawer */
html.dark [x-show="isMobileMenuOpen"] {
    background-color: #0d162f !important;
    border-color: #334155 !important;
}

html.dark [x-show="isMobileMenuOpen"] .border-b,
html.dark [x-show="isMobileMenuOpen"] .border-gray-100 {
    border-color: #1e293b !important;
}

/* ==========================================================================
   6. FOOTER IN DARK MODE (COMPLETELY CLEAN & CRISP)
   ========================================================================== */

html.dark footer,
html.dark footer.bg-\[\#D8E6FF\],
html.dark footer#kontak,
html.dark .bg-\[\#D8E6FF\] {
    background-color: #070e1f !important;
    background-image: none !important;
    border-top: 1px solid #1e293b !important;
    color: #cbd5e1 !important;
}

html.dark footer h2,
html.dark footer h3,
html.dark footer .text-\[\#0B5A8A\] {
    color: #38bdf8 !important;
}

html.dark footer p,
html.dark footer span,
html.dark footer li,
html.dark footer div {
    color: #cbd5e1 !important;
}

html.dark footer a {
    color: #cbd5e1 !important;
    transition: color 0.15s ease;
}

html.dark footer a:hover {
    color: #38bdf8 !important;
}

html.dark footer .icon-\[mdi--map-marker\],
html.dark footer .icon-\[mdi--phone\],
html.dark footer .icon-\[mdi--email\],
html.dark footer .icon-\[mdi--camera\] {
    color: #38bdf8 !important;
}

html.dark footer button.bg-\[\#0B5A8A\],
html.dark footer a.bg-\[\#0B5A8A\] {
    background-color: #0284c7 !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.3) !important;
}

html.dark footer button.bg-\[\#0B5A8A\]:hover,
html.dark footer a.bg-\[\#0B5A8A\]:hover {
    background-color: #0369a1 !important;
}

html.dark footer .border-\[\#B9D5FA\] {
    border-color: #1e293b !important;
}

html.dark footer .text-slate-600,
html.dark footer .text-slate-700 {
    color: #94a3b8 !important;
}

/* ==========================================================================
   7. BORDERS & DIVIDERS
   ========================================================================== */

html.dark .border-outline-variant,
html.dark .border-gray-100,
html.dark .border-slate-100,
html.dark .border-slate-200,
html.dark .border-slate-200\/80,
html.dark .border-slate-200\/70,
html.dark .border-slate-200\/60,
html.dark .border-surface-container,
html.dark .border-y {
    border-color: rgba(51, 65, 85, 0.7) !important;
}

/* ==========================================================================
   8. PARTNER LOGOS (ENSURE 100% VISIBILITY)
   ========================================================================== */

html.dark .group:has(img[src*="/images/mitra/"]),
html.dark div:has(> img[src*="/images/mitra/"]),
html.dark [class*="grid"]:has(img[src*="/images/mitra/"]) > div {
    background-color: #ffffff !important;
    border-color: #475569 !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4) !important;
}

html.dark div:has(> img[src*="/images/mitra/"]) span,
html.dark .group:has(img[src*="/images/mitra/"]) span {
    color: #0f172a !important;
}

/* ==========================================================================
   9. ACCORDIONS, FAQS & FORMS
   ========================================================================== */

html.dark details,
html.dark .faq-card,
html.dark [x-data*="open"],
html.dark [x-data*="faq"] {
    background-color: #131d38 !important;
    border-color: #334155 !important;
}

html.dark input:not([type="submit"]):not([type="button"]),
html.dark select,
html.dark textarea {
    background-color: #1a2542 !important;
    color: #ffffff !important;
    border-color: #334155 !important;
}

html.dark input::placeholder,
html.dark textarea::placeholder {
    color: #94a3b8 !important;
}

/* ==========================================================================
   10. THEME TOGGLE BUTTON
   ========================================================================== */

.theme-toggle-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
    border: 1.5px solid #e2e8f0;
    background: #ffffff;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.theme-toggle-btn:hover {
    border-color: #006493;
    color: #006493;
    transform: scale(1.05);
    background: #f8fafc;
}

html.dark .theme-toggle-btn {
    border-color: #334155;
    background: #1e293b;
    color: #f59e0b;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

html.dark .theme-toggle-btn:hover {
    border-color: #f59e0b;
    color: #fbbf24;
    background: #273549;
    transform: scale(1.05);
}

/* Mentor Testimonial Floating Card on /privat */
.mentor-testimonial-card {
    position: absolute;
    bottom: -1.5rem;
    right: -1rem;
    max-width: 360px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1.5px solid rgba(226, 232, 240, 0.9);
    border-radius: 1.5rem;
    padding: 1.25rem 1.5rem;
    box-shadow: 0 20px 40px -15px rgba(0, 46, 71, 0.2), 0 0 1px rgba(0,0,0,0.1);
    z-index: 20;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: block !important;
}
@media (max-width: 767px) {
    .mentor-testimonial-card {
        position: relative;
        bottom: auto;
        right: auto;
        max-width: 100%;
        margin-top: 1rem;
    }
}
html.dark .mentor-testimonial-card {
    background: rgba(19, 29, 56, 0.95);
    border-color: rgba(51, 65, 85, 0.9);
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.7);
}


/* Curved borders for Pricing Cards */
.pricing-card-curved {
    border-radius: 36px !important;
}

/* Compact Partner Logo Grid & Items */
.partner-logo-grid {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
    justify-content: center !important;
    align-items: center !important;
    max-width: 900px !important;
    margin: 0 auto !important;
    width: 100% !important;
}

.partner-logo-item {
    width: 72px !important;
    height: 48px !important;
    padding: 4px 8px !important;
    background: #ffffff !important;
    border: 1.5px solid #e2e8f0 !important;
    border-radius: 12px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
    transition: all 0.2s ease !important;
    overflow: hidden !important;
    flex-shrink: 0 !important;
}

.partner-logo-item:hover {
    transform: translateY(-2px) scale(1.05) !important;
    border-color: #0284c7 !important;
    box-shadow: 0 6px 16px rgba(2, 132, 199, 0.18) !important;
}

.partner-logo-item img {
    max-width: 56px !important;
    max-height: 32px !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    display: block !important;
}


/* =========================================================================
   FULL-COLOR VIBRANT THEMED EVENT CARDS (SYNCED WITH NLS ADMIN)
   ========================================================================= */
.admin-card-osn {
    background: linear-gradient(145deg, #e0f2fe 0%, #bae6fd 100%) !important;
    border: 2.5px solid #38bdf8 !important;
    box-shadow: 0 10px 25px -5px rgba(2, 132, 199, 0.25) !important;
}
html.dark .admin-card-osn {
    background: linear-gradient(145deg, #0c2d48 0%, #0f3d63 100%) !important;
    border: 2.5px solid #0284c7 !important;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5) !important;
}

.admin-card-tka {
    background: linear-gradient(145deg, #fef3c7 0%, #fde68a 100%) !important;
    border: 2.5px solid #f59e0b !important;
    box-shadow: 0 10px 25px -5px rgba(217, 119, 6, 0.25) !important;
}
html.dark .admin-card-tka {
    background: linear-gradient(145deg, #452404 0%, #5e3206 100%) !important;
    border: 2.5px solid #d97706 !important;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5) !important;
}

.admin-card-snbt {
    background: linear-gradient(145deg, #dcfce7 0%, #bbf7d0 100%) !important;
    border: 2.5px solid #10b981 !important;
    box-shadow: 0 10px 25px -5px rgba(5, 150, 105, 0.25) !important;
}
html.dark .admin-card-snbt {
    background: linear-gradient(145deg, #063d27 0%, #095738 100%) !important;
    border: 2.5px solid #059669 !important;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5) !important;
}

.admin-card-mitra {
    background: linear-gradient(145deg, #f3e8ff 0%, #e9d5ff 100%) !important;
    border: 2.5px solid #a855f7 !important;
    box-shadow: 0 10px 25px -5px rgba(124, 58, 237, 0.25) !important;
}
html.dark .admin-card-mitra {
    background: linear-gradient(145deg, #320d53 0%, #461573 100%) !important;
    border: 2.5px solid #7c3aed !important;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5) !important;
}

.admin-card-dinas {
    background: linear-gradient(145deg, #ffe4e6 0%, #fecdd3 100%) !important;
    border: 2.5px solid #f43f5e !important;
    box-shadow: 0 10px 25px -5px rgba(225, 29, 72, 0.25) !important;
}
html.dark .admin-card-dinas {
    background: linear-gradient(145deg, #4d0a1b 0%, #680f25 100%) !important;
    border: 2.5px solid #e11d48 !important;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5) !important;
}

/* =========================================================================
   9. CALENDAR HEADER 3D ICON, HIGH-CONTRAST CARDS & VIBRANT TAB THEMES
   ========================================================================= */

/* Hero Floating Badge ("Muhammad Rafi Qsan") - Modern Prestige Glass Card */
.hero-floating-badge {
    position: absolute !important;
    bottom: 16px !important;
    left: 16px !important;
    right: 16px !important;
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border: 1.5px solid rgba(255, 255, 255, 0.9) !important;
    border-radius: 1.15rem !important;
    box-shadow: 0 20px 40px -10px rgba(15, 23, 42, 0.28), 0 4px 12px -2px rgba(15, 23, 42, 0.08) !important;
    z-index: 30 !important;
    visibility: visible !important;
    opacity: 1 !important;
    display: flex !important;
    align-items: center !important;
    gap: 0.75rem !important;
    padding: 0.65rem 0.95rem !important;
    box-sizing: border-box !important;
    transition: transform 0.25s ease, box-shadow 0.25s ease !important;
}
@media (max-width: 640px) {
    .hero-floating-badge {
        bottom: 12px !important;
        left: 12px !important;
        right: 12px !important;
        padding: 8px 10px !important;
        gap: 10px !important;
        border-radius: 1rem !important;
    }
}
html.dark .hero-floating-badge {
    background: rgba(15, 23, 42, 0.96) !important;
    border: 1.5px solid rgba(51, 65, 85, 0.85) !important;
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.65), 0 4px 12px -2px rgba(0, 0, 0, 0.3) !important;
}
.hero-badge-icon {
    width: 42px !important;
    height: 42px !important;
    border-radius: 12px !important;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%) !important;
    border: 1.5px solid #cbd5e1 !important;
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.08) !important;
    font-size: 22px !important;
    line-height: 1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
}
@media (max-width: 640px) {
    .hero-badge-icon {
        width: 36px !important;
        height: 36px !important;
        border-radius: 10px !important;
        font-size: 19px !important;
    }
}
html.dark .hero-badge-icon {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%) !important;
    border-color: #334155 !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3) !important;
}
.hero-badge-title {
    color: #0f172a !important;
    font-weight: 900 !important;
    font-size: 0.95rem !important;
    line-height: 1.2 !important;
    letter-spacing: -0.02em !important;
    white-space: nowrap !important;
    margin: 0 !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}
@media (max-width: 640px) {
    .hero-badge-title {
        font-size: 0.8rem !important;
        letter-spacing: -0.025em !important;
    }
}
html.dark .hero-badge-title {
    color: #ffffff !important;
}
.hero-badge-sub {
    color: #475569 !important;
    font-weight: 700 !important;
    font-size: 0.76rem !important;
    line-height: 1.2 !important;
    letter-spacing: -0.01em !important;
    white-space: nowrap !important;
    margin: 0.15rem 0 0 0 !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}
@media (max-width: 640px) {
    .hero-badge-sub {
        font-size: 0.7rem !important;
        margin-top: 0.1rem !important;
    }
}
html.dark .hero-badge-sub {
    color: #cbd5e1 !important;
}
.hero-badge-pill-dot {
    width: 6px !important;
    height: 6px !important;
    border-radius: 9999px !important;
    background-color: #10b981 !important;
    display: inline-block !important;
    box-shadow: 0 0 6px rgba(16, 185, 129, 0.7) !important;
    flex-shrink: 0 !important;
}
.hero-pill-desktop {
    display: inline !important;
}
.hero-pill-mobile {
    display: none !important;
}
@media (max-width: 640px) {
    .hero-pill-desktop {
        display: none !important;
    }
    .hero-pill-mobile {
        display: inline !important;
    }
}
.hero-sub-desktop {
    display: inline !important;
}
.hero-sub-mobile {
    display: none !important;
}
@media (max-width: 640px) {
    .hero-sub-desktop {
        display: none !important;
    }
    .hero-sub-mobile {
        display: inline !important;
    }
}
.hero-badge-pill {
    background: rgba(2, 132, 199, 0.1) !important;
    border: 1px solid rgba(2, 132, 199, 0.28) !important;
    color: #0284c7 !important;
    font-weight: 800 !important;
}
html.dark .hero-badge-pill {
    background: rgba(56, 189, 248, 0.15) !important;
    border-color: rgba(56, 189, 248, 0.35) !important;
    color: #38bdf8 !important;
}
@media (max-width: 640px) {
    .hero-badge-pill {
        padding: 2px 7px !important;
        font-size: 9.5px !important;
        gap: 4px !important;
    }
}

/* Calendar Header Card ("Kalender Kegiatan & Event Mendatang") */
.cal-header-card {
    background-color: #ffffff !important;
    border: 1.5px solid #e2e8f0 !important;
    box-shadow: 0 10px 25px -5px rgba(2, 132, 199, 0.08) !important;
}
html.dark .cal-header-card {
    background-color: #131d38 !important;
    border-color: #273549 !important;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5) !important;
}
.cal-header-title {
    color: #0f172a !important;
    font-weight: 900 !important;
}
html.dark .cal-header-title {
    color: #ffffff !important;
}
.cal-header-subtitle {
    color: #475569 !important;
    font-weight: 500 !important;
}
html.dark .cal-header-subtitle {
    color: #94a3b8 !important;
}

/* Article & Blog Header Card ("Daftar Artikel & Berita Edukasi") */
.article-header-card {
    background-color: #ffffff !important;
    border: 1.5px solid #e2e8f0 !important;
    box-shadow: 0 10px 25px -5px rgba(0, 46, 71, 0.08) !important;
}
html.dark .article-header-card {
    background-color: #131d38 !important;
    border-color: #273549 !important;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5) !important;
}
.article-header-title {
    color: #0f172a !important;
    font-weight: 900 !important;
}
html.dark .article-header-title {
    color: #ffffff !important;
}
.article-header-subtitle {
    color: #475569 !important;
    font-weight: 600 !important;
}
html.dark .article-header-subtitle {
    color: #94a3b8 !important;
}

/* 3D Calendar Header Icon Box */
.cal-header-icon-box {
    width: 3.25rem;
    height: 3.25rem;
    border-radius: 1.15rem;
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 25px -5px rgba(2, 132, 199, 0.3);
    border: 2px solid #bae6fd;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%) !important;
}
@media (min-width: 640px) {
    .cal-header-icon-box {
        width: 3.85rem;
        height: 3.85rem;
        border-radius: 1.25rem;
    }
}
html.dark .cal-header-icon-box {
    background: linear-gradient(135deg, #0c2d48 0%, #1e293b 100%) !important;
    border-color: #0284c7 !important;
}
.cal-header-icon-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
    display: block;
}
.cal-header-icon-box:hover .cal-header-icon-img {
    transform: scale(1.08);
}

/* Category Tab Navigation Container - Fully Responsive & Scroll-Proof on Mobile */
.tab-cat-nav-wrap {
    display: flex !important;
    align-items: center !important;
    padding: 0.25rem !important;
    border-radius: 1.15rem !important;
    background: rgba(241, 245, 249, 0.95) !important;
    border: 1px solid #cbd5e1 !important;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05) !important;
    gap: 0.25rem !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    scrollbar-width: none !important;
    -webkit-overflow-scrolling: touch !important;
    box-sizing: border-box !important;
}
@media (min-width: 640px) {
    .tab-cat-nav-wrap {
        width: auto !important;
        padding: 0.375rem !important;
        gap: 0.375rem !important;
        border-radius: 1.25rem !important;
    }
}
html.dark .tab-cat-nav-wrap {
    background: rgba(30, 41, 59, 0.95) !important;
    border-color: #334155 !important;
}
.tab-cat-nav-wrap::-webkit-scrollbar {
    display: none !important;
}

/* Category Tab Buttons - Mobile Fits All 4 (Semua, OSN, SNBT, TKA) Side-by-Side */
.tab-cat-btn {
    flex: 1 1 0% !important;
    min-width: 0 !important;
    padding: 0.45rem 0.45rem !important;
    border-radius: 0.75rem !important;
    font-size: 0.76rem !important;
    font-weight: 800 !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    cursor: pointer !important;
    text-align: center !important;
    border: 1.5px solid transparent !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.25rem !important;
    white-space: nowrap !important;
    user-select: none !important;
    box-sizing: border-box !important;
}
@media (min-width: 380px) {
    .tab-cat-btn {
        padding: 0.45rem 0.6rem !important;
        font-size: 0.78rem !important;
        gap: 0.3rem !important;
    }
}
@media (min-width: 640px) {
    .tab-cat-btn {
        flex: 0 0 auto !important;
        padding: 0.6rem 1.35rem !important;
        font-size: 0.875rem !important;
        gap: 0.45rem !important;
    }
}
.tab-cat-btn.inactive {
    color: #475569 !important;
    background: transparent !important;
}
html.dark .tab-cat-btn.inactive {
    color: #94a3b8 !important;
}
.tab-cat-btn.inactive:hover {
    color: #0f172a !important;
    background: rgba(255, 255, 255, 0.7) !important;
}
html.dark .tab-cat-btn.inactive:hover {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.1) !important;
}

/* Active Semua: NLS Signature Deep Navy */
.tab-cat-btn.active-all {
    background: linear-gradient(135deg, #002E47 0%, #08436b 100%) !important;
    color: #ffffff !important;
    border-color: #002E47 !important;
    box-shadow: 0 4px 14px rgba(0, 46, 71, 0.35) !important;
    font-weight: 800 !important;
}

/* Active OSN: Vibrant Royal Blue Theme */
.tab-cat-btn.active-osn {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%) !important;
    color: #ffffff !important;
    border-color: #38bdf8 !important;
    box-shadow: 0 6px 18px rgba(2, 132, 199, 0.45) !important;
    font-weight: 800 !important;
}
.tab-cat-btn.active-osn span {
    color: #ffffff !important;
}

/* Active SNBT: Emerald Green */
.tab-cat-btn.active-snbt {
    background: linear-gradient(135deg, #059669 0%, #047857 100%) !important;
    color: #ffffff !important;
    border-color: #34d399 !important;
    box-shadow: 0 6px 18px rgba(5, 150, 105, 0.4) !important;
    font-weight: 800 !important;
}
.tab-cat-btn.active-snbt span {
    color: #ffffff !important;
}

/* Active TKA: Warm Amber Gold */
.tab-cat-btn.active-tka {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%) !important;
    color: #ffffff !important;
    border-color: #fbbf24 !important;
    box-shadow: 0 6px 18px rgba(217, 119, 6, 0.4) !important;
    font-weight: 800 !important;
}
.tab-cat-btn.active-tka span {
    color: #ffffff !important;
}

/* Category Badges */
.badge-cat-osn {
    background: #e0f2fe !important;
    color: #0369a1 !important;
    border: 1.5px solid #7dd3fc !important;
    box-shadow: 0 2px 8px rgba(2, 132, 199, 0.2) !important;
}
html.dark .badge-cat-osn {
    background: #0c2d48 !important;
    color: #7dd3fc !important;
    border: 1.5px solid #0284c7 !important;
}

.badge-cat-all {
    background: #f0f9ff !important;
    color: #002E47 !important;
    border: 1.5px solid #bae6fd !important;
}
html.dark .badge-cat-all {
    background: #0f172a !important;
    color: #93c5fd !important;
    border: 1.5px solid #1e3a8a !important;
}

.badge-cat-snbt {
    background: #dcfce7 !important;
    color: #065f46 !important;
    border: 1.5px solid #86efac !important;
}
html.dark .badge-cat-snbt {
    background: #064e3b !important;
    color: #6ee7b7 !important;
    border: 1.5px solid #059669 !important;
}

.badge-cat-tka {
    background: #fef3c7 !important;
    color: #92400e !important;
    border: 1.5px solid #fde68a !important;
}
html.dark .badge-cat-tka {
    background: #451a03 !important;
    color: #fcd34d !important;
    border: 1.5px solid #b45309 !important;
}

/* ==========================================================================
   BULLETPROOF HIGH-CONTRAST ENGINE: GUARANTEE TEXT NEVER MATCHES BACKGROUND
   Universal across all pages, viewports (HP, Tablet, Laptop) and theme modes
   ========================================================================== */

/* 1. News & Article Cards Across All Pages (index, blog, osn, snbt, tka, nexgen) */
article,
.article-card,
[class*="card-accent"] {
    background-color: #ffffff !important;
    border: 1.5px solid #e2e8f0 !important;
    border-radius: 1.5rem !important;
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    overflow: hidden !important;
}

/* Enforce identical 195px banner image container */
.article-card-image-wrap {
    position: relative !important;
    width: 100% !important;
    height: 195px !important;
    min-height: 195px !important;
    max-height: 195px !important;
    overflow: hidden !important;
    display: block !important;
    background-color: #f1f5f9 !important;
    cursor: pointer !important;
}
html.dark .article-card-image-wrap {
    background-color: #0b132b !important;
}
.article-card-image-wrap img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
    display: block !important;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1) !important;
}
.article-card:hover .article-card-image-wrap img {
    transform: scale(1.06) !important;
}

/* Flex card body */
.article-card-body {
    padding: 1.25rem !important;
    display: flex !important;
    flex-direction: column !important;
    flex: 1 1 0% !important;
    justify-content: space-between !important;
}

/* News Title - 100% Dark & Legible on Mobile, Tablet & Desktop */
article h2,
article h3,
article h4,
.article-card h2,
.article-card h3,
.article-card h4,
.article-card-title,
.article-title {
    color: #0f172a !important; /* Deep dark navy / slate-900 */
    font-weight: 800 !important;
}

.article-card-title {
    font-size: 0.95rem !important;
    line-height: 1.35 !important;
    font-weight: 900 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    min-height: 2.6rem !important;
    margin: 0 !important;
}

article h2:hover,
article h3:hover,
.article-card h2:hover,
.article-card-title:hover {
    color: #0284c7 !important;
}

/* News Excerpt & Description */
article p,
.article-card p,
.article-card-excerpt {
    color: #334155 !important; /* Slate 700 */
}

.article-card-excerpt {
    font-size: 0.78rem !important;
    line-height: 1.45 !important;
    font-weight: 500 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    min-height: 2.3rem !important;
    margin: 0 !important;
}

/* Card Footer */
.article-card-footer {
    margin-top: auto !important;
    padding-top: 0.75rem !important;
    border-top: 1px solid #f1f5f9 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
}
html.dark .article-card-footer {
    border-top-color: #1e293b !important;
}

/* News Metadata (Author, Date, Category) */
article .text-slate-700,
article .text-slate-600,
article .text-slate-500,
article .text-slate-400 {
    color: #475569 !important;
}

article span.text-slate-400 {
    color: #64748b !important;
}

/* Category Filter Dropdown & Controls */
.article-cat-btn,
.article-cat-dropdown-text {
    color: #0f172a !important;
    font-weight: 800 !important;
}

/* Article Reader Modal & Empty State */
.article-modal-card {
    background-color: #ffffff !important;
    border-color: #e2e8f0 !important;
}

.article-modal-title {
    color: #0f172a !important;
    font-weight: 900 !important;
}

/* In explicit Dark Mode (html.dark) */
html.dark article,
html.dark .article-card,
html.dark [class*="card-accent"] {
    background-color: #131d38 !important;
    border-color: #273549 !important;
}

html.dark article h2,
html.dark article h3,
html.dark article h4,
html.dark .article-card h2,
html.dark .article-card h3,
html.dark .article-card h4,
html.dark .article-card-title,
html.dark .article-title {
    color: #f8fafc !important; /* Crisp pure white on dark #131d38 card */
}

html.dark article h2:hover,
html.dark article h3:hover,
html.dark .article-card-title:hover {
    color: #38bdf8 !important;
}

html.dark article p,
html.dark .article-card p,
html.dark .article-card-excerpt {
    color: #cbd5e1 !important;
}

html.dark article .text-slate-700,
html.dark article .text-slate-600 {
    color: #94a3b8 !important;
}

html.dark .article-cat-dropdown-text {
    color: #f8fafc !important;
}

html.dark .article-modal-card {
    background-color: #131d38 !important;
    border-color: #273549 !important;
}

html.dark .article-modal-title {
    color: #f8fafc !important;
}

/* 2. CRITICAL: Neutralize Tailwind v4 media-query dark leak on mobile phones */
@media (prefers-color-scheme: dark) {
    html:not(.dark) .dark\:text-white,
    html:not(.dark) [class*="dark:text-white"] {
        color: #0f172a !important;
    }
    html:not(.dark) .dark\:text-slate-100,
    html:not(.dark) .dark\:text-slate-200,
    html:not(.dark) .dark\:text-slate-300 {
        color: #334155 !important;
    }
    html:not(.dark) .dark\:text-slate-400,
    html:not(.dark) .dark\:text-slate-500 {
        color: #64748b !important;
    }
    html:not(.dark) article h2,
    html:not(.dark) article h3,
    html:not(.dark) article h4,
    html:not(.dark) .article-card-title {
        color: #0f172a !important;
    }
    html:not(.dark) article p,
    html:not(.dark) .article-card-excerpt {
        color: #334155 !important;
    }
}

/* 3. Universal Contrast Safeguard: Elements on white/light surfaces MUST NEVER have white text */
html:not(.dark) .bg-white h1,
html:not(.dark) .bg-white h2,
html:not(.dark) .bg-white h3,
html:not(.dark) .bg-white h4,
html:not(.dark) .bg-white h5,
html:not(.dark) .bg-white h6,
html:not(.dark) .bg-slate-50 h1,
html:not(.dark) .bg-slate-50 h2,
html:not(.dark) .bg-slate-50 h3,
html:not(.dark) .bg-slate-50 h4,
html:not(.dark) .bg-slate-50 h5,
html:not(.dark) .bg-slate-50 h6,
html:not(.dark) [class*="bg-white"] h1,
html:not(.dark) [class*="bg-white"] h2,
html:not(.dark) [class*="bg-white"] h3 {
    color: #0f172a !important;
}

html:not(.dark) .bg-white p,
html:not(.dark) .bg-slate-50 p,
html:not(.dark) [class*="bg-white"] p {
    color: #334155 !important;
}

/* 4. Dark Card & Dark Container Exemption: Ensure elements on dark surfaces retain crisp, readable light text */
html:not(.dark) .card-dark-vip,
html:not(.dark) .card-dark-result,
html:not(.dark) [class*="bg-[#091E3A]"]:not([class*="dark:bg-[#091E3A]"]),
html:not(.dark) [class*="bg-[#0B132B]"]:not([class*="dark:bg-[#0B132B]"]),
html:not(.dark) [class*="bg-slate-900"]:not([class*="dark:bg-slate-900"]),
html:not(.dark) [class*="bg-slate-950"]:not([class*="dark:bg-slate-950"]) {
    color: #f8fafc !important;
}

html:not(.dark) .card-dark-vip h1,
html:not(.dark) .card-dark-vip h2,
html:not(.dark) .card-dark-vip h3,
html:not(.dark) .card-dark-vip h4,
html:not(.dark) .card-dark-vip h5,
html:not(.dark) .card-dark-vip h6,
html:not(.dark) .card-dark-result h1,
html:not(.dark) .card-dark-result h2,
html:not(.dark) .card-dark-result h3,
html:not(.dark) .card-dark-result h4,
html:not(.dark) .card-dark-result h5,
html:not(.dark) .card-dark-result h6,
html:not(.dark) [class*="bg-[#091E3A]"]:not([class*="dark:bg-[#091E3A]"]) h1,
html:not(.dark) [class*="bg-[#091E3A]"]:not([class*="dark:bg-[#091E3A]"]) h2,
html:not(.dark) [class*="bg-[#091E3A]"]:not([class*="dark:bg-[#091E3A]"]) h3,
html:not(.dark) [class*="bg-[#091E3A]"]:not([class*="dark:bg-[#091E3A]"]) h4,
html:not(.dark) [class*="bg-[#091E3A]"]:not([class*="dark:bg-[#091E3A]"]) h5,
html:not(.dark) [class*="bg-[#091E3A]"]:not([class*="dark:bg-[#091E3A]"]) h6,
html:not(.dark) [class*="bg-[#0B132B]"]:not([class*="dark:bg-[#0B132B]"]) h1,
html:not(.dark) [class*="bg-[#0B132B]"]:not([class*="dark:bg-[#0B132B]"]) h2,
html:not(.dark) [class*="bg-[#0B132B]"]:not([class*="dark:bg-[#0B132B]"]) h3,
html:not(.dark) [class*="bg-[#0B132B]"]:not([class*="dark:bg-[#0B132B]"]) h4,
html:not(.dark) [class*="bg-[#0B132B]"]:not([class*="dark:bg-[#0B132B]"]) h5,
html:not(.dark) [class*="bg-[#0B132B]"]:not([class*="dark:bg-[#0B132B]"]) h6 {
    color: #ffffff !important;
}

html:not(.dark) .card-dark-vip p,
html:not(.dark) .card-dark-result p,
html:not(.dark) [class*="bg-[#091E3A]"]:not([class*="dark:bg-[#091E3A]"]) p,
html:not(.dark) [class*="bg-[#0B132B]"]:not([class*="dark:bg-[#0B132B]"]) p {
    color: #e2e8f0 !important;
}

html:not(.dark) .card-dark-vip li,
html:not(.dark) .card-dark-result li,
html:not(.dark) [class*="bg-[#091E3A]"]:not([class*="dark:bg-[#091E3A]"]) li,
html:not(.dark) [class*="bg-[#0B132B]"]:not([class*="dark:bg-[#0B132B]"]) li {
    color: #f8fafc !important;
}

html:not(.dark) .card-dark-vip strong,
html:not(.dark) .card-dark-result strong,
html:not(.dark) [class*="bg-[#091E3A]"]:not([class*="dark:bg-[#091E3A]"]) strong,
html:not(.dark) [class*="bg-[#0B132B]"]:not([class*="dark:bg-[#0B132B]"]) strong {
    color: #ffffff !important;
}