/* Custom CSS untuk Frontend Mobile-First (DonasiApps) - Premium Edition */

:root, [data-bs-theme="light"] {
    /* Premium Color Palette */
    --primary-color: #047857; /* Deep Emerald */
    --primary-light: #10b981;
    --primary-dark: #064e3b;
    --secondary-color: #f59e0b; /* Amber/Gold */
    
    /* Override Bootstrap 5 Default Colors */
    --bs-primary: #047857;
    --bs-primary-rgb: 4, 120, 87;
    --bs-secondary: #f59e0b;
    --bs-secondary-rgb: 245, 158, 11;
    --bs-success: #10b981;
    --bs-link-color: #047857;
    --bs-link-hover-color: #064e3b;
    --bs-link-color-rgb: 4, 120, 87;

    --bg-color: #f4f7f6;
    --text-color: #1e293b;
    --white: #ffffff;
    --border-color: #e2e8f0;
    --bottom-nav-height: 70px;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    -webkit-font-smoothing: antialiased;
    margin: 0;
    padding: 0;
}

/* Typography & Layout */
p {
    text-align: justify !important;
    line-height: 1.6;
}

.app-container {
    max-width: 480px;
    margin: 0 auto;
    background-color: var(--white);
    min-height: 100vh;
    box-shadow: 0 0 40px rgba(15, 23, 42, 0.08);
    position: relative;
    display: flex;
    flex-direction: column;
}

/* Smooth Page Transition */
.content-area {
    flex: 1;
    overflow-x: hidden;
    overflow-y: auto;
    padding-bottom: var(--bottom-nav-height);
    background-color: var(--bg-color);
    animation: fadeInUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Glassmorphism Headers */
.app-header, .app-subheader {
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0,0,0,0.04);
}
.app-header {
    box-shadow: none;
    padding: 0.75rem 1.25rem !important;
}
.app-subheader {
    box-shadow: 0 4px 15px rgba(0,0,0,0.02);
}

/* Premium Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    height: var(--bottom-nav-height);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-top: 1px solid rgba(0,0,0,0.06);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1030;
    padding: 0 0.5rem;
    padding-bottom: env(safe-area-inset-bottom);
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #64748b;
    font-size: 0.7rem;
    font-weight: 600;
    width: 65px;
    height: 55px;
    border-radius: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.bottom-nav-item i {
    font-size: 1.25rem;
    margin-bottom: 2px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2;
}
.bottom-nav-item span {
    z-index: 2;
}

/* Active State Pill Effect */
.bottom-nav-item.active {
    color: var(--primary-color);
}
.bottom-nav-item.active::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: #ecfdf5;
    border-radius: 16px;
    z-index: 1;
    animation: scaleIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.bottom-nav-item.active i {
    transform: translateY(-2px);
}
@keyframes scaleIn {
    0% { transform: scale(0.5); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

/* Utilities */
.shadow-sm { box-shadow: 0 4px 15px rgba(15, 23, 42, 0.04) !important; }
.shadow-xs { box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04) !important; }
.rounded-4 { border-radius: 16px !important; }
.rounded-5 { border-radius: 20px !important; }

/* Scrollbars */
.hide-scrollbar::-webkit-scrollbar { display: none; }
.hide-scrollbar { -ms-overflow-style: none; scrollbar-width: none; scroll-behavior: smooth; }

/* Skeletons */
.skeleton {
    background: linear-gradient(110deg, #f1f5f9 8%, #e2e8f0 18%, #f1f5f9 33%);
    border-radius: 8px;
    background-size: 200% 100%;
    animation: 1.5s shine linear infinite;
}
@keyframes shine { to { background-position-x: -200%; } }

/* =========================================
   UI COMPONENTS (Modernized & Reusable)
   ========================================= */

/* Search Container */
.search-container {
    position: relative;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    border: 1px solid #f1f5f9;
    transition: all 0.25s ease;
}
.search-container:focus-within {
    border-color: var(--primary-light);
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.15);
}
.search-input {
    border: none;
    background: transparent;
    font-size: 0.95rem;
    padding: 0.85rem 1rem 0.85rem 0.5rem;
    width: 100%;
}
.search-input:focus { outline: none; box-shadow: none; }

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    border: none;
    border-radius: 50rem;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.25);
    transition: all 0.2s ease;
}
.btn-primary:hover, .btn-primary:active {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.35);
}

/* Quick Actions (Home) */
.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.85rem;
    margin-bottom: 1.5rem;
}
.quick-action-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #334155;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.quick-action-item:hover { transform: translateY(-4px); color: var(--primary-color); }
.quick-action-icon {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    transition: all 0.2s ease;
}
.quick-action-label {
    font-size: 0.72rem;
    font-weight: 600;
    text-align: center;
    line-height: 1.2;
}

/* Section Headers */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
}
.section-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
    letter-spacing: -0.2px;
}
.section-link {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary-color);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* Modern Campaign Cards */
.campaign-card-modern {
    background: #ffffff;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid #f8fafc;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.05);
    margin-bottom: 1.25rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    display: block;
    text-decoration: none;
    color: inherit;
}
.campaign-card-modern:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(15, 23, 42, 0.08);
}
.campaign-card-modern .campaign-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.campaign-card-modern:hover .campaign-img { transform: scale(1.03); }

