/* ==========================================================================
   PARIWISATA KLATEN - PORTAL DIREKTORI & LINK HUB (WEB APIK)
   Clean, Human-Designed Mobile-First UI (Reference: Maya Johnson Screenshot)
   ========================================================================== */

:root {
  /* Color Tokens */
  --bg-app: #08080d;
  --bg-frame: #0d0d14;
  --bg-card: rgba(22, 22, 33, 0.85);
  --bg-card-hover: rgba(32, 32, 48, 0.95);
  --bg-glass: rgba(255, 255, 255, 0.06);

  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(168, 85, 247, 0.35);

  --text-pure: #ffffff;
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-subtle: #64748b;

  /* Theme Accents */
  --brand-purple: #8b5cf6;
  --brand-pink: #ec4899;
  --brand-magenta: #c084fc;
  --glow-pink: rgba(236, 72, 153, 0.3);
  --glow-purple: rgba(139, 92, 246, 0.25);

  /* Category Squircle Gradients */
  --grad-penginapan: linear-gradient(135deg, #6366f1, #8b5cf6);
  --grad-travel: linear-gradient(135deg, #0ea5e9, #38bdf8);
  --grad-rental: linear-gradient(135deg, #10b981, #059669);
  --grad-cafe: linear-gradient(135deg, #f59e0b, #d97706);
  --grad-resto: linear-gradient(135deg, #f43f5e, #e11d48);
  --grad-wisata: linear-gradient(135deg, #06b6d4, #0284c7);
  --grad-ekraf: linear-gradient(135deg, #ec4899, #c026d3);
  --grad-oleh: linear-gradient(135deg, #f97316, #fb923c);
  --grad-kesehatan: linear-gradient(135deg, #10b981, #06b6d4);
  --grad-darurat: linear-gradient(135deg, #ef4444, #dc2626);

  --wa-green: #22c55e;
  --maps-blue: #38bdf8;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --radius-full: 9999px;

  --font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --transition-fast: 0.16s ease;
  --transition-normal: 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   Reset & Base
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  font-size: 16px;
  background-color: var(--bg-app);
  color: var(--text-main);
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-app);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  overflow-x: hidden;
  position: relative;
  line-height: 1.5;
}

/* Background Ambient Glows (Matches the soft glow in the screenshot) */
.ambient-glow {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  filter: blur(140px);
}
.glow-top {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(147, 51, 234, 0.22) 0%, rgba(236, 72, 153, 0.12) 40%, transparent 70%);
  top: -150px;
  left: 50%;
  transform: translateX(-50%);
}
.glow-bottom {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(79, 70, 229, 0.15) 0%, transparent 70%);
  bottom: -100px;
  right: -50px;
}

/* ==========================================================================
   Mobile-Centric Frame (Clean & Focused on UI/UX)
   ========================================================================== */
.mobile-frame {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
  min-height: 100vh;
  padding: 20px 16px 40px 16px;
  display: flex;
  flex-direction: column;
}

/* ==========================================================================
   Top Status & Sync Bar
   ========================================================================== */
.top-status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.sync-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
}
.status-dot {
  width: 7px;
  height: 7px;
  background-color: var(--wa-green);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--wa-green);
  animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot {
  0% { transform: scale(0.9); opacity: 0.8; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.8; }
}

.btn-sync-refresh {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.btn-sync-refresh:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}
.btn-sync-refresh.rotating svg {
  animation: spin 1s linear infinite;
}
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
.icon-refresh {
  width: 15px;
  height: 15px;
}

/* ==========================================================================
   Profile Section (Directly from Screenshot)
   ========================================================================== */
.profile-section {
  text-align: center;
  margin-bottom: 22px;
}

.avatar-container {
  display: inline-block;
  margin-bottom: 14px;
}
.avatar-image {
  width: 96px;
  height: 124px;
  display: block;
  margin: 0 auto;
  object-fit: contain;
  border: none;
  background: transparent;
  filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.5));
  transition: transform var(--transition-normal);
}
.avatar-image:hover {
  transform: scale(1.04);
}

.identity-meta {
  margin-bottom: 16px;
}
.title-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-bottom: 3px;
}
.profile-name {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-pure);
}
.ig-verified-badge {
  width: 21px;
  height: 21px;
  display: inline-block;
  object-fit: contain;
  vertical-align: middle;
  filter: drop-shadow(0 2px 8px rgba(0, 149, 246, 0.45));
}

.profile-subtitle {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--brand-magenta);
  margin-bottom: 8px;
}
.profile-bio {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.5;
  max-width: 320px;
  margin: 0 auto;
}

/* Social Icon Circles Row (Menu Atas) */
.social-icons-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  margin-top: 16px;
}
.social-circle-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--border-subtle);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: all var(--transition-fast);
}
.social-circle-btn svg {
  width: 20px;
  height: 20px;
}
.social-circle-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}
.social-circle-btn:active {
  transform: scale(0.95);
}

