.awe-ref {
  font-family: 'Inter', system-ui, sans-serif;
}

.awe-ref__grid {
  display: grid;
  grid-template-columns: repeat(var(--awe-ref-cols, 3), 1fr);
  gap: 20px;
}

.awe-ref__card {
  display: flex;
  flex-direction: column;
  padding: 28px 28px 30px;
  background: #f4f7fb;
  border: 1px solid #c5ccd6;
  border-radius: 10px;
  color: inherit;
  text-decoration: none !important;
  transition: transform .2s, box-shadow .2s, border-color .2s;
}

.awe-ref__card[hidden] {
  display: none;
}

a.awe-ref__card:hover {
  transform: translateY(-3px);
  border-color: #9fb0c4;
  box-shadow: 0 12px 28px rgba(11, 31, 58, .08);
}

.awe-ref__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding-bottom: 34px;
  margin-bottom: 28px;
  border-bottom: 1px solid #b9c3cf;
}

.awe-ref__ikona {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: #436d99;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.awe-ref__nr {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  color: #8a97a8;
}

.awe-ref__etykieta {
  display: block;
  margin-bottom: 14px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #6b7a90;
}

.awe-ref__tytul {
  margin: 0 0 16px;
  font-family: 'Sora', 'Inter', sans-serif;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.4;
  color: #0b1f3a !important;
}

.awe-ref__opis {
  margin: 0;
  font-size: 14px;
  line-height: 1.65;
  color: #6b7a90;
}

/* Link do PDF */
.awe-ref__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 22px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #1f9d55;
}

.awe-ref__link::after {
  content: "";
  width: 14px;
  height: 14px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: transform .2s;
}

a.awe-ref__card:hover .awe-ref__link::after {
  transform: translateX(3px);
}

/* Paginacja */
.awe-ref__paginacja {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 36px;
}

.awe-ref__paginacja[hidden] {
  display: none;
}

.awe-ref__strona {
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  background: #f4f7fb;
  border: 1px solid #c5ccd6;
  border-radius: 8px;
  font: 600 14px/1 'Inter', system-ui, sans-serif;
  color: #0b1f3a;
  cursor: pointer;
  transition: background .2s, border-color .2s, color .2s;
}

.awe-ref__strona:hover:not(:disabled) {
  border-color: #436d99;
}

.awe-ref__strona.is-active {
  background: #0b1f3a;
  border-color: #0b1f3a;
  color: #fff;
}

.awe-ref__strona:disabled {
  opacity: .4;
  cursor: default;
}

/* Responsywność */
@media (max-width: 991px) {
  .awe-ref__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .awe-ref__grid { grid-template-columns: 1fr; gap: 16px; }
  .awe-ref__card { padding: 24px; }
  .awe-ref__top { padding-bottom: 24px; margin-bottom: 22px; }
}

/* Lightbox zdjęć */
.awe-ref-lb {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 24px;
  background: rgba(6, 18, 36, .9);
  opacity: 0;
  transition: opacity .2s;
}

.awe-ref-lb.is-open {
  opacity: 1;
}

.awe-ref-lb img {
  display: block;
  max-width: min(1200px, 100%);
  max-height: calc(100vh - 120px);
  border-radius: 8px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .45);
}

.awe-ref-lb__tytul {
  margin: 0;
  font: 600 15px/1.4 'Inter', system-ui, sans-serif;
  color: #e6edf7;
  text-align: center;
}

.awe-ref-lb__zamknij {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 8px;
  background: transparent;
  font: 400 26px/1 system-ui, sans-serif;
  color: #fff;
  cursor: pointer;
}

.awe-ref-lb__zamknij:hover {
  border-color: rgba(255, 255, 255, .6);
}

body.awe-ref-lb-open {
  overflow: hidden;
}
