/* ============================================
   GMAHK - Gereja Masehi Advent Hari Ketujuh
   Custom Stylesheet - Bootstrap 5 Theme
   ============================================ */

/* ---- CSS Variables ---- */
:root {
    --primary: #2f557f;
    --primary-dark: #1b3a5c;
    --primary-light: #4a7ab5;
    --secondary: #5a6f7d;
    --accent: #d4a843;
    --accent-dark: #b8922e;
    --dark: #0f1923;
    --light-bg: #f8f9fb;
    --body-bg: #ffffff;
    --body-color: #333;
    --muted-color: #6c757d;
    --card-bg: #ffffff;
    --border-color: rgba(0,0,0,0.08);
    --font-sans: 'Noto Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-serif: 'Noto Serif', Georgia, 'Times New Roman', serif;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.05), 0 10px 15px rgba(0,0,0,0.08);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.08), 0 20px 48px rgba(0,0,0,0.06);
    --radius: 16px;
    --radius-sm: 10px;
    --radius-lg: 24px;
    --font-size-base: 1rem;
}

/* ---- Dark Mode ---- */
[data-theme="dark"] {
    --body-bg: #0f1923;
    --body-color: #e4e6eb;
    --muted-color: #a8b2bd;
    --card-bg: #1a2332;
    --light-bg: #141d27;
    --border-color: rgba(255,255,255,0.08);
}
[data-theme="dark"] body { background-color: var(--body-bg); color: var(--body-color); }
[data-theme="dark"] .bg-white { background-color: var(--card-bg) !important; }
[data-theme="dark"] .bg-light { background-color: var(--light-bg) !important; }
[data-theme="dark"] .text-muted { color: var(--muted-color) !important; }
[data-theme="dark"] .text-dark { color: var(--body-color) !important; }
[data-theme="dark"] .card { background-color: var(--card-bg); color: var(--body-color); }
[data-theme="dark"] .card-img-top.bg-primary.bg-opacity-10,
[data-theme="dark"] .card-img-top.bg-warning.bg-opacity-10,
[data-theme="dark"] .card-img-top.bg-success.bg-opacity-10,
[data-theme="dark"] .card-img-top.bg-info.bg-opacity-10,
[data-theme="dark"] .card-img-top.bg-danger.bg-opacity-10,
[data-theme="dark"] .card-img-top.bg-secondary.bg-opacity-10 { filter: brightness(0.7); }
[data-theme="dark"] .form-control,
[data-theme="dark"] .form-select {
    background-color: #222d3d;
    color: var(--body-color);
    border-color: rgba(255,255,255,0.1);
}
[data-theme="dark"] .form-control::placeholder { color: #6c7a89; }
[data-theme="dark"] .table { color: var(--body-color); }
[data-theme="dark"] .table-light {
    background-color: #1a2332 !important;
    color: var(--body-color);
}
[data-theme="dark"] hr { border-color: rgba(255,255,255,0.1); }
[data-theme="dark"] .breadcrumb a { color: rgba(255,255,255,0.7); }
[data-theme="dark"] .modal-content { background-color: var(--card-bg); color: var(--body-color); }
[data-theme="dark"] .dropdown-menu { background-color: var(--card-bg); }
[data-theme="dark"] .dropdown-item { color: var(--body-color); }
[data-theme="dark"] .dropdown-item:hover { background-color: rgba(255,255,255,0.06); }

/* ---- High Contrast Mode ---- */
[data-contrast="high"] {
    --primary: #0050b3;
    --primary-dark: #002766;
    --accent: #faad14;
    --body-color: #000;
    --muted-color: #000;
    --border-color: #000;
}
[data-contrast="high"][data-theme="dark"] {
    --body-bg: #000;
    --body-color: #fff700;
    --muted-color: #fff700;
    --card-bg: #000;
    --light-bg: #000;
    --primary: #fff700;
    --accent: #fff700;
}
[data-contrast="high"] * {
    text-shadow: none !important;
}
[data-contrast="high"] a { text-decoration: underline; }
[data-contrast="high"] .btn { border-width: 2px !important; font-weight: 600; }

/* ---- Global Styles ---- */
html {
    overflow-y: scroll;
    overflow-x: hidden;
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
    font-size: var(--font-size-base);
}
body {
    font-family: var(--font-sans);
    color: var(--body-color);
    background-color: var(--body-bg);
    overflow-x: hidden;
    margin: 0;
    padding: 0;
    transition: background-color 0.3s ease, color 0.3s ease;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-sans);
}

