/* ===================================================================
   KODE BAGIAN HALAMAN PUBLIK
   =================================================================== */
body {
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bs-body-bg, #f8f-9fa);
    color: var(--bs-body-color, #333);
    transition: background-color 0.2s ease, color 0.2s ease;
}

.navbar-brand {
    font-weight: bold;
    font-size: 1.5rem;
}

.hero-section {
    background-color: #e0f2f7; 
    border-radius: 10px;
    padding: 60px 20px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    position: relative; 
    overflow: hidden; 
}

.hero-section h1 {
    color: #0056b3; 
    margin-bottom: 15px;
}

.hero-section .lead {
    color: #555;
}

.hero-section img {
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    margin-top: 30px;
}

section {
    background-colo: #fff;
    border-radius: 8px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

section h2 {
    color: #0056b3;
    margin-bottom: 30px;
    font-weight: 600;
}

#prayer-times-display .card {
    background-color: #e6f7ff; 
    border: 1px solid #cceeff;
    border-radius: 8px;
    transition: transform 0.2s;
}

#prayer-times-display .card:hover {
    transform: translateY(-5px);
}

#prayer-times-display .card h5 {
    color: #004085;
    margin-bottom: 5px;
}

#prayer-times-display .card p {
    color: #002752;
}

.news-item .card {
    border: none;
    transition: transform 0.2s, box-shadow 0.2s;
}
.news-item .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}
.news-item .card-img-top {
    object-fit: cover;
    height: 180px;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

#zakat-calculator-form {
    padding: 20px;
    border: 1px solid #eee;
    border-radius: 8px;
    background-color: #fdfdfd;
}

#zakat-result {
    border: 1px solid #d4edda;
    background-color: #d4edda;
    color: #155724;
    font-weight: bold;
}

#kepengurusan-section .card {
    border: 1px solid #ddd;
}
#kepengurusan-section .card-img-top {
    object-fit: cover;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin-top: 15px;
    border: 2px solid #007bff;
}

#rekening-section .card {
    background-color: #f0f8ff;
    border: 1px solid #b3d9ff;
}
#rekening-section .card img {
    border: 1px solid #eee;
}

footer {
    background-color: #2c3e50 !important;
    color: #ecf0f1 !important;
    font-size: 0.9rem;
}

:root {
    --profil-primary: #2d7a32;
    --profil-primary-light: #4caf50;
    --profil-accent: #1565c0;
    --profil-text: #212121;
    --profil-text-light: #616161;
    --profil-bg: #ffffff;
    --profil-bg-light: #f9f9f9;
    --profil-border: #e0e0e0;
    --profil-shadow: 0 4px 12px rgba(0,0,0,0.1);
    --profil-radius: 12px;
    --profil-transition: 0.3s ease;
}

.page-header {
    background: var(--profil-bg-light);
    padding: 3rem 0;
    text-align: center;
    border-bottom: 1px solid var(--profil-border);
}
.page-title {
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 700;
    color: var(--profil-primary);
    margin-bottom: 0.5rem;
}
.page-subtitle {
    font-size: 1.1rem;
    color: var(--profil-text-light);
    max-width: 600px;
    margin: 0 auto;
}

.main-content { padding: 3rem 0; }

.mosque-showcase { margin-bottom: 3rem; }
.mosque-image-wrapper {
    border-radius: var(--profil-radius);
    overflow: hidden;
    box-shadow: var(--profil-shadow);
    margin-bottom: 1.5rem;
}
.mosque-image {
    width: 100%;
    height: 450px;
    object-fit: cover;
    display: block;
}
.mosque-info { text-align: center; }
.mosque-name { font-size: 2rem; font-weight: 600; margin-bottom: 0.25rem; }
.mosque-address { color: var(--profil-text-light); display: flex; align-items: center; justify-content: center; gap: 0.5rem; }
.mosque-address i { color: var(--profil-primary); }

.two-columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; margin-bottom: 2rem; }

