/* --------------------
   ตัวแปรสีใช้ซ้ำทั้งเว็บ
-------------------- */
:root {
  --bg-main: #0f172a; /* พื้นหลังหลัก */
  --bg-card: #0b1220; /* พื้นหลังการ์ด */
  --accent-1: #000428; /* ส้ม */
  --accent-2: #004e92; /* ชมพู */
  --accent-3: #22d3ee; /* ฟ้า */
  --text-main: #e5e7eb; /* ตัวหนังสือ */
  --text-muted: #9ca3af;
  --shadow-soft: 0 18px 40px rgba(15, 23, 42, 0.8);
}

/* รีเซ็ทพื้นฐานเล็กน้อย */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background: radial-gradient(
    circle at top,
    #1e293b 0,
    #020617 55%,
    #000000 100%
  );
  color: var(--text-main);
  min-height: 100vh;
}

/* --------------------
   Header + Canvas Logo
-------------------- */

header {
  padding: 18px 24px 26px;
  text-align: center;
  background: linear-gradient(120deg, var(--accent-1), var(--accent-2));
  color: white;
  position: sticky;
  top: 0;
  z-index: 20;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.65);
}

header h1 {
  font-size: 1.9rem;
  letter-spacing: 0.05em;
  margin-top: 8px;
}

header p {
  font-size: 0.95rem;
  opacity: 0.95;
  margin-top: 4px;
}

/* ให้ canvas ชิดกลาง และเว้นระยะหัว */
#logoCanvas {
  display: block;
  margin: 0 auto 6px;
}

/* --------------------
   Navigation
-------------------- */
nav {
  display: flex;
  justify-content: center;
  gap: 24px;
  padding: 10px 24px 14px;
  background: linear-gradient(90deg, #020617, #020617ee);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 96px; /* อยู่ใต้ header */
  z-index: 10;
  box-shadow: 0 8px 25px rgba(15, 23, 42, 0.8);
}

nav a {
  color: var(--text-main);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 6px 10px;
  border-radius: 999px;
  position: relative;
  transition: background 0.25s ease, transform 0.15s ease, color 0.25s ease;
}

nav a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -3px;
  width: 0;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent-1), var(--accent-2));
  transform: translateX(-50%);
  transition: width 0.25s ease;
}

nav a:hover {
  background: rgba(148, 163, 184, 0.12);
  color: white;
  transform: translateY(-1px);
}

nav a:hover::after {
  width: 70%;
}

/* --------------------
   โครง main + การ์ดสถานที่
-------------------- */

main {
  max-width: 1100px;
  margin: 26px auto 40px;
  padding: 0 16px 32px;
}

.place-card {
  background: radial-gradient(
    circle at top left,
    rgba(248, 250, 252, 0.04) 0,
    #020617 55%
  );
  border-radius: 18px;
  padding: 20px 22px 18px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(148, 163, 184, 0.2);
  position: relative;
  overflow: hidden;
}

/* แสงไล่ระดับมุมการ์ด */
.place-card::before {
  content: "";
  position: absolute;
  inset: -80%;
  background: conic-gradient(
    from 210deg,
    rgba(248, 250, 252, 0) 0deg,
    rgba(236, 72, 153, 0.32) 80deg,
    rgba(56, 189, 248, 0.32) 140deg,
    rgba(249, 115, 22, 0.32) 220deg,
    rgba(248, 250, 252, 0) 300deg
  );
  opacity: 0;
  transition: opacity 0.45s ease;
  pointer-events: none;
}

.place-card:hover::before {
  opacity: 1;
}

.place-card h2 {
  font-size: 1.25rem;
  margin-bottom: 6px;
}

.place-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 12px;
}

/* แถวรูป */
.img-row {
  display: flex;
  gap: 16px;
  margin-top: 4px;
}

.img-row img {
  width: 50%;
  border-radius: 14px;
  object-fit: cover;
  max-height: 220px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.9);
  transform: translateY(0);
  transition: transform 0.25s ease, box-shadow 0.25s ease, filter 0.3s ease;
}

.img-row img:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 1);
  filter: brightness(1.05);
}

/* --------------------
   Section ฟอร์มแนะนำสถานที่
-------------------- */

#form-section {
  margin-top: 30px;
  padding: 22px 22px 24px;
  border-radius: 18px;
  background: linear-gradient(
    135deg,
    rgba(236, 72, 153, 0.12),
    rgba(56, 189, 248, 0.12)
  );
  border: 1px solid rgba(251, 113, 133, 0.4);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.9);
}

#form-section h2 {
  margin-bottom: 12px;
}

/* ฟอร์ม */
form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}

form label {
  font-size: 0.9rem;
  color: var(--text-main);
}

input,
textarea {
  background: rgba(15, 23, 42, 0.9);
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.6);
  padding: 9px 11px;
  color: var(--text-main);
  font-size: 0.95rem;
  outline: none;
  transition: border 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

input:focus,
textarea:focus {
  border-color: var(--accent-3);
  box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.6);
  background: rgba(15, 23, 42, 1);
}

textarea {
  min-height: 90px;
  resize: vertical;
}

/* ปุ่มส่งฟอร์ม */
button[type="submit"] {
  margin-top: 6px;
  align-self: flex-start;
  padding: 9px 20px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  background-image: linear-gradient(120deg, var(--accent-1), var(--accent-2));
  color: white;
  font-weight: 600;
  font-size: 0.95rem;
  box-shadow: 0 14px 30px rgba(248, 113, 113, 0.55);
  transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

button[type="submit"]:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 40px rgba(248, 113, 113, 0.7);
  filter: brightness(1.05);
}

/* --------------------
   Footer
-------------------- */

footer {
  text-align: center;
  padding: 16px 12px 18px;
  border-top: 1px solid rgba(75, 85, 99, 0.7);
  background: radial-gradient(circle at top, #020617, #000000);
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* --------------------
   Responsive / มือถือ
-------------------- */

@media (max-width: 768px) {
  header {
    padding: 16px 16px 20px;
  }

  header h1 {
    font-size: 1.5rem;
  }

  nav {
    flex-wrap: wrap;
    gap: 10px;
    padding: 8px 10px 12px;
    top: 88px;
  }

  nav a {
    font-size: 0.85rem;
    padding: 5px 9px;
  }

  main {
    padding: 0 10px 26px;
    margin-top: 20px;
  }

  .place-card {
    padding: 16px 15px 14px;
  }

  .img-row {
    flex-direction: column;
  }

  .img-row img {
    width: 100%;
    max-height: 220px;
  }

  #form-section {
    padding: 18px 15px 20px;
  }
}

.place-actions {
  margin-top: 12px;
}

.map-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  background-image: linear-gradient(120deg, var(--accent-3), var(--accent-2));
  color: white;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.9);
  transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.map-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 32px rgba(15, 23, 42, 1);
  filter: brightness(1.05);
}
