/* ============================================================
   edition.css — Styles for individual edition pages
   Depends on: css/style.css (shared variables & base styles)
   ============================================================ */

/* ── Route Section ──────────────────────────────── */
.route-section {
  margin-bottom: 2.5rem;
}
.route-day {
  background: var(--cream-dk, #F0EAE0);
  border-radius: 10px;
  padding: 1.5rem 2rem;
  margin-bottom: 1.5rem;
  border-left: 4px solid var(--earth-400, #8D6E63);
}
.route-day h3 {
  font-family: var(--font-display, 'Playfair Display', serif);
  color: var(--earth-800, #3E2723);
  font-size: 1.15rem;
  margin-bottom: .4rem;
}
.route-day .route-itinerary {
  font-family: var(--font-mono, monospace);
  font-size: .82rem;
  color: var(--earth-500, #6D4C41);
  margin-bottom: .6rem;
  word-break: break-word;
}
.route-day .route-desc {
  font-size: .95rem;
  line-height: 1.55;
  color: var(--earth-700, #4E342E);
}

/* ── Map ────────────────────────────────────────── */
.edition-map {
  width: 100%;
  height: 380px;
  border-radius: 10px;
  margin-bottom: 2.5rem;
  border: 2px solid var(--earth-200, #BCAAA4);
}

/* ── Profile Tabs ───────────────────────────────── */
.profiles-section { margin-bottom: 2.5rem; }

.profile-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: .8rem;
  margin-bottom: 1.5rem;
}
.profile-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  border: 3px solid transparent;
  border-radius: 10px;
  padding: .5rem;
  transition: border-color .25s, box-shadow .25s, transform .15s;
  background: var(--cream-dk, #F0EAE0);
  min-width: 100px;
  flex: 1;
  max-width: 300px;
}
.profile-tab:hover {
  border-color: var(--earth-300, #A1887F);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,.1);
}
.profile-tab.active {
  border-color: var(--ochre, #C8A951);
  background: var(--white, #fff);
  box-shadow: 0 4px 16px rgba(200,169,81,.25);
}
.profile-tab img {
  width: 100%;
  height: 400px;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: .4rem;
  background: var(--earth-100, #D7CCC8);
}
.profile-tab .tab-label {
  font-family: var(--font-body, sans-serif);
  font-weight: 700;
  font-size: .82rem;
  color: var(--earth-700, #4E342E);
}
.profile-tab .tab-soil {
  font-size: .72rem;
  color: var(--earth-400, #8D6E63);
  text-align: center;
  line-height: 1.3;
}
.profile-tab .tab-placeholder {
  width: 100%;
  height: 400px;
  border-radius: 6px;
  margin-bottom: .4rem;
  background: var(--earth-100, #D7CCC8);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  color: var(--earth-300, #A1887F);
}

/* ── Profile Detail Panel ───────────────────────── */
.profile-detail {
  background: var(--white, #fff);
  border: 1px solid var(--earth-100, #D7CCC8);
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 2px 16px rgba(0,0,0,.06);
  animation: fadeIn .3s ease;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.profile-detail h3 {
  font-family: var(--font-display, serif);
  font-size: 1.25rem;
  color: var(--earth-800, #3E2723);
  margin-bottom: .3rem;
}
.profile-detail .soil-type-badge {
  display: inline-block;
  background: var(--ochre, #C8A951);
  color: var(--earth-900, #2C1810);
  padding: .25rem .75rem;
  border-radius: 20px;
  font-size: .8rem;
  font-weight: 600;
  margin-bottom: 1rem;
}
.profile-detail .location-meta {
  font-size: .85rem;
  color: var(--earth-500, #6D4C41);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}
.profile-detail .incomplete-badge {
  display: inline-block;
  background: var(--earth-100, #D7CCC8);
  color: var(--earth-600, #5D4037);
  padding: .5rem 1rem;
  border-radius: 8px;
  font-size: .9rem;
  text-align: center;
}

/* Sub-sections within profile */
.profile-subsection {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--earth-100, #D7CCC8);
}
.profile-subsection h4 {
  font-family: var(--font-display, serif);
  font-size: 1.05rem;
  color: var(--earth-700, #4E342E);
  margin-bottom: 1rem;
}

/* ── Sketch + Description Grid ──────────────────── */
.sketch-desc-grid {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 2rem;
  align-items: start;
}
@media (max-width: 768px) {
  .sketch-desc-grid {
    grid-template-columns: 1fr;
  }
}

/* Morphological Description Table */
.morph-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .82rem;
}
.morph-table th, .morph-table td {
  padding: .5rem .6rem;
  border-bottom: 1px solid var(--earth-100, #D7CCC8);
  text-align: left;
  vertical-align: top;
}
.morph-table th {
  background: var(--cream-dk, #F0EAE0);
  font-weight: 700;
  color: var(--earth-700, #4E342E);
  white-space: nowrap;
}
.morph-table .hz-symbol {
  font-weight: 700;
  font-family: var(--font-mono, monospace);
  white-space: nowrap;
}
.morph-table .color-chip {
  display: inline-block;
  width: 16px;
  height: 16px;
  border-radius: 3px;
  border: 1px solid rgba(0,0,0,.15);
  vertical-align: middle;
  margin-right: 4px;
}
.morph-table .lamella-marker {
  display: inline-block;
  background: var(--ochre, #C8A951);
  color: var(--earth-900, #2C1810);
  font-size: .65rem;
  padding: 1px 5px;
  border-radius: 3px;
  margin-left: 4px;
  font-weight: 700;
}

/* ── Charts Row ─────────────────────────────────── */
.diagrams-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 1.5rem;
}
@media (max-width: 768px) {
  .diagrams-row { grid-template-columns: 1fr; }
}


/* ── Triangle container ──────────────────────────── */
.triangle-container {
  display: flex;
  justify-content: center;
  margin-top: 1rem;
  min-width: 100%;
}

.triangle-container svg {
  max-width: 700px !important;
  width: 100% !important;
}

/* ── Observations ────────────────────────────────── */
.observations-list {
  list-style: none;
  padding: 0;
}
.observations-list li {
  position: relative;
  padding-left: 1.2rem;
  margin-bottom: .5rem;
  font-size: .9rem;
  color: var(--earth-600, #5D4037);
  line-height: 1.5;
}
.observations-list li::before {
  content: '●';
  position: absolute;
  left: 0;
  color: var(--ochre, #C8A951);
}

/* ── Gallery Section ─────────────────────────────── */
.gallery-section {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 2px solid var(--earth-200, #BCAAA4);
}


.gallery-grid img:hover {
  transform: scale(1.03);
}

/* Empty state */
.empty-gallery {
  text-align: center;
  padding: 2rem;
  color: var(--earth-300, #A1887F);
  font-size: .95rem;
}

/* ── Back to archive link ────────────────────────── */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  color: var(--earth-500, #6D4C41);
  text-decoration: none;
  font-size: .9rem;
  margin-bottom: 1.5rem;
  transition: color .2s;
}

.svg-tooltip {
  position: fixed;
  pointer-events: none;
  background: rgba(44, 24, 16, 0.92);
  color: #FAF6F0;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.82rem;
  font-family: var(--font-body, sans-serif);
  line-height: 1.5;
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.15s;
  max-width: 260px;
}
.svg-tooltip.visible {
  opacity: 1;
}

.back-link:hover { color: var(--ochre, #C8A951); }
.back-link svg { width: 16px; height: 16px; }

/* ── Gallery Carousel ────────────────────────────── */
.gallery-carousel {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1a1a12;
  border-radius: 10px;
  overflow: hidden;
  max-height: 520px;
}
.carousel-slide img {
  display: block;
  max-width: 100%;
  max-height: 500px;
  object-fit: contain;
  margin: 0 auto;
}
.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(250, 246, 240, 0.85);
  border: none;
  color: #3E2723;
  font-size: 1.6rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 2;
  transition: background 0.2s;
}
.carousel-arrow:hover {
  background: rgba(200, 169, 81, 0.9);
}
.carousel-prev { left: 12px; }
.carousel-next { right: 12px; }
.carousel-counter {
  text-align: center;
  padding: 0.6rem;
  font-size: 0.85rem;
  color: var(--earth-400, #8D6E63);
}

#routeTitleRo, #routeTitleEn {
  text-align: center;
}
.edition-meta {
  font-weight: 400;
  font-size: 0.75em;
  color: var(--earth-500, #6D4C41);
  letter-spacing: 0.03em;
}

.route-description p {
  margin: 0 0 0.8rem 0;
  text-align: justify;
  line-height: 1.7;
}
.route-description .route-bullet {
  padding-left: 1.2rem;
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

/* ── Route Legend ────────────────────────────────── */
.route-legend {
  background: rgba(250, 246, 240, 0.92);
  padding: 10px 14px;
  border-radius: 6px;
  border: 1px solid #BCAAA4;
  font-family: var(--font-body, 'Source Sans 3', sans-serif);
  font-size: 0.82rem;
  line-height: 1.8;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}
.route-legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.route-legend-line {
  display: inline-block;
  width: 24px;
  height: 4px;
  border-radius: 2px;
  flex-shrink: 0;
}
.route-legend-dot {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid #3E2723;
  flex-shrink: 0;
}

/* ── Lightbox ────────────────────────────────────── */
.lightbox {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}
.lightbox.active {
  display: flex;
}
.lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 4px 30px rgba(0,0,0,0.5);
}
.lightbox-close {
  position: absolute;
  top: 16px;
  right: 24px;
  background: none;
  border: none;
  color: #FAF6F0;
  font-size: 2.4rem;
  cursor: pointer;
  z-index: 2;
}
.lightbox-close:hover { color: #C8A951; }
.lightbox-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(250, 246, 240, 0.15);
  border: none;
  color: #FAF6F0;
  font-size: 2rem;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 2;
}
.lightbox-arrow:hover { background: rgba(200, 169, 81, 0.4); }
.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }

/* ── Profile map markers ─────────────────────────── */
.profile-map-icon {
  background: #C8A951;
  border: 2px solid #3E2723;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.profile-map-icon span {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 11px;
  font-weight: 700;
  color: #3E2723;
  line-height: 1;
}
.described-by {
  font-size: 0.85rem;
  color: var(--earth-500, #6D4C41);
  font-style: italic;
  margin: 0.5rem 0 1.5rem;
}