/* ==========================================================================
   SAFARI PACKAGES — Archive Refactor
   ========================================================================== */

/* ─── SECTION HEADS ─── */
.pkg-intro {
  padding: var(--sp-xl) 0;
  text-align: center;
}
.pkg-intro h2 {
  max-width: 800px;
  margin: 0 auto 1.4rem;
  color: var(--brown);
}
.pkg-intro p {
  max-width: 560px;
  margin: 0 auto;
}

.pkg-chapter-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 3rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}
.pkg-chapter-head h3 {
  font-size: clamp(2rem, 3.5vw, 2.8rem);
  color: var(--brown);
  line-height: 1.1;
}
.pkg-chapter-head h3 em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  color: var(--gold);
}
.pkg-chapter-count {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
}

/* ─── FEATURED PACKAGE (Immersive Layout) ─── */
.pkg-featured-wrap {
  margin-bottom: var(--sp-xl);
}

.pkg-featured-card {
  position: relative;
  background: var(--charcoal);
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  min-height: 540px;
  text-decoration: none;
  color: var(--white);
  overflow: hidden;
}

.pkg-featured-img-side {
  position: relative;
  overflow: hidden;
}
.pkg-featured-img-side img.main-feat-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease-out);
}

.pkg-featured-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  transition: background 0.6s var(--ease-out);
  z-index: 2;
}

.pkg-featured-card:hover .main-feat-img {
  transform: scale(1.05);
}
.pkg-featured-card:hover .pkg-featured-overlay {
  background: rgba(0, 0, 0, 0.2);
}

.feat-eyebrow {
  position: absolute;
  top: 2rem;
  left: 2rem;
  z-index: 10;
}

.pkg-featured-strip {
  position: absolute;
  bottom: 2rem;
  left: 2rem;
  display: flex;
  gap: 0.75rem;
  z-index: 5;
}
.pkg-featured-strip img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.pkg-featured-body {
  padding: clamp(2rem, 5vw, 4rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
}
.pkg-featured-body h2 {
  font-size: clamp(2.5rem, 4vw, 4rem);
  line-height: 1.1;
  margin: 1rem 0 1.5rem;
  color: var(--white);
}
.pkg-featured-body p {
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--sage-light);
  margin-bottom: 2rem;
}

.pkg-featured-card .sa-card-arrow {
  position: absolute;
  top: 2rem;
  right: 2rem;
}

/* ─── ARCHIVE GRID & CARDS (Inlined) ─── */
.sa-archive-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.sa-archive-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 480px;
  overflow: hidden;
  text-decoration: none;
  background: var(--charcoal);
}

.sa-archive-card-img {
  position: absolute;
  inset: 0;
  z-index: 1;
}
.sa-archive-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1s var(--ease-out);
}

.sa-archive-card-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(
    to top,
    rgba(10, 5, 0, 1) 0%,
    rgba(10, 5, 0, 0.8) 25%,
    rgba(10, 5, 0, 0.4) 50%,
    transparent 100%
  );
  opacity: 0.95;
  transition: opacity 0.5s ease;
}

.sa-archive-card-info {
  position: relative;
  z-index: 3;
  padding: var(--sp-xl) var(--sp-lg) var(--sp-lg);
  color: var(--white);
}

.sa-archive-card-info h4 {
  font-size: 1.6rem;
  line-height: 1.2;
  margin: 0.5rem 0 0.8rem;
  color: var(--white);
  font-weight: 600;
  text-shadow: 0 2px 15px rgba(0, 0, 0, 0.5);
}

.sa-archive-card-excerpt {
  font-size: 0.92rem;
  line-height: 1.45;
  color: var(--white);
  margin-bottom: 1.2rem;
  font-weight: 400;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sa-archive-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: 1rem;
}

.sa-archive-meta-item {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
}

/* Hover States */
.sa-archive-card:hover .sa-archive-card-img img {
  transform: scale(1.1);
}
.pkg-featured-card:hover .sa-card-arrow {
  transform: translateX(8px);
  filter: brightness(1.1) saturate(1.1);
}

/* Archive Card Arrow */
.sa-archive-card .sa-card-arrow {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 4;
  transition: transform 0.4s var(--ease-spring), filter 0.4s ease;
}

.sa-archive-card:hover .sa-card-arrow {
  transform: translateX(8px);
  filter: brightness(1.1) saturate(1.1);
}

/* ─── ALTERNATING SECTIONS ─── */
.pkg-archive-section {
  padding: var(--sp-xl) 0;
}
.pkg-archive-section--alt {
  background: #f7f3ed;
}

/* ─── RESPONSIVE ─── */
@media (max-width: 1100px) {
  .pkg-featured-card {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .pkg-featured-img-side {
    height: 400px;
  }
}

@media (max-width: 1024px) {
  .sa-archive-grid {
    grid-template-columns: 1fr 1fr;
  }
  .sa-archive-card {
    min-height: 420px;
  }
}

@media (max-width: 640px) {
  .sa-archive-grid {
    grid-template-columns: 1fr;
  }
  .sa-archive-card {
    min-height: 380px;
  }
  .pkg-chapter-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  .pkg-featured-img-side {
    height: 300px;
  }
  .pkg-featured-body {
    padding: 2rem 1.5rem;
  }
}

/* ==========================================================================
   PACKAGES ARCHIVE — Flat Grid Additions
   ========================================================================== */

/* Tour type label inside card */
.sa-archive-card-type {
    font-family: var(--sans);
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--gold);
    margin-bottom: 0.35rem;
    display: block;
}

/* Most Popular badge — overlaid on image top-left */
.sa-pkg-badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    z-index: 2;
    font-family: var(--sans);
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.2rem 0.55rem;
    border-radius: 2px;
}
.sa-pkg-badge--pop {
    background: var(--gold);
    color: var(--charcoal);
}

/* Difficulty meta pill */
.sa-archive-meta-item--diff {
    color: var(--sage-light);
    border: 1px solid rgba(255,255,255,0.25);
    padding: 0 0.4rem;
    border-radius: 2px;
}

.pkg-all-section { padding: var(--sp-xl) 0; }
