/* ---------------------------------------------------------------
   Afiliacja — styles strony (dopasowane do site.css kursypolska.pl)
   Paleta, promienie i typografia pochodzą ze zmiennych serwisu.
   --------------------------------------------------------------- */

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------------------------------------------------------------
   Nota afiliacyjna — karta z animowanym obrysem, aurorą i ziarnem.
   Tekst pozostaje w normalnym przepływie; efekty są dekoracyjne
   i respektują prefers-reduced-motion.
   --------------------------------------------------------------- */

@property --aff-angle {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

.aff-note {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: 10px 36px 10px 10px;
  padding: 34px 38px 30px;
  margin: 0 0 30px;
  border: 1px solid rgba(184, 243, 107, .18);
  background: linear-gradient(150deg, rgba(37, 46, 35, .95), rgba(15, 19, 15, .97));
  box-shadow:
    0 40px 90px -50px rgba(0, 0, 0, .95),
    0 0 70px -34px rgba(184, 243, 107, .3),
    inset 0 1px 0 rgba(255, 255, 255, .06);
  backdrop-filter: blur(14px);
}

/* Obracający się gradientowy obrys */
.aff-note::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: inherit;
  padding: 1.5px;
  pointer-events: none;
  background: conic-gradient(
    from var(--aff-angle),
    rgba(184, 243, 107, 0) 0%,
    rgba(184, 243, 107, 1) 9%,
    rgba(141, 121, 255, .85) 22%,
    rgba(255, 154, 104, .55) 33%,
    rgba(184, 243, 107, 0) 46%,
    rgba(184, 243, 107, 0) 100%
  );
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  animation: aff-spin 11s linear infinite;
}

/* Ziarno — wybija płaskie gradienty */
.aff-note::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: .045;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Aurora w tle */
.aff-note-glow {
  position: absolute;
  inset: -35%;
  z-index: 0;
  pointer-events: none;
  filter: blur(20px);
  background:
    radial-gradient(38% 44% at 16% 10%, rgba(184, 243, 107, .34), transparent 68%),
    radial-gradient(30% 38% at 84% 6%, rgba(141, 121, 255, .3), transparent 70%),
    radial-gradient(46% 52% at 72% 96%, rgba(255, 154, 104, .18), transparent 72%);
  animation: aff-drift 20s ease-in-out infinite alternate;
}

.aff-note-inner {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: minmax(230px, .82fr) minmax(0, 1.45fr);
  gap: 14px 44px;
  align-items: start;
}

.aff-note-aside {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-self: stretch;
}

.aff-note-content {
  display: flex;
  flex-direction: column;
  gap: 13px;
  border-left: 1px solid rgba(232, 238, 219, .09);
  padding-left: 44px;
}

/* Wejście z opóźnieniami — animujemy tylko, gdy użytkownik nie prosi
   o ograniczenie ruchu. Bez animacji treść jest widoczna od razu. */
@media (prefers-reduced-motion: no-preference) {
  .aff-note-aside > *,
  .aff-note-content > * {
    animation: aff-rise .8s cubic-bezier(.2, .8, .2, 1) both;
  }
  .aff-note-aside > *:nth-child(1) { animation-delay: .04s; }
  .aff-note-aside > *:nth-child(2) { animation-delay: .12s; }
  .aff-note-aside > *:nth-child(3) { animation-delay: .5s; }
  .aff-note-content > *:nth-child(1) { animation-delay: .18s; }
  .aff-note-content > *:nth-child(2) { animation-delay: .26s; }
  .aff-note-content > *:nth-child(3) { animation-delay: .34s; }
  .aff-note-content > *:nth-child(4) { animation-delay: .42s; }
  .aff-note-content > *:nth-child(5) { animation-delay: .5s; }
}

.aff-note-kicker {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 !important;
  color: var(--lime) !important;
  font: 9.5px/1 ui-monospace, monospace !important;
  letter-spacing: .22em;
  text-transform: uppercase;
}
.aff-note-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 0 0 rgba(184, 243, 107, .55);
  animation: aff-pulse 2.6s ease-out infinite;
}

.aff-note-title {
  margin: 0 0 4px !important;
  font-size: clamp(25px, 3.1vw, 38px) !important;
  line-height: 1.08;
  letter-spacing: -.045em;
  font-weight: 600;
  color: #f2f4ea;
}
.aff-note-title em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -.055em;
  color: var(--lime);
}

