﻿:root {
  --bg: #f4f7f5;
  --card: #ffffff;
  --text: #1d2a23;
  --muted: #56665d;
  --accent: #1f7a45;
  --accent-dark: #0f5d33;
  --danger: #b71c1c;
  --danger-bg: #ffe9e9;
  --shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
  --radius: 14px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", Arial, sans-serif;
}

.hero {
  background: linear-gradient(rgba(16, 67, 38, 0.72), rgba(16, 67, 38, 0.72)), url("/images/04.jpg") center/cover no-repeat;
  color: #fff;
  text-align: center;
  padding: 52px 14px;
}

.hero h1 { margin: 0 0 8px; font-size: 1.85rem; }
.hero p { margin: 0; opacity: 0.95; }

.container {
  max-width: 980px;
  margin: 18px auto;
  padding: 0 12px;
  display: grid;
  gap: 16px;
}

.spot {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px;
}

.title { margin: 0 0 10px; font-size: 1.22rem; }

.slider {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: #dce7e0;
}

.slides {
  position: relative;
  aspect-ratio: 16 / 10;
  touch-action: pan-y;
  background: #0f1110;
}

.slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

.slide.is-portrait {
  object-fit: contain;
}

.slide.active {
  opacity: 1;
  pointer-events: auto;
}

.slider-dots {
  position: absolute;
  left: 50%;
  bottom: 10px;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 3;
}

.slider-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  padding: 0;
}

.slider-dot.active {
  background: #fff;
}

.slide-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 50%;
  font-size: 1.2rem;
  color: #fff;
  background: rgba(0, 0, 0, 0.45);
  cursor: pointer;
  z-index: 2;
}

.prev { left: 8px; }
.next { right: 8px; }

.description {
  margin: 10px 0 6px;
  text-align: justify;
}
.coords { margin: 0; color: var(--muted); font-weight: 600; }

