/*
  VN Golf Finder — Minimal static styles
  - Light, responsive, no JS required
*/

:root {
  --bg: #0b1015;
  --panel: #111823;
  --card: #131b26;
  --line: #243041;
  --text: #e9eef5;
  --muted: #a9b4c2;
  --primary: #4cc38a; /* teal-green */
  --primary-ink: #0e1c15;
  --accent: #7cc4ff;  /* sky */
  --danger: #ff6369;
  --radius: 12px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

/* Reset-ish */
* { box-sizing: border-box; }
html, body { height: 100%; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 72px; /* keep anchor targets visible below sticky header */
}
body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Noto Sans, Helvetica, Arial, Apple Color Emoji, Segoe UI Emoji;
  color: var(--text);
  background: radial-gradient(1200px 800px at 20% -10%, #0e1420 0%, var(--bg) 60%) fixed,
              radial-gradient(1000px 700px at 120% 20%, #0b1320 0%, var(--bg) 60%) fixed,
              var(--bg);
  line-height: 1.5;
  padding-top: 64px; /* room for fixed header */
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(12,17,24,0.85), rgba(12,17,24,0.6));
  backdrop-filter: saturate(140%) blur(10px);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand {
  font-weight: 800;
  letter-spacing: 0.2px;
  color: var(--text);
}
.nav { display: flex; align-items: center; gap: 12px; }
.nav a {
  color: var(--muted);
  margin-left: 0; /* gap으로 간격 처리 */
  font-weight: 600;
}
.nav a:hover { color: var(--text); }

/* 언어 메뉴는 제거(한국어 고정) */

/* Hero */
.hero {
  padding: 56px 0 24px;
}
.hero h1 {
  font-size: 32px;
  margin: 0 0 8px;
}
.subtitle { color: var(--muted); margin: 0; }
/* Page helper */
.page-subline { color: var(--muted); margin: 4px 0 14px; }
.external { color:#a6d4ff; border-bottom:1px dashed rgba(124,196,255,0.6); }
.external:hover { color:#ffffff; border-bottom-color:#cfe6ff; }
.external::after { content:'\2197'; /* ↗ */ font-size:.9em; margin-left:4px; opacity:.85 }

/* Sections */
.section { padding: 40px 0; }
.section[id] { scroll-margin-top: 72px; }
.section--alt {
  background: linear-gradient(180deg, rgba(19,27,38,0.6), rgba(19,27,38,0.3));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.section-title {
  margin: 0 0 20px;
  font-size: 20px;
}

h1.section-title {
  font-size: 28px;
  line-height: 1.2;
}

/* Collapsible regions */
.region { margin-bottom: 28px; }
.region__head { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:10px; }
.region__toggle { display:inline-flex; align-items:center; gap:8px; background:transparent; color:var(--text); font-weight:800; font-size:20px; border:0; padding:0; cursor:pointer; flex:0 0 auto; }
.region__toggle:hover { opacity: .9; }
.chev { width: 0; height: 0; border-left:6px solid transparent; border-right:6px solid transparent; border-top:8px solid var(--muted); transition: transform .18s ease; }
/* Chevron icon (hollow) */
.chev-icon { width:16px; height:16px; display:inline-block; transition: transform .18s ease, color .18s ease; color: var(--muted); }
.region__toggle:hover .chev-icon { color:#c7d8f1 }
.region__toggle[aria-expanded="false"] .chev-icon { transform: rotate(180deg); }

/* Utility */
.hidden{ display:none !important; }
.region[data-collapsed="true"] .chev { transform: rotate(-90deg); }
.region__body { margin-top: 6px; }
.region[data-collapsed="true"] .region__body { display:none; }

/* Filters (region tags) */
.filters {
  display: flex;
  flex: 1 1 100%;
  min-width: 0;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-start;
  margin: 10px 0 20px;
}
.filters::-webkit-scrollbar { display: none; }

@media (min-width: 960px) {
  .filters {
    flex: 1 1 auto;
    margin: 0 0 20px;
    justify-content: flex-end;
  }
}
.tag { display:inline-flex; align-items:center; gap:6px; padding:6px 10px; border-radius:999px; border:1px solid var(--line); color: var(--muted); background:#10192a; cursor:pointer; font-weight:600; font-size:13px; }
.tag:hover { color:#fff; border-color:#3a4b66; }
.tag.is-active { background: rgba(124,196,255,0.18); color:#e9f3ff; border-color: rgba(124,196,255,0.45); }
.screen-filters { display:flex; flex-direction:column; gap:12px; margin: 18px 0 20px; align-items:flex-start; }
.screen-filters .tag-group { display:flex; align-items:center; gap:10px; flex-wrap:wrap; width:100%; }
.tag-label { font-size:13px; font-weight:700; color: var(--muted); text-transform:uppercase; letter-spacing:0.02em; }
.screen-filters .tag { margin:0; }
.screen-header { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:12px; }
.screen-header .section-title { margin:0; }

/* Grid */
.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

@media (max-width: 1200px) {
  .grid {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  }
}

/* Card */
.card {
  background: linear-gradient(180deg, rgba(22,31,44,0.9), rgba(17,24,35,0.9));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  display: flex;
  flex-direction: column;
  transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
}
.card:hover {
  transform: translateY(-2px);
  border-color: #31415a;
  box-shadow: 0 14px 40px rgba(0,0,0,0.45);
}
.card__header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.card__title { margin: 0; font-size: 18px; flex: 1 1 auto; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
/* keep badge/map on one line and prevent wrapping under long titles */
.card__header > :last-child { flex: 0 0 auto; white-space: nowrap; }
.badge {
  border-radius: 999px;
  padding: 4px 10px;
  background: rgba(124,196,255,0.12);
  color: #a6d4ff;
  border: 1px solid rgba(124,196,255,0.35);
  font-size: 12px;
  font-weight: 700;
}
.meta {
  list-style: none;
  padding: 0; margin: 12px 0 12px;
  color: var(--muted);
}
.meta li { margin: 6px 0; }

.price {
  background: linear-gradient(180deg, rgba(76,195,138,0.1), rgba(76,195,138,0.06));
  border: 1px solid rgba(76,195,138,0.35);
  color: #c9ffe7;
  padding: 12px;
  border-radius: 10px;
}

.card__footer { margin-top: 14px; display: flex; }
.btn {
  display: inline-block;
  border-radius: 10px;
  padding: 10px 14px;
  background: var(--primary);
  color: var(--primary-ink);
  font-weight: 800;
  border: 1px solid rgba(0,0,0,0.1);
  box-shadow: inset 0 -2px 0 rgba(0,0,0,0.1);
}
.btn:hover { filter: brightness(1.05); }
/* 추가: 이중 버튼 레이아웃, 고스트/비활성 스타일 */
.card__footer { gap: 10px; flex-wrap: wrap; }
.card__chat { margin-left: auto; display: inline-flex; align-items: center; position: relative; padding: 2px; border-radius: 4px; }
.card__chat::after { content: attr(data-tooltip); position: absolute; right: 0; bottom: calc(100% + 6px); padding: 4px 8px; border-radius: 4px; background: rgba(0, 0, 0, 0.75); color: #fff; font-size: 12px; white-space: nowrap; opacity: 0; transform: translateY(4px); pointer-events: none; transition: opacity 0.15s ease, transform 0.15s ease; }
.card__chat:hover::after, .card__chat:focus-visible::after { opacity: 1; transform: translateY(0); }
.card__chat img { display: block; width: 24px; height: 24px; }
.card__footer .btn, .card__footer .btn--ghost { position: relative; }
.card__footer .btn::after, .card__footer .btn--ghost::after { content: "코스 보기"; position: absolute; left: 50%; bottom: calc(100% + 6px); transform: translate(-50%, 4px); padding: 4px 8px; border-radius: 4px; background: rgba(0, 0, 0, 0.75); color: #fff; font-size: 12px; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity 0.15s ease, transform 0.15s ease; }
.card__footer .btn:hover::after, .card__footer .btn:focus-visible::after, .card__footer .btn--ghost:hover::after, .card__footer .btn--ghost:focus-visible::after { opacity: 1; transform: translate(-50%, 0); }
.btn.btn--ghost { background: transparent; color: var(--text); border: 1px solid var(--line); box-shadow: none; }
.btn.disabled { opacity: 0.45; pointer-events: none; }

.note { color: var(--muted); margin-top: 14px; }
.bullet { color: var(--muted); }

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 28px 0 40px;
  color: var(--muted);
  background: linear-gradient(0deg, rgba(12,17,24,0.7), rgba(12,17,24,0));
}

.footer-grid { display:grid; gap:24px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.footer-title { margin:0 0 12px; font-size:18px; color: var(--text); }
.footer-brand p { margin:0 0 10px; }
.footer-note { font-size:13px; color: var(--muted); }
.footer-contact { display:flex; flex-direction:row; gap:14px; margin-top:12px; align-items:center; }
.footer-link { color:#a6d4ff; font-weight:600; display:inline-flex; align-items:center; gap:8px; }
.footer-link:hover { color:#ffffff; }
.footer-link img { display:block; width:30px; height:30px; border-radius:6px; }
.footer-link--icon { position:relative; justify-content:center; width:auto; height:auto; padding:0; border-radius:6px; transition: transform 0.15s ease; }
.footer-link--icon:hover { transform: translateY(-2px); }
.footer-link--icon::after { content: attr(data-tooltip); position:absolute; bottom: calc(100% + 8px); left:50%; transform: translate(-50%, 4px); padding:4px 8px; border-radius:4px; background: rgba(0,0,0,0.75); color:#fff; font-size:12px; white-space:nowrap; opacity:0; pointer-events:none; transition:opacity 0.15s ease, transform 0.15s ease; }
.footer-link--icon:hover::after, .footer-link--icon:focus-visible::after { opacity:1; transform: translate(-50%, 0); }
.footer-column h3 { margin:0 0 12px; font-size:15px; color: var(--text); }
.footer-list { list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:6px; }
.footer-list a { color: var(--muted); }
.footer-list a:hover { color: #ffffff; }
.footer-meta { border-top:1px solid var(--line); margin-top:24px; padding-top:16px; display:flex; flex-wrap:wrap; gap:12px; font-size:13px; color: var(--muted); }
.footer-meta span { margin-right:12px; }
/* Small screens */
@media (max-width: 640px) {
  .hero { padding-top: 32px; }
  .site-header .wrap { height: 56px; }
  .nav a { margin-left: 12px; }
}

/* ---- 추가: 코스 탭/홀 그리드/라이트박스/스코어카드 ---- */
.tabs{display:flex;gap:8px;margin:8px 0 18px}
.tab{background:#162032;color:var(--text);border:1px solid var(--line);padding:10px 14px;border-radius:10px;font-weight:700;cursor:pointer}
.tab.is-active,.tab:hover{border-color:#31415a;background:#1b2940}
.tab-panel{display:none}
.tab-panel.is-active{display:block}

.holes-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(86px,1fr));gap:12px}
@media (min-width: 900px){
  /* 1~9 첫줄, 10~18 둘째줄을 강제하기 위해 9열 고정 */
  .holes-grid{grid-template-columns:repeat(9, minmax(0,1fr));}
}
.hole{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;height:86px;background:#725a47;color:#fff;border:none;border-radius:10px;cursor:pointer;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2)}
.hole .n{font-size:28px;font-weight:800}
.hole .t{font-size:12px;letter-spacing:1px;opacity:.9}
.hole:focus{outline:2px solid #c9ad93;outline-offset:2px}
.hole[disabled]{background:#4a3b30;color:rgba(255,255,255,0.55);opacity:0.6;cursor:not-allowed;box-shadow:none}

.scorecards{margin-top:18px}
.table-scroll{overflow:auto;border:1px solid var(--line);border-radius:12px;background:#0f1624}
table.score{border-collapse:separate;border-spacing:0;width:100%;min-width:760px}
table.score th,table.score td{padding:8px 10px;border-bottom:1px solid #1f2940;text-align:center}
table.score thead th{position:sticky;top:0;background:#10192a}
table.screen-table td{text-align:left;}
table.screen-table td:nth-child(2),table.screen-table td:nth-child(3){text-align:center;white-space:nowrap;}
table.screen-table th:nth-child(2),table.screen-table th:nth-child(3){white-space:nowrap;}
table.screen-table td a{color:var(--accent);}
table.screen-table td a:hover{color:#ffffff;text-decoration:underline;}
.tee th{font-weight:800;text-align:left}
.tee-gold td{background:#6b5a2a;color:#ffe9a6}
.tee-black td{background:#1e1e1e;color:#ddd}
.tee-blue td{background:#165a82;color:#dff2ff}
.tee-white td{background:#2a3344;color:#f2f6ff}
.tee-red td{background:#6a2a2a;color:#ffd6d6}
.tee-par td{background:#1a2334}

.lightbox{position:fixed;inset:0;background:rgba(0,0,0,.7);display:none;align-items:center;justify-content:center;padding:20px}
.lightbox.open{display:flex}
.lb-figure{background:#fff;border-radius:12px;max-width:86vw;max-height:86vh;padding:10px;display:flex;flex-direction:column;gap:6px}
.lb-figure img{max-width:82vw;max-height:76vh;border-radius:8px;object-fit:contain;background:#fff}
.lb-figure figcaption{color:#111;font-weight:900}
.lb-nav{position:absolute;top:50%;transform:translateY(-50%);font-size:42px;line-height:1;background:#00000066;border:0;color:#fff;border-radius:50%;width:48px;height:48px;cursor:pointer}
.lb-nav.left{left:12px}
.lb-nav.right{right:12px}
.lb-close{position:absolute;top:16px;right:16px;background:#00000066;border:0;color:#fff;border-radius:50%;width:36px;height:36px;font-size:20px;cursor:pointer}
/* small map icon link */
.map-link { display:inline-flex; align-items:center; justify-content:center; width:26px; height:26px; border-radius:6px; color:#a6d4ff; border:1px solid rgba(124,196,255,0.35); background: rgba(124,196,255,0.12); }
.map-link:hover { color:#fff; border-color:#7cc4ff; background: rgba(124,196,255,0.2); }

/* Map */
.map-card{background:linear-gradient(180deg, rgba(22,31,44,0.9), rgba(17,24,35,0.9));border:1px solid var(--line);border-radius:12px;box-shadow:var(--shadow);padding:12px;}
.map{height:340px;border-radius:10px;overflow:hidden}
.map-fallback{margin-top:10px}
.drive-summary{margin:4px 0 10px}

.weather-preview { margin-top:12px; padding:10px; background:rgba(16,24,35,0.65); border:1px solid rgba(124,196,255,0.18); border-radius:10px; font-size:12px; color:var(--muted); }
.weather-preview__title { display:flex; align-items:center; gap:6px; margin-bottom:8px; font-weight:700; color:var(--text); font-size:13px; }
.weather-preview__grid { display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:6px; }
.weather-preview__item { background:rgba(12,19,29,0.75); border-radius:8px; padding:6px 4px; text-align:center; display:flex; flex-direction:column; gap:4px; align-items:center; justify-content:center; }
.weather-preview__time { font-weight:600; color:var(--text); font-size:12px; }
.weather-preview__temp { font-weight:700; color:#ffd27d; font-size:12px; }
.weather-preview__icon { width:20px; height:20px; }
.weather-preview__loading { color:var(--muted); font-size:12px; }
.weather-preview__error { color:#ff9898; font-size:12px; }
@media (max-width: 640px) {
  .weather-preview__grid { display:flex; overflow-x:auto; gap:6px; padding-bottom:6px; margin:0 -4px; padding-left:4px; scroll-snap-type:x proximity; scroll-padding-left:4px; }
  .weather-preview__grid::-webkit-scrollbar { height:6px; }
  .weather-preview__grid::-webkit-scrollbar-thumb { background:rgba(124,196,255,0.45); border-radius:999px; }
  .weather-preview__grid::-webkit-scrollbar-track { background:transparent; }
  .weather-preview__grid > .weather-preview__item { flex:0 0 calc(25% - 4px); scroll-snap-align:start; }
}

.weather-detail-link { display:inline-flex; align-items:center; gap:6px; margin-top:10px; font-size:12px; color:#a6d4ff; font-weight:600; }
.weather-detail-link:hover { color:#ffffff; text-decoration:underline; }