.aff-note-lead {
  max-width: 70ch;
  margin: 0 !important;
  color: #dcdfd2 !important;
  font-size: 15px !important;
  line-height: 1.85 !important;
}

.aff-note-inner p {
  max-width: 72ch;
  margin: 0 !important;
  color: #a9b1a2;
  font-size: 13px;
  line-height: 1.9;
}
.aff-note-inner strong { color: #e4ebd8; font-weight: 600; }

/* Podkreślenie kluczowych fraz */
.hl {
  color: #eef3e4;
  background: linear-gradient(transparent 64%, rgba(184, 243, 107, .22) 64%);
  padding-bottom: 1px;
}

.aff-note-thanks {
  margin-top: 6px !important;
  font-family: var(--serif);
  font-style: italic;
  font-size: 17px !important;
  line-height: 1.6 !important;
  color: #e9eedd !important;
}
.aff-note-thanks span {
  background: linear-gradient(96deg, var(--lime) 0%, #dff7b8 45%, #f0f1e9 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.aff-note-contact {
  align-self: flex-start;
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  border: 1px solid rgba(184, 243, 107, .42);
  border-radius: 99px;
  color: #dfe6d4;
  font-size: 11.5px;
  letter-spacing: .01em;
  text-decoration: none;
  transition: background .3s ease, color .3s ease, border-color .3s ease, transform .3s ease;
}
.aff-note-contact span:first-child { color: #8b9385; }
.aff-note-contact span[aria-hidden] { color: var(--lime); transition: transform .3s ease; }
.aff-note-contact:hover,
.aff-note-contact:focus-visible {
  background: var(--lime);
  border-color: var(--lime);
  color: #10130d;
  transform: translateY(-2px);
}
.aff-note-contact:hover span,
.aff-note-contact:focus-visible span { color: #10130d; }
.aff-note-contact:hover span[aria-hidden],
.aff-note-contact:focus-visible span[aria-hidden] { transform: translate(2px, -2px); }
.aff-note-contact:focus-visible { outline: 2px solid var(--lime); outline-offset: 4px; }

@keyframes aff-spin { to { --aff-angle: 360deg; } }
@keyframes aff-drift {
  from { transform: translate3d(-2%, -1%, 0) scale(1); }
  to   { transform: translate3d(2%, 1.5%, 0) scale(1.06); }
}
@keyframes aff-rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}
@keyframes aff-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(184, 243, 107, .5); }
  70%  { box-shadow: 0 0 0 9px rgba(184, 243, 107, 0); }
  100% { box-shadow: 0 0 0 0 rgba(184, 243, 107, 0); }
}

@media (max-width: 900px) {
  .aff-note-inner { grid-template-columns: 1fr; gap: 16px; }
  .aff-note-content { border-left: 0; padding-left: 0; }
  .aff-note-contact { margin-top: 6px; }
}

@media (max-width: 700px) {
  .aff-note { padding: 24px 20px 22px; border-radius: 8px 26px 8px 8px; }
  .aff-note-title { font-size: clamp(22px, 6.4vw, 29px) !important; }
  .aff-note-lead { font-size: 14px !important; }
  .aff-note-thanks { font-size: 15.5px !important; }
  .aff-note-contact { align-self: stretch; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  .aff-note::before,
  .aff-note-glow,
  .aff-note-dot,
  .aff-note-inner > * { animation: none !important; }
  .aff-note-contact { transition: none; }
}

/* Filtry */
.affiliate-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-block: 0 22px;
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  appearance: none;
  border: 1px solid rgba(232, 238, 219, .14);
  border-radius: 99px;
  background: transparent;
  color: #a8afa2;
  font: 10.5px/1 var(--sans);
  letter-spacing: .04em;
  padding: 9px 15px;
  cursor: pointer;
  transition: border-color .25s ease, color .25s ease, background .25s ease;
}
.chip:hover { border-color: rgba(184, 243, 107, .45); color: #dfe6d7; }
.chip[aria-pressed="true"] {
  border-color: var(--lime);
  background: rgba(184, 243, 107, .12);
  color: var(--lime);
}
.chip:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; }

.offer-search { flex: 1 1 auto; min-width: 240px; max-width: 330px; }
.offer-search input {
  width: 100%;
  border: 1px solid rgba(232, 238, 219, .14);
  border-radius: 10px;
  background: rgba(20, 24, 20, .7);
  color: var(--text);
  font: 12px/1.4 var(--sans);
  padding: 11px 14px;
}
.offer-search input::placeholder { color: #71786c; }
.offer-search input:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; border-color: transparent; }

/* Lista */
.affiliate-list { padding-block: 0 70px; }
.list-empty, .list-error {
  border: 1px dashed rgba(232, 238, 219, .16);
  border-radius: 8px;
  padding: 26px 24px;
  color: #9aa192;
  font-size: 13px;
  line-height: 1.8;
}
.list-error { border-color: rgba(255, 154, 104, .34); color: #f0b79a; }

.list-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 18px;
}
.list-title {
  margin: 0 !important;
  font-size: 13px !important;
  letter-spacing: .01em;
  font-weight: 560;
  color: #cfd5c6;
}
.ad-badge {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(255, 154, 104, .55);
  border-radius: 4px;
  background: rgba(255, 154, 104, .1);
  color: #ffb896;
  font: 8.5px ui-monospace, monospace;
  letter-spacing: .16em;
  text-transform: uppercase;
  padding: 5px 9px;
  white-space: nowrap;
}



/* Blok informacyjny nad listą: źródło danych i zasada kolejności */
.list-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  margin: 0 0 20px;
  border: 1px solid rgba(232, 238, 219, .1);
  border-radius: 6px 18px 6px 6px;
  background: rgba(19, 23, 19, .55);
  overflow: hidden;
}
.list-fact {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin: 0 !important;
  padding: 15px 18px;
}
.list-fact + .list-fact { border-top: 1px solid rgba(232, 238, 219, .08); }
@media (min-width: 880px) {
  .list-fact + .list-fact {
    border-top: 0;
    border-left: 1px solid rgba(232, 238, 219, .08);
  }
}
.list-fact-label {
  color: var(--lime);
  font: 8.5px ui-monospace, monospace;
  letter-spacing: .17em;
  text-transform: uppercase;
}
.list-fact-text {
  color: #8c9487;
  font-size: 11px;
  line-height: 1.75;
}