.content-card {
    background: var(--profil-bg);
    border-radius: var(--profil-radius);
    padding: 2rem;
    box-shadow: var(--profil-shadow);
    border: 1px solid var(--profil-border);
}
.content-card .card-header {
    display: flex; align-items: center; gap: 1rem;
    margin-bottom: 1.5rem; padding: 0; background: none; border: none;
}
.content-card .card-icon {
    width: 48px; height: 48px; background: var(--profil-primary);
    border-radius: 8px; display: flex; align-items: center; justify-content: center;
    color: white; font-size: 1.25rem; flex-shrink: 0;
}
.content-card .card-icon.blue { background: var(--profil-accent); }
.content-card .card-icon.orange { background: #f57c00; }
.content-card .card-title { font-size: 1.25rem; font-weight: 600; margin: 0; }
.content-card .card-content { color: var(--profil-text-light); line-height: 1.7; }

.featured-card {
    background: var(--profil-bg-light); border-radius: var(--profil-radius);
    padding: 2.5rem; text-align: center; box-shadow: var(--profil-shadow);
    margin-bottom: 2rem; border: 1px solid var(--profil-border);
}
.featured-header { display: flex; align-items: center; justify-content: center; gap: 1rem; margin-bottom: 1.5rem; }
.featured-icon {
    width: 56px; height: 56px; background: var(--profil-primary); border-radius: var(--profil-radius);
    display: flex; align-items: center; justify-content: center; color: white; font-size: 1.5rem;
}
.featured-title { font-size: 1.5rem; font-weight: 600; margin: 0; }
.featured-content { text-align: left; color: var(--profil-text-light); line-height: 1.8; max-width: 700px; margin: 0 auto; }

.contact-section { padding: 3rem 0; background: var(--profil-bg-light); border-top: 1px solid var(--profil-border); }
.contact-header { text-align: center; margin-bottom: 2rem; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; max-width: 700px; margin: 0 auto; }
.contact-item { text-align: center; }
.contact-item .contact-icon { font-size: 2.5rem; color: var(--profil-primary); margin-bottom: 0.5rem; }
.contact-item .contact-label { font-weight: 600; margin-bottom: 0.25rem; }
.contact-item .contact-value { color: var(--profil-text-light); font-size: 0.95rem; }

.scroll-top {
    position: fixed; bottom: 20px; right: 20px;
    width: 45px; height: 45px; background: var(--profil-primary); color: white;
    border: none; border-radius: 50%; cursor: pointer;
    font-size: 1.25rem; box-shadow: var(--profil-shadow);
    transition: opacity 0.3s, visibility 0.3s, transform 0.3s;
    opacity: 0; visibility: hidden; z-index: 1000;
}
.scroll-top.show { opacity: 1; visibility: visible; }
.scroll-top:hover { transform: translateY(-3px); }

.fade-in { opacity: 0; transform: translateY(20px); transition: opacity 0.6s ease-out, transform 0.6s ease-out; }
.fade-in.is-visible { opacity: 1; transform: translateY(0); }

@media (max-width: 768px) {
    .contact-grid { grid-template-columns: 1fr; gap: 2.5rem; }
    .mosque-image { height: 300px; }
}
/* Kustomisasi Posisi Toast SweetAlert2 */
.swal2-container.swal2-top-end {
    margin-top: 75px; 
}
/* ===================================================================
   KODE NAVBAR
   =================================================================== */

/* Styling untuk teks logo baru di topbar */
.topbar .logo-text {
    line-height: 1.2;
}
.topbar .logo-text strong {
    font-size: 1.25rem;
    font-weight: 700;
    color: #198754;
}
.topbar .logo-text .sub-text {
    font-size: 0.75rem;
    color: #6c757d;
}
[data-bs-theme="dark"] .topbar .nav-link span {
    color: #6c757d !important;
}


/* 1. Aturan default (untuk mobile): Sidebar tersembunyi */
.sidebar {
    width: 250px;
    position: fixed;
    top: 0;
    left: -250px; 
    height: 100vh;
    z-index: 1032; 
    transition: left 0.3s ease-in-out;
}

/* 2. Aturan default (untuk mobile): Konten & topbar memenuhi layar */
#content-wrapper {
    width: 100%;
    margin-left: 0; 
    padding-top: 70px;
    position: relative;
    background-color: var(--bs-body-bg);
    transition: all 0.25s ease-out;
}
.topbar {
    height: 70px;
    position: fixed;
    top: 0;
    left: 0; 
    right: 0;
    z-index: 500;
    transition: all 0.25s ease-out;
}

/* 3. Aturan untuk layar besar (desktop, lebar > 992px) */
@media (min-width: 992px) {
    .sidebar {
        left: 0;
    }
    #content-wrapper {
        margin-left: 250px;
    }
    .topbar {
        left: 250px;
    }
}

/* 4. Logika saat tombol toggle ditekan (di mobile) */
#wrapper.upz-sidebar-open .sidebar {
    left: 0; 
}

