/* ─── Base ─── */
#epen-app {
  font-family: 'Roboto Condensed', sans-serif;
  font-weight: 400;
  color: #1e3048;
  line-height: 1.3;
  display: flex;
  gap: 72px;
}

#epen-app * {
  box-sizing: border-box;
}

/* ─── Sidebar ─── */
.epen-sidebar {
  width: 260px;
  flex-shrink: 0;
}

/* ─── Filter group ─── */
.epen-filter {
  margin-bottom: 48px;
}

.epen-filter-label {
  display: block;
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 28px;
  font-weight: 400;
  color: #1e3048;
  line-height: 1.2;
  margin: 0 0 8px;
}

/* ─── Select ─── */
.epen-select-wrap {
  position: relative;
}

.epen-select-wrap::after {
  content: '';
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 7px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7' viewBox='0 0 12 7'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%231e3048' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: contain;
  pointer-events: none;
}

.epen-select-wrap select {
  width: 100%;
  padding: 8px 48px 8px 12px;
  border: 1.5px solid #707070;
  border-radius: 10px;
  background: #fff;
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 18px;
  font-weight: 400;
  color: #1e3048;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}

.epen-select-wrap select.is-placeholder {
  color: #414b5a;
}

.epen-select-wrap select:focus {
  outline: none;
  border-color: #1a6db5;
}

/* ─── Reset link ─── */
.epen-reset-link {
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 18px;
  font-weight: 400;
  color: #1a6db5;
  text-decoration: none;
  display: inline-block;
  margin-top: 8px;
}

.epen-reset-link:hover {
  text-decoration: underline;
}

/* ─── Main ─── */
.epen-main {
  flex: 1;
  min-width: 0;
}

/* ─── Grid ─── */
.epen-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px 28px;
}

/* ─── Card ─── */
.epen-card-photo {
  display: block;
  border-radius: 12px;
  overflow: hidden;
  background: #eeeae6;
  aspect-ratio: 4 / 3;
  margin-bottom: 16px;
  transition: opacity 0.15s ease;
}

.epen-card-photo:hover {
  opacity: 0.88;
}

.epen-card-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}

.epen-card-company {
  display: block;
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #8fa5bb;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.epen-card-name {
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 17px;
  font-weight: 400;
  color: #1e3048;
  line-height: 1.3;
  margin: 0 0 14px;
}

.epen-card-name-link {
  color: inherit;
  text-decoration: none;
}

.epen-card-name-link:hover {
  text-decoration: underline;
}

.epen-card-date {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 700;
  color: #6e7a84;
  letter-spacing: 0.04em;
  margin: 8px 0 0;
}

.epen-card-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 15px;
  font-weight: 400;
  color: #1a6db5;
  text-decoration: none;
  margin-top: 10px;
}

.epen-card-link:hover {
  text-decoration: underline;
}

.epen-card-link svg {
  flex-shrink: 0;
}

/* ─── Empty ─── */
.epen-empty {
  grid-column: 1 / -1;
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 16px;
  color: #8fa5bb;
  padding: 48px 0;
}

/* ─── Loading ─── */
#epen-grid.is-loading {
  opacity: 0.3;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

/* ─── Pagination ─── */
.epen-pagination {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 48px;
}

.epen-pagination button {
  width: 38px;
  height: 38px;
  border: 1.5px solid #c8d8e8;
  border-radius: 8px;
  background: #fff;
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 15px;
  color: #1e3048;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition:
    border-color 0.15s,
    color 0.15s,
    background 0.15s;
}

.epen-pagination button:hover {
  border-color: #1a6db5;
  color: #1a6db5;
}

.epen-pagination button.is-active {
  background: #1a6db5;
  border-color: #1a6db5;
  color: #fff;
  cursor: default;
}

/* ─── Responsive ─── */
@media (max-width: 1024px) {
  .epen-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  #epen-app {
    flex-direction: column;
    gap: 32px;
  }
  .epen-sidebar {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .epen-grid {
    grid-template-columns: 1fr;
  }
}
