/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --blue-dark:   #1a5276;
  --blue-mid:    #2980b9;
  --blue-light:  #aed6f1;
  --green:       #1e8449;
  --green-light: #a9dfbf;
  --amber:       #d4ac0d;
  --bg:          #f0f6f0;
  --surface:     #ffffff;
  --text:        #1c2833;
  --text-light:  #566573;
  --border:      #d5e8d4;
  --nav-height:  64px;
  --header-height: 70px;
  --radius:      12px;
  --shadow:      0 2px 12px rgba(0,0,0,0.10);
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: 'Open Sans', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue-mid); text-decoration: none; }

/* ── App Shell ── */
#app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ── Header ── */
#app-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-height);
  background: var(--blue-dark);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.header-logo {
  width: 42px;
  height: 42px;
  object-fit: contain;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  padding: 2px;
  flex-shrink: 0;
}

.header-text h1 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
}

.header-text p {
  font-size: 0.72rem;
  color: var(--blue-light);
  letter-spacing: 0.03em;
}

/* ── Main Content ── */
#main-content {
  margin-top: var(--header-height);
  margin-bottom: var(--nav-height);
  flex: 1;
}

/* ── Sections ── */
.section { display: none; }
.section.active { display: block; }

/* ── Hero ── */
.hero {
  position: relative;
  height: 240px;
  overflow: hidden;
}

.hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(26,82,118,0.3) 0%, rgba(26,82,118,0.7) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 20px;
  text-align: center;
}

.hero-overlay h2 {
  color: #fff;
  font-size: 1.4rem;
  font-weight: 700;
  text-shadow: 0 1px 4px rgba(0,0,0,0.5);
  line-height: 1.3;
}

.hero-overlay p {
  color: rgba(255,255,255,0.9);
  font-size: 0.85rem;
  margin-top: 4px;
  text-shadow: 0 1px 3px rgba(0,0,0,0.4);
}

/* ── Section Header ── */
.section-header {
  background: var(--blue-dark);
  color: #fff;
  padding: 20px 16px 16px;
}

.section-header h2 {
  font-size: 1.2rem;
  font-weight: 700;
}

.section-header p {
  font-size: 0.82rem;
  color: var(--blue-light);
  margin-top: 2px;
}

/* ── Content Wrapper ── */
.content-wrap { padding: 16px; }

/* ── Quick Info Cards (Welcome) ── */
.quick-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 20px;
}

.quick-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 14px 12px;
  text-align: center;
  box-shadow: var(--shadow);
  border-top: 3px solid var(--blue-mid);
}

.quick-card .icon { font-size: 1.6rem; margin-bottom: 6px; }
.quick-card .label { font-size: 0.7rem; color: var(--text-light); text-transform: uppercase; letter-spacing: 0.05em; }
.quick-card .value { font-size: 0.95rem; font-weight: 700; color: var(--blue-dark); margin-top: 2px; }

/* ── Welcome Message ── */
.welcome-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}

.welcome-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--blue-dark);
  margin-bottom: 8px;
}

.welcome-card p {
  font-size: 0.88rem;
  color: var(--text);
  line-height: 1.65;
}

.welcome-card p + p { margin-top: 8px; }

/* ── WiFi Highlight Card ── */
.wifi-card {
  background: linear-gradient(135deg, var(--blue-dark), var(--blue-mid));
  color: #fff;
  border-radius: var(--radius);
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}

.wifi-card .wifi-icon { font-size: 2rem; flex-shrink: 0; }

.wifi-card .wifi-label { font-size: 0.72rem; opacity: 0.8; text-transform: uppercase; letter-spacing: 0.05em; }
.wifi-card .wifi-name { font-size: 1.05rem; font-weight: 700; }
.wifi-card .wifi-pass-label { font-size: 0.72rem; opacity: 0.8; margin-top: 6px; }
.wifi-card .wifi-pass { font-size: 1.05rem; font-weight: 700; letter-spacing: 0.05em; }

/* ── Photo Gallery ── */
.photo-gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 16px;
}

.photo-gallery img {
  border-radius: 8px;
  height: 120px;
  object-fit: cover;
  width: 100%;
}

.photo-gallery img.wide {
  grid-column: 1 / -1;
  height: 180px;
}