.offer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(292px, 1fr));
  gap: 13px;
}

/* Karta oferty — stały kształt 4:3, treść zawsze pod obrazem */
.offer-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 0;
  gap: 0;
  border: 1px solid rgba(232, 238, 219, .12);
  border-radius: 5px 26px 5px 5px;
  background: linear-gradient(145deg, rgba(27, 33, 29, .96), rgba(15, 19, 17, .9));
  color: inherit;
  text-decoration: none;
  overflow: hidden;
  transition: border-color .35s ease, transform .45s cubic-bezier(.2, .8, .2, 1), background .35s ease, box-shadow .35s ease;
}
.offer-card::after {
  content: "";
  position: absolute;
  right: -60px; bottom: -96px;
  width: 180px; height: 180px;
  border: 1px solid rgba(184, 243, 107, .08);
  border-radius: 50%;
  pointer-events: none;
}
/* Karty ukrywane przez filtry (atrybut hidden) muszą znikać mimo display:flex. */
.offer-card[hidden] { display: none; }

.offer-card:hover,
.offer-card:focus-visible {
  transform: translateY(-6px);
  border-color: rgba(184, 243, 107, .45);
  background: linear-gradient(145deg, rgba(36, 45, 32, .97), rgba(17, 21, 18, .94));
  box-shadow: 0 20px 54px rgba(0, 0, 0, .22);
}
.offer-card:focus-visible { outline: 2px solid var(--lime); outline-offset: 4px; }

/* Obszar kreacji — zawsze te same proporcje, niezależnie od grafiki */
.offer-media {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: linear-gradient(150deg, #1d231b, #12160f);
  border-bottom: 1px solid rgba(232, 238, 219, .08);
}
.offer-media-img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s cubic-bezier(.2, .8, .2, 1);
}
.offer-card:hover .offer-media-img { transform: scale(1.03); }

/* Kreacja o innych proporcjach: całość na rozmytym tle z tej samej grafiki */
.offer-media--contain .offer-media-img { object-fit: contain; padding: 18px; }
.offer-media-blur {
  position: absolute;
  inset: -12%;
  background-size: cover;
  background-position: center;
  filter: blur(26px) brightness(.45) saturate(1.15);
  transform: scale(1.06);
  z-index: 0;
}

