/*
==========================================
 CATEGORY BASE
 Shared styles for:
 - category.php
 - category-evenimente.php
 Keeps hero + cards + pagination + empty state
 without depending on page-templates.css.
==========================================
*/

/* ---------- Shared page shell ---------- */

.page-shell {
  position: relative;
  padding: 40px 0 72px;
}

/* ---------- Shared hero base ----------
 * Hero nu mai folosește Bootstrap .container/.row/.col.
 * Layoutul e controlat integral de .category-hero__inner și .ev-hero__content.
 */

.tpl-hero.category-hero,
.ev-hero {
  position: relative;
  overflow: hidden;
  padding: 56px 16px 46px;
  background: linear-gradient(180deg, #184a7a 0%, #103861 100%);
  color: #fff;
}

.tpl-hero.category-hero::before,
.ev-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.10), transparent 34%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.04), transparent 48%);
  pointer-events: none;
}

.category-hero__inner,
.ev-hero__content {
  position: relative;
  z-index: 1;
  width: min(760px, calc(100% - 48px));
  margin-inline: auto;
  text-align: center;
}

.tpl-hero__tagline,
.ev-hero__tagline {
  display: inline-block;
  margin: 0 0 14px;
  color: #f4c515;
  font-size: 0.92rem;
  font-style: italic;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.tpl-hero__title,
.ev-hero__title {
  margin: 0;
  color: #fff;
  font-family: "Oswald-Regular", "Heebo", sans-serif;
  font-size: clamp(2.4rem, 4.8vw, 4rem);
  line-height: 1.02;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.tpl-hero__subtitle,
.ev-hero__desc {
  max-width: 760px;
  margin: 18px auto 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 1rem;
  line-height: 1.7;
}

.tpl-hero__subtitle p,
.ev-hero__desc p {
  margin: 0;
}

.category-hero__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  margin: 20px auto 0;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.92rem;
  line-height: 1;
}

/* ---------- Shared category cards ---------- */

.page-card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.94);
  border-radius: 28px;
  text-decoration: none;
  color: inherit;
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.10);
  transition:
    transform 0.28s ease,
    box-shadow 0.28s ease,
    border-color 0.28s ease;
}

.page-card:hover,
.page-card:focus-visible {
  transform: translateY(-6px);
  box-shadow: 0 22px 56px rgba(15, 23, 42, 0.16);
}

/* Placeholder moștenește aspect-ratio pentru alinierea grid-ului când lipsește thumbnail. */
.page-card__img,
.page-card__img--placeholder {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
}

.page-card__img {
  object-fit: cover;
  background: #dfe6ef;
}

.page-card__img--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #1f5489;
  font-size: 2rem;
  background: linear-gradient(180deg, #edf3f8 0%, #dfe8f1 100%);
}

.page-card__body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1 1 auto;
  padding: 20px 22px 22px;
}

.page-card__date {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(31, 84, 137, 0.08);
  color: #1f5489;
  font-size: 0.80rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.page-card__title {
  margin: 0;
  color: #1e205a;
  font-family: "Heebo", sans-serif;
  font-size: clamp(1.35rem, 2vw, 1.85rem);
  line-height: 1.22;
  font-weight: 700;
  letter-spacing: -0.02em;
  word-break: break-word;
}

.page-card__desc {
  margin: 0;
  color: #516176;
  font-size: 0.98rem;
  line-height: 1.7;
}

.page-card__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  color: #1f5489;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.4;
}

.page-card__link i {
  font-size: 0.95rem;
  opacity: 0.85;
}

/* ---------- Empty state ---------- */

.category-archive__empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
  padding: 60px 24px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.08);
}

.category-archive__empty > i {
  color: #1f5489;
  font-size: 2.4rem;
  opacity: 0.9;
}

.category-archive__empty h2 {
  margin: 0;
  color: #1e205a;
  font-family: "Heebo", sans-serif;
  font-size: clamp(1.6rem, 2.4vw, 2.2rem);
  line-height: 1.2;
  font-weight: 700;
}

.category-archive__empty p {
  max-width: 620px;
  margin: 0;
  color: #58667a;
  font-size: 1rem;
  line-height: 1.7;
}

/* ---------- Shared light button ---------- */

.page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: #1f5489;
  color: #fff;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    background-color 0.2s ease,
    color 0.2s ease;
}

.page-btn:hover,
.page-btn:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(31, 84, 137, 0.22);
  color: #fff;
  text-decoration: none;
}

.page-btn--light {
  background: #fff;
  color: #1f5489;
  border-color: rgba(31, 84, 137, 0.14);
}

.page-btn--light:hover,
.page-btn--light:focus-visible {
  color: #163b63;
  background: #f8fbff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
}

/* ---------- Pagination ---------- */

.category-archive__pagination {
  margin-top: 36px;
}

.category-archive__pagination .pagination {
  gap: 8px;
  justify-content: center;
  margin: 0;
  padding: 0;
  border-radius: 0;
}

.category-archive__pagination .pagination > li > a,
.category-archive__pagination .pagination > li > span {
  float: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  margin-left: 0;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(31, 84, 137, 0.14);
  background: rgba(255, 255, 255, 0.92);
  color: #1f5489;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.category-archive__pagination .pagination > li > a:hover,
.category-archive__pagination .pagination > li > span:hover,
.category-archive__pagination .pagination > li > a:focus,
.category-archive__pagination .pagination > li > span:focus {
  color: #fff;
  background: #1f5489;
  border-color: #1f5489;
}

.category-archive__pagination .pagination > .active > a,
.category-archive__pagination .pagination > .active > span,
.category-archive__pagination .pagination > .active > a:focus,
.category-archive__pagination .pagination > .active > span:focus,
.category-archive__pagination .pagination > .active > a:hover,
.category-archive__pagination .pagination > .active > span:hover {
  background: #1f5489;
  border-color: #1f5489;
  color: #fff;
  box-shadow: 0 12px 26px rgba(31, 84, 137, 0.2);
}

/* ---------- Responsive ---------- */

@media (max-width: 991.98px) {
  .tpl-hero.category-hero,
  .ev-hero {
    padding: 44px 16px 38px;
  }

  .page-shell {
    padding: 32px 0 56px;
  }

  .page-card__body {
    padding: 18px 18px 20px;
  }
}

@media (max-width: 767.98px) {
  .category-hero__inner,
  .ev-hero__content {
    width: min(100% - 24px, 760px);
  }

  .tpl-hero.category-hero,
  .ev-hero {
    padding: 38px 12px 30px;
  }

  .page-shell {
    padding: 24px 0 44px;
  }

  .page-card {
    border-radius: 22px;
  }

  .page-card__body {
    padding: 16px 16px 18px;
  }

  .page-card__title {
    font-size: 1.5rem;
  }

  .category-archive__empty {
    padding: 42px 18px;
    border-radius: 22px;
  }
}
