/* ============================================================
   SAFARI ITINERARY — BASE STRUCTURAL CSS
   All colors via CSS custom properties from theme files.
   ============================================================ */

/* ── Page wrapper ───────────────────────────────────────────── */
.it-page {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 0 64px;
  background: var(--bg-page);
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text);
  line-height: 1.65;
}

/* ── Preview banner ─────────────────────────────────────────── */
.it-preview-banner {
  background: #fef3c7;
  color: #92400e;
  text-align: center;
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 500;
  border-bottom: 1px solid #fcd34d;
  position: sticky;
  top: 0;
  z-index: 100;
}
.it-preview-banner a {
  color: #92400e;
  font-weight: 700;
  text-decoration: underline;
}

/* ── Header ─────────────────────────────────────────────────── */
.it-header {
  text-align: center;
  padding: 40px 32px 32px;
  background: var(--bg-card);
  border-bottom: 3px solid var(--accent);
}
.it-logo {
  max-height: 80px;
  max-width: 260px;
  display: block;
  margin: 0 auto 16px;
  object-fit: contain;
}
.it-header-intro {
  font-size: 14px;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ── Client info hero ───────────────────────────────────────── */
.it-hero {
  background: var(--bg-card);
  padding: 32px 32px 28px;
  border-left: 5px solid var(--accent);
  margin-bottom: 2px;
}
.it-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
  margin: 0 0 20px;
  letter-spacing: -0.01em;
}
.it-meta-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-top: 4px;
}
.it-meta-chip {
  display: flex;
  align-items: baseline;
  gap: 5px;
  font-size: 13px;
}
.it-meta-chip .label {
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.06em;
}
.it-meta-chip .value {
  color: var(--text);
  font-weight: 500;
}
.it-meta-chip code {
  font-family: 'DM Mono', 'Fira Code', monospace;
  font-size: 12px;
  background: var(--bg-page);
  padding: 1px 6px;
  border-radius: 3px;
  color: var(--text);
}

/* ── Intro text sections ────────────────────────────────────── */
.it-short-desc,
.it-intro-full {
  background: var(--bg-card);
  padding: 24px 32px;
  margin-bottom: 2px;
}
.it-short-desc p {
  font-size: 15px;
  color: var(--text);
  margin: 0;
  font-style: italic;
  line-height: 1.75;
}
.it-intro-full {
  font-size: 14px;
  color: var(--text);
  line-height: 1.8;
  border-top: 1px solid var(--border);
}

/* ── Section generic ────────────────────────────────────────── */
.it-section {
  background: var(--bg-card);
  padding: 28px 32px;
  margin-bottom: 2px;
}
.it-section-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--accent);
  margin: 0 0 16px;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  gap: 8px;
}
.it-section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ── Parks & Reserves ───────────────────────────────────────── */
.it-parks-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.it-park-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--bg-page);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 13px;
}
.it-park-pill .park-name {
  font-weight: 600;
  color: var(--text);
}
.it-park-pill .park-country {
  color: var(--text-muted);
  font-size: 11px;
}

/* ── Map ────────────────────────────────────────────────────── */
.it-map {
  max-width: 100%;
  overflow: hidden;
}
.it-map img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

/* ── Days container ─────────────────────────────────────────── */
.it-days {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 0 0 8px;
}

/* ── Day card ───────────────────────────────────────────────── */
.it-day-card {
  background: var(--bg-card);
  border-radius: 4px;
  box-shadow: var(--shadow);
  overflow: hidden;
  border-top: 3px solid var(--accent);
}

.it-day-header {
  background: var(--bg-header);
  padding: 14px 24px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}
.it-day-number {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.it-day-date {
  font-size: 12px;
  color: var(--text-on-dark);
  opacity: 0.7;
  font-style: italic;
}

.it-day-body {
  padding: 24px 24px 20px;
}

/* ── Timeline ───────────────────────────────────────────────── */
.it-timeline {
  position: relative;
  padding-left: 40px;
  margin-bottom: 4px;
}
.it-timeline::before {
  content: '';
  position: absolute;
  left: 19px;
  top: 10px;
  bottom: 10px;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent), transparent);
}

.it-timeline-item {
  position: relative;
  margin-bottom: 22px;
  padding-left: 4px;
}
.it-timeline-item:last-child {
  margin-bottom: 0;
}

.it-timeline-dot {
  position: absolute;
  left: -28px;
  top: 5px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--bg-card);
  box-shadow: 0 0 0 1px var(--accent);
}

.it-timeline-item.accommodation .it-timeline-dot {
  background: var(--accent-alt);
  border-color: var(--bg-card);
  box-shadow: 0 0 0 1px var(--accent-alt);
  border-radius: 3px;
  transform: rotate(45deg);
  width: 12px;
  height: 12px;
  top: 6px;
}
.it-timeline-item.addon .it-timeline-dot {
  background: var(--addon-color);
  border-color: var(--bg-card);
  box-shadow: 0 0 0 1px var(--addon-color);
  border-radius: 2px;
  width: 10px;
  height: 10px;
  top: 7px;
  left: -26px;
}

.it-timeline-item-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 5px;
  line-height: 1.3;
}
.it-timeline-item-location {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0 0 4px;
}
.it-timeline-item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 6px;
}
.it-timeline-item-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 6px 0 0;
}