/* ── Accordion ── */
.accordion { margin-bottom: 16px; }

.accordion-item {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 8px;
  overflow: hidden;
}

.accordion-btn {
  width: 100%;
  background: none;
  border: none;
  padding: 16px;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  font-family: inherit;
  gap: 10px;
}

.accordion-btn:active { background: #f0f6f0; }

.accordion-btn-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.accordion-icon { font-size: 1.4rem; flex-shrink: 0; }

.accordion-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--blue-dark);
  line-height: 1.3;
}

.accordion-subtitle {
  font-size: 0.75rem;
  color: var(--text-light);
  margin-top: 1px;
}

.accordion-chevron {
  font-size: 0.8rem;
  color: var(--text-light);
  transition: transform 0.25s;
  flex-shrink: 0;
}

.accordion-item.open .accordion-chevron { transform: rotate(180deg); }

.accordion-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.accordion-item.open .accordion-body { max-height: 800px; }

.accordion-content {
  padding: 0 16px 16px;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

.accordion-content p {
  font-size: 0.87rem;
  color: var(--text);
  line-height: 1.65;
  margin-bottom: 8px;
}

.accordion-content p:last-child { margin-bottom: 0; }

.accordion-content ul {
  padding-left: 18px;
  margin-top: 4px;
}

.accordion-content li {
  font-size: 0.87rem;
  color: var(--text);
  line-height: 1.7;
  margin-bottom: 2px;
}

.step {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 8px;
}

.step-num {
  background: var(--blue-dark);
  color: #fff;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 2px;
}

.step-text { font-size: 0.87rem; color: var(--text); line-height: 1.6; }

.note-box {
  background: #fef9e7;
  border-left: 3px solid var(--amber);
  border-radius: 0 6px 6px 0;
  padding: 10px 12px;
  margin-top: 10px;
  font-size: 0.83rem;
  color: #7d6608;
  line-height: 1.55;
}

.tip-box {
  background: #eafaf1;
  border-left: 3px solid var(--green);
  border-radius: 0 6px 6px 0;
  padding: 10px 12px;
  margin-top: 10px;
  font-size: 0.83rem;
  color: #1a6035;
  line-height: 1.55;
}

/* ── Restaurant Cards ── */
.filter-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 12px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.filter-bar::-webkit-scrollbar { display: none; }

.filter-btn {
  flex-shrink: 0;
  padding: 6px 14px;
  border-radius: 20px;
  border: 1.5px solid var(--blue-mid);
  background: none;
  color: var(--blue-mid);
  font-size: 0.8rem;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.filter-btn.active {
  background: var(--blue-dark);
  border-color: var(--blue-dark);
  color: #fff;
}

.restaurant-list { padding: 12px 16px; }

.restaurant-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 12px;
  padding: 16px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.restaurant-emoji { font-size: 2rem; flex-shrink: 0; }

.restaurant-info { flex: 1; min-width: 0; }

.restaurant-name {
  font-size: 0.97rem;
  font-weight: 700;
  color: var(--blue-dark);
}

.restaurant-meta {
  display: flex;
  gap: 8px;
  margin-top: 3px;
  flex-wrap: wrap;
}

.restaurant-tag {
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 600;
}

.tag-type { background: var(--blue-light); color: var(--blue-dark); }
.tag-price { background: #d5f5e3; color: #1e8449; }
.tag-dist { background: #fdebd0; color: #935116; }

.restaurant-desc {
  font-size: 0.82rem;
  color: var(--text-light);
  margin-top: 6px;
  line-height: 1.55;
}

.restaurant-tip {
  font-size: 0.79rem;
  color: var(--green);
  margin-top: 4px;
  font-style: italic;
}

/* ── Sub-tabs (Explore) ── */
.sub-tabs {
  display: flex;
  background: var(--surface);
  border-bottom: 2px solid var(--border);
}

.sub-tab {
  flex: 1;
  padding: 12px 4px;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-light);
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
}

.sub-tab.active {
  color: var(--blue-dark);
  border-bottom-color: var(--blue-dark);
}

.sub-panel { display: none; padding: 12px 16px; }
.sub-panel.active { display: block; }

/* ── Attraction Cards ── */
.attraction-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 12px;
  overflow: hidden;
}

.attraction-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
}

.attraction-emoji { font-size: 1.8rem; flex-shrink: 0; }

.attraction-title {
  font-size: 0.97rem;
  font-weight: 700;
  color: var(--blue-dark);
}

.attraction-distance {
  font-size: 0.75rem;
  color: var(--text-light);
  margin-top: 2px;
}

.attraction-body {
  padding: 0 16px 14px;
  font-size: 0.85rem;
  color: var(--text);
  line-height: 1.6;
  border-top: 1px solid var(--border);
  padding-top: 10px;
}

/* ── Info Section ── */
.info-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 12px;
  overflow: hidden;
}

