@import "reset.css";


/* FIX: Header harus selalu di atas detail panel */
nav.fixed {
    z-index: 10000 !important; /* Lebih tinggi dari detail panel (9999) */
}

/* Mobile menu juga harus tinggi */
#mobile-menu {
    z-index: 10001 !important;
    position: relative; /* Pastikan z-index bekerja */
}

/* Pastikan detail panel di bawah header */
#detail-panel {
    z-index: 9999; /* Tetap tinggi tapi di bawah header */
}

#map { 
    height: 100%; 
    width: 100%; 
    position: relative; 
    z-index: 0; 
}

#kosan-list-desktop::-webkit-scrollbar {
    width: 6px;
}

#kosan-list-desktop::-webkit-scrollbar-thumb {
    background: #c5c5c5;
    border-radius: 10px;
}

#kosan-list-desktop::-webkit-scrollbar-thumb:hover {
    background: #a9a9a9;
}

#detail-panel.show {
    transform: translateX(0);
}

/* Styling untuk tombol filter aktif */
.filter-btn.active,
.filter-btn.active:focus,
.filter-btn.active:visited {
    background-color: #1A6FC9 !important;
    color: white !important;
    border-color: #1A6FC9 !important;
}

/* Saat tombol aktif di-hover, tetap biru */
.filter-btn.active:hover {
    background-color: #1A6FC9 !important;
    color: white !important;
    border-color: #1A6FC9 !important;
}

/* Style untuk gambar di detail panel */
#detail-images img {
    transition: transform 0.3s ease;
}

#detail-images img:hover {
    transform: scale(1.02);
}

/* Placeholder untuk gambar error */
.image-placeholder {
    background: linear-gradient(135deg, #f0f0f0 0%, #e0e0e0 100%);
}

/* Custom scrollbar untuk detail panel */
.detail-content::-webkit-scrollbar {
    width: 4px;
}

.detail-content::-webkit-scrollbar-thumb {
    background: #c5c5c5;
    border-radius: 10px;
}

/* Animation untuk image loading */
@keyframes pulse {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}

.loading-image {
    animation: pulse 2s infinite;
}

/* Carousel Styles */
.carousel-container {
    user-select: none;
}

.carousel-slide {
    transition: opacity 0.5s ease-in-out;
}

.thumbnails-container::-webkit-scrollbar {
    height: 4px;
}

.thumbnails-container::-webkit-scrollbar-thumb {
    background: #c5c5c5;
    border-radius: 10px;
}

.thumbnail-item {
    transition: border-color 0.3s ease;
}

.thumbnail-item:hover {
    border-color: #6993CF !important;
}

/* Zoom effect on image hover */
.carousel-slide img {
    transition: transform 0.3s ease;
}

.carousel-slide img:hover {
    transform: scale(1.05);
}

/* Loading animation */
@keyframes shimmer {
    0% { background-position: -468px 0; }
    100% { background-position: 468px 0; }
}

.loading-image {
    animation: shimmer 2s infinite linear;
    background: linear-gradient(to right, #f6f7f8 8%, #edeef1 18%, #f6f7f8 33%);
    background-size: 800px 104px;
}

/* Footer Styles */
footer {
    z-index: 10000;
    /* position: relative; */
    background: #1A6FC9; 
}

#detail-panel {
    height: calc(100vh - 99px) !important; 
    margin-bottom: 60px;
}

/* Detail Content Scroll */
.detail-content {
    max-height: calc(100vh - 160px) !important; 
    padding-bottom: 20px;
}

/* Improved filter button styles */
.filter-btn {
    transition: all 0.2s ease-in-out;
    border: 1.5px solid transparent;
}

.filter-btn.active {
    background-color: #1A6FC9 !important;
    color: white !important;
    border-color: #1A6FC9 !important;
    box-shadow: 0 2px 8px rgba(26, 111, 201, 0.3);
    transform: translateY(-1px);
}

.filter-btn:not(.active):hover {
    border-color: #1A6FC9;
    color: #1A6FC9;
    background-color: #f8fafc;
    transform: translateY(-1px);
}

/* Layout adjustment for better integration */
section:first-of-type {
    margin-bottom: 0;
}

/* Custom styles for buttons */
    .button-container {
      display: flex;
      width: 100%;
    }


/* Style untuk tombol Profile */
    #profile-btn {
      background-color: #1A6FC9; /* Warna primary */
    }
    
    #profile-btn:hover {
      background-color: #1559a8; /* Warna hover sedikit lebih gelap */
    }
    
    /* Style untuk tombol WhatsApp */
    #detail-wa {
      background-color: #075E54; /* Hijau WhatsApp */
    }
    
    #detail-wa:hover {
      background-color: #1da851; /* Hijau WhatsApp hover */
    }