.display-3, .display-6 {
    font-family: var(--font-serif);
}

blockquote {
    font-family: var(--font-serif);
}

a {
    transition: var(--transition);
}

/* ---- Focus Ring Enhancement ---- */
:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
    border-radius: 4px;
}
button:focus-visible,
a.btn:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
}

/* ---- Override Bootstrap Primary Color ---- */
.bg-primary { background-color: var(--primary) !important; }
.btn-primary {
    background-color: var(--primary) !important;
    border-radius: var(--radius-sm);
    font-weight: 500;
    letter-spacing: 0.01em;
    border-color: var(--primary) !important;
    position: relative;
    overflow: hidden;
}
.btn-primary:hover {
    background-color: var(--primary-dark) !important;
    border-color: var(--primary-dark) !important;
}
.btn-outline-primary {
    color: var(--primary) !important;
    border-color: var(--primary) !important;
    border-radius: var(--radius-sm);
    font-weight: 500;
}
.btn-outline-primary:hover {
    background-color: var(--primary) !important;
    border-color: var(--primary) !important;
    color: #fff !important;
}
.text-primary { color: var(--primary) !important; }
.bg-primary.bg-opacity-10 { background-color: rgba(47, 85, 127, 0.08) !important; }

/* Warning / Accent Override */
.btn-warning {
    background-color: var(--accent) !important;
    border-color: var(--accent) !important;
    color: #fff !important;
}
.btn-warning:hover {
    background-color: var(--accent-dark) !important;
    border-color: var(--accent-dark) !important;
    color: #fff !important;
}
.text-warning { color: var(--accent) !important; }

/* ---- Button Ripple Effect ---- */
.btn {
    position: relative;
    overflow: hidden;
}
.btn .ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.45);
    transform: scale(0);
    animation: rippleAnim 0.6s linear;
    pointer-events: none;
}
@keyframes rippleAnim {
    to { transform: scale(3); opacity: 0; }
}

/* ---- Scroll Progress Bar ---- */
#scrollProgress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0;
    background: linear-gradient(90deg, var(--accent), var(--primary));
    z-index: 9999;
    transition: width 0.1s ease-out;
    pointer-events: none;
}

