/* Mobile Optimization CSS for DBANGLE Homepage */

/* Mobile Navigation Bar */
.mobile-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #1a2332;
    border-top: 1px solid #3a5ca8;
    z-index: 1000;
    padding: 8px 0;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
}

/* Add bottom padding to body to account for mobile nav */
body {
    padding-bottom: 0;
}

.mobile-nav .nav-item {
    flex: 1;
    text-align: center;
    min-width: 0; /* Ensure flex items can shrink */
}

.mobile-nav .nav-link {
    color: #ffffff;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 4px;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.mobile-nav .nav-link:hover,
.mobile-nav .nav-link.active {
    color: #e67e22;
    background: rgba(230, 126, 34, 0.1);
    border-radius: 8px;
}

.mobile-nav .nav-icon {
    font-size: 20px;
    margin-bottom: 4px;
}

/* Mobile Sidebar Menu */
.mobile-sidebar {
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100vh;
    background: #1a2332;
    z-index: 2000;
    transition: left 0.3s ease;
    overflow-y: auto;
    box-shadow: 2px 0 10px rgba(0,0,0,0.3);
    transform: translateZ(0); /* Force hardware acceleration */
}

.mobile-sidebar.open {
    left: 0;
    transform: translateX(0);
}

.mobile-sidebar-header {
    background: #0f1419;
    padding: 20px;
    border-bottom: 1px solid #3a5ca8;
}

.mobile-sidebar-header h3 {
    color: #ffffff;
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
}

.mobile-sidebar-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    color: #ffffff;
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
}

.mobile-sidebar-menu {
    padding: 0;
    margin: 0;
    list-style: none;
}

.mobile-sidebar-menu li {
    border-bottom: 1px solid #2a3441;
}

.mobile-sidebar-menu a {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    color: #ffffff;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.mobile-sidebar-menu a:hover {
    background: rgba(230, 126, 34, 0.1);
    color: #e67e22;
}

.mobile-sidebar-menu i {
    margin-right: 12px;
    font-size: 18px;
    width: 20px;
    text-align: center;
}

/* Mobile Sidebar Overlay */
.mobile-sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.5);
    z-index: 1999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
}

