:root {
  --brand: #063b70;
  --brand-light: #00a9e8;
  --sun: #f5a300;
  --ink: #16324a;
  --muted: #526575;
  --border: #d9e2e8;
  --surface: #ffffff;
  --soft: #f5f8fa;
  --services: #a9233a;
  --procedures: #082f57;
  --business: #f36b12;
  --health: #00a653;
  --events: #f4b000;
  --beaches: #00b8b2;
  --contacts: #d32f2f;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--soft);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: var(--soft); }
button, input { font: inherit; }
button { cursor: pointer; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }

.app-shell {
  width: min(100%, 560px);
  min-height: 100dvh;
  margin: 0 auto;
  background: var(--surface);
  box-shadow: 0 0 36px rgba(6, 59, 112, .09);
  padding-bottom: calc(78px + env(safe-area-inset-bottom));
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(14px);
}
.app-header img { display: block; width: 168px; height: auto; }
.location-pill {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  min-height: 38px;
  padding: 8px 11px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--brand);
  background: var(--soft);
  font-size: .82rem;
  font-weight: 700;
}

main { padding: 24px 18px 8px; }
.intro { padding: 6px 2px 18px; }
.eyebrow { margin: 0 0 5px; color: var(--brand-light); font-size: .76rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 7px; font-size: clamp(1.85rem, 7vw, 2.35rem); line-height: 1.1; color: var(--brand); }
h2 { font-size: 1.1rem; line-height: 1.25; }
.intro p:last-child { margin: 0; color: var(--muted); line-height: 1.55; }

.search-wrap { position: relative; margin-bottom: 28px; }
.search-icon { position: absolute; left: 16px; top: 14px; z-index: 1; color: var(--brand); font-size: 1.45rem; line-height: 1; }
#main-search {
  width: 100%;
  min-height: 54px;
  padding: 0 45px 0 48px;
  border: 2px solid var(--border);
  border-radius: 16px;
  outline: 0;
  color: var(--ink);
  background: #fff;
  box-shadow: 0 8px 24px rgba(6, 59, 112, .07);
  font-size: 1rem;
}
#main-search:focus { border-color: var(--brand-light); box-shadow: 0 0 0 4px rgba(0,169,232,.12); }
#clear-search { position: absolute; right: 8px; top: 8px; display: none; width: 38px; height: 38px; border: 0; border-radius: 50%; color: var(--muted); background: transparent; font-size: 1.5rem; }
.suggestions { position: absolute; top: 62px; z-index: 15; width: 100%; padding: 7px; border: 1px solid var(--border); border-radius: 15px; background: #fff; box-shadow: 0 18px 45px rgba(6,59,112,.16); }
.suggestions button { display: flex; width: 100%; gap: 10px; align-items: center; padding: 12px; border: 0; border-radius: 10px; color: var(--ink); background: transparent; text-align: left; }
.suggestions button:hover, .suggestions button:focus { background: var(--soft); }

.section-heading { display: flex; justify-content: space-between; align-items: baseline; margin: 0 2px 12px; }
.section-heading h2 { margin: 0; color: var(--ink); }
.section-heading span { color: var(--muted); font-size: .75rem; }
.quick-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 30px; }
.quick-card {
  min-height: 104px;
  padding: 13px 8px 11px;
  border: 1px solid var(--border);
  border-radius: 16px;
  color: var(--ink);
  background: #fff;
  box-shadow: 0 5px 16px rgba(6,59,112,.05);
  font-size: .77rem;
  font-weight: 750;
  line-height: 1.2;
}
.quick-card:active { transform: scale(.98); }
.quick-icon { display: grid; place-items: center; width: 43px; height: 43px; margin: 0 auto 9px; border-radius: 14px; color: #fff; font-size: 1.28rem; }

.category-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 28px; }
.category-card { display: flex; align-items: center; gap: 11px; min-height: 72px; padding: 12px; border: 1px solid var(--border); border-radius: 16px; color: var(--ink); background: #fff; font-weight: 750; text-align: left; }
.category-card .category-icon { display: grid; flex: 0 0 42px; place-items: center; width: 42px; height: 42px; border-radius: 13px; color: #fff; font-size: 1.2rem; }
.category-card small { display: block; margin-top: 3px; color: var(--muted); font-size: .68rem; font-weight: 500; }

.today-card { margin-bottom: 22px; padding: 20px; border-radius: 20px; color: #fff; background: linear-gradient(140deg, #063b70 0%, #07599c 100%); }
.today-card .eyebrow { color: #7cddff; }
.today-card h2 { margin-bottom: 8px; font-size: 1.24rem; }
.today-card p:last-child { margin: 0; color: rgba(255,255,255,.82); font-size: .9rem; line-height: 1.5; }
.status-dot { float: right; width: 10px; height: 10px; margin-top: 3px; border-radius: 50%; background: #42db8b; box-shadow: 0 0 0 5px rgba(66,219,139,.17); }

.detail-view { min-height: 64vh; }
.back-button { margin: 0 0 22px; padding: 8px 0; border: 0; color: var(--brand); background: transparent; font-weight: 750; }
.detail-hero { padding: 22px; border-radius: 22px; color: #fff; background: var(--accent, var(--brand)); }
.detail-hero .detail-symbol { font-size: 2rem; }
.detail-hero h1 { margin: 10px 0 5px; color: #fff; }
.detail-hero p { margin: 0; color: rgba(255,255,255,.85); }
.demo-note { margin-top: 16px; padding: 14px 15px; border: 1px solid #bde8f7; border-radius: 14px; color: var(--ink); background: #effaff; font-size: .86rem; line-height: 1.45; }
.action-list { display: grid; gap: 10px; margin-top: 18px; }
.action-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 66px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 15px; background: #fff; }
.action-row strong { display: block; font-size: .93rem; }
.action-row small { color: var(--muted); }
.action-row a { padding: 9px 12px; border-radius: 10px; color: #fff; background: var(--brand); font-size: .75rem; font-weight: 800; text-decoration: none; }
.empty-state { margin-top: 28px; padding: 38px 22px; border: 1px dashed var(--border); border-radius: 20px; text-align: center; background: var(--soft); }
.empty-state > span { color: var(--brand-light); font-size: 2.4rem; }
.empty-state h2 { margin: 10px 0 6px; }
.empty-state p { margin: 0; color: var(--muted); line-height: 1.5; }

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  width: min(100%, 560px);
  padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  border-top: 1px solid var(--border);
  background: rgba(255,255,255,.97);
  backdrop-filter: blur(14px);
}
.bottom-nav button { display: grid; gap: 3px; justify-items: center; min-height: 51px; padding: 5px 2px; border: 0; border-radius: 12px; color: var(--muted); background: transparent; font-size: .68rem; font-weight: 700; }
.bottom-nav button span { font-size: 1.2rem; line-height: 1; }
.bottom-nav button.active { color: var(--brand); background: #eef6fc; }

@media (min-width: 700px) {
  body { padding: 28px 0; }
  .app-shell { min-height: calc(100dvh - 56px); border-radius: 28px; overflow: hidden; }
  .bottom-nav { bottom: 28px; border-radius: 0 0 28px 28px; }
}

@media (max-width: 370px) {
  .app-header img { width: 145px; }
  .location-pill { padding-inline: 9px; font-size: .75rem; }
  .quick-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (prefers-reduced-motion: no-preference) {
  .quick-card, .category-card, .bottom-nav button { transition: transform .15s ease, background-color .15s ease, box-shadow .15s ease; }
  .quick-card:hover, .category-card:hover { transform: translateY(-2px); box-shadow: 0 9px 22px rgba(6,59,112,.09); }
}