/* Brak kreacji: logo programu, potem inicjały */
.offer-media--fallback {
  display: grid;
  place-items: center;
  background: radial-gradient(ellipse at 50% 120%, rgba(184, 243, 107, .1), transparent 62%), linear-gradient(150deg, #1d231b, #12160f);
}
.offer-fallback { position: relative; z-index: 1; display: grid; place-items: center; }
.offer-fallback img { max-width: 104px; max-height: 104px; border-radius: 12px; display: block; }
.offer-initials { font: 600 34px/1 var(--sans); letter-spacing: -.05em; color: #48523f; }

.offer-card-body {
  position: relative;
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 14px;
  padding: 20px 24px 22px;
}
.offer-body { display: flex; flex-direction: column; gap: 7px; }
.offer-cat {
  color: var(--lime);
  font: 8px ui-monospace, monospace;
  letter-spacing: .17em;
  text-transform: uppercase;
}
.offer-name {
  font-size: 16px;
  line-height: 1.32;
  letter-spacing: -.035em;
  font-weight: 580;
  color: var(--text);
}
.offer-hint {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  color: #71786c;
  font-size: 10px;
  letter-spacing: .02em;
}
.offer-hint-text { color: #71786c; }
.offer-flag {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(184, 243, 107, .45);
  border-radius: 4px;
  background: rgba(184, 243, 107, .08);
  color: var(--lime);
  font: 8px ui-monospace, monospace;
  letter-spacing: .14em;
  text-transform: uppercase;
  padding: 4px 7px;
  white-space: nowrap;
}

.offer-cta {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #b9c0b0;
  font-size: 11px;
  letter-spacing: .02em;
}
.offer-cta span { color: var(--lime); }
.offer-card:hover .offer-cta { color: var(--lime); }

/* Nagłówek: siódmy link w menu nie mieści się w domyślnej szerokości,
   więc na tej stronie zwężamy odstępy i ukrywamy podpis marki. */
.affiliate-page .nav { gap: 21px; }
@media (max-width: 1499px) {
  .affiliate-page .brand-caption { display: none; }
}

/* Odznaka podglądu */
.preview-badge {
  position: fixed;
  right: 18px; bottom: 18px;
  left: auto;
  z-index: 60;
  border: 1px solid rgba(184, 243, 107, .5);
  border-radius: 99px;
  background: rgba(16, 18, 15, .92);
  color: var(--lime);
  font: 9px ui-monospace, monospace;
  letter-spacing: .14em;
  padding: 8px 14px;
  backdrop-filter: blur(6px);
}

@media (max-width: 640px) {
  .provider-note { padding: 18px 18px; border-radius: 6px 20px 6px 6px; }
  .list-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 18px;
}
.list-title {
  margin: 0 !important;
  font-size: 13px !important;
  letter-spacing: .01em;
  font-weight: 560;
  color: #cfd5c6;
}
.ad-badge {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(255, 154, 104, .55);
  border-radius: 4px;
  background: rgba(255, 154, 104, .1);
  color: #ffb896;
  font: 8.5px ui-monospace, monospace;
  letter-spacing: .16em;
  text-transform: uppercase;
  padding: 5px 9px;
  white-space: nowrap;
}

.offer-grid { grid-template-columns: 1fr; }
  .offer-card { padding: 20px; }
  .affiliate-controls { flex-direction: column; align-items: stretch; }
  .offer-search { flex: 0 0 auto; min-width: 0; max-width: none; }
  .preview-badge { left: 12px; bottom: 12px; font-size: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  .offer-card, .chip { transition: none; }
  .offer-card:hover, .offer-card:focus-visible { transform: none; }
}

/* Komunikat serwisowy — zamiast pustej listy przy awarii danych. */
.maintenance {
  border: 1px dashed rgba(255, 154, 104, .38);
  border-radius: 8px 26px 8px 8px;
  background:
    radial-gradient(ellipse at 92% 0%, rgba(255, 154, 104, .1), transparent 62%),
    rgba(22, 26, 22, .62);
  padding: 30px 32px;
}
.maintenance-title {
  margin: 0 0 10px;
  color: #f6e9e0;
  font-size: clamp(19px, 2.3vw, 26px);
  font-weight: 600;
  letter-spacing: -.03em;
}
.maintenance-text {
  max-width: 62ch;
  margin: 0 0 16px;
  color: #aab1a2;
  font-size: 13px;
  line-height: 1.8;
}
.maintenance-actions { margin: 0; color: #6f766a; font-size: 12px; }
.maintenance-actions a { color: var(--lime); text-decoration: none; }
.maintenance-actions a:hover { text-decoration: underline; }

@media (max-width: 700px) {
  .maintenance { padding: 22px 20px; border-radius: 6px 20px 6px 6px; }
}