/* ---- Toast Notification ---- */
#toastContainer {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9998;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
    max-width: calc(100vw - 40px);
}
.toast-notif {
    background: var(--card-bg);
    color: var(--body-color);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    min-width: 280px;
    max-width: 360px;
    box-shadow: var(--shadow-lg);
    border-left: 4px solid var(--primary);
    display: flex;
    align-items: center;
    gap: 12px;
    animation: toastSlideIn 0.35s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    pointer-events: auto;
    opacity: 0;
    transform: translateX(20px);
}
.toast-notif.success { border-left-color: #28a745; }
.toast-notif.error { border-left-color: #dc3545; }
.toast-notif.info { border-left-color: var(--primary); }
.toast-notif.warning { border-left-color: var(--accent); }
.toast-notif i { font-size: 1.2rem; flex-shrink: 0; }
.toast-notif.success i { color: #28a745; }
.toast-notif.error i { color: #dc3545; }
.toast-notif.info i { color: var(--primary); }
.toast-notif.warning i { color: var(--accent); }
.toast-notif .toast-close {
    background: none;
    border: none;
    color: var(--muted-color);
    cursor: pointer;
    padding: 0;
    margin-left: auto;
    font-size: 1.1rem;
}
.toast-notif.hide { animation: toastSlideOut 0.3s ease forwards; }
@keyframes toastSlideIn {
    from { opacity: 0; transform: translateX(40px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes toastSlideOut {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(60px); }
}

/* ---- Floating Action Button (FAB) ---- */
.fab-container {
    position: fixed;
    bottom: 80px;
    right: 16px;
    z-index: 1040;
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
    gap: 10px;
}
.fab-main {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(0,0,0,0.25);
    transition: var(--transition);
}
.fab-main:hover { background: var(--primary-dark); transform: scale(1.08); }
.fab-main.open i { transform: rotate(135deg); }
.fab-main i { transition: transform 0.3s ease; }
.fab-item {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-decoration: none;
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px) scale(0.7);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 1.1rem;
}
.fab-container.open .fab-item {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}
.fab-container.open .fab-item:nth-child(2) { transition-delay: 0.05s; }
.fab-container.open .fab-item:nth-child(3) { transition-delay: 0.1s; }
.fab-container.open .fab-item:nth-child(4) { transition-delay: 0.15s; }
.fab-container.open .fab-item:nth-child(5) { transition-delay: 0.2s; }
.fab-item.whatsapp { background: #25d366; }
.fab-item.email { background: var(--primary); }
.fab-item.location { background: var(--accent); }
.fab-item.phone { background: #28a745; }

/* ---- Topbar ---- */
.topbar {
    font-size: 0.8rem;
    background-color: var(--dark) !important;
}
.topbar a:hover {
    color: #fff !important;
}

/* ---- Navbar ---- */
#mainNavbar {
    background-color: var(--primary) !important;
    transition: var(--transition);
    padding-top: 0.6rem;
    padding-bottom: 0.6rem;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}
#mainNavbar.scrolled {
    background-color: rgba(27, 58, 92, 0.97) !important;
    padding-top: 0.4rem;
    padding-bottom: 0.4rem;
    box-shadow: 0 1px 20px rgba(0,0,0,0.15);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}
.navbar-brand .brand-icon {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.15);
    border-radius: 10px;
}
.navbar-brand .brand-icon svg {
    flex-shrink: 0;
}

/* ---- Search Autocomplete ---- */
.search-wrapper {
    position: relative;
}
.search-input {
    border-radius: 20px;
    padding: 0.45rem 1rem;
    padding-left: 2.2rem;
    border: 1px solid rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.1);
    color: #fff;
    font-size: 0.85rem;
    min-width: 220px;
    transition: var(--transition);
}
.search-input::placeholder { color: rgba(255,255,255,0.6); }
.search-input:focus {
    background: rgba(255,255,255,0.2);
    border-color: var(--accent);
    outline: none;
    color: #fff;
}
.search-wrapper .search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255,255,255,0.7);
    pointer-events: none;
    font-size: 0.9rem;
}
.search-results {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    width: 360px;
    max-width: 90vw;
    max-height: 400px;
    overflow-y: auto;
    background: var(--card-bg);
    color: var(--body-color);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    z-index: 1050;
    display: none;
}
.search-results.show { display: block; animation: fadeInDown 0.2s ease; }
.search-result-item {
    display: flex;
    gap: 10px;
    padding: 10px 14px;
    text-decoration: none;
    color: var(--body-color);
    border-bottom: 1px solid var(--border-color);
    transition: background 0.15s ease;
}
.search-result-item:hover { background: var(--light-bg); color: var(--body-color); }
.search-result-item:last-child { border-bottom: 0; }
.search-result-thumb {
    width: 44px;
    height: 44px;
    border-radius: 6px;
    background: var(--light-bg) center/cover;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted-color);
}
.search-result-title { font-weight: 600; font-size: 0.9rem; margin: 0 0 2px; }
.search-result-excerpt { font-size: 0.78rem; color: var(--muted-color); margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.search-result-empty { padding: 16px; text-align: center; color: var(--muted-color); font-size: 0.85rem; }
.search-result-loading { padding: 16px; text-align: center; color: var(--muted-color); }
@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ---- Site Layout (exact ALPS theme v3 - adventist.design) ---- */
.site-grid {
    display: flex;
    flex-wrap: nowrap;
    flex-direction: row;
    width: 100%;
    justify-content: stretch;
}
.site-content {
    width: calc(100vw / 7 * 6 - 0.01px);
    z-index: 2;
    position: relative;
    overflow: visible;
}

/* Fix: modal harus di atas site-grid stacking context */
.modal-backdrop { z-index: 10000 !important; }
.modal { z-index: 10001 !important; }

/* ---- Sabbath Column ---- */
.l-sabbath {
    width: calc(100vw / 7 * 1 - 0.01px);
    background-color: #fff;
    z-index: 1;
    position: relative;
    min-height: 100vh;
    cursor: pointer;
    margin: 0;
    padding-top: 0;
    display: block;
}
.l-sabbath__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
    background: var(--sabbath-bg, var(--primary));
    opacity: 1;
    transition: none;
}
.l-sabbath__logo {
    padding-top: .625rem;
    padding-left: .625rem;
    padding-right: .625rem;
    display: block;
    position: relative;
    width: 100%;
    margin: 0 auto;
    left: 0;
    right: 0;
    max-width: 9.6875rem;
    z-index: 2;
}
@media (min-width: 501px) {
    .l-sabbath__logo {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
        padding-top: 1.25rem;
    }
}
.l-sabbath__logo svg {
    width: 100%;
    height: auto;
}
.l-sabbath__logo svg path {
    fill: #fff;
    transition: fill 0.5s ease;
}
.l-sabbath:hover .l-sabbath__overlay {
    opacity: 0.92;
}
.l-sabbath:hover .l-sabbath__logo svg path {
    fill: #fff;
}

