@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;1,400&family=DM+Sans:wght@300;400;500&display=swap');

:root {
  --sand: #e8d5b0;
  --sand-light: #f5ead8;
  --sand-dark: #c4a97a;
  --earth: #8b6b4a;
  --earth-dark: #5c4330;
  --water: #4a7fa5;
  --water-light: #7fb3cf;
  --water-dark: #2c5f7a;
  --ink: #1a1410;
  --ink-light: #3d3229;
  --parchment: #faf6ee;
  --white: #ffffff;
  --accent: #c17f3e;
  --accent-light: #e8a85c;
  --type-sea: #2c5f7a;
  --type-river: #3d6b45;
  --type-lake: #4a5f7a;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--parchment);
  color: var(--ink);
  min-height: 100vh;
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image:
    radial-gradient(ellipse at 20% 20%, rgba(196,169,122,0.12) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(74,127,165,0.08) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

/* ---- HEADER ---- */
.site-header {
  background: var(--earth-dark);
  padding: 1.2rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 20px rgba(26,20,16,0.3);
}

.site-logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  color: var(--sand-light);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.site-logo .logo-icon {
  width: 28px;
  height: 36px;
}

.site-nav {
  display: flex;
  gap: 0.5rem;
}

.site-nav a {
  color: var(--sand);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  padding: 0.4rem 0.9rem;
  border-radius: 4px;
  transition: background 0.2s, color 0.2s;
}

.site-nav a:hover {
  background: rgba(232,213,176,0.15);
  color: var(--sand-light);
}

.site-nav a.active {
  background: rgba(232,213,176,0.2);
  color: var(--sand-light);
}

/* ---- TYPE BADGES ---- */
.type-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.25rem 0.6rem;
  border-radius: 3px;
}

.type-badge.zee {
  background: rgba(44,95,122,0.12);
  color: var(--type-sea);
  border: 1px solid rgba(44,95,122,0.25);
}

.type-badge.rivier {
  background: rgba(61,107,69,0.12);
  color: var(--type-river);
  border: 1px solid rgba(61,107,69,0.25);
}

.type-badge.meer {
  background: rgba(74,95,122,0.12);
  color: var(--type-lake);
  border: 1px solid rgba(74,95,122,0.25);
}

/* ---- BOTTLE CARD ---- */
.bottle-card {
  background: var(--white);
  border: 1px solid rgba(196,169,122,0.3);
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
  color: inherit;
  display: block;
}

.bottle-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(92,67,48,0.15);
}

.bottle-card-visual {
  height: 140px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bottle-card-visual.zee { background: linear-gradient(135deg, #c8dfe8 0%, #7fb3cf 100%); }
.bottle-card-visual.rivier { background: linear-gradient(135deg, #c8d8c0 0%, #7fa882 100%); }
.bottle-card-visual.meer { background: linear-gradient(135deg, #c4cfd8 0%, #7f9ab0 100%); }

.bottle-card-visual .bottle-svg {
  width: 50px;
  opacity: 0.85;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.15));
}

.bottle-card-visual .bottle-number {
  position: absolute;
  top: 10px;
  right: 12px;
  font-family: 'Playfair Display', serif;
  font-size: 2.2rem;
  font-weight: 700;
  opacity: 0.18;
  color: var(--ink);
  line-height: 1;
}

.bottle-card-body {
  padding: 1rem 1.1rem;
}

.bottle-card-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  color: var(--ink);
}

.bottle-card-location {
  font-size: 0.8rem;
  color: var(--earth);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.bottle-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 1.1rem;
  border-top: 1px solid rgba(196,169,122,0.2);
  background: var(--sand-light);
}

.bottle-card-date {
  font-size: 0.78rem;
  color: var(--earth);
}

/* ---- BUTTONS ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1.2rem;
  border-radius: 5px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  border: none;
}

.btn-primary {
  background: var(--earth-dark);
  color: var(--sand-light);
}

.btn-primary:hover {
  background: var(--ink);
  color: var(--sand-light);
}

.btn-secondary {
  background: transparent;
  color: var(--earth-dark);
  border: 1.5px solid var(--sand-dark);
}

.btn-secondary:hover {
  background: var(--sand-light);
}

.btn-accent {
  background: var(--accent);
  color: var(--white);
}

.btn-accent:hover {
  background: var(--earth);
}

.btn-danger {
  background: #c0392b;
  color: white;
}
.btn-danger:hover { background: #922b21; }

/* ---- FORM ELEMENTS ---- */
.form-group {
  margin-bottom: 1.2rem;
}

.form-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--earth-dark);
  margin-bottom: 0.4rem;
  letter-spacing: 0.03em;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 0.6rem 0.85rem;
  border: 1.5px solid var(--sand-dark);
  border-radius: 5px;
  background: var(--white);
  color: var(--ink);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--earth);
  box-shadow: 0 0 0 3px rgba(139,107,74,0.15);
}

.form-textarea {
  min-height: 100px;
  resize: vertical;
}

/* ---- UTILITY ---- */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
  position: relative;
  z-index: 1;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.year-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 2rem 0 1rem;
}

