/* ============================================
   PPID Mobile-First Design System
   Referensi: myBCA App
   Prefix: .m- (mobile)
   ============================================ */

:root {
    /* Colors */
    --m-primary: #1A466C;
    --m-primary-dark: #0F2D47;
    --m-accent: #8F0408;
    --m-accent-light: #B91C1C;
    --m-gold: #D4A843;
    --m-bg: #F5F7FA;
    --m-card: #FFFFFF;
    --m-text: #2D3436;
    --m-text-light: #636E72;
    --m-text-muted: #B2BEC3;
    --m-border: #E8ECF0;
    --m-success: #00B894;

    /* Typography */
    --m-font-family: 'Poppins', sans-serif;
    --m-font-xs: 11px;
    --m-font-sm: 13px;
    --m-font-md: 15px;
    --m-font-lg: 18px;
    --m-font-xl: 22px;

    /* Spacing */
    --m-space-xs: 4px;
    --m-space-sm: 8px;
    --m-space-md: 16px;
    --m-space-lg: 24px;
    --m-space-xl: 32px;

    /* Radius */
    --m-radius-sm: 8px;
    --m-radius-md: 12px;
    --m-radius-lg: 20px;
    --m-radius-full: 50%;

    /* Shadows */
    --m-shadow-sm: 0 2px 8px rgba(0,0,0,0.04);
    --m-shadow-md: 0 4px 16px rgba(0,0,0,0.08);
    --m-shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
}

/* ============================================
   Base Mobile Wrapper
   ============================================ */
.m-app {
    font-family: var(--m-font-family);
    background: var(--m-bg);
    min-height: 100vh;
    padding-bottom: 70px; /* Ruang untuk bottom nav */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}


/* ============================================
   Compact Header (Global - Non-Home Pages)
   ============================================ */
.m-compact-header {
    background: linear-gradient(135deg, #8F0408 0%, #1A466C 100%);
    padding: 10px var(--m-space-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.m-compact-brand {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.m-compact-logo {
    height: 40px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 1px 4px rgba(0,0,0,0.2));
}

.m-compact-actions {
    display: flex;
    gap: var(--m-space-sm);
}

.m-compact-btn {
    width: 36px;
    height: 36px;
    border-radius: var(--m-radius-full);
    background: rgba(255,255,255,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 16px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.m-compact-btn:hover,
.m-compact-btn:active {
    background: rgba(255,255,255,0.25);
    color: #fff;
    text-decoration: none;
}

/* ============================================
   Mobile Header (Home Page Only)
   ============================================ */
.m-header {
    background: linear-gradient(165deg, #8F0408 0%, #1A466C 100%);
    padding: 20px var(--m-space-md) 50px;
    position: relative;
    overflow: hidden;
}

.m-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -30%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, transparent 70%);
    border-radius: 50%;
}

.m-header::after {
    content: '';
    position: absolute;
    bottom: -40%;
    left: -20%;
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(255,255,255,0.03) 0%, transparent 70%);
    border-radius: 50%;
}

.m-header-top {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: var(--m-space-lg);
    position: relative;
    z-index: 2;
}

.m-header-brand {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.m-header-logo-large {
    height: 55px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.2));
}

.m-header-greeting {
    position: relative;
    z-index: 2;
    margin-bottom: var(--m-space-md);
}

.m-header-greeting-text {
    color: rgba(255,255,255,0.7);
    font-size: var(--m-font-sm);
    font-weight: 400;
    margin: 0 0 2px 0;
}

.m-header-greeting-title {
    color: #fff;
    font-size: var(--m-font-xl);
    font-weight: 700;
    margin: 0;
    line-height: 1.3;
}

.m-search-bar {
    position: relative;
    z-index: 2;
}

.m-search-input {
    width: 100%;
    padding: 12px 16px 12px 44px;
    border: none;
    border-radius: var(--m-radius-md);
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    color: #fff;
    font-size: var(--m-font-sm);
    font-family: var(--m-font-family);
    outline: none;
    transition: all 0.3s ease;
}

.m-search-input::placeholder {
    color: rgba(255,255,255,0.5);
}

.m-search-input:focus {
    background: rgba(255,255,255,0.25);
    box-shadow: 0 0 0 2px rgba(255,255,255,0.2);
}

.m-search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255,255,255,0.5);
    font-size: 16px;
    pointer-events: none;
}

/* ============================================
   Quick Menu Grid (myBCA-style)
   ============================================ */
.m-quick-menu {
    padding: 0 var(--m-space-md);
    margin-top: -30px;
    position: relative;
    z-index: 10;
}

.m-quick-menu-card {
    background: var(--m-card);
    border-radius: var(--m-radius-lg);
    box-shadow: var(--m-shadow-lg);
    padding: var(--m-space-lg) var(--m-space-md);
}

