/* =========================================================
   1. UTAMA
   ========================================================= */
:root {
    --primary: #2563eb;
    --primary-dark: #1e40af;
    --primary-soft: #eff6ff;
    --bg-body: #f8fafc;
    --bg-card: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border-color: rgba(0, 0, 0, 0.08);
    --radius-xl: 24px;
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
    --hero-top: #f0f9ff;
    --hero-bottom: var(--bg-body);
    --success: #10b981;
    --danger: #ef4444;
}

[data-bs-theme="dark"] {
    --primary: #3b82f6;
    --primary-dark: #60a5fa;
    --primary-soft: rgba(37, 99, 235, 0.15);
    --bg-body: #0f172a;
    --bg-card: #1e293b;
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --border-color: rgba(255, 255, 255, 0.1);
    --hero-top: #0f172a;
    --hero-bottom: var(--bg-body);
}

body {
    background-color: var(--bg-body) !important;
    color: var(--text-main) !important;
    font-family: 'Plus Jakarta Sans', sans-serif;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
    scroll-behavior: smooth;
    margin: 0;
    padding: 0;
}

section {
    background-color: var(--bg-body) !important;
}

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-body);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* =========================================================
   2. BERANDA
   ========================================================= */
.hero-section {
    padding: 180px 0 120px;
    background: linear-gradient(180deg, var(--hero-top) 0%, var(--hero-bottom) 100%);
    position: relative;
    overflow: hidden;
}

.hero-title {
    font-size: 4rem;
    font-weight: 800;
    letter-spacing: -2.5px;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    background: linear-gradient(to right, var(--text-main), var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.05));
}

.hero-custom-img {
    width: 100%;
    height: 550px;
    object-fit: cover;
    border-radius: 40px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.2);
    transform: perspective(1000px) rotateY(-5deg);
    transition: 0.5s ease;
    border: 4px solid var(--bg-card);
    animation: floatImage 6s ease-in-out infinite;
    background-color: var(--bg-card);
}

.hero-custom-img:hover {
    transform: perspective(1000px) rotateY(0deg) scale(1.02);
    animation-play-state: paused;
}

@keyframes floatImage {
    0%, 100% {
        transform: perspective(1000px) rotateY(-5deg) translateY(0);
    }
    50% {
        transform: perspective(1000px) rotateY(-5deg) translateY(-20px);
    }
}

.section-tag {
    color: var(--primary);
    font-weight: 800;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    display: inline-block;
    background: var(--primary-soft);
    padding: 8px 16px;
    border-radius: 100px;
    margin-bottom: 15px;
}

.typing-cursor::after {
    content: '|';
    animation: blink 1s infinite;
}

@keyframes blink {
    50% { opacity: 0; }
}

.cat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 30px 20px;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-decoration: none;
    color: var(--text-main);
    height: 100%;
    display: block;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
    position: relative;
    overflow: hidden;
}

.cat-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.2), transparent);
    transform: skewX(-25deg);
    transition: 0.5s;
}

.cat-card:hover::after {
    left: 150%;
}

.cat-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
    border-color: var(--primary);
}

.cat-icon {
    width: 80px;
    height: 80px;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 2.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin: 0 auto 20px;
    transition: 0.4s;
}

.cat-card:hover .cat-icon {
    background: var(--primary);
    color: white;
    transform: scale(1.1) rotate(10deg);
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.3);
}

.place-card-mini {
    background: var(--bg-card);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: 0.3s;
    height: 100%;
    display: block;
    text-decoration: none;
    color: var(--text-main);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
}

.place-card-mini:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.08);
    border-color: var(--primary);
}