.actions {
  margin-top: 12px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.audio-btn, .nav-btn {
  border: none;
  border-radius: 10px;
  padding: 10px 14px;
  text-decoration: none;
  font-size: 0.95rem;
  cursor: pointer;
}

.audio-btn { background: #e8f3ec; color: var(--accent-dark); font-weight: 600; }
.audio-btn.playing { background: #d6eadf; }
.nav-btn { background: var(--accent); color: #fff; font-weight: 700; }

.audio-player { display: none; }

.empty {
  text-align: center;
  background: #fff;
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 24px;
}

.footer {
  text-align: center;
  padding: 12px;
  color: #4d5c54;
  font-size: 0.9rem;
}

/* admin */
.hidden { display: none !important; }

.admin-wrap {
  max-width: 1200px;
  margin: 18px auto;
  padding: 0 12px 24px;
}

.admin-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.card {
  background: #fff;
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 14px;
}

.login-card { max-width: 640px; margin: 0 auto; }

label { font-weight: 600; font-size: 0.95rem; }

input, textarea {
  width: 100%;
  margin-top: 6px;
  margin-bottom: 12px;
  padding: 10px;
  border: 1px solid #d2ddd6;
  border-radius: 10px;
  font: inherit;
}

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

.btn {
  border: none;
  border-radius: 10px;
  padding: 10px 14px;
  font-weight: 700;
  cursor: pointer;
}

.btn-primary { background: var(--accent); color: #fff; }
.btn-muted { background: #e8f3ec; color: var(--accent-dark); }
.btn-danger { background: var(--danger-bg); color: var(--danger); }

.form-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.editor-toolbar { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.editor-btn { padding: 6px 10px; min-width: 48px; }
.editor-sep {
  width: 1px;
  height: 24px;
  background: #d1dbd4;
  display: inline-block;
}
.rich-editor {
  min-height: 190px;
  border: 1px solid #d2ddd6;
  border-radius: 10px;
  background: #fff;
  padding: 0;
  margin-top: 6px;
  margin-bottom: 12px;
}
.rich-editor:focus { outline: 2px solid #c5e5d2; }
.quill-toolbar {
  border: 1px solid #d2ddd6 !important;
  border-radius: 10px 10px 0 0;
  background: #f8fbf9;
}
.quill-toolbar .editor-btn {
  min-width: 62px;
  padding: 6px 10px;
}
.quill-toolbar .editor-btn.active {
  background: #cfe8da;
  color: #0a5b31;
  box-shadow: inset 0 0 0 1px #8ec8a7;
}
#descriptionEditor {
  border: 1px solid #d2ddd6;
  border-top: none;
  border-radius: 0 0 10px 10px;
}
#descriptionEditor .ql-editor {
  min-height: 190px;
  font-size: 1rem;
  line-height: 1.6;
  font-weight: 400;
}
#descriptionEditor .ql-editor p,
#descriptionEditor .ql-editor div,
#descriptionEditor .ql-editor li {
  font-weight: 400;
}
#descriptionEditor .ql-editor strong,
#descriptionEditor .ql-editor b {
  font-weight: 700;
}
#descriptionEditor .ql-editor.ql-blank::before {
  color: #9aa8a0;
  font-style: normal;
}
.rich-editor h1 { font-size: 1.7rem; margin: 0.6em 0; }
.rich-editor h2 { font-size: 1.35rem; margin: 0.55em 0; }
.rich-editor ul,
.rich-editor ol { padding-left: 1.4rem; margin: 0.6rem 0; }
.rich-editor ul { list-style: disc; }
.rich-editor ol { list-style: decimal; }

.login-form-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }

.field-error {
  min-height: 16px;
  display: block;
  color: var(--danger);
  font-size: 0.82rem;
  margin-top: -8px;
  margin-bottom: 8px;
}

.status-line {
  min-height: 20px;
  margin: 8px 0 0;
  font-weight: 600;
}

.topbar-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.topbar-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.place-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid #dde7e0;
  border-radius: 12px;
  padding: 10px;
  margin-bottom: 8px;
  gap: 8px;
}

.place-title-btn {
  border: none;
  background: none;
  font: inherit;
  color: var(--accent-dark);
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  padding: 0;
}

.row-icons { display: flex; gap: 8px; }

.icon-btn {
  border: none;
  background: #ebf4ee;
  border-radius: 8px;
  width: 36px;
  height: 36px;
  cursor: pointer;
}

.icon-btn.danger { background: #ffeaea; }

.thumb-list { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0; }
.thumb-sort-list { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0 12px; }
.thumb-sort-item {
  width: 132px;
  border: 1px solid #d9e2dc;
  border-radius: 10px;
  padding: 6px;
  background: #fff;
  cursor: grab;
}
.thumb-sort-item.dragging { opacity: 0.5; }
.add-thumb-btn {
  display: grid;
  place-items: center;
  text-align: center;
  gap: 6px;
  border-style: dashed;
  color: #2f6d49;
  background: #f5fbf7;
}
.add-thumb-btn .plus {
  font-size: 1.5rem;
  line-height: 1;
  font-weight: 700;
}
.thumb-sort-actions { margin-top: 6px; display: grid; gap: 6px; }
.mini-btn { padding: 6px 8px; font-size: 0.8rem; }
.file-name {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.thumb {
  width: 84px;
  height: 64px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #d3dfd7;
}

.image-keep-box { width: 95px; }

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.checkbox-row.mini { margin: 4px 0 0; font-size: 0.8rem; }
.checkbox-row input { width: auto; margin: 0; }

.inline-link {
  color: var(--accent-dark);
  text-decoration: underline;
  display: inline-block;
  margin-bottom: 10px;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  z-index: 100;
}

.modal-content {
  background: #fff;
  width: min(760px, 100%);
  border-radius: 14px;
  padding: 14px;
  max-height: 88vh;
  overflow: auto;
}
#modalDescription { text-align: justify; }
#modalDescription ul,
#modalDescription ol { padding-left: 1.4rem; margin: 0.6rem 0; }
#modalDescription ul { list-style: disc; }
#modalDescription ol { list-style: decimal; }
#modalDescription h1 { font-size: 1.5rem; margin: 0.6em 0; }
#modalDescription h2 { font-size: 1.25rem; margin: 0.5em 0; }
#modalDescription p { margin: 0.45em 0; }

.description ul,
.description ol { padding-left: 1.35rem; margin: 0.45rem 0; }
.description ul { list-style: disc; }
.description ol { list-style: decimal; }
.description strong,
.description b { font-weight: 700; }
.description em,
.description i { font-style: italic; }
.description blockquote {
  border-left: 4px solid #d7e2db;
  padding-left: 0.9rem;
  margin: 0.6rem 0;
  color: #405046;
  background: #f7faf8;
}
.description .ql-align-center { text-align: center; }
.description .ql-align-justify { text-align: justify; }
.description h1 { font-size: 1.35rem; margin: 0.55em 0; }
.description h2 { font-size: 1.2rem; margin: 0.5em 0; }
.description p { margin: 0.4em 0; }

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.meta {
  font-size: 0.9rem;
  color: var(--muted);
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.lightbox-image {
  max-width: min(1200px, 100%);
  max-height: 82vh;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.45);
  user-select: none;
}

.lightbox-btn {
  position: absolute;
  border: none;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
}

.lightbox-close { top: 12px; right: 12px; }
.lightbox-prev { left: 10px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 10px; top: 50%; transform: translateY(-50%); }

.lightbox-caption {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  text-align: center;
  font-weight: 600;
  font-size: 0.95rem;
  width: calc(100% - 40px);
}

@media (max-width: 767px) {
  .container {
    padding: 0 10px;
  }

  .spot {
    padding: 12px;
  }

  .slider {
    margin-left: -12px;
    margin-right: -12px;
    border-radius: 0;
  }

  .slides {
    aspect-ratio: 4 / 3;
  }

  .lightbox {
    padding: 0;
    background: #000;
  }

  .lightbox-image {
    width: 100vw;
    height: 100vh;
    max-width: none;
    max-height: none;
    border-radius: 0;
    object-fit: contain;
    box-shadow: none;
  }

  .lightbox-prev,
  .lightbox-next {
    display: none;
  }

  .lightbox-close {
    top: 10px;
    right: 10px;
    z-index: 4;
  }

  .lightbox-caption {
    bottom: 10px;
    z-index: 4;
  }
}

@media (min-width: 768px) {
  .hero { padding: 62px 24px; }
  .hero h1 { font-size: 2.35rem; }
  .spot, .card { padding: 18px; }
  .title { font-size: 1.45rem; }
  .admin-grid { grid-template-columns: 1.1fr 1fr; }
  .login-form-grid { grid-template-columns: 1fr 1fr auto; align-items: start; }
  .slides { aspect-ratio: 16 / 9; }
}
