/* =========================
   Category Timeline Page
   ========================= */

/* Hero */
.type-page-hero {
  position: relative;
  min-height: 52vh;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  background: #151515;
}

.type-page-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  transform: scale(1);
  background-color: #1d1d1d;
}

/* fallback when no image exists */
.type-page-hero-bg:empty,
.type-page-hero-bg:not([style]) {
  background:
    linear-gradient(135deg, rgba(22, 22, 22, 0.96), rgba(48, 48, 48, 0.9)),
    radial-gradient(
      circle at top right,
      rgba(211, 84, 42, 0.2),
      transparent 34%
    );
}

.type-page-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(8, 8, 8, 0.84) 0%,
    rgba(8, 8, 8, 0.58) 42%,
    rgba(8, 8, 8, 0.34) 100%
  );
  z-index: 1;
}

.type-page-hero .container {
  position: relative;
  z-index: 2;
}

.type-page-hero h1 {
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.type-page-hero p {
  font-size: 1rem;
  line-height: 1.75;
}

/* =========================
   Timeline Grid Section
   ========================= */

.timeline-section {
  padding: 5rem 0;
  background: linear-gradient(to bottom, #f7f5f1 0%, #f5f3ee 100%);
}

.timeline-intro {
  max-width: 62ch;
  margin-bottom: 2.5rem;
}

.timeline-eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #9b6a4b;
  margin-bottom: 0.8rem;
}

.timeline-heading {
  font-size: clamp(2rem, 4vw, 3.4rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: #171717;
  margin-bottom: 0.9rem;
}

.timeline-copy {
  font-size: 1rem;
  line-height: 1.8;
  color: #5c5c5c;
  margin-bottom: 0;
}

/* =========================
   Timeline Cards
   ========================= */

.timeline-card {
  display: block;
  height: 100%;
  text-decoration: none;
  color: inherit;
}

.timeline-card-inner {
  position: relative;
  height: 100%;
  min-height: 260px;
  padding: 1.7rem;
  border-radius: 1.5rem;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.94),
    rgba(247, 244, 238, 0.96)
  );
  border: 1px solid rgba(20, 20, 20, 0.07);
  box-shadow:
    0 12px 34px rgba(22, 22, 22, 0.08),
    0 2px 8px rgba(22, 22, 22, 0.04);
  overflow: hidden;
  transition:
    transform 0.28s ease,
    box-shadow 0.28s ease,
    border-color 0.28s ease;
}

.timeline-card-inner::before {
  content: "";
  position: absolute;
  inset: auto auto 0 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, #d3542a 0%, #e4a07d 100%);
  opacity: 0.95;
}

.timeline-card-inner::after {
  content: "";
  position: absolute;
  top: -20%;
  right: -10%;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(211, 84, 42, 0.09), transparent 70%);
  pointer-events: none;
}

.timeline-card:hover .timeline-card-inner,
.timeline-card:focus-visible .timeline-card-inner {
  transform: translateY(-6px);
  box-shadow:
    0 20px 48px rgba(22, 22, 22, 0.12),
    0 4px 14px rgba(22, 22, 22, 0.06);
  border-color: rgba(211, 84, 42, 0.18);
}

.timeline-card:focus-visible {
  outline: none;
}

/* Top row */
.timeline-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2.2rem;
}

.timeline-card-label {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  background: rgba(211, 84, 42, 0.08);
  color: #9c4d2e;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.timeline-card-count {
  font-size: 0.92rem;
  color: #777;
  white-space: nowrap;
}

/* Main title */
.timeline-card-title {
  font-size: clamp(1.7rem, 4vw, 2.6rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.04em;
  color: #181818;
  margin-bottom: 2.5rem;
}

/* Bottom link */
.timeline-card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.96rem;
  font-weight: 600;
  color: #222;
  transition:
    transform 0.22s ease,
    color 0.22s ease;
}

.timeline-card:hover .timeline-card-link,
.timeline-card:focus-visible .timeline-card-link {
  color: #d3542a;
  transform: translateX(4px);
}

/* =========================
   Alerts / Empty state
   ========================= */

.timeline-empty-alert {
  border: 1px solid rgba(20, 20, 20, 0.08);
  border-radius: 1rem;
  background: #fff;
  box-shadow: 0 8px 24px rgba(20, 20, 20, 0.05);
}

/* =========================
   Buttons
   ========================= */

.type-page-hero .btn-outline-light {
  border-width: 1px;
  border-color: rgba(255, 255, 255, 0.45);
  color: #fff;
  border-radius: 999px;
  padding: 0.8rem 1.15rem;
  font-weight: 600;
  transition:
    background-color 0.24s ease,
    border-color 0.24s ease,
    transform 0.24s ease;
}

.type-page-hero .btn-outline-light:hover,
.type-page-hero .btn-outline-light:focus {
  background-color: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.7);
  color: #fff;
  transform: translateY(-1px);
}

/* =========================
   Responsive
   ========================= */

@media (max-width: 1199.98px) {
  .timeline-card-inner {
    min-height: 240px;
  }
}

@media (max-width: 991.98px) {
  .type-page-hero {
    min-height: 46vh;
  }

  .type-page-hero .container {
    margin-top: 60px !important;
  }

  .timeline-section {
    padding: 4rem 0;
  }

  .timeline-card-top {
    margin-bottom: 1.8rem;
  }

  .timeline-card-title {
    margin-bottom: 2rem;
  }
}

@media (max-width: 767.98px) {
  .type-page-hero {
    min-height: 42vh;
  }

  .type-page-hero h1 {
    font-size: clamp(2rem, 7vw, 2.8rem);
  }

  .type-page-hero p {
    max-width: 100% !important;
  }

  .timeline-section {
    padding: 3rem 0;
  }

  .timeline-intro {
    margin-bottom: 2rem;
  }

  .timeline-card-inner {
    min-height: 220px;
    padding: 1.35rem;
    border-radius: 1.2rem;
  }

  .timeline-card-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
  }

  .timeline-card-title {
    font-size: clamp(1.6rem, 7vw, 2.1rem);
    margin-bottom: 1.6rem;
  }

  .timeline-card-count {
    white-space: normal;
  }
}

@media (max-width: 479.98px) {
  .type-page-hero {
    min-height: 38vh;
  }

  .type-page-hero .container {
    margin-top: 48px !important;
  }

  .timeline-card-inner {
    min-height: 200px;
    padding: 1.15rem;
  }

  .timeline-card-label {
    font-size: 0.72rem;
  }

  .timeline-card-link {
    font-size: 0.92rem;
  }
}