.nav-link {
    font-weight: 500;
    font-size: 0.875rem;
    padding: 0.5rem 0.9rem !important;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    letter-spacing: 0.01em;
}
.nav-link:hover,
.nav-link.active {
    background: rgba(255,255,255,0.12);
}
.dropdown-menu-dark {
    background-color: var(--primary-dark);
    border: none;
    border-radius: var(--radius-sm);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    padding: 0.5rem;
}
.dropdown-item {
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
}
.dropdown-item:hover {
    background-color: rgba(255,255,255,0.1);
}

/* ---- Hero Image (jangan diubah - standar Adventist) ---- */
.c-hero-image {
    width: 100%;
    overflow: hidden;
    line-height: 0;
    position: relative;
}
.c-hero-image img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}
.c-hero-image::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 120px;
    background: linear-gradient(to top, rgba(255,255,255,0.8) 0%, transparent 100%);
    pointer-events: none;
}
[data-theme="dark"] .c-hero-image::after {
    background: linear-gradient(to top, rgba(15,25,35,0.9) 0%, transparent 100%);
}

/* ---- Hero Video ---- */
.c-hero-image .hero-video {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    background: #000;
}
@media (min-width: 992px) {
    .c-hero-image .hero-video {
        max-height: 80vh;
    }
}
.hero-video-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 88px;
    height: 88px;
    border-radius: 50%;
    border: none;
    background: rgba(0,0,0,0.55);
    color: #fff;
    font-size: 3.5rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s ease;
    z-index: 5;
    backdrop-filter: blur(4px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.4);
}
.hero-video-play-btn:hover {
    background: rgba(0,0,0,0.75);
    transform: translate(-50%, -50%) scale(1.08);
}
.hero-video-play-btn i {
    line-height: 1;
}

/* ---- History Page Video ---- */
.history-video {
    background: #000;
    object-fit: cover;
}
.history-video-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 72px;
    height: 72px;
    border-radius: 50%;
    border: none;
    background: rgba(0,0,0,0.55);
    color: #fff;
    font-size: 2.8rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s ease;
    z-index: 5;
    backdrop-filter: blur(4px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.4);
}
.history-video-play-btn:hover {
    background: rgba(0,0,0,0.75);
    transform: translate(-50%, -50%) scale(1.08);
}
.history-video-play-btn i {
    line-height: 1;
}

/* ---- Animations ---- */
.animate-fade-in { animation: fadeIn 0.8s ease forwards; }
.animate-slide-up { animation: slideUp 0.8s ease forwards; }
.animate-slide-up-delay { animation: slideUp 0.8s ease 0.2s forwards; opacity: 0; }
.animate-slide-up-delay-2 { animation: slideUp 0.8s ease 0.4s forwards; opacity: 0; }
.animate-bounce { animation: bounce 2s ease infinite; }

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* ---- Reveal on Scroll ---- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.active {
    opacity: 1;
    transform: translateY(0);
}
.reveal-left { transform: translateX(-30px); }
.reveal-right { transform: translateX(30px); }
.reveal-left.active, .reveal-right.active { transform: translateX(0); }

