:root {
  --harbor: #0b3d4a;
  --harbor-deep: #072c36;
  --wave: #1f7a8c;
  --sunset: #e85d4c;
  --gold: #f4b942;
  --sand: #fff4e6;
  --foam: #f8fcfb;
  --ink: #163038;
  --muted: #5b747c;
  --card: rgba(255, 252, 248, 0.82);
  --line: rgba(11, 61, 74, 0.12);
  --shadow: 0 18px 50px rgba(7, 44, 54, 0.14);
  --radius: 22px;
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Outfit", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(244, 185, 66, 0.28), transparent 55%),
    radial-gradient(900px 500px at 90% 0%, rgba(31, 122, 140, 0.22), transparent 50%),
    linear-gradient(180deg, #eef7f5 0%, var(--sand) 42%, #f7efe4 100%);
  min-height: 100vh;
  overflow-x: hidden;
}

a { color: var(--wave); text-decoration: none; }
a:hover { color: var(--sunset); }
img { max-width: 100%; display: block; }
.container { width: min(1120px, calc(100% - 2rem)); margin-inline: auto; }
.muted { color: var(--muted); }
.bg-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.45;
  pointer-events: none;
  z-index: -1;
  animation: drift 18s ease-in-out infinite;
}
.bg-orb-1 { width: 320px; height: 320px; background: #f4b942; top: 12%; left: -80px; }
.bg-orb-2 { width: 280px; height: 280px; background: #1f7a8c; bottom: 8%; right: -60px; animation-delay: -6s; }

@keyframes drift {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-24px) scale(1.05); }
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(14px);
  background: rgba(255, 248, 240, 0.78);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 72px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--harbor);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
}
.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--gold), var(--sunset));
  color: #fff;
  box-shadow: 0 8px 20px rgba(232, 93, 76, 0.35);
  animation: pulse 2.8s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { transform: rotate(-6deg) scale(1); }
  50% { transform: rotate(4deg) scale(1.06); }
}
.site-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}
.site-nav a {
  color: var(--harbor);
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  font-weight: 500;
  transition: background 0.2s, transform 0.2s;
}
.site-nav a:hover,
.site-nav a.is-active {
  background: rgba(31, 122, 140, 0.12);
  transform: translateY(-1px);
}
.lang-btn {
  background: var(--harbor) !important;
  color: #fff !important;
  margin-left: 0.35rem;
}
.lang-btn:hover { background: var(--wave) !important; color: #fff !important; }

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: rgba(11, 61, 74, 0.08);
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 5px auto;
  background: var(--harbor);
}

.hero {
  position: relative;
  padding: clamp(2.5rem, 6vw, 5rem) 0 3rem;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2rem;
  align-items: end;
}
.kicker {
  display: inline-block;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sunset);
  font-weight: 700;
  margin-bottom: 0.8rem;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6vw, 4.4rem);
  line-height: 1.02;
  margin: 0 0 1rem;
  color: var(--harbor-deep);
  max-width: 12ch;
}
.hero-lead {
  font-size: 1.15rem;
  line-height: 1.6;
  color: var(--muted);
  max-width: 38ch;
  margin-bottom: 1.6rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: 0;
  border-radius: 999px;
  padding: 0.85rem 1.35rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  background: linear-gradient(135deg, var(--sunset), #ff7a45);
  color: #fff;
  box-shadow: 0 12px 28px rgba(232, 93, 76, 0.35);
}
.btn-secondary {
  background: rgba(11, 61, 74, 0.08);
  color: var(--harbor);
}
.btn-ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--harbor);
}