.place-thumb {
    height: 220px;
    width: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.place-card-mini:hover .place-thumb {
    transform: scale(1.05);
}

.skeleton {
    background: linear-gradient(90deg, var(--border-color) 25%, var(--bg-body) 50%, var(--border-color) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 20px;
}

.skeleton-card {
    border: 1px solid var(--border-color);
    border-radius: 24px;
    background: var(--bg-card);
    height: 100%;
    overflow: hidden;
}

.skeleton-img {
    height: 220px;
}

.skeleton-text {
    height: 20px;
    border-radius: 10px;
    margin-bottom: 10px;
}

.skeleton-anim {
    background: linear-gradient(90deg, var(--bg-body) 25%, var(--border-color) 50%, var(--bg-body) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite linear;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* =========================================================
   3. KATEGORI
   ========================================================= */
.category-header {
    padding-top: 140px;
    padding-bottom: 60px;
    background: linear-gradient(135deg, var(--hero-top) 0%, var(--bg-body) 100%);
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--border-color);
}

.header-pattern {
    position: absolute;
    top: -50px;
    right: -50px;
    font-size: 15rem;
    opacity: 0.03;
    color: var(--primary);
    transform: rotate(15deg);
    pointer-events: none;
}

.category-title-styled {
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: -1.5px;
    text-transform: capitalize;
    color: var(--text-main);
    display: inline-block;
}

.btn-back-custom {
    background-color: var(--bg-card);
    color: var(--text-main);
    border: 1px solid var(--border-color);
    font-weight: 700;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
}

.btn-back-custom:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateX(-5px);
    box-shadow: 0 5px 15px rgba(37, 99, 235, 0.15);
}

.cat-nav-wrapper {
    background: var(--bg-card);
    padding: 15px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
    border: 1px solid var(--border-color);
    margin-bottom: 40px;
    margin-top: -30px;
    position: relative;
    z-index: 10;
}

.cat-pill {
    padding: 12px 24px;
    border-radius: 100px;
    background: transparent;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.85rem;
    transition: 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.cat-pill:hover {
    background: var(--bg-body);
    color: var(--primary);
}

.cat-pill.active {
    background: var(--primary);
    color: white !important;
    box-shadow: 0 8px 15px rgba(37, 99, 235, 0.25);
}

.controls-wrapper {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.search-box {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 5px 20px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 250px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.02);
    transition: 0.3s;
}

.search-box:focus-within {
    border-color: var(--primary);
    box-shadow: 0 5px 20px rgba(37, 99, 235, 0.1);
}

.search-box input {
    background: transparent;
    color: var(--text-main);
    border: none;
    width: 100%;
    padding: 12px 0;
    outline: none;
    margin-left: 10px;
    font-weight: 500;
}

.sort-box {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 0 15px;
    color: var(--text-muted);
    font-weight: 600;
    outline: none;
    cursor: pointer;
}

.card-place {
    border: 1px solid var(--border-color);
    border-radius: 24px;
    background: var(--bg-card);
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    position: relative;
}

.card-place:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
    border-color: var(--primary-soft);
}

.place-img-container {
    width: 100%;
    height: 220px;
    overflow: hidden;
    position: relative;
}

.place-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.card-place:hover .place-img {
    transform: scale(1.05);
}

.status-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 6px 14px;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 800;
    z-index: 2;
    backdrop-filter: blur(4px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    display: inline-flex;
    align-items: center;
    gap: 6px; 
}

.status-open {
    background: #dcfce7 !important;
    color: #166534 !important;
    border: 1px solid #bbf7d0 !important;
}

.status-closed {
    background: #fee2e2 !important;
    color: #991b1b !important;
    border: 1px solid #fecaca !important;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.dot-open { 
    background: #166534 !important; 
}

.dot-closed { 
    background: #991b1b !important; 
}

.tag-pill {
    background: var(--bg-body);
    color: var(--text-muted);
    font-size: 0.65rem;
    padding: 6px 12px;
    border-radius: 100px;
    font-weight: 700;
    border: 1px solid var(--border-color);
}

.card-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.pagination-container {
    margin-top: 50px;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.page-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-muted);
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s;
}

.page-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.page-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.2);
}

.page-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* =========================================================
   4. DETAIL
   ========================================================= */
.detail-hero-header {
    position: relative;
    height: 55vh;
    min-height: 400px;
    background-color: var(--text-main);
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(15, 23, 42, 0) 0%, rgba(15, 23, 42, 0.9) 100%);
}

.hero-bg-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(1) !important; 
}

.back-btn-wrapper {
    position: absolute;
    top: 100px;
    left: 5%;
    z-index: 10;
}

.btn-glass {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: white;
    border-radius: 100px;
    padding: 10px 24px;
    font-weight: 700;
    font-size: 0.9rem;
    transition: 0.3s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-glass:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: translateY(-3px);
    color: white;
}

[data-bs-theme="dark"] .btn-glass {
    background: rgba(0, 0, 0, 0.5);
    border-color: rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
}

.detail-content-wrapper {
    margin-top: -80px;
    position: relative;
    z-index: 5;
    padding-bottom: 80px;
}

.main-card {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    padding: 40px;
    margin-bottom: 30px;
}

.place-title {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 15px;
    color: var(--text-main);
}

.badge-category {
    background: var(--primary-soft);
    color: var(--primary);
    padding: 6px 14px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
}