/* ---- Number Counter ---- */
.counter {
    font-variant-numeric: tabular-nums;
}

/* ---- Skeleton Loading ---- */
.skeleton {
    background: linear-gradient(90deg, rgba(0,0,0,0.06) 25%, rgba(0,0,0,0.12) 50%, rgba(0,0,0,0.06) 75%);
    background-size: 200% 100%;
    animation: skeletonShimmer 1.4s infinite;
    border-radius: 8px;
    color: transparent !important;
    pointer-events: none;
    user-select: none;
}
[data-theme="dark"] .skeleton {
    background: linear-gradient(90deg, rgba(255,255,255,0.05) 25%, rgba(255,255,255,0.12) 50%, rgba(255,255,255,0.05) 75%);
    background-size: 200% 100%;
}
@keyframes skeletonShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
.skeleton-text { height: 14px; margin-bottom: 8px; }
.skeleton-title { height: 24px; margin-bottom: 12px; width: 70%; }
.skeleton-img { height: 180px; width: 100%; }

/* ---- Image Blur-Up Placeholder ---- */
.img-blur-up {
    filter: blur(10px);
    transition: filter 0.4s ease;
    transform: scale(1.02);
}
.img-blur-up.loaded {
    filter: blur(0);
    transform: scale(1);
}

/* ---- Sticky TOC ---- */
.article-toc {
    position: sticky;
    top: 100px;
    max-height: calc(100vh - 140px);
    overflow-y: auto;
    padding: 1rem;
    border-left: 2px solid var(--border-color);
    font-size: 0.85rem;
}
.article-toc h6 {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted-color);
    margin-bottom: 0.75rem;
}
.article-toc ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.article-toc li { margin-bottom: 0.35rem; }
.article-toc li.level-3 { padding-left: 1rem; font-size: 0.8rem; }
.article-toc a {
    text-decoration: none;
    color: var(--muted-color);
    display: block;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
    line-height: 1.4;
}
.article-toc a:hover,
.article-toc a.active {
    color: var(--primary);
    background: rgba(47, 85, 127, 0.08);
    font-weight: 600;
}
[data-theme="dark"] .article-toc a:hover,
[data-theme="dark"] .article-toc a.active {
    background: rgba(74, 122, 181, 0.15);
}

/* ---- Reading Time / Article Meta ---- */
.article-meta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 0.85rem;
    color: var(--muted-color);
    margin-bottom: 1rem;
}
.article-meta span { display: inline-flex; align-items: center; gap: 4px; }

