/* ==========================================================================
   Friends of the Commons - Nature Walk & I-Spy Discovery Trail Stylesheet
   Designed for Responsive Mobile Viewing & Clean A4 Printing
   ========================================================================== */

:root {
  --nt-green: #004226;
  --nt-green-light: #eaf3ed;
  --nt-green-accent: #2e7d32;
  --nt-terracotta: #a8422b;
  --nt-terracotta-light: #fdf5f2;
  --nt-sand: #f5f3ec;
  --nt-charcoal: #232a26;
  --nt-muted: #57655d;
  --nt-border: #d3ded7;
  --nt-border-subtle: #e5ece8;
  --font-serif: "Georgia", "Cambria", "Times New Roman", serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

body {
  font-family: var(--font-sans);
  color: var(--nt-charcoal);
  background-color: #f7f9f8;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.trail-container {
  max-width: 960px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

/* Action Bar (Screen Only) */
.trail-action-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding: 0.85rem 1.25rem;
  background: #ffffff;
  border: 1px solid var(--nt-border);
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.trail-back-link {
  color: var(--nt-green);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.trail-back-link:hover {
  text-decoration: underline;
}

.print-btn {
  background-color: var(--nt-green);
  color: #ffffff;
  border: none;
  border-radius: 4px;
  padding: 0.6rem 1.25rem;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: background-color 0.15s ease;
}

.print-btn:hover {
  background-color: #0b5837;
}

/* Trail Sheet Header */
.trail-sheet {
  background: #ffffff;
  border: 1px solid var(--nt-border);
  border-radius: 8px;
  padding: 2.5rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
}

.trail-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 2px solid var(--nt-green);
  padding-bottom: 1.5rem;
  margin-bottom: 1.5rem;
  gap: 1.5rem;
}

.trail-header-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.trail-logo {
  width: 65px;
  height: 65px;
  object-fit: contain;
}

.trail-brand-title {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--nt-green);
  line-height: 1.2;
}

.trail-brand-sub {
  font-size: 0.8rem;
  color: var(--nt-muted);
  font-weight: 500;
}

.trail-tag-badge {
  background-color: var(--nt-terracotta);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.35rem 0.75rem;
  border-radius: 4px;
  white-space: nowrap;
}

.trail-title-block {
  margin-bottom: 1.5rem;
}

.trail-title {
  font-family: var(--font-serif);
  font-size: 2rem;
  color: var(--nt-green);
  line-height: 1.25;
  margin-bottom: 0.5rem;
}

.trail-intro {
  font-size: 1rem;
  color: var(--nt-muted);
  line-height: 1.6;
}

/* Tracker Box */
.trail-tracker-box {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1rem;
  background: var(--nt-sand);
  border: 1px dashed var(--nt-border);
  border-radius: 6px;
  padding: 1rem 1.25rem;
  margin-bottom: 2rem;
  font-size: 0.95rem;
}

.tracker-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.tracker-label {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--nt-green);
}

.tracker-line {
  border-bottom: 1px solid var(--nt-charcoal);
  height: 1.5rem;
}

/* Spotter Grid */
.spotter-category-title {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  color: var(--nt-green);
  border-bottom: 1px solid var(--nt-border);
  padding-bottom: 0.4rem;
  margin: 2rem 0 1.25rem 0;
}

.spotter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.spotter-card {
  background: #ffffff;
  border: 1.5px solid var(--nt-border);
  border-radius: 6px;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.spotter-card:hover {
  border-color: var(--nt-green-accent);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.spotter-img-wrap {
  width: 100%;
  height: 135px;
  background: #f0f4f1;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 0.65rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.spotter-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.spotter-meta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.spotter-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--nt-charcoal);
  line-height: 1.25;
}

.spotter-checkbox {
  width: 22px;
  height: 22px;
  border: 2px solid var(--nt-green);
  border-radius: 4px;
  flex-shrink: 0;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.spotter-clue {
  font-size: 0.8rem;
  color: var(--nt-muted);
  line-height: 1.35;
  margin-top: auto;
}

/* Interactive Activities & Notes Section */
.trail-draw-box {
  background: var(--nt-green-light);
  border: 1.5px dashed var(--nt-green-accent);
  border-radius: 6px;
  padding: 1.25rem 1.5rem;
  margin-top: 2rem;
  margin-bottom: 1.5rem;
}

.trail-draw-box h3,
.trail-draw-box h4 {
  font-family: var(--font-serif);
  color: var(--nt-green);
  font-size: 1.15rem;
  margin-bottom: 0.4rem;
}

.trail-draw-box p {
  font-size: 0.88rem;
  color: var(--nt-muted);
  margin-bottom: 1rem;
}

.draw-canvas-area {
  background: #ffffff;
  border: 1px solid var(--nt-border);
  border-radius: 4px;
  height: 120px;
}

/* Junior Ranger Code */
.trail-footer-code {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--nt-sand);
  border-left: 4px solid var(--nt-green);
  padding: 1rem 1.25rem;
  border-radius: 0 4px 4px 0;
  font-size: 0.85rem;
  color: var(--nt-charcoal);
  line-height: 1.5;
}

/* Print Specific Rules */
@media print {
  body {
    background-color: #ffffff;
    color: #000000;
  }

  .trail-container {
    max-width: 100%;
    padding: 0;
    margin: 0;
  }

  .trail-action-bar {
    display: none !important;
  }

  .trail-sheet {
    border: none;
    padding: 0;
    box-shadow: none;
  }

  .spotter-card {
    break-inside: avoid;
    border: 1px solid #999999;
  }

  .spotter-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 0.6rem;
  }

  .spotter-img-wrap {
    height: 100px;
  }

  .spotter-name {
    font-size: 0.85rem;
  }

  .spotter-clue {
    font-size: 0.72rem;
  }

  .draw-canvas-area {
    border: 1px solid #999999;
    height: 100px;
  }

  @page {
    size: A4 portrait;
    margin: 10mm 12mm;
  }
}

@media (max-width: 600px) {
  .trail-tracker-box {
    grid-template-columns: 1fr;
  }
  .spotter-grid {
    grid-template-columns: 1fr 1fr;
  }
}