.m-quick-menu-title {
    font-size: var(--m-font-xs);
    font-weight: 600;
    color: var(--m-text-light);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin: 0 0 var(--m-space-md) 0;
    padding-left: var(--m-space-xs);
}

.m-menu-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--m-space-sm);
}

.m-menu-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    padding: var(--m-space-sm) var(--m-space-xs);
    border-radius: var(--m-radius-md);
    transition: all 0.2s ease;
}

.m-menu-item:hover,
.m-menu-item:active {
    background: var(--m-bg);
    text-decoration: none;
    transform: scale(0.96);
}

.m-menu-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--m-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--m-space-sm);
    font-size: 20px;
    transition: transform 0.2s ease;
}

.m-menu-item:active .m-menu-icon {
    transform: scale(0.9);
}

/* Icon Color Variants (Pastel backgrounds) */
.m-icon-red       { background: #FDE8E8; color: #B91C1C; }
.m-icon-blue      { background: #DBEAFE; color: #1D4ED8; }
.m-icon-green     { background: #D1FAE5; color: #059669; }
.m-icon-orange    { background: #FEF3C7; color: #D97706; }
.m-icon-purple    { background: #EDE9FE; color: #7C3AED; }
.m-icon-teal      { background: #CCFBF1; color: #0D9488; }
.m-icon-pink      { background: #FCE7F3; color: #DB2777; }
.m-icon-navy      { background: #E0E7FF; color: #3730A3; }

.m-menu-label {
    font-size: var(--m-font-xs);
    color: var(--m-text);
    font-weight: 500;
    text-align: center;
    line-height: 1.3;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* ============================================
   Banner Slider (Mini Carousel)
   ============================================ */
.m-banner-section {
    padding: var(--m-space-md);
}

.m-banner-title {
    font-size: var(--m-font-xs);
    font-weight: 600;
    color: var(--m-text-light);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin: 0 0 var(--m-space-sm) var(--m-space-xs);
}

.m-banner-slider {
    overflow: hidden;
}

.m-banner-slider .slick-slide {
    padding: 0 4px;
    opacity: 1 !important;
}

.m-banner-item {
    border-radius: var(--m-radius-lg);
    overflow: hidden;
    position: relative;
    height: 160px;
}

.m-banner-img {
    width: 100%;
    max-width: 100% !important;
    height: 100%;
    object-fit: fill; /* Atau bisa contain, tetapi fill memastikan mengambil seluruh ruang banner-item */
    border-radius: var(--m-radius-lg);
}

.m-banner-slider .slick-dots {
    bottom: -20px;
    display: flex !important;
    justify-content: center;
    padding: 0;
    margin: 8px 0 0 0;
    list-style: none;
    gap: 6px;
}

.m-banner-slider .slick-dots li button {
    width: 6px;
    height: 6px;
    border-radius: 3px;
    background: var(--m-border);
    border: none;
    padding: 0;
    font-size: 0;
    transition: all 0.3s ease;
}

.m-banner-slider .slick-dots li.slick-active button {
    width: 20px;
    background: var(--m-primary);
}

/* ============================================
   Info Cards Section
   ============================================ */
.m-info-section {
    padding: var(--m-space-md);
}

.m-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--m-space-md);
}

.m-section-title {
    font-size: var(--m-font-md);
    font-weight: 700;
    color: var(--m-text);
    margin: 0;
}

.m-section-more {
    font-size: var(--m-font-xs);
    color: var(--m-primary);
    font-weight: 600;
    text-decoration: none;
}

.m-link-card {
    background: var(--m-card);
    border-radius: var(--m-radius-lg);
    box-shadow: var(--m-shadow-sm);
    padding: var(--m-space-md);
}

.m-link-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--m-space-md);
}

.m-link-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    transition: transform 0.2s ease;
}

.m-link-item:active {
    transform: scale(0.95);
}

.m-link-img {
    width: 56px;
    height: 56px;
    object-fit: contain;
    border-radius: var(--m-radius-sm);
    background: var(--m-bg);
    padding: 6px;
    margin-bottom: var(--m-space-xs);
}

.m-link-name {
    font-size: 10px;
    color: var(--m-text-light);
    text-align: center;
    font-weight: 500;
    line-height: 1.2;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* ============================================
   Visitor Stats Card (Mobile)
   ============================================ */
.m-stats-card {
    background: linear-gradient(135deg, #8F0408 0%, #1A466C 100%);
    border-radius: var(--m-radius-lg);
    padding: var(--m-space-md);
    color: #fff;
    box-shadow: var(--m-shadow-md);
    cursor: pointer;
    transition: transform 0.2s ease;
}

.m-stats-card:active {
    transform: scale(0.98);
}

.m-stats-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--m-space-sm);
}

.m-stats-label {
    font-size: var(--m-font-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.7;
}

.m-stats-badge {
    background: var(--m-success);
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

.m-stats-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #fff;
    animation: m-pulse 1.5s ease-in-out infinite;
}

@keyframes m-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.m-stats-row {
    display: flex;
    justify-content: space-around;
    text-align: center;
}

.m-stats-item {
    flex: 1;
}

.m-stats-number {
    font-size: var(--m-font-lg);
    font-weight: 700;
    line-height: 1.2;
}

.m-stats-desc {
    font-size: 10px;
    opacity: 0.6;
    font-weight: 400;
}

.m-stats-divider {
    width: 1px;
    background: rgba(255,255,255,0.15);
    margin: 0 4px;
}

/* ============================================
   Bottom Navigation Bar
   ============================================ */
.m-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: var(--m-card);
    box-shadow: 0 -2px 20px rgba(0,0,0,0.08);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 9999;
    padding: 0 var(--m-space-sm);
    border-top: 1px solid var(--m-border);
}

.m-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    flex: 1;
    padding: 6px 0;
    color: var(--m-text-muted);
    transition: all 0.2s ease;
    gap: 2px;
}

.m-nav-item.active,
.m-nav-item:active {
    color: var(--m-accent);
    text-decoration: none;
}

.m-nav-item:hover {
    text-decoration: none;
    color: var(--m-text-light);
}

.m-nav-icon {
    font-size: 20px;
    line-height: 1;
}

.m-nav-label {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.2px;
}

.m-nav-item.active .m-nav-icon {
    transform: scale(1.1);
}

/* ============================================
   Utility Classes
   ============================================ */
.m-mt-sm { margin-top: var(--m-space-sm); }
.m-mt-md { margin-top: var(--m-space-md); }
.m-mt-lg { margin-top: var(--m-space-lg); }
.m-mb-sm { margin-bottom: var(--m-space-sm); }
.m-mb-md { margin-bottom: var(--m-space-md); }
.m-mb-lg { margin-bottom: var(--m-space-lg); }
.m-px-md { padding-left: var(--m-space-md); padding-right: var(--m-space-md); }

/* ============================================
   Animations
   ============================================ */
@keyframes m-fadeInUp {
    from { opacity: 0; transform: translateY(15px); }
    to   { opacity: 1; transform: translateY(0); }
}

.m-animate-in {
    animation: m-fadeInUp 0.3s ease forwards;
}

.m-animate-delay-1 { animation-delay: 0.05s; }
.m-animate-delay-2 { animation-delay: 0.1s; }
.m-animate-delay-3 { animation-delay: 0.15s; }

/* ============================================
   Full-Page Mobile Menu
   ============================================ */
.m-fullmenu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 10000;
    display: flex;
    align-items: flex-end;
}

.m-fullmenu-sheet {
    background: var(--m-card);
    width: 100%;
    max-height: 85vh;
    border-radius: var(--m-radius-lg) var(--m-radius-lg) 0 0;
    overflow-y: auto;
    animation: m-slideUp 0.3s ease;
}

@keyframes m-slideUp {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
}

.m-fullmenu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--m-space-md) var(--m-space-lg);
    border-bottom: 1px solid var(--m-border);
    position: sticky;
    top: 0;
    background: var(--m-card);
    z-index: 100;
}