/* ---- Breadcrumb Enhanced ---- */
.breadcrumb-enhanced {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    align-items: center;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 0.85rem;
}
.breadcrumb-enhanced li { display: inline-flex; align-items: center; gap: 4px; }
.breadcrumb-enhanced li + li::before {
    content: '›';
    color: rgba(255,255,255,0.5);
    margin: 0 4px;
}
.breadcrumb-enhanced a { color: rgba(255,255,255,0.8); text-decoration: none; }
.breadcrumb-enhanced a:hover { color: #fff; }
.breadcrumb-enhanced .active { color: #fff; font-weight: 500; }

/* ---- Schedule Premium (Horizontal Split + Glass) ---- */
.schedule-premium {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.schedule-row {
    display: flex;
    align-items: stretch;
    gap: 16px;
    opacity: 0;
    transform: translateY(16px);
    animation: scheduleReveal 0.5s ease forwards;
}
@keyframes scheduleReveal {
    to { opacity: 1; transform: translateY(0); }
}
.schedule-row.schedule-today {
    position: relative;
}
.schedule-row.schedule-today::before {
    content: '';
    position: absolute;
    left: -8px;
    top: 0;
    bottom: 0;
    width: 4px;
    border-radius: 4px;
    background: var(--primary);
    box-shadow: 0 0 12px rgba(47, 85, 127, 0.4);
}
.day-badge {
    min-width: 100px;
    max-width: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px 12px;
    border-radius: var(--radius);
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    text-align: center;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(47, 85, 127, 0.2);
    transition: var(--transition);
}
.day-badge-active {
    background: linear-gradient(135deg, var(--accent), var(--accent-dark, #b8922e));
    box-shadow: 0 4px 20px rgba(212, 168, 67, 0.35);
    transform: scale(1.03);
}
.day-badge-name {
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}
.day-badge-today {
    font-size: 0.65rem;
    margin-top: 4px;
    padding: 2px 8px;
    border-radius: 10px;
    background: rgba(255,255,255,0.25);
    font-weight: 600;
    letter-spacing: 0.03em;
}
.schedule-items {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: stretch;
}
.schedule-glass-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    flex: 1 1 auto;
    min-width: 200px;
    transition: var(--transition);
}
.schedule-glass-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(47, 85, 127, 0.1);
    border-color: rgba(47, 85, 127, 0.2);
}
[data-theme="dark"] .schedule-glass-card {
    background: rgba(26, 35, 50, 0.7);
    border-color: rgba(255, 255, 255, 0.08);
}
[data-theme="dark"] .schedule-glass-card:hover {
    border-color: rgba(74, 122, 181, 0.3);
}
.schedule-time {
    font-family: 'JetBrains Mono', 'Fira Code', 'SF Mono', monospace;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--primary);
    white-space: nowrap;
    min-width: 52px;
    letter-spacing: -0.02em;
}
.schedule-today .schedule-time {
    color: var(--accent);
}
.schedule-info {
    flex: 1;
    min-width: 0;
}
.schedule-title {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--body-color);
    line-height: 1.3;
}
.schedule-desc {
    font-size: 0.78rem;
    color: var(--muted-color);
    margin-top: 2px;
    line-height: 1.3;
}

/* Responsive: mobile stacked */
@media (max-width: 767.98px) {
    .schedule-row {
        flex-direction: column;
        gap: 10px;
    }
    .day-badge {
        min-width: unset;
        max-width: unset;
        flex-direction: row;
        gap: 8px;
        padding: 10px 16px;
        border-radius: var(--radius-sm);
    }
    .day-badge-today { margin-top: 0; }
    .schedule-items {
        flex-direction: column;
    }
    .schedule-glass-card {
        min-width: unset;
    }
    .schedule-row.schedule-today::before {
        left: 0;
        top: -4px;
        bottom: unset;
        width: 100%;
        height: 3px;
    }
}

/* ---- Quick Info Cards ---- */
.quick-info {
    position: relative;
}

/* ---- Icon Circles ---- */
.icon-circle {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}
.icon-sm {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

/* ---- Animated Icons ---- */
.icon-animated { transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1); }
.card-hover:hover .icon-animated { transform: scale(1.15) rotate(-6deg); }
.card-hover:hover .icon-animated.icon-heart { animation: pulse 0.6s ease; }

/* ---- Modern Section Titles ---- */
section .badge {
    font-size: 0.75rem;
    letter-spacing: 0.03em;
}
section .display-6 {
    letter-spacing: -0.02em;
    line-height: 1.2;
}

/* ---- Card Hover Effect ---- */
.card-hover {
    transition: var(--transition);
    border: 1px solid var(--border-color) !important;
}
.card-hover:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg) !important;
    border-color: rgba(47, 85, 127, 0.2) !important;
}
.card {
    border-radius: var(--radius) !important;
    backdrop-filter: blur(10px);
    background-color: var(--card-bg);
}

/* Tap target minimum 44x44 mobile */
@media (hover: none) and (pointer: coarse) {
    .btn-sm, .nav-link, a.btn { min-height: 44px; }
}

/* ---- Verse Section ---- */
.verse-section {
    background-color: var(--primary-dark);
    position: relative;
}
.verse-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(160deg, var(--primary-dark) 0%, #0f2a42 50%, #1a3a5c 100%);
    z-index: 0;
}
.verse-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.02'%3E%3Cpath d='M50 50c0-5.523 4.477-10 10-10s10 4.477 10 10-4.477 10-10 10c0 5.523-4.477 10-10 10s-10-4.477-10-10 4.477-10 10-10zM10 10c0-5.523 4.477-10 10-10s10 4.477 10 10-4.477 10-10 10c0 5.523-4.477 10-10 10S0 25.523 0 20s4.477-10 10-10z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* ---- Gallery ---- */
.gallery-item {
    transition: var(--transition);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}