/* ========== OPTION 1: COMPACT LIST WITH BIG MAP ========== */
/* Mobile responsive adjustments */
@media (max-width: 767px) {
    /* List section: 25% of screen */
    .mobile-list-section {
        height: 25vh !important;
        min-height: 160px !important;
        max-height: 200px !important;
        border-bottom: 1px solid #e5e7eb;
        background: white;
        overflow: hidden;
    }
    
    .mobile-list-header {
        padding: 0.5rem 1rem !important;
    }
    
    /* Mobile list container */
    #kosan-list-mobile {
        height: calc(100% - 3rem) !important;
        -ms-overflow-style: none;
        scrollbar-width: none;
        scroll-behavior: smooth;
        display: flex;
        align-items: stretch;
    }
    
    #kosan-list-mobile::-webkit-scrollbar {
        display: none;
        height: 0;
    }
    
    /* Mobile card styling - COMPACT */
    .mobile-card {
        width: 256px !important; /* w-64 = 256px */
        height: 100% !important;
        min-height: 120px !important;
        padding: 0.5rem !important;
        margin: 0 !important;
        border-radius: 0.375rem !important;
        border: 1px solid #e5e7eb !important;
        background: white !important;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
        transition: all 0.2s ease !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: space-between !important;
    }
    
    .mobile-card:hover {
        border-color: #1A6FC9 !important;
        box-shadow: 0 2px 8px rgba(26, 111, 201, 0.15) !important;
        transform: translateY(-1px) !important;
    }
    
    /* Map container: 75% of screen */
    .flex-1.h-full {
        height: 75vh !important;
    }
    
    #map {
        height: 75vh !important;
    }
    
    /* Fullscreen mode */
    .fullscreen {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        z-index: 40 !important;
        height: 100vh !important;
    }
    
    .fullscreen #map {
        height: 100vh !important;
    }
    
    /* Hide desktop list on mobile */
    .hidden.md\\:flex {
        display: none !important;
    }
    
    /* Card content styling */
    .mobile-card h3 {
        font-size: 0.75rem !important;
        line-height: 1 !important;
        margin-bottom: 0rem !important;
        min-height: 0rem !important;
    }
    
    .mobile-card .text-primary {
        font-size: 0.875rem !important;
        margin-bottom: 0.125rem !important;
    }
    
    .mobile-card .text-gray-600 {
        font-size: 0.625rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    .mobile-card button {
        font-size: 0.625rem !important;
        padding: 0.375rem 0.5rem !important;
        margin-top: auto !important;
    }
    
    .mobile-card span.text-\\[9px\\] {
        font-size: 0.5625rem !important;
        padding: 0.125rem 0.375rem !important;
    }
}

@media (min-width: 768px) {
    /* Desktop layout */
    .hidden.md\\:flex {
        display: flex !important;
    }
    
    .md\\:hidden {
        display: none !important;
    }
    
    #kosan-list-desktop {
        height: calc(100vh - 180px);
    }
    
    .flex-1.h-full {
        height: 100% !important;
    }
    
    #map {
        height: 100% !important;
    }

    .button-container {
        flex-direction: row;
        gap: 12px;
      }
      
    .button-container a {
        flex: 1;
        min-width: 0;
    }
}


/* Untuk mobile: tombol vertikal */
@media (max-width: 767px) {   
    .button-container {
        flex-direction: row;
        gap: 12px;
    }
      
    .button-container a {
        width: 100%;
    }
}