/* ==========================================================================
   Universal Search Bar
   ========================================================================== */
.search-bar-wrap {
  margin-bottom: 18px;
}
.search-input-box {
  position: relative;
  width: 100%;
}
.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 17px;
  height: 17px;
  color: var(--text-subtle);
  pointer-events: none;
}
.search-input-box input {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 38px 12px 40px;
  color: var(--text-pure);
  font-size: 0.84rem;
  font-family: inherit;
  outline: none;
  transition: all var(--transition-fast);
}
.search-input-box input:focus {
  border-color: var(--brand-purple);
  box-shadow: 0 0 0 3px var(--glow-purple);
  background: rgba(26, 26, 40, 0.95);
}
.search-input-box input::placeholder {
  color: var(--text-subtle);
}
.btn-clear-search {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-subtle);
  font-size: 1.3rem;
  cursor: pointer;
  line-height: 1;
}
.btn-clear-search:hover {
  color: var(--text-pure);
}

/* ==========================================================================
   Menu Cards Section (VIEW 1 - First Menu grouped as requested)
   ========================================================================== */
.menu-cards-section {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.menu-card {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 13px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
  cursor: pointer;
  position: relative;
  text-decoration: none;
  color: inherit;
  transition: all var(--transition-fast);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.menu-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}
.menu-card:active {
  transform: scale(0.985);
}

/* Highlight style for the top card (like "My Amazon Storefront" in screenshot) */
.menu-card.highlight-card {
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.16), rgba(139, 92, 246, 0.12));
  border: 1px solid rgba(236, 72, 153, 0.35);
  box-shadow: 0 4px 18px rgba(236, 72, 153, 0.15);
}
.menu-card.highlight-card:hover {
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.24), rgba(139, 92, 246, 0.18));
  border-color: rgba(236, 72, 153, 0.5);
}

/* Squircle Icon Box */
.squircle-icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}
.squircle-icon svg {
  width: 22px;
  height: 22px;
}

.icon-penginapan { background: var(--grad-penginapan); }
.icon-travel     { background: var(--grad-travel); }
.icon-rental     { background: var(--grad-rental); }
.icon-cafe       { background: var(--grad-cafe); }
.icon-resto      { background: var(--grad-resto); }
.icon-wisata     { background: var(--grad-wisata); }
.icon-ekraf      { background: var(--grad-ekraf); }
.icon-oleh       { background: var(--grad-oleh); }
.icon-kesehatan  { background: var(--grad-kesehatan); }
.icon-darurat    { background: var(--grad-darurat); }

.menu-card-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.menu-card-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.menu-card-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-pure);
  letter-spacing: -0.01em;
}
.count-pill {
  font-size: 0.68rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.08);
  color: var(--brand-magenta);
  padding: 2px 7px;
  border-radius: var(--radius-full);
}
.menu-card-desc {
  font-size: 0.77rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.menu-card-chevron {
  color: var(--text-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform var(--transition-fast), color var(--transition-fast);
}
.menu-card-chevron svg {
  width: 17px;
  height: 17px;
}
.menu-card:hover .menu-card-chevron {
  color: var(--text-pure);
  transform: translateX(3px);
}

/* ==========================================================================
   Category Detail Directory View (VIEW 2)
   ========================================================================== */
.category-detail-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
  animation: fadeIn 0.2s ease-out;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Detail Header Bar with Back Button */
.detail-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-subtle);
}
.btn-back {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 6px 12px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.btn-back svg {
  width: 15px;
  height: 15px;
}
.btn-back:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  transform: translateX(-2px);
}

.detail-title-info {
  text-align: right;
}
.detail-category-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-pure);
}
.detail-category-count {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* Category Filter Controls */
.category-filter-controls {
  display: flex;
  gap: 8px;
}
.sub-search-box {
  position: relative;
  flex: 1.4;
}
.sub-search-box input {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 9px 30px 9px 34px;
  color: var(--text-pure);
  font-size: 0.78rem;
  font-family: inherit;
  outline: none;
}
.sub-search-box input:focus {
  border-color: var(--brand-purple);
}
.sub-search-box .search-icon {
  width: 14px;
  height: 14px;
  left: 11px;
}

.filter-select-wrap {
  flex: 1;
}
.filter-select-wrap select {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 9px 10px;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-family: inherit;
  outline: none;
  cursor: pointer;
}
.filter-select-wrap select:focus {
  border-color: var(--brand-purple);
}

/* Items List Container */
.items-list-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Individual Listing Card */
.listing-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 13px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all var(--transition-fast);
  backdrop-filter: blur(10px);
}
.listing-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.16);
  transform: translateY(-1px);
}