.year-divider-label {
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--earth-dark);
  white-space: nowrap;
}

.year-divider-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, var(--sand-dark), transparent);
}

/* ---- PAGE TITLE AREA ---- */
.page-hero {
  padding: 3rem 0 2rem;
  position: relative;
}

.page-hero-title {
  font-family: 'Playfair Display', serif;
  font-size: 2.8rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.15;
  margin-bottom: 0.5rem;
}

.page-hero-subtitle {
  font-size: 1rem;
  color: var(--earth);
  font-weight: 300;
}

/* ---- PHOTO GALLERY ---- */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 8px;
  margin-top: 1rem;
}

.photo-grid img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: 5px;
  cursor: pointer;
  transition: opacity 0.2s;
}

.photo-grid img:hover {
  opacity: 0.85;
}

/* ---- LIGHTBOX ---- */
.lightbox {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(26,20,16,0.92);
  z-index: 999;
  align-items: center;
  justify-content: center;
}

.lightbox.open { display: flex; }

.lightbox img {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: 6px;
}

.lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  color: var(--sand-light);
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
  background: none;
  border: none;
}

/* ---- DETAIL PAGE ---- */
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 2rem;
  margin-top: 2rem;
}

@media (max-width: 780px) {
  .detail-grid {
    grid-template-columns: 1fr;
  }
}

.detail-card {
  background: var(--white);
  border: 1px solid rgba(196,169,122,0.3);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.2rem;
}

.detail-card-title {
  font-family: 'Playfair Display', serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--earth);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.8rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid rgba(196,169,122,0.25);
}

.detail-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(196,169,122,0.1);
  font-size: 0.875rem;
}

.detail-meta-row:last-child { border-bottom: none; }

.detail-meta-label {
  color: var(--earth);
  font-weight: 500;
}

.detail-meta-value {
  color: var(--ink);
  text-align: right;
  font-family: 'Playfair Display', serif;
}

.nfc-link-box {
  background: var(--earth-dark);
  color: var(--sand-light);
  border-radius: 8px;
  padding: 1.2rem;
  text-align: center;
}

.nfc-link-url {
  font-family: 'DM Sans', monospace;
  font-size: 0.78rem;
  color: var(--sand);
  word-break: break-all;
  margin: 0.6rem 0;
  background: rgba(0,0,0,0.2);
  padding: 0.5rem;
  border-radius: 4px;
}

.copy-btn {
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 4px;
  padding: 0.45rem 1rem;
  font-size: 0.82rem;
  cursor: pointer;
  transition: background 0.2s;
}
.copy-btn:hover { background: var(--accent-light); }

/* ---- NOTIFICATIONS ---- */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--earth-dark);
  color: var(--sand-light);
  padding: 0.8rem 1.4rem;
  border-radius: 6px;
  font-size: 0.875rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.25);
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s;
  z-index: 999;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* ---- MAP CONTAINER ---- */
.map-container {
  width: 100%;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(196,169,122,0.3);
}

/* ---- ADMIN ---- */
.admin-sidebar {
  width: 280px;
  flex-shrink: 0;
}

.admin-list-item {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.7rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s;
  border: 1px solid transparent;
  margin-bottom: 0.4rem;
}

.admin-list-item:hover {
  background: var(--sand-light);
}

.admin-list-item.active {
  background: var(--sand-light);
  border-color: var(--sand-dark);
}

.admin-list-item-num {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--sand-dark);
  min-width: 24px;
  text-align: center;
}

.admin-list-item-info {
  flex: 1;
  overflow: hidden;
}

.admin-list-item-name {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-list-item-sub {
  font-size: 0.75rem;
  color: var(--earth);
}

/* ---- STATS ROW ---- */
.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--white);
  border: 1px solid rgba(196,169,122,0.3);
  border-radius: 8px;
  padding: 1.1rem 1.2rem;
  text-align: center;
}

