﻿/* ============================================================
   blog-post.css — Blog post & package detail page styles
   ============================================================ */

/* ── Hero ───────────────────────────────────────────────── */
.bp-hero {
  position: relative;
  height: 70vh;
  min-height: 500px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  margin: 0;
  padding: 0;
}

.bp-hero__img {
  position: absolute;
  inset: 0;
  will-change: transform;
}

.bp-hero__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.12);
  transition: transform 1.4s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}

.bp-hero.loaded .bp-hero__img img {
  animation: bpZoom 14s ease-in-out infinite alternate;
}

@keyframes bpZoom {
  from { transform: scale(1.0); }
  to   { transform: scale(1.06); }
}

.bp-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.88) 0%, rgba(0,0,0,.35) 55%, rgba(0,0,0,.08) 100%);
}

/* Hero content animates up on load */
.bp-hero__content {
  position: relative;
  z-index: 1;
  max-width: 860px;
  margin: 0 auto;
  padding: 0 40px 56px;
  width: 100%;
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .9s var(--ease) .3s, transform .9s var(--ease) .3s;
}
.bp-hero.loaded .bp-hero__content {
  opacity: 1;
  transform: translateY(0);
}

.bp-hero__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.bp-hero__tag {
  font-family: var(--display);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #fff;
  background: var(--orange);
  padding: 4px 12px;
  border-radius: 100px;
}

.bp-hero__date,
.bp-hero__read {
  font-family: var(--display);
  font-size: 11px;
  color: rgba(255,255,255,.6);
  letter-spacing: .5px;
}

.bp-hero__dot {
  width: 3px;
  height: 3px;
  background: rgba(255,255,255,.3);
  border-radius: 50%;
}

.bp-hero__title {
  font-family: var(--serif);
  font-size: clamp(2rem, 5vw, 3.8rem);
  font-weight: 300;
  color: #fff;
  line-height: 1.15;
}
.bp-hero__title em { font-style: italic; color: var(--orange); }

/* ── Article layout ─────────────────────────────────────── */
.bp-body {
  max-width: 860px;
  margin: 0 auto;
  padding: 72px 40px 100px;
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 80px;
  align-items: start;
}

/* ── Prose ──────────────────────────────────────────────── */
.bp-prose { min-width: 0; }

.bp-prose .bp-lead {
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 300;
  color: rgba(17,17,17,.75);
  line-height: 1.8;
  margin-bottom: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(17,17,17,.08);
}

.bp-prose h2 {
  font-family: var(--serif);
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 300;
  color: #111;
  line-height: 1.2;
  margin: 48px 0 20px;
}
.bp-prose h2 em { font-style: italic; color: var(--orange); }

.bp-prose h3 {
  font-family: var(--display);
  font-size: 1rem;
  font-weight: 700;
  color: #111;
  letter-spacing: .5px;
  margin: 32px 0 12px;
}

.bp-prose p {
  font-size: 1rem;
  color: rgba(17,17,17,.7);
  line-height: 1.9;
  margin-bottom: 20px;
}

.bp-prose ul,
.bp-prose ol {
  margin: 0 0 24px;
  padding-left: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bp-prose ul li,
.bp-prose ol li {
  font-size: .95rem;
  color: rgba(17,17,17,.7);
  line-height: 1.7;
  padding-left: 24px;
  position: relative;
}

.bp-prose ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  width: 6px;
  height: 6px;
  background: var(--orange);
  border-radius: 50%;
}

.bp-prose ol { counter-reset: ol-counter; }
.bp-prose ol li { counter-increment: ol-counter; }
.bp-prose ol li::before {
  content: counter(ol-counter);
  position: absolute;
  left: 0;
  top: 0;
  font-family: var(--display);
  font-size: 11px;
  font-weight: 700;
  color: var(--orange);
  letter-spacing: 1px;
}

.bp-prose blockquote {
  margin: 40px 0;
  padding: 28px 32px;
  background: #F7F5F2;
  border-left: 3px solid var(--orange);
  border-radius: 0 12px 12px 0;
}
.bp-prose blockquote p {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-style: italic;
  color: rgba(17,17,17,.75);
  margin: 0;
  line-height: 1.7;
}