.info-card-header {
  background: var(--blue-dark);
  color: #fff;
  padding: 12px 16px;
  font-size: 0.9rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.info-card-body { padding: 14px 16px; }

.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  gap: 12px;
}

.info-row:last-child { border-bottom: none; }
.info-label { font-size: 0.82rem; color: var(--text-light); font-weight: 600; }
.info-value { font-size: 0.88rem; color: var(--text); font-weight: 600; text-align: right; }

.rules-list { list-style: none; }

.rules-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.87rem;
  color: var(--text);
  line-height: 1.5;
}

.rules-list li:last-child { border-bottom: none; }
.rules-list .rule-icon { flex-shrink: 0; font-size: 1.1rem; }

/* ── Emergency / Contact ── */
.contact-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 10px;
}

.contact-card a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  color: var(--text);
}

.contact-card a:active { background: var(--bg); border-radius: var(--radius); }

.contact-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.icon-red { background: #fadbd8; }
.icon-blue { background: #d6eaf8; }
.icon-green { background: #d5f5e3; }
.icon-amber { background: #fef9e7; }

.contact-details { flex: 1; }
.contact-name { font-size: 0.95rem; font-weight: 700; color: var(--blue-dark); }
.contact-number { font-size: 0.85rem; color: var(--text-light); margin-top: 1px; }

.contact-arrow { color: var(--text-light); font-size: 0.85rem; }

/* ── Bottom Nav ── */
#bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--nav-height);
  background: var(--surface);
  display: flex;
  align-items: stretch;
  border-top: 1px solid var(--border);
  box-shadow: 0 -2px 10px rgba(0,0,0,0.08);
  z-index: 100;
}

.nav-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border: none;
  background: none;
  cursor: pointer;
  padding: 6px 2px;
  font-family: inherit;
  color: var(--text-light);
  transition: color 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.nav-btn.active { color: var(--blue-dark); }

.nav-btn svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-btn span {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.nav-btn.active .nav-indicator {
  width: 4px; height: 4px;
  background: var(--blue-dark);
  border-radius: 50%;
  margin-bottom: -7px;
}

/* ── Misc ── */
.section-intro {
  padding: 16px 16px 4px;
  font-size: 0.85rem;
  color: var(--text-light);
  line-height: 1.6;
}

.divider-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-light);
  padding: 12px 16px 6px;
}

/* ── iOS safe area ── */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  #bottom-nav { padding-bottom: env(safe-area-inset-bottom); height: calc(var(--nav-height) + env(safe-area-inset-bottom)); }
  #main-content { margin-bottom: calc(var(--nav-height) + env(safe-area-inset-bottom)); }
}

/* ── Install Banner ── */
#install-banner {
  display: none;
  position: fixed;
  bottom: calc(var(--nav-height) + 8px);
  left: 12px; right: 12px;
  background: var(--blue-dark);
  color: #fff;
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  z-index: 200;
  align-items: center;
  gap: 12px;
}

#install-banner p { font-size: 0.85rem; flex: 1; line-height: 1.4; }

#install-banner button {
  flex-shrink: 0;
  padding: 8px 16px;
  border-radius: 8px;
  border: none;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}

.btn-install { background: var(--amber); color: #1a1a1a; }
.btn-dismiss { background: transparent; color: rgba(255,255,255,0.7); font-weight: 400; }

@media (min-width: 480px) {
  .hero { height: 300px; }
  .quick-grid { grid-template-columns: repeat(4, 1fr); }
  .photo-gallery img { height: 160px; }
  .photo-gallery img.wide { height: 220px; }
}