/* Card Landscape Banner (Google Maps Photo) */
.card-banner-box {
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 180px;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  background: rgba(255, 255, 255, 0.04);
  margin-bottom: 2px;
}
.card-banner-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.listing-card:hover .card-banner-img {
  transform: scale(1.04);
}
.card-banner-badge {
  position: absolute;
  bottom: 8px;
  left: 8px;
  background: rgba(10, 10, 16, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #f1f5f9;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: var(--radius-full);
}

.listing-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}
.listing-title-box {
  flex: 1;
}
.listing-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-pure);
  line-height: 1.35;
  margin-bottom: 2px;
}
.listing-sub {
  display: inline-block;
  font-size: 0.68rem;
  color: var(--brand-magenta);
  background: rgba(139, 92, 246, 0.14);
  padding: 1px 7px;
  border-radius: var(--radius-full);
  font-weight: 600;
}

.btn-card-share,
.btn-card-copy {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--transition-fast);
}
.btn-card-share svg,
.btn-card-copy svg {
  width: 15px;
  height: 15px;
}
.btn-card-share:hover,
.btn-card-copy:hover {
  background: rgba(139, 92, 246, 0.2);
  border-color: rgba(139, 92, 246, 0.4);
  color: #fff;
  transform: scale(1.06);
}

.listing-address {
  display: flex;
  align-items: flex-start;
  gap: 5px;
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 2px;
}
.listing-address svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--maps-blue);
}

.listing-actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.btn-card-action {
  flex: 1 1 0;
  min-width: 85px;
  padding: 8px 6px;
  border-radius: var(--radius-sm);
  font-size: 0.76rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-fast);
}
.btn-card-action svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}
.btn-card-maps {
  background: rgba(14, 165, 233, 0.12);
  color: var(--maps-blue);
  border: 1px solid rgba(14, 165, 233, 0.25);
}
.btn-card-maps:hover {
  background: #0284c7;
  color: #fff;
}
.btn-card-wa {
  background: rgba(34, 197, 94, 0.12);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.25);
}
.btn-card-wa:hover {
  background: #16a34a;
  color: #fff;
}
.btn-card-call {
  background: rgba(239, 68, 68, 0.14);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}
.btn-card-call:hover {
  background: #dc2626;
  color: #fff;
}
.btn-card-hotline {
  background: rgba(245, 158, 11, 0.14);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
}
.btn-card-hotline:hover {
  background: #d97706;
  color: #fff;
}

.listing-desc {
  display: none !important;
}

/* Empty State */
.empty-state-box {
  text-align: center;
  padding: 34px 16px;
  background: var(--bg-card);
  border: 1px dashed var(--border-subtle);
  border-radius: var(--radius-md);
}
.empty-emoji {
  font-size: 2rem;
  display: block;
  margin-bottom: 8px;
}
.empty-state-box h3 {
  font-size: 0.95rem;
  color: var(--text-pure);
  margin-bottom: 4px;
}
.empty-state-box p {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Load More */
.load-more-box {
  text-align: center;
  padding-top: 4px;
}
.btn-load-more {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 9px 20px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.btn-load-more:hover {
  background: var(--brand-purple);
  color: #fff;
  border-color: var(--brand-purple);
}
.btn-load-more svg {
  width: 14px;
  height: 14px;
}

/* ==========================================================================
   Global Search View (VIEW 3)
   ========================================================================== */
.global-search-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: fadeIn 0.2s ease-out;
}
.search-results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border-subtle);
}
.search-results-header h3 {
  font-size: 0.92rem;
  color: var(--text-pure);
  font-weight: 700;
}
.btn-text-action {
  background: none;
  border: none;
  color: var(--brand-magenta);
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
}
.btn-text-action:hover {
  text-decoration: underline;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.app-footer {
  margin-top: 36px;
  text-align: center;
  padding-top: 18px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.footer-sync-info {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  color: var(--text-muted);
}
.footer-sheet-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  color: var(--brand-magenta);
  text-decoration: none;
  background: rgba(139, 92, 246, 0.1);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(139, 92, 246, 0.2);
  transition: all var(--transition-fast);
}
.footer-sheet-link svg {
  width: 13px;
  height: 13px;
}
.footer-sheet-link:hover {
  background: rgba(139, 92, 246, 0.22);
  color: #fff;
}
.footer-credit {
  font-size: 0.7rem;
  color: var(--text-subtle);
  line-height: 1.5;
}

/* ==========================================================================
   Toast Notification
   ========================================================================== */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(0);
  background: #141420;
  color: #fff;
  border: 1px solid var(--brand-purple);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px var(--glow-purple);
  padding: 9px 18px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  z-index: 1000;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.toast.hidden {
  opacity: 0;
  transform: translateX(-50%) translateY(16px);
  pointer-events: none;
}
.toast-icon {
  background: var(--brand-purple);
  color: #fff;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
}

/* Utilities */
.hidden {
  display: none !important;
}
