/* =========================
   Archive Period Items 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;
  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.86) 0%,
    rgba(8, 8, 8, 0.6) 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;
}

/* Hero buttons */
.type-page-hero .btn-outline-light {
  border-width: 1px;
  border-color: rgba(255, 255, 255, 0.42);
  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);
}

/* =========================
   Search / Filter Form
   ========================= */

.type-page-hero .input-group-text {
  border: 0;
  color: #666;
  border-radius: 1rem 0 0 1rem;
  padding-inline: 1rem;
}

.type-page-hero .form-control,
.type-page-hero .form-select {
  border: 0;
  min-height: 58px;
  box-shadow: none;
}

.type-page-hero .form-control {
  border-radius: 0 1rem 1rem 0;
}

.type-page-hero .form-select {
  border-radius: 1rem;
  padding-inline: 1rem;
}

.type-page-hero .form-control:focus,
.type-page-hero .form-select:focus {
  box-shadow: 0 0 0 0.2rem rgba(211, 84, 42, 0.18);
}

.btn-accent {
  background: #d3542a;
  color: #fff;
  border: 0;
  border-radius: 1rem;
  font-weight: 600;
  transition:
    background-color 0.24s ease,
    transform 0.24s ease,
    box-shadow 0.24s ease;
}

.btn-accent:hover,
.btn-accent:focus {
  background: #b94723;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(211, 84, 42, 0.25);
}

/* =========================
   Items Section
   ========================= */

.archive-items-section {
  padding: 5rem 0;
  background: linear-gradient(to bottom, #f7f5f1 0%, #f4f1eb 100%);
}

.archive-items-toolbar {
  margin-bottom: 2rem;
}

.archive-items-count {
  font-size: 0.98rem;
  color: #666;
}

.archive-items-count strong {
  color: #1a1a1a;
}

.archive-items-toolbar .btn-outline-secondary {
  border-radius: 999px;
  padding: 0.55rem 1rem;
  font-weight: 600;
}

/* =========================
   Archive Cards
   ========================= */

.archive-card {
  display: block;
  height: 100%;
  text-decoration: none;
  color: inherit;
}

.archive-card:hover,
.archive-card:focus {
  text-decoration: none;
  color: inherit;
}

.archive-card {
  border-radius: 1.4rem;
  overflow: hidden;
  background: rgba(255, 255, 255, 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);
  transition:
    transform 0.28s ease,
    box-shadow 0.28s ease,
    border-color 0.28s ease;
}

.archive-card:hover,
.archive-card:focus-visible {
  transform: translateY(-6px);
  box-shadow:
    0 18px 44px rgba(22, 22, 22, 0.12),
    0 4px 12px rgba(22, 22, 22, 0.06);
  border-color: rgba(211, 84, 42, 0.18);
}

.archive-card:focus-visible {
  outline: none;
}

/* Media */
.archive-card-media {
  position: relative;
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, #ece7df, #e2ddd5);
  overflow: hidden;
}

.archive-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.archive-card:hover .archive-card-media img,
.archive-card:focus-visible .archive-card-media img {
  transform: scale(1.04);
}

.archive-card-placeholder {
  height: 100%;
  display: grid;
  place-items: center;
  background: linear-gradient(
    135deg,
    rgba(232, 226, 217, 0.9),
    rgba(242, 238, 231, 0.95)
  );
  color: #777;
}

/* Body */
.archive-card-body {
  padding: 1.25rem 1.25rem 1.35rem;
}

.archive-card-body .small.text-muted {
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #8a8a8a !important;
  margin-bottom: 0.5rem;
}

.archive-card-title {
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: #191919;
  margin-bottom: 0.7rem;
}

.archive-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  font-size: 0.94rem;
  color: #6e6e6e;
  line-height: 1.5;
}

.archive-card-body p {
  font-size: 0.96rem;
  line-height: 1.75;
  color: #5e5e5e !important;
}

/* =========================
   Empty State
   ========================= */

.archive-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);
}

/* =========================
   Responsive
   ========================= */

@media (max-width: 991.98px) {
  .type-page-hero {
    min-height: 46vh;
  }

  .type-page-hero .container {
    margin-top: 60px !important;
  }

  .archive-items-section {
    padding: 4rem 0;
  }

  .archive-card-title {
    font-size: 1.2rem;
  }
}

@media (max-width: 767.98px) {
  .type-page-hero {
    min-height: 42vh;
  }

  .type-page-hero h1 {
    font-size: clamp(2rem, 7vw, 2.7rem);
  }

  .type-page-hero .container {
    margin-top: 50px !important;
  }

  .type-page-hero .form-control,
  .type-page-hero .form-select {
    min-height: 52px;
  }

  .archive-items-section {
    padding: 3rem 0;
  }

  .archive-items-toolbar {
    margin-bottom: 1.5rem;
  }

  .archive-card {
    border-radius: 1.15rem;
  }

  .archive-card-body {
    padding: 1.05rem 1.05rem 1.15rem;
  }

  .archive-card-title {
    font-size: 1.12rem;
  }

  .archive-card-body p {
    font-size: 0.93rem;
    line-height: 1.68;
  }
}

@media (max-width: 479.98px) {
  .type-page-hero {
    min-height: 38vh;
  }

  .type-page-hero .container {
    margin-top: 42px !important;
  }

  .archive-card-media {
    aspect-ratio: 1 / 1;
  }

  .archive-card-title {
    font-size: 1.05rem;
  }

  .archive-items-count {
    font-size: 0.92rem;
  }
}