/* Category Chips */
.category-chip {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    min-width: 72px;
    text-decoration: none;
    color: #475569;
    transition: all 0.2s ease;
    flex-shrink: 0;
}
.category-icon-circle {
    width: 58px;
    height: 58px;
    border-radius: 20px;
    background: #f0fdf4;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
    border: 1px solid #dcfce7;
    box-shadow: 0 4px 12px rgba(4, 120, 87, 0.05);
    transition: all 0.3s ease;
}
.category-chip:hover { color: var(--primary-color); transform: translateY(-3px); }
.category-chip:hover .category-icon-circle {
    background: var(--primary-color);
    color: #ffffff;
    box-shadow: 0 6px 16px rgba(4, 120, 87, 0.25);
}

/* Prayer/Testimonial Bubbles */
.prayer-bubble-card {
    background: #ffffff;
    border-radius: 20px;
    border: 1px solid #f1f5f9;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.04);
    padding: 1.25rem;
    width: 280px;
    display: inline-block;
    white-space: normal;
    vertical-align: top;
    margin-right: 1rem;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

/* Inputs & Forms */
.form-control-modern {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 0.85rem 1rem;
    font-size: 0.95rem;
    color: #334155;
    transition: all 0.2s ease;
}
.form-control-modern:focus {
    background: #ffffff;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1);
}

/* Transparansi Banner Premium */
.transparency-banner-premium {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 60%, var(--primary-light) 100%);
    border-radius: 18px;
    padding: 1.15rem;
    color: #ffffff;
    position: relative;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(4, 120, 87, 0.2);
    margin-bottom: 1.5rem;
    text-decoration: none;
    display: block;
}
.transparency-banner-premium::after {
    content: '';
    position: absolute;
    width: 120px;
    height: 120px;
    right: -20px;
    bottom: -30px;
    background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, transparent 70%);
    pointer-events: none;
}

/* Page Header Emerald (Professional UI) */
.page-header-emerald {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 60%, var(--primary-light) 100%);
    color: white;
    border-radius: 0 0 28px 28px;
    margin-top: -1rem;
    box-shadow: 0 8px 25px rgba(4, 120, 87, 0.15);
    position: relative;
    padding: 1.25rem 1.25rem 2rem;
    text-align: center;
}
.page-header-emerald::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: url('data:image/svg+xml;utf8,<svg width=\
20\ height=\20\ xmlns=\http://www.w3.org/2000/svg\><circle cx=\2\ cy=\2\ r=\1\ fill=\rgba
255
255
255
0.07
\/></svg>');
    border-radius: 0 0 28px 28px;
    pointer-events: none;
}
.page-header-emerald .header-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 1rem;
    position: relative;
    z-index: 2;
}
.page-header-emerald .back-btn-top {
    color: var(--primary-dark);
    font-size: 1.1rem;
    text-decoration: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255, 255, 255, 0.95);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.page-header-emerald .back-btn-top:hover {
    transform: translateX(-3px);
    background: #ffffff;
    box-shadow: 0 6px 15px rgba(0,0,0,0.12);
}
.page-header-emerald .header-icon {
    font-size: 2.8rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 0.25rem;
    display: inline-block;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.1));
    position: relative;
    z-index: 2;
}
.page-header-emerald .header-title {
    font-weight: 800;
    margin-bottom: 0.25rem;
    font-size: 1.4rem;
    letter-spacing: -0.3px;
    position: relative;
    z-index: 2;
}
.page-header-emerald .header-subtitle {
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.85);
    margin: 0 auto;
    max-width: 85%;
    text-align: center !important;
    line-height: 1.4;
    position: relative;
    z-index: 2;
}


/* Floating Menu Button */
.bottom-nav-fab {
    position: relative;
    top: -20px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1040;
    cursor: pointer;
    border: 4px solid var(--bg-color);
}
.bottom-nav-fab:active {
    transform: scale(0.9);
}
.bottom-nav-fab i {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 1.5rem;
}
.bottom-nav-fab.open i {
    transform: rotate(135deg);
}

/* App Drawer / Popup Menu */
.app-drawer-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1025;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}
.app-drawer-overlay.show {
    opacity: 1;
    visibility: visible;
}
.app-drawer {
    position: fixed;
    bottom: calc(var(--bottom-nav-height) + 20px);
    left: 50%;
    transform: translateX(-50%) translateY(120%);
    width: 90%;
    max-width: 440px;
    background: #ffffff;
    border-radius: 28px;
    padding: 1.5rem;
    z-index: 1035;
    box-shadow: 0 20px 50px rgba(0,0,0,0.15);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
}
.app-drawer.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}
.app-drawer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem 0.5rem;
}
.app-drawer-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #334155;
    transition: all 0.2s ease;
}
.app-drawer-item:hover {
    transform: translateY(-3px);
}
.app-drawer-icon {
    width: 50px;
    height: 50px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    margin-bottom: 0.4rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.04);
}
.app-drawer-label {
    font-size: 0.65rem;
    font-weight: 600;
    text-align: center;
    line-height: 1.2;
}

