:root {
            --primary: #ba2632;
            --secondary: #552a2a;
            --success: #e76f51;
            --danger: #e63946;
            --warning: #f4a261;
            --dark: #2b2d42;
            --light: #fff5f5;
            --gray-soft: #f0c0c0;
            --text-muted: #b87373;
            --sidebar-width-desktop: 360px;
            --sidebar-width-tablet: 320px;
            --header-height: 70px;
            --footer-padding: 40px;

            /* Palet Utama Warna Kategori Destinasi Wisata */
            --color-alam: #1f9236;
            --color-kuliner: #e76f51;
            --color-budaya: #3ebdac;
            --color-religi: #e9c46a;
            --color-buatan: #457b9d;
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            display: flex;
            flex-direction: column;
            min-height: 100vh;
            margin: 0;
            background-color: #f5f7fb;
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        }

        /* KONSISTEN SEMUA LAYAR */
        header {
            position: sticky;
            top: 0;
            background: white;
            z-index: 1100 !important;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
            padding: 0 24px;
            min-height: var(--header-height);
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 16px;
        }

        .header-left {
            display: flex;
            align-items: center;
            gap: 16px;
            flex: 1;
            min-width: 0;
        }

        .logo-img {
            height: 45px;
            width: auto;
            flex-shrink: 0;
            object-fit: contain;
        }

        .header-left h1 {
            font-size: 1rem;
            color: var(--secondary);
            margin: 0;
            line-height: 1.3;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        nav {
            flex-shrink: 0;
        }

        .admin-link {
            background: var(--primary);
            color: white;
            padding: 8px 20px;
            border-radius: 8px;
            text-decoration: none;
            display: flex;
            align-items: center;
            gap: 8px;
            transition: all 0.3s ease;
            font-size: 0.9rem;
            font-weight: 500;
            white-space: nowrap;
        }
        
        .text-link {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            background: transparent;
            border: none;
            padding: 0;
            color: #552a2a;
            text-decoration: none;
            font-weight: 500;
            box-shadow: none;
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .text-link:hover {
            color: #552a2a;
            text-decoration: underline;
            transform: translateX(3px);
        }

        /* Variasi untuk teks peta dengan ikon */
        .text-link.peta-link i,
        .text-link i.fa-map,
        .text-link i.fa-map-marker-alt {
            transition: transform 0.3s ease;
        }

        .text-link.peta-link:hover i,
        .text-link:hover i.fa-map,
        .text-link:hover i.fa-map-marker-alt {
            transform: scale(1.1);
        }

        

        /* Style tambahan untuk link peta di navbar atau konten */
        .nav-link-peta {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            background: transparent;
            border: none;
            padding: 0;
            color: #e74c3c;
            text-decoration: none;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .nav-link-peta:hover {
            color: #c0392b;
            text-decoration: underline;
            transform: translateX(3px);
        }

        .nav-link-peta i {
            font-size: 1rem;
            transition: transform 0.3s ease;
        }

        .nav-link-peta:hover i {
            transform: scale(1.1);
        }
        .admin-link:hover {
            background: var(--secondary);
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(42, 157, 143, 0.3);
        }

        .container {
            flex: 1;
            display: flex;
            flex-direction: row;
            position: relative;
            min-height: calc(100vh - var(--header-height) - 380px);
        }

        /* mAP CONTAINER RESPONSIF */
        .map-container {
            flex: 1;
            position: relative;
            min-height: 500px;
        }

        #map {
            width: 100%;
            height: 100%;
            min-height: 500px;
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
        }

        .map-controls {
            position: absolute;
            bottom: 20px;
            right: 20px;
            z-index: 1000;
            display: flex;
            gap: 10px;
            flex-wrap: wrap;
            justify-content: flex-end;
        }

        .map-btn {
            background: white;
            border: none;
            padding: 10px 16px;
            border-radius: 8px;
            cursor: pointer;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
            font-weight: 500;
            transition: all 0.2s ease;
            display: flex;
            align-items: center;
            gap: 8px;
            font-size: 0.85rem;
        }

        .map-btn:hover {
            background: var(--primary);
            color: white;
            transform: translateY(-2px);
        }

        .routing-controls {
            position: absolute;
            bottom: 20px;
            left: 20px;
            right: calc(var(--sidebar-width-desktop) + 30px);
            background: white;
            border-radius: 12px;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
            padding: 12px 16px;
            z-index: 1000;
            display: none;
            backdrop-filter: blur(10px);
            background: rgba(255, 255, 255, 0.95);
        }

        .routing-controls.active {
            display: block;
        }

        .routing-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 10px;
        }

        .routing-header h4 {
            color: var(--primary);
            font-size: 0.95rem;
        }

        .close-routing {
            background: none;
            border: none;
            font-size: 1.2rem;
            cursor: pointer;
            color: #999;
        }

        .route-info {
            font-size: 0.85rem;
            padding: 8px 0;
            border-top: 1px solid #eee;
            border-bottom: 1px solid #eee;
            margin-bottom: 10px;
        }

        .route-actions .btn {
            width: 100%;
            padding: 8px;
            border-radius: 6px;
            border: none;
            background: var(--primary);
            color: white;
            cursor: pointer;
        }

        /*SIDEBAR RESPONSIF */
        .sidebar {
            width: var(--sidebar-width-desktop);
            background: white;
            border-left: 1px solid #e0e0e0;
            display: flex;
            flex-direction: column;
            overflow-y: auto;
            max-height: calc(100vh - var(--header-height));
            position: sticky;
            top: var(--header-height);
            z-index: 100;
        }

        .controls {
            padding: 20px;
            border-bottom: 1px solid #eee;
        }

        .controls h3 {
            font-size: 1.1rem;
            margin-bottom: 16px;
            color: var(--secondary);
        }

        .form-group {
            margin-bottom: 16px;
        }

        .form-group label {
            display: block;
            margin-bottom: 8px;
            font-weight: 500;
            font-size: 0.85rem;
        }

        .form-group select {
            width: 100%;
            padding: 10px 12px;
            border: 1px solid #ddd;
            border-radius: 8px;
            font-size: 0.9rem;
            background: white;
        }

        .form-buttons {
            display: flex;
            gap: 10px;
            margin-top: 16px;
        }

        .btn {
            padding: 10px 16px;
            border: none;
            border-radius: 8px;
            cursor: pointer;
            font-weight: 500;
            transition: all 0.2s ease;
            display: inline-flex;
            align-items: center;
            gap: 8px;
            font-size: 0.85rem;
        }

        .btn-primary {
            background: var(--primary);
            color: white;
        }

        .btn-primary:hover {
            background: var(--secondary);
        }

        .btn-secondary {
            background: #6c757d;
            color: white;
        }

        .btn-secondary:hover {
            background: #5a6268;
        }

        .results {
            flex: 1;
            padding: 20px;
            overflow-y: auto;
        }

        .results h3 {
            font-size: 1rem;
            margin-bottom: 16px;
            color: var(--secondary);
        }

        .facilities-list {
            display: flex;
            flex-direction: column;
            gap: 16px;
        }

        .facility-card {
            background: #f8f9fa;
            border-radius: 12px;
            padding: 16px;
            cursor: pointer;
            transition: all 0.2s ease;
            border: 1px solid #e9ecef;
        }

        .facility-card:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
            border-color: var(--primary);
        }

        .facility-header {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            gap: 10px;
            margin-bottom: 10px;
            flex-wrap: wrap;
        }

        .facility-header h4 {
            font-size: 1rem;
            color: var(--secondary);
            flex: 1;
        }

        .kategori-badge {
            padding: 4px 10px;
            border-radius: 20px;
            font-size: 0.7rem;
            font-weight: 600;
            white-space: nowrap;
        }

        .badge-alam {
            background: rgba(42, 157, 143, 0.15);
            color: var(--color-alam);
        }

        .badge-kuliner {
            background: rgba(231, 111, 81, 0.15);
            color: var(--color-kuliner);
        }

        .badge-budaya {
            background: rgba(244, 162, 97, 0.15);
            color: var(--color-budaya);
        }

        .badge-religi {
            background: rgba(233, 196, 106, 0.15);
            color: #b58900;
        }

        .badge-buatan {
            background: rgba(69, 123, 157, 0.15);
            color: var(--color-buatan);
        }

        .compact-text {
            font-size: 0.8rem;
            margin: 6px 0;
            line-height: 1.4;
        }

        .facility-photo {
            margin-top: 10px;
        }

        .facility-photo img {
            width: 100%;
            height: 120px;
            object-fit: cover;
            border-radius: 8px;
        }

        .distance {
            font-weight: bold;
            color: var(--primary);
        }

        .no-results {
            text-align: center;
            padding: 40px 20px;
            color: #6c757d;
        }

        /* ==================== FOOTER DENGAN ANIMASI MASUK & KELUAR ==================== */
        .site-footer {
            background-color: #3d2a2a;
            color: #bdc3c7;
            border-top: 4px solid var(--primary);
            padding-top: 40px;
            z-index: 1050;

            /* Animasi awal - tersembunyi */
            opacity: 0;
            transform: translateY(50px);
            transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
            pointer-events: none;
        }

        /* Class saat footer terlihat */
        .site-footer.visible {
            opacity: 1;
            transform: translateY(0);
            pointer-events: auto;
        }

        /* Class saat footer sedang menghilang */
        .site-footer.hiding {
            opacity: 0;
            transform: translateY(50px);
            pointer-events: none;
        }

        /* Animasi untuk setiap kolom footer (stagger effect) */
        .footer-column {
            opacity: 0;
            transform: translateY(30px);
            transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
        }

        .site-footer.visible .footer-column {
            opacity: 1;
            transform: translateY(0);
        }

        .site-footer.hiding .footer-column {
            opacity: 0;
            transform: translateY(30px);
        }

        /* Stagger delay untuk setiap kolom saat masuk */
        .site-footer.visible .footer-column:nth-child(1) {
            transition-delay: 0.1s;
        }

        .site-footer.visible .footer-column:nth-child(2) {
            transition-delay: 0.2s;
        }

        .site-footer.visible .footer-column:nth-child(3) {
            transition-delay: 0.3s;
        }

        .site-footer.visible .footer-column:nth-child(4) {
            transition-delay: 0.4s;
        }

        /* Stagger delay untuk setiap kolom saat keluar (lebih cepat) */
        .site-footer.hiding .footer-column:nth-child(1) {
            transition-delay: 0s;
        }

        .site-footer.hiding .footer-column:nth-child(2) {
            transition-delay: 0.05s;
        }

        .site-footer.hiding .footer-column:nth-child(3) {
            transition-delay: 0.1s;
        }

        .site-footer.hiding .footer-column:nth-child(4) {
            transition-delay: 0.15s;
        }

        /* Animasi untuk footer bottom */
        .footer-bottom {
            opacity: 0;
            transform: translateY(20px);
            transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
            transition-delay: 0.5s;
        }

        .site-footer.visible .footer-bottom {
            opacity: 1;
            transform: translateY(0);
        }

        .site-footer.hiding .footer-bottom {
            opacity: 0;
            transform: translateY(20px);
            transition-delay: 0.1s;
        }

        .footer-container {
            max-width: 1200px;
            margin: 0 auto;
            padding: 0 20px;
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
            gap: 30px;
        }

        .footer-column h3 {
            color: #ffffff;
            font-size: 1.1rem;
            margin-bottom: 20px;
            position: relative;
            padding-bottom: 8px;
            font-weight: 600;
        }

        .footer-column h3::after {
            content: '';
            position: absolute;
            left: 0;
            bottom: 0;
            width: 40px;
            height: 2px;
            background-color: var(--primary);
            transform: scaleX(0);
            transition: transform 0.3s ease;
            transform-origin: left;
        }

        .site-footer.visible .footer-column h3::after {
            transform: scaleX(1);
        }

        .site-footer.hiding .footer-column h3::after {
            transform: scaleX(0);
        }

        .footer-column p {
            font-size: 0.85rem;
            line-height: 1.6;
            margin: 0 0 15px 0;
        }

        .footer-column ul {
            list-style: none;
            padding: 0;
            margin: 0;
        }

        .footer-column ul li {
            margin-bottom: 10px;
            font-size: 0.85rem;
            opacity: 0;
            transform: translateX(-10px);
            transition: all 0.3s ease;
        }

        .site-footer.visible .footer-column ul li {
            opacity: 1;
            transform: translateX(0);
        }

        .site-footer.hiding .footer-column ul li {
            opacity: 0;
            transform: translateX(-10px);
        }

        /* Stagger delay untuk setiap list item saat masuk */
        .site-footer.visible .footer-column:nth-child(1) ul li:nth-child(1) {
            transition-delay: 0.15s;
        }

        .site-footer.visible .footer-column:nth-child(1) ul li:nth-child(2) {
            transition-delay: 0.2s;
        }

        .site-footer.visible .footer-column:nth-child(1) ul li:nth-child(3) {
            transition-delay: 0.25s;
        }

        .site-footer.visible .footer-column:nth-child(1) ul li:nth-child(4) {
            transition-delay: 0.3s;
        }

        .site-footer.visible .footer-column:nth-child(2) ul li:nth-child(1) {
            transition-delay: 0.25s;
        }

        .site-footer.visible .footer-column:nth-child(2) ul li:nth-child(2) {
            transition-delay: 0.3s;
        }

        .site-footer.visible .footer-column:nth-child(2) ul li:nth-child(3) {
            transition-delay: 0.35s;
        }

        .site-footer.visible .footer-column:nth-child(2) ul li:nth-child(4) {
            transition-delay: 0.4s;
        }

        .site-footer.visible .footer-column:nth-child(3) ul li:nth-child(1) {
            transition-delay: 0.35s;
        }

        .site-footer.visible .footer-column:nth-child(3) ul li:nth-child(2) {
            transition-delay: 0.4s;
        }

        .site-footer.visible .footer-column:nth-child(3) ul li:nth-child(3) {
            transition-delay: 0.45s;
        }

        .site-footer.visible .footer-column:nth-child(3) ul li:nth-child(4) {
            transition-delay: 0.5s;
        }

        .site-footer.visible .footer-column:nth-child(4) ul li:nth-child(1) {
            transition-delay: 0.45s;
        }

        .site-footer.visible .footer-column:nth-child(4) ul li:nth-child(2) {
            transition-delay: 0.5s;
        }

        .site-footer.visible .footer-column:nth-child(4) ul li:nth-child(3) {
            transition-delay: 0.55s;
        }

        /* Stagger delay untuk list item saat keluar (lebih cepat) */
        .site-footer.hiding .footer-column ul li {
            transition-delay: 0s !important;
        }

        .footer-column ul li a {
            color: #bdc3c7;
            text-decoration: none;
            transition: all 0.3s ease;
            display: inline-block;
        }

        .footer-column ul li a:hover {
            color: #ffffff;
            transform: translateX(5px);
        }

        .footer-column ul li i {
            margin-right: 8px;
            color: var(--primary);
            font-size: 0.8rem;
        }

        .social-links {
            display: flex;
            gap: 10px;
            margin-top: 15px;
            flex-wrap: wrap;
        }

        .social-links a {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 34px;
            height: 34px;
            background-color: #961e20;
            color: #ffffff;
            border-radius: 50%;
            text-decoration: none;
            transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
            font-size: 0.9rem;
            opacity: 0;
            transform: scale(0);
        }

        .site-footer.visible .social-links a {
            opacity: 1;
            transform: scale(1);
        }

        .site-footer.hiding .social-links a {
            opacity: 0;
            transform: scale(0);
        }

        /* Stagger delay untuk social links saat masuk */
        .site-footer.visible .social-links a:nth-child(1) {
            transition-delay: 0.2s;
        }

        .site-footer.visible .social-links a:nth-child(2) {
            transition-delay: 0.3s;
        }

        .site-footer.visible .social-links a:nth-child(3) {
            transition-delay: 0.4s;
        }

        .site-footer.visible .social-links a:nth-child(4) {
            transition-delay: 0.5s;
        }

        /* Stagger delay untuk social links saat keluar */
        .site-footer.hiding .social-links a {
            transition-delay: 0s;
        }

        .social-links a:hover {
            background-color: var(--primary);
            transform: translateY(-3px) scale(1.05);
        }

        .footer-bottom {
            background-color: #412b2b;
            padding: 20px 20px;
            margin-top: 40px;
            text-align: center;
            border-top: 1px solid rgba(255, 255, 255, 0.05);
            font-size: 0.8rem;
        }

        .footer-bottom p {
            margin: 5px 0;
        }

        .footer-bottom a {
            color: #ffffff;
            text-decoration: none;
            font-weight: 500;
        }

        .footer-bottom a:hover {
            color: var(--primary);
            text-decoration: underline;
        }

        /* ==================== RESPONSIVE BREAKPOINTS ==================== */

        @media (max-width: 1024px) {
            :root {
                --sidebar-width-desktop: var(--sidebar-width-tablet);
            }

            .logo-img {
                height: 42px;
            }

            .header-left h1 {
                font-size: 0.9rem;
            }

            .admin-link {
                padding: 8px 16px;
                font-size: 0.85rem;
            }
        }

        @media (max-width: 768px) {
            header {
                padding: 0 16px;
                min-height: 60px;
                gap: 12px;
            }

            .logo-img {
                height: 38px;
            }

            .header-left {
                gap: 12px;
            }

            .header-left h1 {
                font-size: 0.8rem;
                white-space: normal;
                line-height: 1.2;
                display: -webkit-box;
              
                -webkit-box-orient: vertical;
                overflow: hidden;
            }

            .admin-link {
                padding: 6px 14px;
                font-size: 0.8rem;
            }

            .container {
                flex-direction: column;
            }

            .map-container {
                min-height: 400px;
                height: 50vh;
            }

            #map {
                position: relative;
                min-height: 400px;
                height: 100%;
            }

            .sidebar {
                width: 100%;
                position: relative;
                top: 0;
                max-height: none;
                border-left: none;
                border-top: 1px solid #e0e0e0;
            }

            .routing-controls {
                left: 16px;
                right: 16px;
                bottom: 16px;
            }

            .map-controls {
                bottom: 16px;
                right: 16px;
            }

            .map-btn {
                padding: 8px 12px;
                font-size: 0.75rem;
            }
        }

        @media (max-width: 480px) {
            header {
                padding: 0 12px;
                min-height: 55px;
                gap: 8px;
            }

            .logo-img {
                height: 32px;
            }

            .header-left {
                gap: 8px;
            }

            .header-left h1 {
                font-size: 0.7rem;
            
            }

            .admin-link {
                padding: 5px 10px;
                font-size: 0.75rem;
            }

            .admin-link span {
                display: none;
            }

            .admin-link i {
                font-size: 1rem;
            }

            .map-container {
                min-height: 350px;
                height: 45vh;
            }

            .form-buttons {
                flex-direction: column;
            }

            .btn {
                justify-content: center;
                width: 100%;
            }

            .facility-card {
                padding: 12px;
            }

            .facility-header {
                flex-direction: column;
                align-items: flex-start;
            }
        }

        @media (max-width: 360px) {
            .logo-img {
                height: 28px;
            }

            .header-left h1 {
                font-size: 0.65rem;
            }

            .admin-link {
                padding: 4px 8px;
            }

            .map-container {
                min-height: 300px;
                height: 40vh;
            }
        }

        .leaflet-popup-content-wrapper {
            width: 260px;
            border-radius: 8px;
            padding: 2px;
        }

        .leaflet-popup-content {
            width: 240px !important;
            margin: 12px !important;
        }

        .small-icon {
            font-size: 0.8rem;
        }

        /* Desain Scrollbar Kustom untuk Kotak Rincian Pop-up */
        .popup-scroll-area::-webkit-scrollbar {
            width: 4px;
        }

        .popup-scroll-area::-webkit-scrollbar-track {
            background: #f1f1f1;
            border-radius: 4px;
        }

        .popup-scroll-area::-webkit-scrollbar-thumb {
            background: #cbd5e1;
            border-radius: 4px;
        }

        .popup-scroll-area::-webkit-scrollbar-thumb:hover {
            background: #94a3b8;
        }
    