.hero-visual {
  position: relative;
  min-height: 340px;
  border-radius: 36px;
  background:
    linear-gradient(160deg, rgba(11, 61, 74, 0.92), rgba(31, 122, 140, 0.75)),
    url("data:image/svg+xml,%3Csvg width='160' height='160' viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 80c20-20 40 20 60 0s40 20 60 0 40 20 60 0v80H0z' fill='rgba(255,255,255,0.06)'/%3E%3C/svg%3E");
  color: #fff;
  padding: 1.6rem;
  box-shadow: var(--shadow);
  overflow: hidden;
  animation: riseIn 0.8s ease both;
}
.hero-visual::before {
  content: "";
  position: absolute;
  inset: auto -20% -30% 20%;
  height: 60%;
  background: radial-gradient(circle at center, rgba(244,185,66,0.45), transparent 70%);
}
.hero-stat {
  position: relative;
  margin-top: 1rem;
  padding: 1rem 1.1rem;
  border-radius: 18px;
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.18);
}
.hero-stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.7rem;
}
.floating-chip {
  position: absolute;
  right: 1.2rem;
  top: 1.2rem;
  background: var(--gold);
  color: var(--harbor-deep);
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  font-weight: 700;
  animation: bob 3.2s ease-in-out infinite;
}
@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
@keyframes riseIn {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

.section { padding: 2.5rem 0; }
.section-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: end;
  margin-bottom: 1.4rem;
}
.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  margin: 0 0 0.35rem;
  color: var(--harbor-deep);
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}
.place-card, .guide-card, .tip-card {
  padding: 1.2rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.place-card:hover, .guide-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 40px rgba(7, 44, 54, 0.16);
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.7rem;
}
.place-card h3, .guide-card h3 {
  margin: 0 0 0.45rem;
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--harbor-deep);
}
.place-card p, .guide-card p, .tip-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}
.meta {
  margin-top: 0.85rem;
  font-size: 0.92rem;
  color: var(--harbor);
}

.page-hero {
  padding: 2.4rem 0 1rem;
}
.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  margin: 0 0 0.5rem;
  color: var(--harbor-deep);
}

.map-shell {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 1rem;
  min-height: 420px;
}
.map-sidebar {
  padding: 1.1rem;
}
.map-sidebar h2 {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
}
#map {
  min-height: 420px;
  height: 420px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  overflow: hidden;
}
#nearest-wrap {
  margin-top: 2rem;
  margin-bottom: 3rem;
}
#nearest-wrap h2 {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  color: var(--harbor-deep);
  font-size: 1.6rem;
}
.nearest-panel {
  overflow-x: auto;
  border: 2px solid var(--harbor);
  border-radius: 12px;
  background: #fff;
}
.nearest-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}
.nearest-table th {
  text-align: left;
  padding: 0.75rem 1rem;
  background: #0B3D4A;
  color: #fff;
  font-size: 0.9rem;
}
.nearest-table td {
  padding: 0.85rem 1rem;
  vertical-align: top;
  border-top: 1px solid #d7e3e6;
  min-width: 160px;
  font-size: 0.95rem;
}
.nearest-table a {
  color: var(--harbor);
  font-weight: 600;
  text-decoration: underline;
}
.nearest-meta {
  color: var(--muted);
  font-size: 0.82rem;
  margin-top: 0.25rem;
  line-height: 1.35;
}
.nearest-cat {
  white-space: nowrap;
}
.nearest-cat .filter-dot {
  display: inline-block;
  margin-right: 0.4rem;
  vertical-align: middle;
}
.nearest-wrap { margin-bottom: 1rem; }
.nearest-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}
.nearest-card {
  padding: 1rem 1.1rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.nearest-card h3 {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--harbor-deep);
  display: flex;
  align-items: center;
  gap: 0.45rem;
}
.nearest-card ol {
  margin: 0;
  padding-left: 1.15rem;
}
.nearest-card li {
  margin-bottom: 0.65rem;
  line-height: 1.35;
}
.nearest-card li:last-child { margin-bottom: 0; }
.nearest-card .dist {
  display: block;
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 0.15rem;
}
.nearest-card a { font-weight: 600; color: var(--harbor); }
.nearest-card a:hover { color: var(--sunset); }
.field {
  display: grid;
  gap: 0.35rem;
  margin-bottom: 0.9rem;
}
.field label { font-weight: 600; color: var(--harbor); font-size: 0.92rem; }
.field input, .field select, .field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.75rem 0.9rem;
  font: inherit;
  background: #fff;
  color: var(--ink);
}
.field textarea { min-height: 120px; resize: vertical; }
.filter-list {
  display: grid;
  gap: 0.45rem;
  margin: 0.8rem 0 1rem;
}
.filter-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.7rem;
  border-radius: 14px;
  background: rgba(255,255,255,0.7);
  border: 1px solid transparent;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.filter-item:hover { border-color: rgba(31,122,140,0.25); }