.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,0.4) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}
.gallery-item:hover { transform: scale(1.03); box-shadow: var(--shadow-lg); }
.gallery-item:hover::after { opacity: 1; }

/* ---- Lightbox Upgraded ---- */
#gmahkLightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.92);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    animation: fadeIn 0.25s ease;
}
#gmahkLightbox.show { display: flex; }
#gmahkLightbox .lb-img {
    max-width: 92vw;
    max-height: 82vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    user-select: none;
}
#gmahkLightbox .lb-caption {
    color: #fff;
    margin-top: 12px;
    font-size: 0.9rem;
    text-align: center;
    max-width: 90vw;
    opacity: 0.85;
}
#gmahkLightbox .lb-nav,
#gmahkLightbox .lb-close,
#gmahkLightbox .lb-download {
    position: absolute;
    background: rgba(255,255,255,0.12);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.3rem;
    transition: all 0.2s ease;
    text-decoration: none;
}
#gmahkLightbox .lb-nav:hover,
#gmahkLightbox .lb-close:hover,
#gmahkLightbox .lb-download:hover { background: rgba(255,255,255,0.22); transform: scale(1.05); }
#gmahkLightbox .lb-prev { left: 20px; top: 50%; transform: translateY(-50%); }
#gmahkLightbox .lb-next { right: 20px; top: 50%; transform: translateY(-50%); }
#gmahkLightbox .lb-close { top: 16px; right: 16px; }
#gmahkLightbox .lb-download { top: 16px; right: 76px; }
#gmahkLightbox .lb-counter {
    position: absolute;
    top: 20px;
    left: 20px;
    color: rgba(255,255,255,0.75);
    font-size: 0.9rem;
    padding: 6px 14px;
    background: rgba(0,0,0,0.35);
    border-radius: 20px;
}
@media (max-width: 576px) {
    #gmahkLightbox .lb-prev { left: 8px; }
    #gmahkLightbox .lb-next { right: 8px; }
    #gmahkLightbox .lb-nav, #gmahkLightbox .lb-close, #gmahkLightbox .lb-download { width: 42px; height: 42px; }

    /* Extra small screens */
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    .display-5 { font-size: 1.3rem; }
    .display-6 { font-size: 1.2rem; }
    h5 { font-size: 1rem; }
    .btn { font-size: 0.8rem; padding: 0.4rem 0.75rem; }
    .btn-sm { font-size: 0.7rem; padding: 0.3rem 0.6rem; }
    .badge { font-size: 0.65rem; }
    .navbar-brand .brand-text span { font-size: 0.65rem !important; }
    .navbar-brand .brand-text small { font-size: 0.55rem !important; }
}

/* ---- Footer ---- */
.footer {
    background-color: var(--dark) !important;
    border-top: 1px solid rgba(255,255,255,0.05);
}
.footer a:hover {
    color: var(--accent) !important;
}
.footer h5, .footer h6 {
    letter-spacing: 0.02em;
}

/* ---- Back to Top ---- */
#backToTop {
    transition: var(--transition);
    opacity: 0;
    visibility: hidden;
    right: 16px;
    z-index: 99;
}
#backToTop.show {
    opacity: 1;
    visibility: visible;
}

/* ---- Section Spacing ---- */
section {
    position: relative;
}
section.bg-light {
    background-color: var(--light-bg) !important;
}
section.py-5 {
    padding-top: 4rem !important;
    padding-bottom: 4rem !important;
}
@media (min-width: 992px) {
    section.py-5 {
        padding-top: 5rem !important;
        padding-bottom: 5rem !important;
    }
}

/* ---- Form Styles ---- */
.form-control, .form-select {
    border-radius: var(--radius-sm);
    border: 1px solid #e2e8f0;
    padding: 0.65rem 1rem;
    transition: var(--transition);
}
.form-control:focus,
.form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(47, 85, 127, 0.12);
}

