.page-territorial {
  width: 100%;
}

.territorial-hero {
  position: relative;
  overflow: hidden;
  border-radius: 0 0 24px 24px;
  padding: 42px 34px;
  margin-bottom: 24px;
  background:
    radial-gradient(circle at 85% 20%, rgba(255, 0, 0, 0.22), transparent 34%),
    linear-gradient(135deg, #050505 0%, #111 55%, #2a0505 100%);
  color: #fff;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.14);
}

.territorial-kicker {
  display: inline-flex;
  align-items: center;
  margin-bottom: 14px;
  padding: 7px 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.11);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.territorial-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(2.1rem, 4vw, 3.45rem);
  line-height: 1;
  font-weight: 950;
  letter-spacing: -0.06em;
}

.territorial-hero p {
  max-width: 780px;
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.05rem;
  line-height: 1.6;
}

.territorial-panel {
  padding: 20px;
  margin: 0 0 34px;
  border: 1px solid rgba(0, 0, 0, 0.075);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.055);
}

.territorial-filters {
  display: grid;
  grid-template-columns: auto auto auto 210px 1fr;
  gap: 10px;
  align-items: center;
  margin-bottom: 18px;
}

.territorial-chip,
#territorialType {
  min-height: 42px;
  border: 1px solid rgba(0, 0, 0, 0.105);
  background: #fff;
  color: #111;
  border-radius: 999px;
  padding: 0 15px;
  font-weight: 900;
  cursor: pointer;
  transition: 0.2s ease;
}

.territorial-chip:hover,
.territorial-chip.active {
  background: #111;
  color: #fff;
  border-color: #111;
  transform: translateY(-1px);
}

#territorialType {
  appearance: none;
  padding-right: 34px;
  background-image:
    linear-gradient(45deg, transparent 50%, #111 50%),
    linear-gradient(135deg, #111 50%, transparent 50%);
  background-position:
    calc(100% - 18px) 18px,
    calc(100% - 13px) 18px;
  background-size: 5px 5px;
  background-repeat: no-repeat;
}

#territorialSearch {
  width: 100%;
  min-height: 42px;
  border: 1px solid rgba(0, 0, 0, 0.13);
  border-radius: 999px;
  padding: 0 18px;
  background: #fff;
  color: #111;
  font-weight: 750;
  outline: none;
}

#territorialSearch:focus,
#territorialType:focus {
  border-color: #ff0000;
  box-shadow: 0 0 0 4px rgba(255, 0, 0, 0.08);
}

.territorial-stats {
  margin-bottom: 18px;
  color: #555;
  font-weight: 750;
}

.territorial-stats strong {
  color: #ff0000;
  font-size: 1.35rem;
  font-weight: 950;
}

.territorial-status {
  padding: 18px;
  border-radius: 18px;
  background: #f7f7f7;
  color: #555;
  font-weight: 850;
}

.territorial-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.territorial-card {
  display: flex;
  flex-direction: column;
  min-height: 390px;
  padding: 17px;
  border-radius: 22px;
  background:
    linear-gradient(#fff, #fff) padding-box,
    linear-gradient(135deg, rgba(0, 0, 0, 0.08), rgba(255, 0, 0, 0.14)) border-box;
  border: 1px solid transparent;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.055);
  transition: 0.22s ease;
}

.territorial-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.105);
}

.territorial-card-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 13px;
}

.territorial-location-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.territorial-badge,
.territorial-date,
.territorial-source,
.territorial-city {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.74rem;
  font-weight: 950;
}

.territorial-badge {
  color: #fff;
  background: #111;
}

.territorial-badge.dept-67 {
  background: #111;
}

.territorial-badge.dept-68 {
  background: #ff0000;
}

.territorial-city {
  background: rgba(255, 0, 0, 0.08);
  color: #ff0000;
  font-weight: 900;
  border: 1px solid rgba(255, 0, 0, 0.15);
}

.territorial-date {
  flex-shrink: 0;
  background: #f5f5f5;
  color: #555;
}

.territorial-alert {
  width: fit-content;
  margin: 0 0 10px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 0, 0, 0.09);
  color: #d00000;
  font-size: 0.76rem;
  font-weight: 950;
}

.territorial-card h2 {
  margin: 0 0 12px;
  color: #111;
  font-size: 1.05rem;
  line-height: 1.25;
  font-weight: 950;
  letter-spacing: -0.025em;
}

.territorial-employer {
  margin-bottom: 14px;
  color: #ff0000;
  font-size: 0.9rem;
  line-height: 1.45;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.territorial-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 0 0 14px;
}