.stat-number {
  font-family: 'Playfair Display', serif;
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--earth-dark);
  line-height: 1;
}

.stat-label {
  font-size: 0.78rem;
  color: var(--earth);
  margin-top: 0.3rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

@media (max-width: 600px) {
  .page-hero-title { font-size: 2rem; }
  .stats-row { grid-template-columns: repeat(3, 1fr); }
  .site-header { padding: 1rem; }
}

/* ---- MOBILE OPTIMIZATIONS ---- */
@media (max-width: 768px) {
  .site-header {
    padding: 0.8rem 1rem;
  }
  .site-logo {
    font-size: 1.2rem;
  }
  .site-logo .logo-icon {
    width: 24px;
    height: 32px;
  }
  .site-nav {
    gap: 0.3rem;
  }
  .site-nav a {
    padding: 0.3rem 0.7rem;
    font-size: 0.8rem;
  }
  .page-hero {
    padding: 2rem 0 1.5rem;
  }
  .page-hero-title {
    font-size: 2.2rem;
  }
  .page-hero-subtitle {
    font-size: 0.9rem;
  }
  .container {
    padding: 0 1rem;
  }
  .year-divider {
    margin: 1.5rem 0 0.8rem;
  }
  .year-divider-label {
    font-size: 1.3rem;
  }
  .bottles-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.8rem;
  }
  .bottle-card-body {
    padding: 0.8rem 0.9rem;
  }
  .bottle-card-title {
    font-size: 1rem;
  }
  .bottle-card-footer {
    padding: 0.6rem 0.9rem;
  }
  .photo-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 6px;
  }
  .photo-grid img {
    height: 120px;
  }
  .toast {
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    width: auto;
  }
  .admin-sidebar {
    width: 250px;
  }
  .admin-list-item {
    padding: 0.6rem 0.8rem;
  }
  .admin-list-item-num {
    font-size: 1rem;
    min-width: 20px;
  }
  .admin-list-item-name {
    font-size: 0.82rem;
  }
  .admin-list-item-sub {
    font-size: 0.7rem;
  }
  .detail-card {
    padding: 1.2rem;
  }
  .detail-meta-row {
    font-size: 0.82rem;
  }
  .nfc-link-box {
    padding: 1rem;
  }
  .nfc-link-url {
    font-size: 0.75rem;
  }
}

@media (max-width: 480px) {
  .site-logo {
    font-size: 1.1rem;
  }
  .site-nav a {
    padding: 0.25rem 0.6rem;
    font-size: 0.75rem;
  }
  .page-hero-title {
    font-size: 1.8rem;
  }
  .page-hero-subtitle {
    font-size: 0.85rem;
  }
  .stats-row {
    gap: 0.5rem;
  }
  .stat-card {
    padding: 0.8rem 1rem;
  }
  .stat-number {
    font-size: 1.8rem;
  }
  .stat-label {
    font-size: 0.7rem;
  }
  .bottles-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0.6rem;
  }
  .bottle-card-visual {
    height: 120px;
  }
  .bottle-card-visual .bottle-svg {
    width: 40px;
  }
  .bottle-card-visual .bottle-number {
    font-size: 1.8rem;
    top: 8px;
    right: 10px;
  }
  .bottle-card-body {
    padding: 0.7rem 0.8rem;
  }
  .bottle-card-title {
    font-size: 0.95rem;
  }
  .bottle-card-location {
    font-size: 0.75rem;
  }
  .bottle-card-footer {
    padding: 0.5rem 0.8rem;
  }
  .bottle-card-date {
    font-size: 0.75rem;
  }
  .filter-bar {
    gap: 0.4rem;
  }
  .filter-btn {
    padding: 0.3rem 0.7rem;
    font-size: 0.75rem;
  }
  .photo-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 4px;
  }
  .photo-grid img {
    height: 100px;
  }
  .admin-sidebar {
    width: 220px;
  }
  .admin-list-item-num {
    font-size: 0.9rem;
  }
  .detail-grid {
    gap: 1.5rem;
  }
  .detail-meta-row {
    font-size: 0.8rem;
  }
  .btn {
    padding: 0.7rem 1.4rem;
    font-size: 0.9rem;
  }
  .form-input,
  .form-select,
  .form-textarea {
    font-size: 0.95rem;
    padding: 0.7rem 0.9rem;
  }
  .form-label {
    font-size: 0.85rem;
  }
}