/* ---- Responsive ---- */
@media (max-width: 991.98px) {
    .hero-section .display-3 { font-size: 2.2rem; }
    .min-vh-75 { min-height: 60vh; }
    .mt-n5 { margin-top: -2rem !important; }
    #backToTop { right: 16px; }
    .search-input { min-width: 160px; }
    .search-results { width: 300px; }
    .article-toc { position: static; max-height: none; margin-bottom: 1rem; }
}

@media (max-width: 767.98px) {
    .hero-section .display-3 { font-size: 1.8rem; }
    .display-6 { font-size: 1.5rem; }
    .display-5 { font-size: 1.6rem; }
    .min-vh-75 { min-height: 50vh; }
    .topbar { display: none !important; }
    .quick-info .card-body { padding: 1rem !important; }
    .quick-info h5 { font-size: 1rem; }
    .fab-container { bottom: 16px; }

    /* Padding konsisten untuk semua container di mobile */
    .container {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }

    /* Section spacing lebih compact di mobile */
    section.py-5 {
        padding-top: 2.5rem !important;
        padding-bottom: 2.5rem !important;
    }
    section.py-4 {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }

    /* Page hero lebih compact */
    .page-hero {
        padding: 2rem 0 1.5rem;
    }
    .page-hero h1 {
        font-size: 1.5rem;
    }

    /* Card spacing */
    .row.g-4 { --bs-gutter-y: 1rem; --bs-gutter-x: 0.75rem; }
    .row.g-5 { --bs-gutter-y: 1.5rem; --bs-gutter-x: 1rem; }

    /* Card body padding */
    .card-body { padding: 1rem !important; }
    .card-body h5 { font-size: 1rem; }
    .card-body p { font-size: 0.875rem; }

    /* Footer compact */
    .footer { padding-top: 2.5rem !important; }
    .footer .row.g-4 { --bs-gutter-y: 1.5rem; }

    /* Navbar brand compact */
    .navbar-brand img { max-height: 36px !important; }

    /* Breadcrumb */
    .breadcrumb { font-size: 0.8rem; }

    /* Teks section title */
    .text-center.mb-4 h2,
    .text-center.mb-5 h2 {
        font-size: 1.4rem;
    }
    .text-center.mb-4 p,
    .text-center.mb-5 p {
        font-size: 0.85rem;
    }

    /* Schedule cards compact */
    .schedule-glass-card {
        padding: 0.75rem !important;
    }

    /* Icon circles smaller */
    .icon-circle {
        width: 48px;
        height: 48px;
    }
    .icon-circle .fs-3 {
        font-size: 1.2rem !important;
    }

    /* Article cards */
    .card-hover div[style*="height:220px"] {
        height: 160px !important;
    }

    /* Gallery items */
    .gallery-item {
        border-radius: 0.75rem !important;
    }
}

/* ---- Badge Styles ---- */
.badge {
    font-weight: 500;
}

/* ---- Custom Scrollbar ---- */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--light-bg); }
::-webkit-scrollbar-thumb { background: #c0c0c0; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #a0a0a0; }
[data-theme="dark"] ::-webkit-scrollbar-track { background: #1a2332; }
[data-theme="dark"] ::-webkit-scrollbar-thumb { background: #3a4a5c; }
[data-theme="dark"] ::-webkit-scrollbar-thumb:hover { background: #556677; }

/* ---- Print Styles ---- */
@media print {
    .topbar, #mainNavbar, .scroll-indicator, #backToTop, .offcanvas, .l-sabbath,
    #scrollProgress, #toastContainer, .fab-container { display: none !important; }
    .site-content { width: 100% !important; }
    .hero-section { min-height: auto !important; padding: 2rem 0; }
}

/* ---- Reduced Motion Support ---- */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    .reveal { opacity: 1; transform: none; }
    .skeleton { animation: none; background: rgba(0,0,0,0.08); }
}
[data-motion="reduced"] *, [data-motion="reduced"] *::before, [data-motion="reduced"] *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
}
[data-motion="reduced"] .reveal { opacity: 1; transform: none; }