.territorial-info-grid div {
  min-width: 0;
  padding: 11px;
  border-radius: 16px;
  background: #f7f7f7;
}

.territorial-info-grid span,
.territorial-deadline span {
  display: block;
  margin-bottom: 4px;
  color: #777;
  font-size: 0.72rem;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.territorial-info-grid strong {
  display: block;
  color: #111;
  font-size: 0.82rem;
  line-height: 1.35;
  font-weight: 900;
}

.territorial-deadline {
  margin-top: auto;
  margin-bottom: 14px;
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 0, 0, 0.055);
  border: 1px solid rgba(255, 0, 0, 0.12);
}

.territorial-deadline strong {
  color: #b80000;
  font-size: 0.9rem;
  font-weight: 950;
}

.territorial-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 11px;
  padding-top: 14px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.territorial-source {
  background: rgba(255, 0, 0, 0.08);
  color: #c60000;
}

.territorial-card-bottom a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 15px;
  border-radius: 999px;
  background: #111;
  color: #fff;
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 950;
  transition: 0.2s ease;
  white-space: nowrap;
}

.territorial-card-bottom a:hover {
  background: #ff0000;
  transform: translateY(-1px);
}

.territorial-loadmore-wrap {
  display: flex;
  justify-content: center;
  margin-top: 22px;
}

#territorialLoadMore {
  display: none;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  background: #111;
  color: #fff;
  font-weight: 950;
  cursor: pointer;
  transition: 0.2s ease;
}

#territorialLoadMore:hover {
  background: #ff0000;
  transform: translateY(-1px);
}

body.dark-mode .territorial-panel,
.dark-mode .territorial-panel {
  background: #0d1620;
  border-color: rgba(255, 255, 255, 0.08);
}

body.dark-mode .territorial-card,
.dark-mode .territorial-card {
  background:
    linear-gradient(#101b26, #101b26) padding-box,
    linear-gradient(135deg, rgba(255, 255, 255, 0.09), rgba(255, 0, 0, 0.22)) border-box;
}

body.dark-mode .territorial-card h2,
body.dark-mode .territorial-info-grid strong,
.dark-mode .territorial-card h2,
.dark-mode .territorial-info-grid strong {
  color: #fff;
}

body.dark-mode .territorial-employer,
.dark-mode .territorial-employer {
  color: rgba(255, 255, 255, 0.82);
}

body.dark-mode .territorial-info-grid div,
body.dark-mode .territorial-city,
body.dark-mode .territorial-date,
.dark-mode .territorial-info-grid div,
.dark-mode .territorial-city,
.dark-mode .territorial-date {
  background: rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.86);
}

body.dark-mode #territorialSearch,
body.dark-mode #territorialType,
body.dark-mode .territorial-chip,
.dark-mode #territorialSearch,
.dark-mode #territorialType,
.dark-mode .territorial-chip {
  background: #111c28;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.12);
}

body.dark-mode .territorial-chip.active,
.dark-mode .territorial-chip.active {
  background: #fff;
  color: #111;
}

body.dark-mode .territorial-stats,
.dark-mode .territorial-stats {
  color: rgba(255, 255, 255, 0.78);
}

.territorial-city {
  max-width: 310px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.territorial-info-grid strong {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.territorial-info-grid div {
  min-height: 84px;
}

.territorial-card h2 {
  min-height: 52px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.territorial-employer {
  min-height: 42px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.territorial-card {
  min-height: 550px;
}

body.dark-mode .territorial-employer,
.dark-mode .territorial-employer {
  color: #ff4d4d;
}

body.dark-mode .territorial-city,
.dark-mode .territorial-city {
  background: rgba(255, 0, 0, 0.15);
  color: #ff4d4d;
}

@media (max-width: 1180px) {
  .territorial-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .territorial-filters {
    grid-template-columns: repeat(3, auto) 1fr;
  }

  #territorialSearch {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  .territorial-hero {
    padding: 30px 22px;
  }

  .territorial-panel {
    padding: 15px;
  }

  .territorial-filters {
    grid-template-columns: 1fr;
  }

  .territorial-chip,
  #territorialType,
  #territorialSearch {
    width: 100%;
  }

  .territorial-grid {
    grid-template-columns: 1fr;
  }

  .territorial-info-grid {
    grid-template-columns: 1fr;
  }

  .territorial-card-bottom {
    align-items: flex-start;
    flex-direction: column;
  }

  .territorial-card-bottom a {
    width: 100%;
  }
}