/* Main Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.navbar {
    position: sticky;
    top: 0;
    z-index: 1000; /* Ensures navbar stays on top of other content */
    background-color: #212529 !important;
    border-bottom: 1px solid #23272b;
}

/* Navbar compact styling */
.navbar-nav .nav-item {
    margin-right: 0.1rem; /* Kurangi margin antar item */
    display: flex;
    align-items: center; /* Sejajarkan item secara vertikal */
  }

  /* Khusus untuk nav-item dengan dropdown user */
.navbar-nav .nav-item .dropdown-toggle {
    display: flex;
    align-items: center;
    padding-top: 0;
    padding-bottom: 0;
    height: 100%;
  }

  /* Atur ukuran foto profil agar konsisten */
.navbar-nav .nav-item img {
    width: 28px;
    height: 28px;
    object-fit: cover;
    border-radius: 50%;
  }
  
  .navbar-nav .nav-link {
    display: flex;
    align-items: center;
    height: 100%;
    padding: 0.4rem 0.5rem; /* Kurangi padding pada link */
    font-size: 0.85rem; /* Perkecil ukuran font */
  }
  
  .navbar-nav .nav-link i {
    font-size: 0.8rem; /* Perkecil icon */
    margin-right: 0.2rem; /* Kurangi jarak antara icon dan teks */
  }
  
  /* Perkecil dropdown menu jika ada */
  .navbar .dropdown-menu {
    font-size: 0.8rem;
  }
  
  /* Perkecil brand/logo navbar jika perlu */
  .navbar-brand {
    font-size: 1.1rem;
    padding-top: 0.3rem;
    padding-bottom: 0.3rem;
  }

.navbar-dark .navbar-nav .nav-link {
    color: #fff;
    transition: color 0.2s;
}

.navbar-dark .navbar-nav .nav-link.active, 
.navbar-dark .navbar-nav .nav-link:focus, 
.navbar-dark .navbar-nav .nav-link:hover {
    color: #0d6efd;
}

.navbar-dark .navbar-brand {
    color: #fff;
}

.navbar-dark .navbar-brand:focus, 
.navbar-dark .navbar-brand:hover {
    color: #0d6efd;
}

.hero {
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url("/static/img/bg.jpg");
    background-size: cover;
    background-position: center;
    color: white;
    padding: 100px 0;
    margin-bottom: 30px;
}

/* Hero Logo Styling */
.hero-logo {
    max-width: 200px;
    height: auto;
    filter: brightness(0) invert(1);
    transition: transform 0.3s ease;
}

.hero-logo:hover {
    transform: scale(1.05);
}

/* Responsive hero logo */
@media (max-width: 768px) {
    .hero-logo {
        max-width: 150px;
    }
}

@media (max-width: 480px) {
    .hero-logo {
        max-width: 120px;
    }
}