.mobile-sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Mobile Responsive Adjustments */
@media (max-width: 768px) {
    /* Show mobile navigation */
    .mobile-nav {
        display: flex;
    }
    
    /* Add bottom padding to body to account for mobile nav */
    body {
        padding-bottom: 80px;
    }
    
    /* Hide desktop navigation on mobile */
    .navbar-nav {
        display: none !important;
    }
    
    /* Hide header on mobile */
    .navbar {
        display: none !important;
    }
    
    /* Mobile Hero Section */
    .hero-section {
        padding: 60px 20px 40px;
        text-align: center;
    }
    
    .hero-section h1 {
        font-size: 2rem !important;
        line-height: 1.2;
        margin-bottom: 1rem;
    }
    
    .hero-section .lead {
        font-size: 1rem !important;
        line-height: 1.5;
        margin-bottom: 1.5rem;
    }
    
    .hero-section .btn {
        padding: 12px 24px;
        font-size: 16px;
        margin: 8px;
    }
    
    /* Mobile Statistics Cards */
    .stats-card {
        margin-bottom: 1rem;
        padding: 1.5rem 1rem;
    }
    
    .stats-card h3 {
        font-size: 2rem !important;
    }
    
    .stats-card p {
        font-size: 0.9rem !important;
    }
    
    /* Mobile Map Section */
    .map-section {
        padding: 40px 20px;
    }
    
    .map-section h2 {
        font-size: 1.8rem !important;
        margin-bottom: 1rem;
    }
    
    .map-section .lead {
        font-size: 1rem !important;
        margin-bottom: 1.5rem;
    }
    
    #interactive-map {
        height: 300px !important;
        border-radius: 12px;
        margin-bottom: 1rem;
    }
    
    /* Mobile Map Categories */
    .map-categories {
        padding: 40px 20px;
    }
    
    .map-categories h2 {
        font-size: 1.8rem !important;
        margin-bottom: 1rem;
    }
    
    .category-card {
        margin-bottom: 1rem;
        padding: 1.5rem 1rem;
    }
    
    .category-card h4 {
        font-size: 1.2rem !important;
        margin-bottom: 0.5rem;
    }
    
    .category-card p {
        font-size: 0.9rem !important;
        line-height: 1.5;
    }
    
    .category-card .btn {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    /* Mobile Articles Section */
    .articles-section {
        padding: 40px 20px;
    }
    
    .articles-section h2 {
        font-size: 1.8rem !important;
        margin-bottom: 1rem;
    }
    
    .articles-section .lead {
        font-size: 1rem !important;
        margin-bottom: 1.5rem;
    }
    
    /* Mobile Article Cards */
    .article-card {
        margin-bottom: 1.5rem;
        border-radius: 12px;
        overflow: hidden;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    }
    
    .article-card .card-img-top {
        height: 180px !important;
        object-fit: cover;
    }
    
    .article-card .card-body {
        padding: 1rem;
    }
    
    .article-card .card-title {
        font-size: 1.1rem !important;
        line-height: 1.3;
        margin-bottom: 0.75rem;
        font-weight: 600;
    }
    
    .article-card .card-text {
        font-size: 0.9rem !important;
        line-height: 1.4;
        margin-bottom: 1rem;
    }
    
    .article-card .badge {
        font-size: 10px !important;
        padding: 4px 8px;
        margin-bottom: 0.5rem;
    }
    
    .article-card .article-meta {
        font-size: 11px !important;
        color: #6c757d;
    }
    
    .article-card .article-meta i {
        margin-right: 4px;
    }
    
    /* Mobile Buttons */
    .btn-lg {
        padding: 12px 24px;
        font-size: 16px;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 14px;
        border-radius: 8px;
    }
    
    /* Mobile Container */
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    /* Mobile Typography */
    h1, .h1 {
        font-size: 2rem !important;
    }
    
    h2, .h2 {
        font-size: 1.8rem !important;
    }
    
    h3, .h3 {
        font-size: 1.5rem !important;
    }
    
    h4, .h4 {
        font-size: 1.3rem !important;
    }
    
    h5, .h5 {
        font-size: 1.1rem !important;
    }
    
    /* Mobile Spacing */
    .py-5 {
        padding-top: 3rem !important;
        padding-bottom: 3rem !important;
    }
    
    .py-4 {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }
    
    .mt-4 {
        margin-top: 1.5rem !important;
    }
    
    .mb-4 {
        margin-bottom: 1.5rem !important;
    }
    
    /* Mobile Grid Adjustments */
    .col-lg-4 {
        margin-bottom: 1rem;
    }
    
    /* Mobile Footer */
    footer {
        margin-bottom: 80px;
    }
    
    /* Mobile Floating Buttons */
    .floating-buttons {
        position: fixed;
        bottom: 100px;
        right: 20px;
        z-index: 999;
    }
    
    /* Ensure sidebar is above floating buttons */
    .mobile-sidebar {
        z-index: 2000 !important;
    }
    
    .mobile-sidebar-overlay {
        z-index: 1999 !important;
    }
    
    .floating-btn {
        width: 50px;
        height: 50px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        margin-bottom: 10px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.15);
        border: none;
        font-size: 20px;
        transition: all 0.3s ease;
    }
    
    .floating-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 16px rgba(0,0,0,0.2);
    }
    
    .floating-btn.chat {
        background: #92400e;
        color: white;
    }
    
    .floating-btn.accessibility {
        background: #007bff;
        color: white;
    }
    
    /* Mobile Search Bar */
    .search-section {
        padding: 20px;
    }
    
    .search-input {
        font-size: 16px;
        padding: 12px 16px;
        border-radius: 8px;
    }
    
    /* Mobile Baduy Pattern */
    .baduy-pattern {
        height: 3px !important;
        margin: 1.5rem 0 !important;
        width: 80px !important;
    }
    
    /* Mobile Responsive Images */
    img {
        max-width: 100%;
        height: auto;
    }
    
    /* Mobile Card Shadows */
    .card {
        box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
        border: none !important;
    }
    
    /* Mobile Button Groups */
    .btn-group {
        flex-direction: column;
        width: 100%;
    }
    
    .btn-group .btn {
        margin-bottom: 0.5rem;
        border-radius: 8px !important;
    }
    
    /* Mobile Alert Messages */
    .alert {
        margin: 1rem;
        border-radius: 8px;
        font-size: 14px;
    }
    
    /* Mobile Loading States */
    .loading {
        text-align: center;
        padding: 2rem;
    }
    
    .loading .spinner-border {
        width: 2rem;
        height: 2rem;
    }
}

/* Extra Small Mobile Devices */
@media (max-width: 576px) {
    .hero-section h1 {
        font-size: 1.8rem !important;
    }
    
    .hero-section .lead {
        font-size: 0.95rem !important;
    }
    
    .stats-card h3 {
        font-size: 1.8rem !important;
    }
    
    .article-card .card-title {
        font-size: 1rem !important;
    }
    
    .mobile-nav .nav-link {
        font-size: 10px;
        padding: 6px 2px;
    }
    
    .mobile-nav .nav-icon {
        font-size: 16px;
        margin-bottom: 2px;
    }
    
    .mobile-nav .nav-item {
        flex: 1;
        min-width: 0;
    }
    
    .floating-buttons {
        bottom: 90px;
        right: 15px;
    }
    
    .floating-btn {
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
}

/* Very Small Mobile Devices */
@media (max-width: 480px) {
    .mobile-nav .nav-link {
        font-size: 9px;
        padding: 4px 1px;
    }
    
    .mobile-nav .nav-icon {
        font-size: 14px;
        margin-bottom: 1px;
    }
    
    .mobile-nav .nav-item {
        flex: 1;
        min-width: 0;
    }
    
    .mobile-nav .nav-link span {
        line-height: 1.2;
    }
}

/* Landscape Mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .hero-section {
        padding: 40px 20px 30px;
    }
    
    .hero-section h1 {
        font-size: 1.6rem !important;
    }
    
    #interactive-map {
        height: 250px !important;
    }
    
    body {
        padding-bottom: 70px;
    }
    
    .mobile-nav {
        padding: 6px 0;
    }
    
    .mobile-nav .nav-link {
        padding: 6px 4px;
        font-size: 11px;
    }
    
    .mobile-nav .nav-icon {
        font-size: 16px;
        margin-bottom: 2px;
    }
} 