.filter-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex: 0 0 auto;
}
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.chip {
  display: inline-flex;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.8);
  border: 1px solid var(--line);
  color: var(--harbor);
  font-weight: 600;
  font-size: 0.9rem;
}
.chip.is-active {
  background: var(--harbor);
  color: #fff;
  border-color: var(--harbor);
}

.guide-article {
  padding: 1.5rem;
}
.guide-article h1 {
  font-family: var(--font-display);
  margin-top: 0;
}
.guide-article ul { padding-left: 1.2rem; }
.guide-article li { margin-bottom: 0.4rem; }

.gate-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem;
}
.gate-card {
  width: min(440px, 100%);
  padding: 2rem;
  text-align: center;
  animation: riseIn 0.6s ease both;
}
.gate-card h1 {
  font-family: var(--font-display);
  margin: 0.4rem 0 0.6rem;
}
.alert {
  padding: 0.75rem 0.9rem;
  border-radius: 14px;
  margin-bottom: 1rem;
  font-weight: 500;
}
.alert-error { background: #ffe6e2; color: #8d2b1f; }
.alert-success { background: #e5f7ef; color: #176848; }
.alert-info { background: #e7f3f6; color: #0b3d4a; }

.site-footer {
  padding: 2.5rem 0 3rem;
  border-top: 1px solid var(--line);
  margin-top: 2rem;
}
.footer-inner { text-align: center; }

/* Admin */
.admin-body { background: #f3f7f8; }
.admin-shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.admin-nav {
  background: var(--harbor-deep);
  color: #fff;
  padding: 1.4rem 1rem;
}
.admin-nav a {
  display: block;
  color: rgba(255,255,255,0.88);
  padding: 0.7rem 0.85rem;
  border-radius: 12px;
  margin-bottom: 0.25rem;
}
.admin-nav a:hover, .admin-nav a.is-active {
  background: rgba(255,255,255,0.12);
  color: #fff;
}
.admin-main { padding: 1.5rem; }
.admin-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.2rem;
}
.table-wrap { overflow: auto; }
table.data {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
}
table.data th, table.data td {
  padding: 0.75rem 0.9rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
table.data th { background: #eef5f6; color: var(--harbor); font-size: 0.85rem; }
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.form-grid .full { grid-column: 1 / -1; }
.translate-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: 0.35rem 0 0.8rem;
}
.btn-sm { padding: 0.45rem 0.8rem; font-size: 0.88rem; }
.status-pill {
  display: inline-block;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
}
.status-on { background: #d9f5e6; color: #176848; }
.status-off { background: #ffe6e2; color: #8d2b1f; }

@media (max-width: 920px) {
  .hero-grid, .map-shell, .grid-3, .grid-2, .form-grid, .admin-shell {
    grid-template-columns: 1fr;
  }
  #map, .map-shell { min-height: 360px; }
  #map { height: 360px; }
  .nav-toggle { display: inline-block; }
  .site-nav {
    display: none;
    position: absolute;
    right: 1rem;
    top: 68px;
    flex-direction: column;
    align-items: stretch;
    background: rgba(255,248,240,0.98);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 0.6rem;
    box-shadow: var(--shadow);
    min-width: 200px;
  }
  .site-nav.is-open { display: flex; }
  .section-head { flex-direction: column; align-items: start; }
}