.htm-box {
    background-color: var(--bg-body);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 25px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.info-icon {
    width: 45px;
    height: 45px;
    border-radius: 12px;
    background: var(--bg-body);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.2rem;
    border: 1px solid var(--border-color);
}

.sidebar-card {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-color);
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: var(--shadow-md);
}

.sidebar-title {
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-main);
}

#map {
    height: 300px;
    width: 100%;
    border-radius: 16px;
    z-index: 1;
}

.leaflet-control-layers {
    border: none !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15) !important;
    font-family: 'Plus Jakarta Sans', sans-serif !important;
    font-weight: 600 !important;
    padding: 10px !important;
    color: #333;
}

[data-bs-theme="dark"] .leaflet-control-layers {
    background: #1e293b !important;
    color: #f1f5f9 !important;
}

.schedule-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.schedule-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px dashed var(--border-color);
    font-size: 0.9rem;
}

.schedule-item:last-child {
    border-bottom: none;
}

.btn-action {
    width: 100%;
    padding: 12px;
    border-radius: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: 0.3s;
    text-decoration: none;
    margin-bottom: 10px;
}

.btn-primary-action {
    background: var(--primary);
    color: white;
    border: none;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.3);
}

.btn-primary-action:hover {
    background: var(--primary-dark);
    color: white;
    transform: translateY(-2px);
}

.btn-outline-action {
    background: transparent;
    border: 2px solid var(--border-color);
    color: var(--text-main);
}

.btn-outline-action:hover {
    border-color: var(--text-main);
    background: var(--bg-body);
}

.btn-disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background: var(--bg-body);
    color: var(--text-muted);
    border: 1px solid var(--border-color);
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-body);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s;
}

/* =========================================================
   5. PROFILE & LOGIN
   ========================================================= */
.login-wrapper {
    min-height: calc(100vh - 100px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 100px 20px 40px;
}

.auth-card {
    width: 100%;
    max-width: 480px;
    background: var(--bg-card);
    border-radius: 32px;
    padding: 50px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border-color);
    animation: slideUp 0.5s ease;
}

.form-control-custom {
    background: var(--bg-body);
    border: 2px solid var(--border-color);
    border-radius: 16px;
    padding: 14px 20px;
    color: var(--text-main);
    transition: 0.3s;
    width: 100%;
}

.form-control-custom:focus {
    background: var(--bg-card);
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
    color: var(--text-main);
    outline: none;
}

.password-toggle {
    cursor: pointer;
    color: var(--text-muted);
    transition: 0.2s;
}

.password-toggle:hover {
    color: var(--primary);
}

.btn-primary-auth {
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: 16px;
    padding: 14px;
    font-weight: 800;
    transition: 0.3s;
}

.btn-primary-auth:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.3);
    color: white;
}

.profile-header {
    background: linear-gradient(135deg, var(--primary) 0%, #818cf8 100%);
    padding-top: 140px;
    padding-bottom: 100px;
    color: white;
    position: relative;
    margin-bottom: -60px;
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 5px solid var(--bg-card);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    background: var(--bg-card);
    object-fit: cover;
}

.profile-main-container {
    max-width: 850px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 2;
}

.profile-nav {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 6px;
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.05);
    display: flex;
    gap: 5px;
    margin-bottom: 30px;
    border: 1px solid var(--border-color);
}

.nav-item-custom {
    flex: 1;
    text-align: center;
    padding: 12px;
    border-radius: 12px;
    color: var(--text-muted);
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
    font-size: 0.9rem;
}

.nav-item-custom:hover {
    background: var(--bg-body);
    color: var(--primary);
}

.nav-item-custom.active {
    background: var(--primary-soft);
    color: var(--primary);
}

.profile-content-card {
    background: var(--bg-card);
    border-radius: 24px;
    padding: 40px;
    border: 1px solid var(--border-color);
    display: none;
    animation: slideUp 0.4s ease-out;
}

.profile-content-card.active {
    display: block;
}

.password-reqs {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 10px;
    padding: 12px;
    background: var(--bg-body);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.req-item {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 5px;
    transition: 0.3s;
}

.req-item.valid {
    color: #10b981;
    font-weight: 700;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================================================
   6. LAYANAN PUBLIK
   ========================================================= */
.layanan-square-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s ease;
    height: 100%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}

.layanan-square-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
    border-color: var(--primary-soft);
}

.layanan-icon-wrapper {
    width: 55px;
    height: 55px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.layanan-icon-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain; 
}

.layanan-icon-wrapper i {
    font-size: 2.5rem;
    color: var(--text-main);
}

.layanan-title {
    font-size: 0.85rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-main);
}