/* ============================================================
   하늘루닌 SkyLunin — 공용 베이스 스타일
   6개 페이지(index/community/mall/vets/regions/route)에 공통.
   디자인 토큰, 리셋, 버튼, NAV, HERO, MAP, 검색, 섹션 공용.
   페이지별 .region-grid 이하 카드 스타일은 각 파일 인라인 유지.
   ============================================================ */

  /* ========== Reset & Base ========== */
  *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
  :root {
    --sky-50: #EAF6FD;
    --sky-100: #D2EBFA;
    --sky-300: #7FC4E8;
    --sky-500: #4FA8D8;
    --sky-700: #1E6FA8;
    --sky-900: #0F4671;
    --teal: #2ABFBF;
    --teal-dark: #1F9B9B;
    --orange: #FF7A45;
    --orange-dark: #E5602B;
    --ink-900: #0E1F2C;
    --ink-700: #2A3E4D;
    --ink-500: #5A6B78;
    --ink-300: #94A3AF;
    --line: #E2EAF1;
    --bg: #FFFFFF;
    --bg-soft: #F4FAFE;
    --card-bg: #FFFFFF;
    --nav-bg: rgba(255, 255, 255, 0.92);
    --hero-bg-from: #F4FAFE;
    --hero-bg-to: #FFFFFF;
    --shadow-sm: 0 2px 8px rgba(15, 70, 113, 0.06);
    --shadow-md: 0 8px 24px rgba(15, 70, 113, 0.10);
    --shadow-lg: 0 18px 48px rgba(15, 70, 113, 0.16);
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;
  }

  /* ========== Dark Mode ========== */
  [data-theme="dark"] {
    --sky-50:  #1A2D44;
    --sky-100: #1F3858;
    --sky-300: #5E94C2;
    --sky-500: #6FB9E0;
    --sky-700: #A8D2EE;
    --sky-900: #E4F1FA;
    --teal: #4DD4D4;
    --teal-dark: #2ABFBF;
    --orange: #FF9268;
    --orange-dark: #FF7A45;
    --ink-900: #F0F4F8;
    --ink-700: #C8D2DA;
    --ink-500: #8995A2;
    --ink-300: #5F6E7C;
    --line: #1F3344;
    --bg: #0A1929;
    --bg-soft: #0F2238;
    --card-bg: #14283F;
    --nav-bg: rgba(10, 25, 41, 0.88);
    --hero-bg-from: #0F2238;
    --hero-bg-to: #0A1929;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 18px 48px rgba(0, 0, 0, 0.6);
  }

  html { scroll-behavior: smooth; }
  body {
    font-family: 'Pretendard', 'Noto Sans KR', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--ink-900);
    background: var(--bg);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    transition: background-color .3s ease, color .3s ease;
  }
  /* 다크모드 전환 시 부드러운 트랜지션 */
  .nav, .hero, .place, .vet-card, .post-card, .hub-card,
  .region-card, .place-img, .place-body, .feature, footer, .faq-item,
  .cta-card, .search-card, .map-card, .vet-emergency-banner,
  .post-modal-inner, .stop, .route-summary, .review, .board-table {
    transition: background-color .3s ease, color .3s ease, border-color .3s ease, box-shadow .3s ease;
  }
  a { color: inherit; text-decoration: none; }
  button { font-family: inherit; cursor: pointer; border: none; background: none; }
  img, svg { max-width: 100%; display: block; }
  ul { list-style: none; }
  .container { width: min(1200px, 92%); margin: 0 auto; }

  /* ========== Buttons ========== */
  .btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 22px; border-radius: 999px; font-weight: 700; font-size: 15px; transition: transform .15s ease, box-shadow .2s ease, background .2s ease; white-space: nowrap; }
  .btn-primary { background: linear-gradient(135deg, var(--sky-500), var(--sky-700)); color: #fff; box-shadow: var(--shadow-sm); }
  .btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
  .btn-kakao { background: #FEE500; color: #191600; }
  .btn-kakao:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
  .btn-ghost { background: #fff; color: var(--sky-700); border: 1.5px solid var(--sky-100); }
  .btn-ghost:hover { background: var(--sky-50); }
  .btn-orange { background: linear-gradient(135deg, var(--orange), var(--orange-dark)); color: #fff; box-shadow: var(--shadow-sm); }
  .btn-orange:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
  .btn-lg { padding: 16px 30px; font-size: 16px; }

  /* ========== NAV ========== */
  .nav { position: sticky; top: 0; z-index: 80; background: var(--nav-bg); backdrop-filter: saturate(180%) blur(14px); border-bottom: 1px solid var(--line); }
  .nav-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 16px; }
  .logo { display: inline-flex; align-items: center; gap: 8px; font-weight: 900; font-size: 20px; color: var(--sky-900); letter-spacing: -0.4px; }
  .logo .paw { font-size: 22px; filter: drop-shadow(0 2px 4px rgba(79,168,216,.35)); }
  .logo small { display: block; font-size: 11px; font-weight: 500; color: var(--ink-500); letter-spacing: 0.6px; line-height: 1; margin-top: 2px; }
  .nav-menu { display: flex; gap: 4px; }
  .nav-menu a { padding: 8px 14px; border-radius: 999px; font-size: 14px; font-weight: 500; color: var(--ink-700); transition: background .15s, color .15s; }
  .nav-menu a:hover { background: var(--sky-50); color: var(--sky-700); }
  .nav-cta { display: flex; gap: 8px; align-items: center; }
  .nav-burger { display: none; width: 40px; height: 40px; border-radius: 10px; align-items: center; justify-content: center; background: var(--sky-50); }
  .nav-burger span { width: 18px; height: 2px; background: var(--sky-700); position: relative; display: block; }
  .nav-burger span::before, .nav-burger span::after { content: ''; position: absolute; left: 0; width: 18px; height: 2px; background: var(--sky-700); }
  .nav-burger span::before { top: -6px; }
  .nav-burger span::after { top: 6px; }

  /* ========== HERO ========== */
  .hero { position: relative; padding: 70px 0 90px; background: linear-gradient(180deg, var(--hero-bg-from) 0%, var(--hero-bg-to) 100%); overflow: hidden; }
  .hero::before { content: ''; position: absolute; right: -120px; top: -120px; width: 360px; height: 360px; border-radius: 50%; background: radial-gradient(closest-side, rgba(42,191,191,.20), transparent 70%); }
  .hero::after { content: ''; position: absolute; left: -100px; bottom: -100px; width: 320px; height: 320px; border-radius: 50%; background: radial-gradient(closest-side, rgba(255,122,69,.14), transparent 70%); }
  .hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; position: relative; z-index: 1; }
  .hero-badge { display: inline-flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--sky-100); color: var(--sky-700); padding: 6px 14px; border-radius: 999px; font-size: 13px; font-weight: 600; box-shadow: var(--shadow-sm); margin-bottom: 18px; }
  .hero-badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 4px rgba(42,191,191,.18); }
  .hero h1 { font-size: clamp(34px, 4.6vw, 56px); font-weight: 900; line-height: 1.16; letter-spacing: -1.2px; color: var(--ink-900); margin-bottom: 18px; }
  .hero h1 .accent { background: linear-gradient(135deg, var(--sky-500), var(--teal)); -webkit-background-clip: text; background-clip: text; color: transparent; }
  .hero p.lead { font-size: 17px; color: var(--ink-500); margin-bottom: 30px; max-width: 540px; }
  .hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 36px; }
  .hero-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; max-width: 540px; }
  .stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-md); padding: 16px 18px; box-shadow: var(--shadow-sm); }
  .stat strong { display: block; font-size: 22px; font-weight: 900; color: var(--sky-700); }
  .stat span { font-size: 13px; color: var(--ink-500); }

  /* MAP CARD */
  .map-card { position: relative; aspect-ratio: 5/4; background: linear-gradient(140deg, #E1F1FB 0%, #D2EBFA 60%, #C9E4F6 100%); border-radius: var(--radius-xl); box-shadow: var(--shadow-lg); overflow: hidden; border: 1px solid #fff; }
  .map-card::before { content: ''; position: absolute; inset: 0;
    background:
      radial-gradient(circle at 20% 80%, rgba(42,191,191,.10), transparent 30%),
      radial-gradient(circle at 80% 20%, rgba(79,168,216,.16), transparent 35%);
  }
  .map-grid { position: absolute; inset: 0; opacity: .35;
    background-image:
      linear-gradient(rgba(30,111,168,.18) 1px, transparent 1px),
      linear-gradient(90deg, rgba(30,111,168,.18) 1px, transparent 1px);
    background-size: 40px 40px;
  }
  .map-route { position: absolute; inset: 0; pointer-events: none; }
  .map-route svg { width: 100%; height: 100%; }
  .map-route path { stroke: var(--orange); stroke-width: 4; fill: none; stroke-linecap: round; stroke-dasharray: 8 10; animation: dash 18s linear infinite; filter: drop-shadow(0 2px 4px rgba(255,122,69,.4)); }
  @keyframes dash { to { stroke-dashoffset: -360; } }
  .pin { position: absolute; transform: translate(-50%, -100%); }
  .pin .head { width: 36px; height: 36px; border-radius: 50% 50% 50% 4px; transform: rotate(-45deg); display: grid; place-items: center; box-shadow: 0 6px 18px rgba(15,70,113,.28); border: 3px solid #fff; }
  .pin .head span { transform: rotate(45deg); font-size: 16px; }
  .pin.p1 { left: 22%; top: 70%; animation: bounce 2.4s ease-in-out infinite; }
  .pin.p2 { left: 42%; top: 48%; animation: bounce 2.4s ease-in-out .2s infinite; }
  .pin.p3 { left: 60%; top: 64%; animation: bounce 2.4s ease-in-out .4s infinite; }
  .pin.p4 { left: 78%; top: 32%; animation: bounce 2.4s ease-in-out .6s infinite; }
  .pin.p1 .head { background: var(--orange); }
  .pin.p2 .head { background: var(--sky-500); }
  .pin.p3 .head { background: var(--teal); }
  .pin.p4 .head { background: var(--sky-700); }
  @keyframes bounce { 0%, 100% { transform: translate(-50%, -100%); } 50% { transform: translate(-50%, calc(-100% - 8px)); } }
  .map-info { position: absolute; left: 18px; bottom: 18px; right: 18px; display: flex; gap: 10px; flex-wrap: wrap; }
  .map-chip { background: rgba(255,255,255,.92); backdrop-filter: blur(8px); padding: 8px 12px; border-radius: 999px; font-size: 12px; font-weight: 600; color: var(--sky-900); display: inline-flex; align-items: center; gap: 6px; box-shadow: var(--shadow-sm); }
  .map-chip .ic { width: 8px; height: 8px; border-radius: 50%; }
  .map-floating { position: absolute; right: -14px; top: 28px; background: #fff; padding: 12px 14px; border-radius: 14px; box-shadow: var(--shadow-md); display: flex; align-items: center; gap: 10px; animation: floatY 4s ease-in-out infinite; }
  .map-floating .av { width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg, var(--orange), #FFB58A); display: grid; place-items: center; color: #fff; font-size: 18px; }
  .map-floating small { display: block; font-size: 11px; color: var(--ink-500); }
  .map-floating strong { font-size: 13px; color: var(--ink-900); }
  @keyframes floatY { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

  /* ========== SEARCH ========== */
  .search-section { padding: 0 0 50px; margin-top: -40px; position: relative; z-index: 5; }
  .search-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px; box-shadow: var(--shadow-md); }
  .search-bar { display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 18px; border: 2px solid var(--sky-100); border-radius: 999px; background: var(--bg-soft); transition: border-color .15s, box-shadow .15s; }
  .search-bar:focus-within { border-color: var(--sky-500); background: #fff; box-shadow: 0 0 0 4px rgba(79,168,216,.18); }
  .search-bar svg { flex: none; }
  .search-bar input { flex: 1; border: 0; outline: 0; background: transparent; font-size: 16px; height: 44px; color: var(--ink-900); font-family: inherit; }
  .search-bar input::placeholder { color: var(--ink-300); }
  .chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
  .chip { padding: 8px 16px; border-radius: 999px; background: var(--bg-soft); color: var(--ink-700); font-size: 13px; font-weight: 600; border: 1px solid transparent; transition: all .15s; }
  .chip:hover { background: var(--sky-50); color: var(--sky-700); }
  .chip.active { background: var(--sky-700); color: #fff; }

  /* ========== Section Common ========== */
  section { padding: 80px 0; }
  .section-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 36px; flex-wrap: wrap; }
  .section-eyebrow { font-size: 13px; font-weight: 700; color: var(--teal-dark); text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: 8px; }
  .section-title { font-size: clamp(26px, 3.2vw, 36px); font-weight: 900; letter-spacing: -0.6px; color: var(--ink-900); }
  .section-sub { color: var(--ink-500); font-size: 15px; max-width: 600px; margin-top: 8px; }
  .section-link { color: var(--sky-700); font-weight: 600; font-size: 14px; }
  .section-link:hover { text-decoration: underline; }

  /* ========== Mobile Responsive (≤ 768px) ========== */
  @media (max-width: 768px) {
    .container { width: 94%; }

    /* NAV */
    .nav-inner { height: 56px; gap: 6px; }
    .logo { font-size: 15px; }
    .logo .paw { font-size: 18px; }
    .logo small { display: none; }
    .nav-menu { display: none; }
    .nav-burger { display: inline-flex; }
    .nav-cta { gap: 6px; }
    .nav-cta .btn { padding: 8px 14px; font-size: 13px; }
    .btn-lg { padding: 12px 20px; font-size: 14px; }

    /* HERO */
    .hero { padding: 32px 0 44px; }
    .hero::before, .hero::after { width: 200px; height: 200px; }
    .hero-grid { grid-template-columns: 1fr; gap: 28px; }
    .hero h1 { font-size: 28px; letter-spacing: -0.6px; line-height: 1.22; }
    .hero p.lead { font-size: 15px; margin-bottom: 22px; }
    .hero-actions { gap: 8px; margin-bottom: 24px; }
    .hero-stats { grid-template-columns: repeat(3, 1fr); gap: 8px; }
    .stat { padding: 10px 8px; }
    .stat strong { font-size: 16px; }
    .stat span { font-size: 11px; }

    /* MAP CARD */
    .map-floating { display: none; }
    .map-info { left: 12px; right: 12px; bottom: 12px; gap: 6px; }
    .map-chip { font-size: 11px; padding: 6px 10px; }

    /* SEARCH */
    .search-section { padding: 0 0 30px; margin-top: -22px; }
    .search-card { padding: 14px; }
    .search-bar { padding: 4px 4px 4px 14px; }
    .search-bar input { font-size: 15px; height: 40px; }
    .chips { gap: 6px; margin-top: 12px; }
    .chip { padding: 6px 12px; font-size: 12px; }

    /* SECTIONS */
    section { padding: 40px 0; }
    .section-head { margin-bottom: 22px; gap: 12px; }
    .section-title { font-size: 22px; }
    .section-sub { font-size: 13px; }

    /* 페이지 공통 그리드 — 모바일에서 1단으로 (인라인 스타일 덮어쓰기) */
    .region-grid,
    .vet-grid,
    .post-grid,
    .hub-grid,
    .feature-grid,
    .mall-grid { grid-template-columns: 1fr !important; gap: 14px !important; }
  }

  /* ========== Small Mobile (≤ 480px) ========== */
  @media (max-width: 480px) {
    .nav-cta .btn-ghost { display: none; }
    .hero h1 { font-size: 24px; }
    .stat { padding: 8px 6px; }
    .stat strong { font-size: 15px; }
    .stat span { font-size: 10px; }
    .section-title { font-size: 20px; }
  }