#map {
    height: 500px;
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.business-card {
    transition: transform 0.3s ease;
    margin-bottom: 20px;
}

    .business-card:hover {
        transform: translateY(-5px);
    }

    /* Styling untuk info window Google Maps */
    .business-card p {
        text-align: left;
        hyphens: auto;
        -webkit-hyphens: auto;
        -moz-hyphens: auto;
        -ms-hyphens: auto;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

.category-filter {
    margin-bottom: 20px;
}

.search-section {
    background-color: #f8f9fa;
    padding: 30px 0;
    margin-bottom: 30px;
}

.footer {
    background-color: #343a40;
    color: white;
    padding: 30px 0;
    margin-top: 50px;
}

.info-box {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    margin-top: -50px;
    position: relative;
    z-index: 100;
}

/* Horizontal Slider Styles */
.business-slider-container {
    position: relative;
    padding: 0 60px; /* Increased padding for arrows */
    margin: 0 auto;
    max-width: 100%;
    overflow: hidden;
}

.business-slider {
    display: flex;
    overflow-x: hidden;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    gap: 12px; /* Reduced gap slightly */
    padding: 10px 0;
    margin: 0 -10px; /* Negative margin to counter container padding */
}

.business-slide {
    flex: 0 0 calc(20% - 10px); /* Adjusted for 5 items */
    scroll-snap-align: start;
    position: relative;
    min-width: 190px; /* Slightly reduced to fit better */
    margin-right: 0;
}

.business-showcase {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    height: 280px; /* Slightly reduced height */
    width: 100%;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border: 1px solid rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

    .business-showcase img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.3s ease;
    }

    .business-showcase:hover img {
        transform: scale(1.05);
    }

    .business-showcase .overlay {
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        background: linear-gradient(transparent, rgba(0,0,0,0.8));
        color: white;
        padding: 20px;
        transition: all 0.3s ease;
    }

    .business-showcase:hover .overlay {
        background: linear-gradient(transparent, rgba(0,0,0,0.9));
    }

    .business-showcase h3 {
        margin: 0;
        font-size: 1.25rem;
        font-weight: bold;
        text-shadow: 2px 2px 4px rgba(0,0,0,0.8), 1px 1px 2px rgba(0,0,0,0.9);
    }

    .business-showcase p {
        margin: 8px 0 0;
        opacity: 0.9;
        font-size: 0.9rem;
        text-shadow: 1px 1px 3px rgba(0,0,0,0.8), 1px 1px 2px rgba(0,0,0,0.9);
        text-align: left;
        hyphens: auto;
        -webkit-hyphens: auto;
        -moz-hyphens: auto;
        -ms-hyphens: auto;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .business-showcase .business-category {
        display: inline-block;
        background-color: rgba(13, 110, 253, 0.8);
        color: white;
        padding: 2px 8px;
        border-radius: 10px;
        font-size: 0.75rem;
        font-weight: 500;
        margin-top: 5px;
        text-shadow: none;
    }

    .business-showcase:hover {
        transform: translateY(-5px);
        box-shadow: 0 6px 16px rgba(0,0,0,0.2);
    }

.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background-color: rgba(13, 110, 253, 0.9); /* Bootstrap primary color */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    border: none;
    transition: all 0.3s ease;
}

.slider-arrow::before {
    content: '';
    width: 10px;
    height: 10px;
    border-top: 2px solid white;
    border-right: 2px solid white;
    display: block;
}

.slider-arrow.prev::before {
    transform: rotate(-135deg);
    margin-left: 4px;
}

.slider-arrow.next::before {
    transform: rotate(45deg);
    margin-right: 4px;
}

.slider-arrow.prev {
    left: 10px;
}

.slider-arrow.next {
    right: 10px;
}

.slider-arrow:disabled {
    background-color: rgba(108, 117, 125, 0.9); /* Bootstrap secondary color */
    cursor: not-allowed;
}

.slider-arrow:not(:disabled):hover {
    background-color: rgb(13, 110, 253); /* Solid Bootstrap primary color */
    transform: translateY(-50%) scale(1.1);
}

.indicator-dots {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.indicator-dot {
    width: 10px;
    height: 10px;
    background-color: #ccc;
    border-radius: 50%;
    margin: 0 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

    .indicator-dot.active {
        background-color: #0d6efd;
    }

/* Chatbot Styles */
.chatbot-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 350px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: height 0.3s ease;
    max-height: 500px;
}

.chatbot-minimized {
    max-height: 60px;
}

.chatbot-header {
    background-color: #0d6efd;
    color: white;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

    .chatbot-header h5 {
        margin: 0;
        font-size: 16px;
    }

.chatbot-toggle {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 14px;
}

.chatbot-body {
    display: flex;
    flex-direction: column;
    height: 450px;
    overflow: hidden;
}

.chat-messages {
    flex-grow: 1;
    overflow-y: auto;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.message {
    max-width: 80%;
    padding: 10px 15px;
    border-radius: 15px;
    margin-bottom: 5px;
}

.bot-message {
    align-self: flex-start;
    background-color: #f1f1f1;
}

    .bot-message .message-content {
        color: #333;
    }

.user-message {
    align-self: flex-end;
    background-color: #0d6efd;
    color: white;
}

.message-content p, .message-content ul {
    margin: 0 0 10px 0;
}

    .message-content p:last-child, .message-content ul:last-child {
        margin-bottom: 0;
    }

.message-content ul {
    padding-left: 20px;
}

.chat-input {
    display: flex;
    padding: 10px;
    border-top: 1px solid #eee;
}

    .chat-input input {
        flex-grow: 1;
        border: 1px solid #ddd;
        border-radius: 20px;
        padding: 8px 15px;
        outline: none;
    }

    .chat-input button {
        background-color: #0d6efd;
        color: white;
        border: none;
        border-radius: 50%;
        width: 40px;
        height: 40px;
        margin-left: 10px;
        cursor: pointer;
        transition: background-color 0.3s;
    }

        .chat-input button:hover {
            background-color: #0b5ed7;
        }

/* Responsive adjustments */
@media (max-width: 576px) {
    .chatbot-container {
        width: calc(100% - 40px);
        bottom: 10px;
        right: 10px;
        left: 10px;
    }
}

/* ACHIEVEMENT NOTIFICATION */
/* Achievement notification styles */
.achievement-notification {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    padding: 15px;
    width: 300px;
    z-index: 1000;
    transform: translateY(200%);
    transition: transform 0.5s ease;
    display: flex;
    align-items: center;
}

    .achievement-notification.show {
        transform: translateY(0);
    }

.achievement-icon {
    width: 60px;
    height: 60px;
    margin-right: 15px;
    border-radius: 50%;
    background-color: #ffdd57;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

    .achievement-icon i {
        font-size: 30px;
        color: #fff;
    }

.achievement-content {
    flex-grow: 1;
}

.achievement-title {
    font-weight: bold;
    font-size: 16px;
    margin-bottom: 5px;
    color: #333;
}

.achievement-description {
    font-size: 13px;
    color: #666;
    margin-bottom: 5px;
}

.achievement-points {
    font-size: 14px;
    color: #42b883;
    font-weight: bold;
}

.achievement-notification .close-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background: none;
    border: none;
    font-size: 16px;
    color: #999;
    cursor: pointer;
}

:root {
    --primary-color: #0d6efd;
    --border-radius: 8px;
}

/* Add this to your index.css file */

.info-box-button {
    background-color: #f8f9fa;
    border-radius: 10px;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #212529;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.info-box-button:hover {
    background-color: #e9ecef;
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.dark-mode .info-box-button {
    background-color: #2c3035;
    color: #f8f9fa;
    box-shadow: 0 2px 5px rgba(255,255,255,0.05);
}

.dark-mode .info-box-button:hover {
    background-color: #343a40;
    box-shadow: 0 5px 15px rgba(255,255,255,0.1);
}

.dropdown-toggle img {
    margin-left: 8px; /* Berikan jarak antara teks dan gambar */
  }

  /* Di file store.css, tambahkan ini: */
.post-card .media-gallery {
    margin-bottom: 15px;
  }
  
  .post-card .post-image-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* Untuk rasio 16:9 */
    overflow: hidden;
  }
  
  .post-card .post-image-container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background-color: #f8f8f8; /* Background color untuk area kosong */
  }
  
  /* Untuk gambar portrait (tinggi) */
  .post-card .portrait .post-image-container {
    padding-bottom: 150%; /* Untuk gambar portrait 2:3 */
  }
  
  /* Media cards dengan gambar bulat */
  .media-card {
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 15px;
    background-color: #f8f8f8;
  }

  /* Bot avatar styling for chatbot */
.bot-avatar {
    height: 120px;
    width: auto;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-right: 16px;
    object-fit: contain;
    max-width: 100px;
}
@media (max-width: 600px) {
    .bot-avatar {
        height: 64px;
        max-width: 48px;
        margin-right: 8px;
    }
}

/* Visitor Counter Styling */
.visitor-counter-bar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 8px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.visitor-counter-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

.visitor-stats {
    font-size: 0.875rem;
    color: white;
    font-weight: 500;
}

.visitor-stat-item {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    padding: 6px 12px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.visitor-stat-item:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.visitor-stat-item.pulse {
    animation: pulse 0.6s ease-in-out;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.visitor-icon {
    font-size: 0.8rem;
    margin-right: 6px;
    opacity: 0.9;
    color: #ffd700;
}

.visitor-label {
    margin-right: 4px;
    opacity: 0.9;
    font-size: 0.8rem;
}

.visitor-count {
    font-weight: 600;
    color: #ffffff;
    font-size: 0.85rem;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    animation: countUpdate 0.5s ease-in-out;
}

.visitor-count.loading {
    min-width: 30px;
    text-align: center;
}

.visitor-count.loading i {
    font-size: 0.8rem;
    opacity: 0.7;
}

@keyframes countUpdate {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Enhanced hover effects */
.visitor-stat-item {
    position: relative;
    overflow: hidden;
}

.visitor-stat-item::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3), transparent);
    transition: all 0.3s ease;
    transform: translate(-50%, -50%);
    border-radius: 50%;
}

.visitor-stat-item:hover::after {
    width: 100%;
    height: 100%;
}

/* Improved mobile responsiveness */
@media (max-width: 576px) {
    .visitor-counter-bar {
        padding: 4px 0;
    }
    
    .visitor-stats {
        justify-content: center;
        width: 100%;
    }
    
    .visitor-stat-item {
        flex: 1;
        justify-content: center;
        min-width: 0; /* Allow items to shrink */
    }
    
    .visitor-count {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

/* Ultra small screens */
@media (max-width: 360px) {
    .visitor-stats {
        flex-wrap: wrap;
        gap: 3px;
    }
    
    .visitor-stat-item {
        flex: 0 1 calc(50% - 1.5px);
        margin-right: 0 !important;
    }
}

/* Responsive adjustments for visitor counter */
@media (max-width: 768px) {
    .visitor-counter-bar {
        padding: 6px 0;
    }
    
    .visitor-stats {
        font-size: 0.75rem;
    }
    
    .visitor-stat-item {
        padding: 4px 8px;
        margin-right: 8px !important;
    }
    
    .visitor-label {
        display: none; /* Hide labels on mobile to save space */
    }
    
    .visitor-icon {
        margin-right: 4px;
    }
}

/* Dark mode support for visitor counter */
@media (prefers-color-scheme: dark) {
    .visitor-counter-bar {
        background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    }
    
    .visitor-stat-item {
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .visitor-stat-item:hover {
        background: rgba(255, 255, 255, 0.1);
    }
}

/* Visitor Counter Title */
.visitor-counter-title {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.visitor-counter-title i {
    color: #ffd700;
    margin-right: 6px;
}

/* Visitor Refresh Button */
.visitor-refresh-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 6px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    cursor: pointer;
}

.visitor-refresh-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.visitor-refresh-btn:active {
    transform: translateY(0);
}

.visitor-refresh-btn.spinning i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Last Updated Timestamp */
.visitor-last-updated {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.6);
    text-align: right;
    margin-top: 2px;
    font-style: italic;
}

/* =======================================
   RESPONSIVE BUSINESS SLIDER
   ======================================= */

/* Mobile and Tablet Adjustments */
@media (max-width: 768px) {
    .business-slider-container {
        padding: 0 45px; /* Further reduced padding for smaller screens */
    }
    
    .business-slide {
        flex: 0 0 calc(33.333% - 6px); /* 3 slides on mobile/tablet with less gap */
        min-width: 110px; /* Much smaller minimum width for mobile */
    }
    
    .business-showcase {
        height: 160px; /* Much smaller height for mobile */
        border-radius: 6px; /* Smaller border radius */
    }
    
    .business-showcase img {
        height: 100%;
        object-fit: cover;
    }
    
    .business-showcase h3 {
        font-size: 0.95rem; /* Much smaller title on mobile */
        line-height: 1.2;
    }
    
    .business-showcase p {
        font-size: 0.75rem; /* Much smaller description on mobile */
        line-height: 1.3;
        margin: 4px 0 0;
    }
    
    .business-showcase .business-category {
        font-size: 0.65rem; /* Much smaller category badge on mobile */
        padding: 1px 4px;
        margin-top: 3px;
    }
    
    .business-showcase .overlay {
        padding: 10px; /* Much smaller padding in overlay */
    }
    
    .slider-arrow {
        width: 32px; /* Smaller arrows on mobile */
        height: 32px;
    }
    
    .slider-arrow::before {
        width: 7px; /* Smaller arrow icons */
        height: 7px;
    }
}

/* Small Mobile Adjustments */
@media (max-width: 480px) {
    .business-slider-container {
        padding: 0 35px; /* Much smaller padding for small mobile */
    }
    
    .business-slide {
        min-width: 95px; /* Much smaller minimum width for small mobile */
    }
    
    .business-showcase {
        height: 140px; /* Much smaller height for small mobile */
        border-radius: 5px;
    }
    
    .business-showcase h3 {
        font-size: 0.85rem; /* Much smaller title on small mobile */
        line-height: 1.1;
    }
    
    .business-showcase p {
        font-size: 0.7rem; /* Much smaller description on small mobile */
        line-height: 1.2;
        margin: 3px 0 0;
    }
    
    .business-showcase .business-category {
        font-size: 0.6rem;
        padding: 1px 3px;
        margin-top: 2px;
    }
    
    .business-showcase .overlay {
        padding: 8px; /* Much smaller padding in overlay */
    }
    
    .slider-arrow {
        width: 28px; /* Much smaller arrows on small mobile */
        height: 28px;
    }
    
    .slider-arrow::before {
        width: 6px; /* Much smaller arrow icons */
        height: 6px;
    }
}

/* Extra Small Mobile (Very small screens) */
@media (max-width: 360px) {
    .business-slider-container {
        padding: 0 30px;
    }
    
    .business-slide {
        min-width: 85px; /* Very small for tiny screens */
    }
    
    .business-showcase {
        height: 120px; /* Very compact height */
        border-radius: 4px;
    }
    
    .business-showcase h3 {
        font-size: 0.8rem;
        line-height: 1.1;
    }
    
    .business-showcase p {
        font-size: 0.65rem;
        line-height: 1.1;
        margin: 2px 0 0;
    }
    
    .business-showcase .business-category {
        font-size: 0.55rem;
        padding: 1px 2px;
        margin-top: 2px;
    }
    
    .business-showcase .overlay {
        padding: 6px; /* Very compact padding */
    }
    
    .slider-arrow {
        width: 25px;
        height: 25px;
    }
    
    .slider-arrow::before {
        width: 5px;
        height: 5px;
    }
}