/* home.css - Homepage styles */
/* ====================================================
   CURUP.INFO — HOMEPAGE v2
   Urutan: Quick Links → Berita → Loker → Kuliner → Wisata/Hotel → Agenda → Stats
   ==================================================== */

/* ── PERFORMANCE ─────────────────────────────────────── */
/* Hapus tap highlight & 300ms delay di semua elemen klik */
*, *::before, *::after { -webkit-tap-highlight-color: transparent; }

a, button, .quick-card, .loker-card, .kuliner-card,
.wisata-card, .hotel-card-h, .agenda-card,
.berita-item, .berita-featured {
  touch-action: manipulation;
}

/* will-change HANYA pada fixed elements yang memang beranimasi */
#floatingBadge {
  will-change: transform;
}

/* Hover/scale effect HANYA untuk mouse (bukan layar sentuh)
   Ini mencegah hover "nyangkut" saat scroll di HP */
@media (hover: hover) and (pointer: fine) {
  .quick-card:hover       { transform: scale(1.05); }
  .loker-card:hover       { background: #f9f9f9; }
  .kuliner-card:hover     { transform: translateY(-3px); box-shadow: 0 6px 24px rgba(0,0,0,.12); }
  .wisata-card:hover      { transform: translateY(-3px); }
  .hotel-card-h:hover     { transform: translateY(-3px); }
  .wisata-hp-card:hover   { transform: translateY(-3px); box-shadow: 0 6px 24px rgba(0,0,0,.12); }
  .wisata-hp-card:hover .whp-img img { transform: scale(1.05); }
  .quick-card:hover .qc-box i { transform: scale(1.1); }
}

/* Active/press effect tetap berlaku di semua device */
.quick-card:active  { transform: scale(0.88) !important; }
.loker-card:active  { transform: scale(0.97) !important; }
.kuliner-card:active { transform: scale(0.97) !important; }

:root {
  --blue:    #1a73e8;
  --blue2:   #0d47a1;
  --green:   #00897b;
  --orange:  #e65100;
  --purple:  #6a1b9a;
  --red:     #c62828;
  --bg:      #f1f3f4;
  --card:    #ffffff;
  --border:  #e0e0e0;
  --text:    #202124;
  --muted:   #5f6368;
  --radius:  12px;
  --shadow:  0 1px 4px rgba(0,0,0,.1), 0 4px 16px rgba(0,0,0,.06);
}
* { box-sizing: border-box; font-family: 'Inter', sans-serif; }
a { text-decoration: none; color: inherit; }

/* ── QUICK LINKS — iOS App Icon Style ────────────────── */
.quick-links {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  padding: 14px 8px 8px;
  background: #f2f2f7; /* iOS home screen bg */
}
@media (min-width: 480px) {
  .quick-links { grid-template-columns: repeat(8, 1fr); }
}

/* Card = ikon + label, background transparan */
.quick-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 4px 2px;
  text-decoration: none;
  cursor: pointer;
  background: none !important;
  border-radius: 0;
  box-shadow: none;
  transition: transform 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

/* Icon box — squircle iOS */
.quick-card .qc-box {
  width: 52px;
  height: 52px;
  border-radius: 22.5%; /* iOS squircle formula */
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  box-shadow:
    0 4px 10px rgba(0,0,0,.22),
    0 1px 3px rgba(0,0,0,.12),
    inset 0 1px 0 rgba(255,255,255,.35);
  transition: box-shadow 0.15s ease;
}

/* Gloss highlight khas iOS */
.quick-card .qc-box::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 52%;
  background: linear-gradient(
    180deg,
    rgba(255,255,255,.42) 0%,
    rgba(255,255,255,.12) 55%,
    rgba(255,255,255,0)   100%
  );
  border-radius: 22.5% 22.5% 0 0;
  z-index: 2;
  pointer-events: none;
}