/* ── Itinerary / data table ─────────────────────────────── */
.bp-prose .bp-table {
  width: 100%;
  border-collapse: collapse;
  margin: 40px 0;
  font-size: 15px;
}
.bp-prose .bp-table thead th {
  font-family: var(--display);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(17,17,17,.4);
  padding: 0 20px 14px;
  text-align: left;
  border-bottom: 1px solid rgba(17,17,17,.1);
}
.bp-prose .bp-table thead th:first-child {
  position: relative;
  padding-left: 44px;
}
.bp-prose .bp-table thead th:first-child::before {
  content: '';
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--orange);
  margin-top: -7px;
}
.bp-prose .bp-table tbody tr:nth-child(even) {
  background: #F7F5F2;
}
.bp-prose .bp-table tbody td {
  padding: 14px 20px;
  color: rgba(17,17,17,.75);
  vertical-align: top;
  line-height: 1.5;
  border: none;
}
.bp-prose .bp-table tbody td:first-child {
  font-family: var(--display);
  font-size: 13px;
  font-weight: 500;
  color: rgba(17,17,17,.55);
  white-space: nowrap;
  width: 110px;
}
/* Edit mode — make cells obviously editable */
.bp-prose[contenteditable="true"] .bp-table td,
.bp-prose[contenteditable="true"] .bp-table th {
  outline: none;
  min-width: 60px;
}
.bp-prose[contenteditable="true"] .bp-table td:focus,
.bp-prose[contenteditable="true"] .bp-table th:focus {
  background: rgba(232,98,10,.06);
  outline: 1px dashed rgba(232,98,10,.4);
}
/* Table wrapper for add-row button in edit mode */
.bp-table-wrap { position: relative; margin: 40px 0; }
.bp-table-wrap .bp-table { margin: 0; }
.bp-table-add-row {
  display: none;
  width: 100%;
  margin-top: 4px;
  padding: 8px;
  background: none;
  border: 1px dashed rgba(232,98,10,.35);
  border-radius: 8px;
  color: var(--orange);
  font-family: var(--display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .5px;
  cursor: pointer;
  transition: background .15s;
}
.bp-table-add-row:hover { background: rgba(232,98,10,.06); }
.bp-prose[contenteditable="true"] .bp-table-add-row { display: block; }

/* ── Inline images — cinematic reveal ───────────────────── */
.bp-prose .bp-img {
  margin: 48px 0;
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  background: linear-gradient(90deg, #f0ede8 25%, #e8e4de 50%, #f0ede8 75%);
  background-size: 200% 100%;
  animation: shimmer 1.6s ease-in-out infinite;
}

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.bp-prose .bp-img.img-loaded {
  animation: none;
  background: none;
}

.bp-prose .bp-img img {
  width: 100%;
  height: 380px;
  object-fit: cover;
  display: block;
  transform: scale(1.06) translateY(12px);
  opacity: 0;
  transition: transform 1s cubic-bezier(0.16, 1, 0.3, 1), opacity .8s ease;
  will-change: transform, opacity;
}

.bp-prose .bp-img.img-visible img {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.bp-prose .bp-img:hover img {
  transform: scale(1.04) translateY(-4px);
  transition: transform 6s ease;
}

/* Orange accent line wipes in above image */
.bp-prose .bp-img::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  background: var(--orange);
  z-index: 2;
  transition: width .8s var(--ease) .2s;
}
.bp-prose .bp-img.img-visible::before { width: 64px; }

.bp-prose .bp-img figcaption {
  font-family: var(--display);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(17,17,17,.35);
  padding: 12px 0 0;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .5s ease .6s, transform .5s ease .6s;
}
.bp-prose .bp-img.img-visible figcaption {
  opacity: 1;
  transform: translateY(0);
}

/* ── Callout ────────────────────────────────────────────── */
.bp-prose .bp-callout {
  background: var(--orange);
  color: #fff;
  border-radius: 16px;
  padding: 28px 32px;
  margin: 40px 0;
}
.bp-prose .bp-callout h4 {
  font-family: var(--display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: rgba(255,255,255,.7);
  margin-bottom: 12px;
}
.bp-prose .bp-callout p {
  color: rgba(255,255,255,.9);
  margin: 0;
  font-size: .95rem;
}

/* ── Table ──────────────────────────────────────────────── */
.bp-prose .bp-table {
  width: 100%;
  border-collapse: collapse;
  margin: 32px 0;
  font-size: 13px;
}
.bp-prose .bp-table th {
  font-family: var(--display);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(17,17,17,.45);
  padding: 10px 16px;
  border-bottom: 2px solid rgba(17,17,17,.1);
  text-align: left;
}
.bp-prose .bp-table td {
  padding: 12px 16px;
  color: rgba(17,17,17,.7);
  border-bottom: 1px solid rgba(17,17,17,.06);
  line-height: 1.6;
}
.bp-prose .bp-table tr:last-child td { border-bottom: none; }
.bp-prose .bp-table tr:nth-child(even) td { background: #F7F5F2; }

/* ── Sidebar ────────────────────────────────────────────── */
.bp-sidebar {
  position: sticky;
  top: 100px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.bp-sidebar__block {
  padding: 24px 0;
  border-bottom: 1px solid rgba(17,17,17,.08);
}
.bp-sidebar__block:last-child { border-bottom: none; }

.bp-sidebar__heading {
  font-family: var(--display);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: rgba(17,17,17,.35);
  margin-bottom: 14px;
}

.bp-sidebar__block p {
  font-size: 13px;
  color: rgba(17,17,17,.55);
  line-height: 1.7;
}

.bp-toc {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bp-toc a {
  font-size: 13px;
  color: rgba(17,17,17,.5);
  line-height: 1.5;
  padding-left: 12px;
  border-left: 2px solid transparent;
  transition: color .25s var(--ease), border-color .25s var(--ease), padding-left .25s var(--ease);
  display: block;
}
.bp-toc a:hover,
.bp-toc a.active {
  color: var(--orange);
  border-left-color: var(--orange);
  padding-left: 16px;
}

.bp-sidebar__cta {
  background: #111;
  border-radius: 16px;
  padding: 24px !important;
  border-bottom: none !important;
}
.bp-sidebar__cta p {
  font-family: var(--serif);
  font-size: 1rem;
  font-style: italic;
  color: rgba(255,255,255,.8);
  line-height: 1.5;
  margin-bottom: 16px;
}
.bp-sidebar__cta .btn-pill {
  width: 100%;
  justify-content: space-between;
  font-size: 11px;
}

/* ── Related posts ──────────────────────────────────────── */
.bp-related {
  background: #F7F5F2;
  padding: 80px 0;
}

.bp-related__inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 40px;
}

.bp-related__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 40px;
}

.bp-related__card {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(17,17,17,.07);
  transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .3s;
  opacity: 0;
  transform: translateY(24px);
}
.bp-related__card.img-visible {
  opacity: 1;
  transform: translateY(0);
}
.bp-related__card:nth-child(1) { transition-delay: 0s; }
.bp-related__card:nth-child(2) { transition-delay: .1s; }
.bp-related__card:nth-child(3) { transition-delay: .2s; }
.bp-related__card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 48px rgba(0,0,0,.12);
  border-color: var(--orange);
}

.bp-related__card-img {
  height: 180px;
  overflow: hidden;
}
.bp-related__card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  transition: transform .7s var(--ease);
}
.bp-related__card:hover .bp-related__card-img img { transform: scale(1.1); }

.bp-related__card-body { padding: 20px; }

.bp-related__card-tag {
  font-family: var(--display);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 8px;
  display: block;
}

.bp-related__card-body h4 {
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 300;
  color: #111;
  line-height: 1.3;
  margin-bottom: 12px;
}

.bp-related__card-body a {
  font-family: var(--display);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--orange);
}

/* ── Back link ──────────────────────────────────────────── */
.bp-back {
  max-width: 860px;
  margin: 0 auto;
  padding: 32px 40px 0;
}

.bp-back a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #fff;
  background: var(--orange);
  text-decoration: none;
  padding: 10px 20px;
  border-radius: 100px;
  transition: background .25s var(--ease), transform .25s var(--ease);
}
.bp-back a:hover { background: var(--orange-glow); transform: translateY(-2px); gap: 12px; }

/* ── Reduced motion ─────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .bp-hero__img img,
  .bp-hero__content,
  .bp-prose .bp-img img,
  .bp-prose .bp-img::before,
  .bp-prose .bp-img figcaption,
  .bp-related__card {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 900px) {
  .bp-body { grid-template-columns: 1fr; gap: 48px; }
  .bp-sidebar { position: static; }
  .bp-related__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .bp-hero__content { padding: 0 20px 40px; }
  .bp-body { padding: 48px 20px 64px; }
  .bp-back { padding: 24px 20px 0; }
  .bp-related__inner { padding: 0 20px; }
  .bp-related__grid { grid-template-columns: 1fr; }
  .bp-prose .bp-img img { height: 240px; }
}
