/*
 * notes.css — Styles for the backend-rendered Travel Notes pages (/notes/).
 *
 * Served as a static file by nginx at /assets/styles/notes.css.
 * Depends on tokens.css being loaded first (provides --color-teal,
 * --color-warm-orange, --color-cream, --color-text).
 */

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: var(--color-text, #222222);
  background: var(--color-cream, #FFF7F0);
}

a { color: var(--color-teal, #0FA3B1); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; border-radius: 6px; }

/* ── Site header (matches baseof.html) ── */
header {
  border-bottom: 1px solid rgba(0,0,0,0.06);
  background: #fff;
}

.site-header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-title { font-size: 1.4rem; font-weight: 700; }
.site-title a { color: var(--color-text, #222222); }

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

.site-header-nav a {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-teal, #0FA3B1);
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  transition: background 0.15s;
}

.site-header-nav a:hover { background: #e8f7f8; text-decoration: none; }
.site-header-nav a.active { background: #e8f7f8; }

/* ── Page wrap ── */
.page-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.5rem 1rem;
}

/* ── Footer ── */
footer {
  border-top: 1px solid rgba(0,0,0,0.04);
  padding: 1rem;
  margin-top: 2rem;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: #666;
}

.footer-inner a { color: #666; }
.footer-inner a:hover { color: var(--color-teal, #0FA3B1); }

/* ── Stats bar ── */
.tn-stats {
  background: #fff;
  border: 1px solid #e8edf2;
  border-radius: 8px;
  padding: 0.75rem 1.25rem;
  margin-bottom: 1.75rem;
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: #666;
}

.tn-stats strong { color: var(--color-text, #222222); }

/* ── Fold (collapsible card) ── */
.tn-fold {
  border: 1px solid #e8edf2;
  border-radius: 10px;
  margin-bottom: 1rem;
  background: #fff;
  overflow: hidden;
}

.tn-fold summary {
  cursor: pointer;
  padding: 0.85rem 1.25rem;
  font-weight: 600;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  user-select: none;
}

.tn-fold summary::-webkit-details-marker { display: none; }

.tn-fold summary::before {
  content: "▶";
  font-size: 0.65rem;
  transition: transform 0.2s;
  color: #999;
}

.tn-fold[open] > summary::before { transform: rotate(90deg); }

.tn-fold-body {
  padding: 1rem 1.25rem 1.25rem;
  border-top: 1px solid #f1f5f9;
}

/* Level variants */
.tn-fold--continent > summary {
  font-size: 1.15rem;
  background: #f0fafb;
  color: var(--color-teal, #0FA3B1);
}

.tn-fold--country > summary { font-size: 1rem; background: #fafcfd; }
.tn-fold--section > summary { font-size: 0.95rem; }

/* ── City-link card ── */
.tn-city-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  border: 1px solid #e8edf2;
  border-radius: 8px;
  margin-bottom: 0.6rem;
  background: #fff;
  transition: box-shadow 0.15s, border-color 0.15s;
  text-decoration: none;
  color: inherit;
}

.tn-city-link:hover {
  box-shadow: 0 2px 8px rgba(15,163,177,0.1);
  border-color: var(--color-teal, #0FA3B1);
  text-decoration: none;
}

.tn-city-link img {
  width: 80px;
  height: 60px;
  object-fit: cover;
  border-radius: 5px;
  flex-shrink: 0;
}

.tn-city-link .city-info h3 { font-size: 1rem; font-weight: 600; }
.tn-city-link .city-info p  { font-size: 0.85rem; color: #666; margin-top: 0.15rem; }

/* ── Page hero ── */
.tn-hero {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 1.75rem;
}

.tn-hero img { width: 100%; height: 260px; object-fit: cover; }

.tn-hero-caption {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.62));
  padding: 1.5rem 1.5rem 1rem;
  color: #fff;
}

.tn-hero-caption h1 { font-size: 1.75rem; font-weight: 700; }
.tn-hero-caption p  { font-size: 0.95rem; opacity: 0.9; margin-top: 0.25rem; }

/* ── Breadcrumb ── */
.tn-breadcrumb {
  font-size: 0.82rem;
  color: #888;
  margin-bottom: 1.25rem;
}

.tn-breadcrumb a { color: var(--color-teal, #0FA3B1); }
.tn-breadcrumb span { margin: 0 0.3rem; }

/* ── Markdown content inside cards ── */
.tn-fold-body h2,
.tn-fold-body h3  { margin: 1rem 0 0.5rem; }
.tn-fold-body p   { margin-bottom: 0.75rem; }

.tn-fold-body ul,
.tn-fold-body ol  { padding-left: 1.5rem; margin-bottom: 0.75rem; }
.tn-fold-body li  { margin-bottom: 0.3rem; }

.tn-fold-body table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.tn-fold-body th,
.tn-fold-body td  { padding: 0.5rem 0.75rem; border: 1px solid #e8edf2; text-align: left; }
.tn-fold-body th  { background: #f0fafb; font-weight: 600; }

/* ── Affiliate CTA button ── */
.tn-ads           { margin-top: 1rem; }
.tn-referential-ads { margin-top: 0.5rem; }

.tn-affiliate-btn {
  display: inline-block;
  padding: 0.45rem 1.1rem;
  background: var(--color-warm-orange, #FF8A4B);
  color: #fff !important;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-top: 0.5rem;
  transition: opacity 0.15s;
}

.tn-affiliate-btn:hover { opacity: 0.88; text-decoration: none; }

/* ── Embed mode — strip chrome when loaded in an iframe ── */
body.embed-mode .tn-ads,
body.embed-mode .tn-referential-ads,
body.embed-mode header,
body.embed-mode footer { display: none; }
body.embed-mode .page-wrap { padding: 0.5rem; }

/* ── Responsive ── */
@media (max-width: 600px) {
  .site-header-inner { padding: 0.6rem 0.75rem; }
  .tn-hero img { height: 180px; }
  .tn-hero-caption h1 { font-size: 1.3rem; }
  .footer-inner { flex-direction: column; gap: 0.4rem; text-align: center; }
}