#content {
    width: 100%;
    padding: 24px;
}

/* Styling Tambahan Sidebar */
.sidebar .sidebar-brand {
    height: 70px;
    padding: 1rem;
}
.sidebar .nav-item .nav-link {
    color: rgba(255,255,255,0.8);
    display: flex;
    align-items: center;
    padding: 0.85rem 1.25rem;
}
.sidebar .nav-item.active .nav-link,
.sidebar .nav-item .nav-link:hover {
    color: #fff;
    background-color: rgba(255,255,255,0.1);
}
.sidebar .sidebar-heading {
    padding: 0 1rem;
    margin-top: 0.5rem;
    font-size: 0.65rem;
    text-transform: uppercase;
    color: rgba(255,255,255,0.4);
}
.sidebar .sub-menu {
    list-style: none;
    padding-left: 0;
    font-size: 0.9rem;
}
.sidebar .sub-menu a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    display: block;
    padding: 0.6rem 1.25rem 0.6rem 3.2rem;
}
.sidebar .sub-menu a:hover,
.sidebar .sub-menu a.active {
    color: #fff;
    background-color: rgba(255,255,255,0.05);
}

/* Styling untuk tombol hamburger */
#upzMobileSidebarToggle {
    color: #6c757d;
}
#upzMobileSidebarToggle:hover {
    color: #198754;
}
/* ===================================================================
   KODE DARK MODE & UTILITAS
   =================================================================== */
.navbar-nav .nav-link:hover,
.navbar-nav .nav-link:focus,
.navbar-nav .nav-link.active {
    text-decoration: none !important;
}

[data-bs-theme="dark"] {
    --bs-body-bg: #212529;
    --bs-body-color: #dee2e6;
    --bs-border-color: #495057;
    --bs-tertiary-bg: #343a40;
    --bs-light-bg-rgb: 43, 48, 53;
    --profil-text: #dee2e6;
    --profil-text-light: #adb5bd;
    --profil-bg: #2b3035;
    --profil-bg-light: #212529;
    --profil-border: #495057;
    --profil-shadow: 0 4px 15px rgba(0,0,0,0.25);
}

/* Aturan agar dark mode hanya berlaku di area konten */
[data-bs-theme="dark"] #content-wrapper {
    background-color: var(--bs-body-bg);
}

/* Menargetkan semua card di area admin saat mode gelap */
[data-bs-theme="dark"] #content-wrapper .card {
    background-color: var(--bs-tertiary-bg) !important;
    border-color: var(--bs-border-color) !important;
}

[data-bs-theme="dark"] #content-wrapper .card-header,
[data-bs-theme="dark"] #content-wrapper .card-footer {
    background-color: #212529 !important;
    border-color: var(--bs-border-color) !important;
}

[data-bs-theme="dark"] .group-header td,
[data-bs-theme="dark"] .subtotal-row td {
    background-color: #374148 !important;
    color: #fff !important;
    border-color: var(--bs-border-color) !important;
}

[data-bs-theme="dark"] .card.bg-light .card-body {
    background-color: #343a40 !important;
    color: var(--bs-body-color) !important;
}
[data-bs-theme="dark"] .card.bg-light h6 {
    color: #adb5bd !important;
}

[data-bs-theme="dark"] .list-group-item,
[data-bs-theme="dark"] .modal-content {
    background-color: var(--bs-tertiary-bg);
    border-color: var(--bs-border-color);
}
[data-bs-theme="dark"] .list-group-item-action:hover,
[data-bs-theme="dark"] .list-group-item-action:focus {
    background-color: #343a40;
}
[data-bs-theme="dark"] .modal-header,
[data-bs-theme="dark"] .modal-footer {
    border-color: var(--bs-border-color);
}
[data-bs-theme="dark"] .dropdown-menu {
    --bs-dropdown-bg: #2b3035;
    --bs-dropdown-border-color: var(--bs-border-color);
    --bs-dropdown-link-color: var(--bs-body-color);
    --bs-dropdown-link-hover-bg: #343a40;
}
[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-select {
    background-color: #343a40;
    color: var(--bs-body-color);
    border-color: var(--bs-border-color);
}
[data-bs-theme="dark"] .form-control:focus,
[data-bs-theme="dark"] .form-select:focus {
    background-color: #343a40;
    color: var(--bs-body-color);
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}
.navbar-nav .nav-link:focus {
    box-shadow: none !important;
}