/* ── Accommodation links ─────────────────────────────────────── */
.it-acc-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.it-acc-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 500;
  color: var(--accent-dark);
  text-decoration: none;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  background: color-mix(in srgb, var(--accent) 10%, var(--bg-card));
  transition: background 0.15s ease, border-color 0.15s ease;
}
.it-acc-link:hover {
  background: color-mix(in srgb, var(--accent) 20%, var(--bg-card));
  border-color: color-mix(in srgb, var(--accent) 50%, transparent);
}
.it-acc-link--ta {
  color: #007a4e;
  border-color: rgba(0, 170, 108, 0.3);
  background: rgba(0, 170, 108, 0.08);
}
.it-acc-link--ta:hover {
  background: rgba(0, 170, 108, 0.16);
  border-color: rgba(0, 170, 108, 0.5);
}

/* ── Badges ─────────────────────────────────────────────────── */
.it-badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  background: color-mix(in srgb, var(--accent) 15%, var(--bg-card));
  color: var(--accent-dark);
  border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
}
.it-badge-accommodation {
  background: color-mix(in srgb, var(--accent-alt) 15%, var(--bg-card));
  color: var(--accent-alt);
  border-color: color-mix(in srgb, var(--accent-alt) 25%, transparent);
}
.it-badge-addon {
  background: color-mix(in srgb, var(--addon-color) 15%, var(--bg-card));
  color: var(--addon-color);
  border-color: color-mix(in srgb, var(--addon-color) 25%, transparent);
}

/* ── Image gallery ──────────────────────────────────────────── */
.it-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 18px;
}
.it-gallery-thumb {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 4px;
  cursor: pointer;
  display: block;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.it-gallery-link {
  display: block;
  position: relative;
  overflow: hidden;
  border-radius: 4px;
}
.it-gallery-link::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40' fill='none' stroke='rgba(255%2C255%2C255%2C0.92)' stroke-width='1.5' stroke-linecap='round'%3E%3Cpath d='M4 14V4h10M26 4h10v10M36 26v10H26M14 36H4V26'/%3E%3C/svg%3E")
    center / 38px 38px no-repeat,
    linear-gradient(to bottom, rgba(10,8,5,0.0) 30%, rgba(10,8,5,0.58) 100%);
  opacity: 0;
  transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}
.it-gallery-link:hover::after {
  opacity: 1;
}
.it-gallery-link:hover .it-gallery-thumb {
  transform: scale(1.06);
}
.it-gallery-more {
  flex-shrink: 0;
  width: 80px;
  height: 130px;
  border-radius: 4px;
  background: var(--bg-page);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
}

/* ── Day notes ──────────────────────────────────────────────── */
.it-day-notes {
  margin-top: 16px;
  padding: 10px 14px;
  border-left: 2px solid var(--accent);
  font-size: 13px;
  font-style: italic;
  color: var(--text-muted);
  line-height: 1.6;
  background: color-mix(in srgb, var(--accent) 5%, var(--bg-card));
  border-radius: 0 4px 4px 0;
}

/* ── Guide profile ──────────────────────────────────────────── */
.it-guide {
  background: var(--bg-card);
  padding: 28px 32px;
  margin-top: 2px;
  border-top: 3px solid var(--accent);
}
.it-guide-card {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  margin-top: 16px;
}
.it-guide-photo {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 3px solid var(--accent);
}
.it-guide-photo-placeholder {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--bg-page);
  border: 2px solid var(--border);
  flex-shrink: 0;
}
.it-guide-info {
  flex: 1;
}
.it-guide-name {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 3px;
}
.it-guide-role {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.it-guide-bio {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ── Footer ─────────────────────────────────────────────────── */
.it-footer {
  background: var(--bg-header);
  color: var(--text-on-dark);
  padding: 36px 32px;
  margin-top: 2px;
}
.it-footer-sections {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.it-footer-section h3 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
}
.it-footer-section p,
.it-footer-section li {
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-on-dark);
  opacity: 0.85;
  margin: 0 0 6px;
}
.it-footer-section ul,
.it-footer-section ol {
  padding-left: 16px;
  margin: 0;
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 640px) {
  .it-page { padding-bottom: 40px; }

  .it-header { padding: 28px 20px 24px; }

  .it-hero { padding: 24px 20px 20px; border-left-width: 4px; }
  .it-title { font-size: 1.8rem; }
  .it-meta-grid { gap: 6px 16px; }

  .it-short-desc,
  .it-intro-full,
  .it-section { padding: 20px; }

  .it-day-body { padding: 18px 16px 14px; }
  .it-day-header { padding: 12px 16px; }

  .it-timeline { padding-left: 32px; }
  .it-timeline::before { left: 13px; }
  .it-timeline-dot { left: -22px; }
  .it-timeline-item.accommodation .it-timeline-dot { left: -21px; }
  .it-timeline-item.addon .it-timeline-dot { left: -19px; }

  .it-guide { padding: 24px 20px; }
  .it-guide-card { flex-direction: column; align-items: center; text-align: center; }

  .it-footer { padding: 28px 20px; }
  .it-footer-sections { grid-template-columns: 1fr; gap: 24px; }
}