/* Warna background per kategori — iOS color palette */
.quick-card.loker   .qc-box { background: linear-gradient(160deg, #1a8cff, #0055d4); }
.quick-card.jb      .qc-box { background: linear-gradient(160deg, #3dd65e, #1da83a); }
.quick-card.usaha   .qc-box { background: linear-gradient(160deg, #ffaa00, #e07800); }
.quick-card.berita  .qc-box { background: linear-gradient(160deg, #bf5af2, #9b31d4); }
.quick-card.darurat .qc-box { background: linear-gradient(160deg, #ff453a, #cc1f14); }
.quick-card.booking .qc-box { background: linear-gradient(160deg, #30d0fe, #0a9fd8); }
.quick-card.xagenda .qc-box { background: linear-gradient(160deg, #a78bfa, #6d28d9); }
.quick-card.kuliner .qc-box { background: linear-gradient(160deg, #ff375f, #cc1038); }
.quick-card.jasa    .qc-box { background: linear-gradient(160deg, #fde047, #eab308); }

/* Extra menu colors */
.quick-card.xwisata    .qc-box { background: linear-gradient(160deg, #34d399, #059669); }
.quick-card.xhotel     .qc-box { background: linear-gradient(160deg, #a78bfa, #7c3aed); }
.quick-card.xproperti  .qc-box { background: linear-gradient(160deg, #fb923c, #b45309); }
.quick-card.xproduk    .qc-box { background: linear-gradient(160deg, #38bdf8, #0369a1); }
.quick-card.xsehat     .qc-box { background: linear-gradient(160deg, #f87171, #be123c); }
.quick-card.xpemerintah .qc-box { background: linear-gradient(160deg, #2dd4bf, #0f766e); }
.quick-card.xpendidikan .qc-box { background: linear-gradient(160deg, #c084fc, #6d28d9); }
.quick-card.xotomotif  .qc-box { background: linear-gradient(160deg, #fb923c, #c2410c); }
.quick-card.xpertanian .qc-box { background: linear-gradient(160deg, #4ade80, #166534); }
.quick-card.xpengumuman .qc-box { background: linear-gradient(160deg, #60a5fa, #1e40af); }
.quick-card.xkeuangan  .qc-box { background: linear-gradient(160deg, #facc15, #b45309); }
.quick-card.xlainnya   .qc-box { background: linear-gradient(160deg, #94a3b8, #475569); }

/* Ikon di dalam box */
.quick-card .qc-box i {
  font-size: 22px;
  color: #fff;
  position: relative;
  z-index: 3;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.3));
  transition: transform 0.15s ease;
}

/* Label di bawah ikon */
.quick-card span {
  display: block;
  font-weight: 500;
  color: #1c1c1e; /* iOS label color */
  font-size: 10px;
  text-align: center;
  line-height: 1.2;
  letter-spacing: -0.1px;
}

/* ── SECTION WRAPPER ─────────────────────────────────── */
.home-section { padding: 20px 12px; }
/* Section dengan background abu — JANGAN pakai inline style margin */
.section-alt   { background: var(--bg); }
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.section-head-left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-pill {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .8px;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 20px;
  color: #fff;
}
.pill-blue   { background: var(--blue); }
.pill-green  { background: var(--green); }
.pill-orange { background: var(--orange); }
.pill-purple { background: var(--purple); }
.pill-red    { background: var(--red); }

.section-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}
.section-link {
  font-size: 12px;
  font-weight: 600;
  color: var(--blue);
}
.section-link:hover { text-decoration: underline; }

/* ── BERITA HEADLINE ─────────────────────────────────── */
.berita-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
.berita-featured {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  background: #111;
  aspect-ratio: 16/9;
  max-height: 260px;
}
.berita-featured img {
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: .75;
  transition: opacity .3s;
}
.berita-featured:hover img { opacity: .9; }
.bf-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 40px 14px 14px;
  background: linear-gradient(to top, rgba(0,0,0,.85) 0%, transparent 100%);
}
.bf-label {
  font-size: 10px;
  font-weight: 700;
  background: var(--blue);
  color: #fff;
  padding: 2px 8px;
  border-radius: 4px;
  display: inline-block;
  margin-bottom: 6px;
  letter-spacing: .5px;
}
.bf-title {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0 0 6px;
}
.bf-meta { font-size: 11px; color: rgba(255,255,255,.75); }

.berita-list { display: flex; flex-direction: column; gap: 0; }
.berita-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background .15s;
}
.berita-item:last-child { border-bottom: none; }
.berita-item:hover { background: #fafafa; }
.bi-img {
  width: 80px; height: 60px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  background: #eee;
}
.bi-content { flex: 1; min-width: 0; }
.bi-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
  margin: 0 0 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.bi-meta { font-size: 11px; color: var(--muted); }

/* ── LOKER LIST ──────────────────────────────────────── */
.loker-list {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
}
.loker-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border-bottom: 1px solid #f0f0f0;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: background .15s;
  touch-action: manipulation;
}
.loker-card:last-child { border-bottom: none; }
.loker-card:active { background: #f5f5f5; }

/* Thumbnail kiri */
.lk-thumb {
  flex-shrink: 0;
  width: 52px; height: 52px;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}
.lk-thumb img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
}
.lk-thumb-grad {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  border-radius: 10px;
}
.lk-thumb-init {
  font-size: 22px; font-weight: 900;
  color: rgba(255,255,255,.92);
  text-shadow: 0 1px 4px rgba(0,0,0,.2);
  line-height: 1;
}

/* Konten kanan */
.lk-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.lk-judul {
  font-size: 13px; font-weight: 700;
  color: #111827; line-height: 1.35;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.lk-company {
  font-size: 11px; color: #6b7280;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  display: flex; align-items: center; gap: 3px;
}
.lk-tags {
  display: flex; align-items: center; gap: 5px;
  flex-wrap: wrap;
}
.lk-tag {
  font-size: 10px; font-weight: 600;
  padding: 1px 7px; border-radius: 20px;
  white-space: nowrap;
}
.lk-tag-tipe    { background: #eff6ff; color: #1d4ed8; }
.lk-tag-new     { background: #f0fdf4; color: #15803d; }
.lk-tag-soon    { background: #fff7ed; color: #c2410c; }
.lk-tag-expired { background: #fef2f2; color: #b91c1c; }
.lk-tag-ok      { background: #f0fdf4; color: #15803d; }

/* Panah kanan */
.lk-arrow {
  flex-shrink: 0;
  font-size: 12px;
  color: #d1d5db;
}

.loker-empty {
  text-align: center;
  padding: 30px 16px;
  background: var(--card);
  border-radius: var(--radius);
  border: 1px dashed var(--border);
}
.loker-empty .empty-icon { font-size: 36px; margin-bottom: 8px; }
.loker-empty p { font-size: 13px; color: var(--muted); margin: 0 0 12px; }
.btn-outline-blue {
  display: inline-block;
  padding: 8px 18px;
  border-radius: 8px;
  border: 1.5px solid var(--blue);
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
}

/* ── KULINER ─────────────────────────────────────────── */
.kuliner-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.kuliner-card {
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform .2s, box-shadow .2s;
}
/* hover dipindah ke @media (hover:hover) di atas */
.kuliner-card img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
}
.kc-body { padding: 10px; }
.kc-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 4px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.kc-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}
.kc-harga { font-size: 11px; color: var(--green); font-weight: 600; }
.kc-rating { font-size: 11px; color: #f9a825; }

/* ── WISATA GRID ─────────────────────────────────────── */
.wisata-hp-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.wisata-hp-card {
  display: block; text-decoration: none; color: inherit;
  border-radius: var(--radius); overflow: hidden;
  background: var(--card);
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform .2s, box-shadow .2s;
}
.wisata-hp-card:active { transform: scale(0.97) !important; }
.whp-img {
  position: relative; overflow: hidden;
}
.whp-img img {
  width: 100%; aspect-ratio: 4/3;
  object-fit: cover; display: block;
  transition: transform .35s ease;
}
.whp-kat {
  position: absolute; top: 8px; left: 8px;
  font-size: 10px; font-weight: 700;
  padding: 2px 8px; border-radius: 4px;
  background: rgba(0,0,0,.45);
  color: #fff;
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,.2);
}
.whp-body {
  padding: 9px 10px 10px;
}
.whp-name {
  font-size: 13px; font-weight: 700;
  color: var(--text); margin: 0 0 3px;
  display: -webkit-box; -webkit-line-clamp: 1;
  -webkit-box-orient: vertical; overflow: hidden;
}
.whp-meta {
  font-size: 11px; color: var(--muted);
  display: flex; align-items: center; gap: 4px;
}

/* ── HOTEL GRID ──────────────────────────────────────── */
.hotel-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.hotel-card-h {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--card);
  box-shadow: 0 1px 4px rgba(0,0,0,.1);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: block;
}
.hotel-card-h img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
}
.hch-body { padding: 8px 10px; }
.hch-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 2px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.hch-desc {
  font-size: 11px;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
}

/* ── AGENDA ──────────────────────────────────────────── */
.agenda-grid { display: flex; flex-direction: column; gap: 8px; }
.agenda-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  cursor: pointer;
  transition: box-shadow .2s;
}
.agenda-card:hover { box-shadow: var(--shadow); }
.agenda-date {
  flex-shrink: 0;
  width: 46px; height: 50px;
  border-radius: 10px;
  background: var(--blue);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.agenda-date .ad-day  { font-size: 20px; font-weight: 800; line-height: 1; }
.agenda-date .ad-mon  { font-size: 9px; font-weight: 600; letter-spacing: .5px; text-transform: uppercase; }
.agenda-info { flex: 1; min-width: 0; }
.agenda-judul {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.agenda-lokasi { font-size: 11px; color: var(--muted); }
.agenda-kat {
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 4px;
  background: #ede7f6;
  color: var(--purple);
  font-weight: 600;
  flex-shrink: 0;
}


/* ── RESPONSIVE (tablet+) ────────────────────────────── */
@media (min-width: 600px) {
  .berita-layout {
    grid-template-columns: 1.4fr 1fr;
    align-items: start;
  }
  .berita-featured { max-height: 320px; aspect-ratio: auto; }
  .loker-grid        { grid-template-columns: repeat(2, 1fr); }
  .wisata-hp-grid    { grid-template-columns: repeat(4, 1fr); }
  .hotel-grid        { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 900px) {
  .berita-featured { max-height: 380px; }
  .kuliner-grid   { grid-template-columns: repeat(4, 1fr); }
  .loker-grid     { grid-template-columns: repeat(2, 1fr); }
  .wisata-hp-grid { grid-template-columns: repeat(4, 1fr); }
  .hotel-grid     { grid-template-columns: repeat(4, 1fr); }
  .quick-links    { grid-template-columns: repeat(8, 1fr); max-width: 900px; margin: 0 auto; }
  .home-section   { max-width: 900px; margin: 0 auto; }
  .section-alt    { max-width: 900px; margin: 0 auto; }
}

/* ── QUICK LINKS WRAPPER ─────────────────────── */
.quick-links-wrap {
  background: #f2f2f7;
  border-bottom: 1px solid #e0e0e0;
}

/* Tombol Lainnya — tampil seperti quick-card biasa */
button.quick-card {
  border: none;
  outline: none;
  font-family: inherit;
  -webkit-appearance: none;
}
button.quick-card.open .qc-box {
  box-shadow:
    0 2px 6px rgba(0,0,0,.18),
    0 1px 2px rgba(0,0,0,.10),
    inset 0 1px 0 rgba(255,255,255,.35);
  transform: scale(0.94);
}

/* ── MENU TAMBAHAN ───────────────────────────── */
.quick-links-more {
  max-height: 0;
  overflow: hidden;
  transition: max-height .4s ease;
}
.quick-links-more.open {
  max-height: 400px;
}
.ql-more-grid {
  border-top: 1px dashed #d1d1d6 !important;
  padding-top: 8px !important;
  padding-bottom: 12px !important;
  background: #f2f2f7 !important;
  grid-template-columns: repeat(4, 1fr) !important;
}
@media (min-width: 480px) {
  .ql-more-grid { grid-template-columns: repeat(8, 1fr) !important; }
}
@media (min-width: 900px) {
  .quick-links-wrap .quick-links { max-width: 900px; margin: 0 auto; }
  .ql-more-grid { max-width: 900px; margin: 0 auto !important; }
}