.m-fullmenu-title {
    font-size: var(--m-font-lg);
    font-weight: 700;
    color: var(--m-text);
    margin: 0;
}

.m-fullmenu-close {
    width: 44px;
    height: 44px;
    border-radius: var(--m-radius-full);
    background: var(--m-bg);
    border: 1px solid var(--m-border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--m-text);
    font-size: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
}

.m-fullmenu-close:active {
    background: var(--m-border);
    transform: scale(0.9);
}

.m-fullmenu-body {
    padding: var(--m-space-md) var(--m-space-lg) 100px;
}

/* Menu Groups */
.m-fmenu-group {
    margin-bottom: var(--m-space-lg);
}

.m-fmenu-group-title {
    font-size: var(--m-font-xs);
    font-weight: 600;
    color: var(--m-text-light);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin: 0 0 var(--m-space-sm) 0;
    padding-bottom: var(--m-space-sm);
    border-bottom: 1px solid var(--m-border);
    display: flex;
    align-items: center;
    gap: var(--m-space-sm);
}

.m-fmenu-group-title i {
    color: var(--m-accent);
    font-size: 14px;
}

.m-fmenu-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--m-space-sm);
    padding-top: var(--m-space-sm);
}

.m-fmenu-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    padding: var(--m-space-sm) var(--m-space-xs);
    border-radius: var(--m-radius-md);
    transition: all 0.15s ease;
}

.m-fmenu-item:active {
    background: var(--m-bg);
    transform: scale(0.95);
}

.m-fmenu-item:hover {
    text-decoration: none;
}

.m-fmenu-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--m-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 6px;
    font-size: 18px;
}

.m-fmenu-item span {
    font-size: 10px;
    color: var(--m-text);
    font-weight: 500;
    text-align: center;
    line-height: 1.2;
}
