/* Komponenty treści: karty, oś czasu, edycje festiwalu, osoby, partnerzy, karta 1,5%, listy danych, kafle akcji, wpisy. */

/* Karty "Jak pomóc" i huby */
.fdt-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--fdt-gap);
  margin-block: 28px;
}

.fdt-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding: clamp(22px, 2.4vw, 32px);
  background: var(--fdt-white);
  border: 1px solid var(--fdt-line-dark);
  border-top: 4px solid var(--fdt-brand);
  border-radius: var(--fdt-radius-lg);
  box-shadow: var(--fdt-shadow);
}

.fdt-card--donate {
  border-top-color: var(--fdt-warm);
  background: linear-gradient(180deg, #fff6ee, var(--fdt-white) 60%);
}

.fdt-card__title {
  margin: 0;
  font-size: 1.3rem;
}

.fdt-cards--help .fdt-card__title {
  min-height: 2.5em;
}

.fdt-people--compact {
  grid-template-columns: repeat(3, 1fr);
}

.fdt-card__text {
  flex: 1;
  margin: 0;
  color: var(--fdt-mute);
  font-size: 1rem;
  line-height: 1.55;
}

.fdt-card .fdt-btn {
  margin-top: 6px;
  width: 100%;
}

.fdt-card--link,
.fdt-card--link:visited {
  color: inherit;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.fdt-card--link:hover {
  transform: translateY(-3px);
  box-shadow: 0 2px 4px rgba(10, 22, 32, 0.08), 0 20px 40px rgba(10, 22, 32, 0.12);
  text-decoration: none;
}

.fdt-card__more {
  margin-top: auto;
  color: var(--fdt-brand-ink);
  font-weight: 700;
}

/* Oś czasu */
.fdt-timeline {
  position: relative;
  margin: 0;
  padding: 0 0 0 30px;
  list-style: none;
}

.fdt-timeline::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(var(--fdt-brand), rgba(45, 180, 234, 0.15));
}

.fdt-timeline__item {
  position: relative;
  padding-bottom: 28px;
}

.fdt-timeline__item:last-child {
  padding-bottom: 0;
}

.fdt-timeline__item::before {
  content: "";
  position: absolute;
  left: -30px;
  top: 6px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--fdt-night);
  border: 3px solid var(--fdt-brand);
}

.fdt-timeline__date {
  display: block;
  margin-bottom: 4px;
  color: var(--fdt-brand-ink);
  font-size: 0.8125rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.fdt-on-dark .fdt-timeline__date {
  color: var(--fdt-brand);
}

.fdt-timeline__title {
  margin: 0 0 6px;
  font-size: 1.25rem;
}

.fdt-timeline__text {
  margin: 0;
  color: var(--fdt-mute);
  max-width: 54ch;
}

.fdt-on-dark .fdt-timeline__text {
  color: var(--fdt-mute-on-dark);
}

/* Kafle akcji */
.fdt-tiles {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--fdt-gap);
}

.fdt-tile,
.fdt-tile:visited {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 220px;
  padding: clamp(24px, 3vw, 40px);
  background: var(--fdt-paper);
  border: 1px solid var(--fdt-line-dark);
  border-radius: var(--fdt-radius-lg);
  color: var(--fdt-ink);
  text-decoration: none;
  overflow: hidden;
  transition: transform 0.18s ease, border-color 0.18s ease, background-color 0.18s ease;
}

.fdt-tile::after {
  content: "";
  position: absolute;
  right: -48px;
  bottom: -48px;
  width: 170px;
  height: 170px;
  border-radius: 50%;
  border: 20px solid rgba(45, 180, 234, 0.16);
  transition: transform 0.3s ease;
}

.fdt-tile:hover {
  transform: translateY(-3px);
  border-color: var(--fdt-brand);
  background: var(--fdt-white);
  text-decoration: none;
}

.fdt-tile:hover::after {
  transform: scale(1.15);
}

.fdt-tile__title {
  font-size: clamp(1.35rem, 2.4vw, 1.9rem);
  font-weight: 800;
  line-height: 1.1;
  color: var(--fdt-brand-ink);
}

.fdt-tile__text {
  max-width: 44ch;
  color: var(--fdt-mute);
}

.fdt-tile__more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  font-weight: 700;
}

/* Edycje festiwalu */
.fdt-editions {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--fdt-gap);
  margin-block: 24px;
}

.fdt-edition,
.fdt-edition:visited {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 22px 24px;
  background: var(--fdt-white);
  border: 1px solid var(--fdt-line-dark);
  border-left: 4px solid var(--fdt-festival);
  border-radius: var(--fdt-radius-lg);
  color: var(--fdt-ink);
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.fdt-edition:hover {
  transform: translateY(-3px);
  box-shadow: var(--fdt-shadow);
  text-decoration: none;
}

.fdt-edition__poster {
  display: block;
  margin: -22px -24px 12px;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: calc(var(--fdt-radius-lg) - 1px) calc(var(--fdt-radius-lg) - 1px) 0 0;
}

.fdt-edition__poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.fdt-edition__no {
  font-size: 2.4rem;
  font-weight: 900;
  line-height: 1;
  color: var(--fdt-festival);
}

.fdt-edition__year {
  font-size: 1.1rem;
  font-weight: 800;
}

.fdt-edition__note {
  color: var(--fdt-mute);
  font-weight: 600;
  line-height: 1.35;
}

.fdt-edition__lineup {
  font-weight: 600;
  line-height: 1.4;
}

.fdt-edition__meta {
  margin-top: auto;
  padding-top: 8px;
  color: var(--fdt-mute);
  font-size: 0.9rem;
}

.fdt-festnext {
  margin: 28px 0;
  padding: 24px 28px;
  background: var(--fdt-night);
  color: var(--fdt-white);
  border-radius: var(--fdt-radius-lg);
  border-left: 6px solid var(--fdt-festival);
}

.fdt-festnext__label {
  margin: 0 0 4px;
  color: var(--fdt-mute-on-dark);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.fdt-festnext__value {
  margin: 0 0 18px;
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 800;
}

.fdt-festnext__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.fdt-festnext .fdt-btn--ghost {
  color: var(--fdt-white);
  border-color: rgba(255, 255, 255, 0.55);
}

.fdt-festnext .fdt-btn--ghost:hover {
  background: var(--fdt-white);
  color: var(--fdt-night);
}

/* Osoby */
.fdt-people {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--fdt-gap);
  margin-block: 28px;
}

.fdt-person {
  background: var(--fdt-white);
  border: 1px solid var(--fdt-line-dark);
  border-radius: var(--fdt-radius-lg);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.fdt-person:hover {
  transform: translateY(-3px);
  box-shadow: var(--fdt-shadow);
}

.fdt-person__link,
.fdt-person__link:visited {
  display: flex;
  flex-direction: column;
  gap: 8px;
  height: 100%;
  padding: 24px;
  color: var(--fdt-ink);
  text-decoration: none;
}

.fdt-person__photo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 84px;
  height: 84px;
  margin-bottom: 8px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--fdt-deep);
  color: var(--fdt-brand);
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.fdt-person__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.fdt-person__name {
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1.25;
}

.fdt-person__role {
  color: var(--fdt-brand-ink);
  font-size: 0.9rem;
  font-weight: 700;
}

.fdt-person__short {
  color: var(--fdt-mute);
  font-size: 0.95rem;
  line-height: 1.55;
}

/* Partnerzy */
.fdt-partners__group {
  margin-block: 28px;
}

.fdt-partners__title {
  margin-bottom: 14px;
  font-size: 0.8125rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fdt-mute);
}

.fdt-partners__list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.fdt-partners__item {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 150px;
  min-height: 84px;
  padding: 14px 22px;
  background: var(--fdt-white);
  border: 1px solid var(--fdt-line-dark);
  border-radius: var(--fdt-radius);
}

.fdt-partners__item img {
  max-height: 56px;
  width: auto;
  object-fit: contain;
}

.fdt-partners__item a {
  display: flex;
  align-items: center;
  color: inherit;
  text-decoration: none;
}

.fdt-partners__name {
  font-weight: 700;
  text-align: center;
}

/* Karta 1,5% podatku */
.fdt-pit {
  margin: 28px 0;
  padding: clamp(24px, 3vw, 40px);
  background: var(--fdt-night);
  color: var(--fdt-white);
  border-radius: var(--fdt-radius-lg);
  border-left: 6px solid var(--fdt-brand);
}

.fdt-pit__label {
  margin: 0 0 4px;
  color: var(--fdt-mute-on-dark);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.fdt-pit__krs {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 900;
  letter-spacing: 0.04em;
  color: var(--fdt-brand);
}

.fdt-pit__name {
  margin: 0 0 20px;
  font-size: 1.15rem;
  font-weight: 700;
}

.fdt-pit__steps {
  margin: 0 0 16px;
  padding-left: 22px;
}

.fdt-pit__steps li {
  margin-bottom: 6px;
}

.fdt-pit__note {
  margin: 0;
  color: var(--fdt-mute-on-dark);
  font-size: 0.9375rem;
}

/* Listy danych */
.fdt-datalist {
  margin: 24px 0;
  border-top: 1px solid var(--fdt-line-dark);
}

.fdt-datalist__row {
  display: grid;
  grid-template-columns: minmax(150px, 240px) 1fr;
  gap: 8px 24px;
  padding: 14px 0;
  border-bottom: 1px solid var(--fdt-line-dark);
}

.fdt-datalist dt {
  font-weight: 700;
  color: var(--fdt-mute);
}

.fdt-datalist dd {
  margin: 0;
  font-weight: 600;
}

/* Wpisy (aktualności) */
.fdt-postgrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--fdt-gap);
}

.fdt-postcard {
  background: var(--fdt-white);
  border: 1px solid var(--fdt-line-dark);
  border-radius: var(--fdt-radius-lg);
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.fdt-postcard:hover {
  transform: translateY(-3px);
  box-shadow: var(--fdt-shadow);
}

.fdt-postcard__link,
.fdt-postcard__link:visited {
  display: flex;
  flex-direction: column;
  height: 100%;
  color: var(--fdt-ink);
  text-decoration: none;
}

.fdt-postcard__media {
  display: block;
  aspect-ratio: 16 / 10;
  background: var(--fdt-deep);
  overflow: hidden;
}

.fdt-postcard__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.fdt-postcard__ph {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--fdt-brand);
}

.fdt-postcard__mark {
  width: 72px;
  height: 72px;
  opacity: 0.8;
}

.fdt-postcard__body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px 22px 24px;
}

.fdt-postcard__date {
  color: var(--fdt-mute);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.fdt-postcard__title {
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1.25;
}

.fdt-postcard__excerpt {
  color: var(--fdt-mute);
  font-size: 0.95rem;
}

/* Cytat i inne elementy treści */
.fdt-quote {
  margin: 28px 0;
  padding: 24px 28px;
  background: var(--fdt-paper);
  border-left: 6px solid var(--fdt-brand);
  border-radius: 0 var(--fdt-radius-lg) var(--fdt-radius-lg) 0;
  font-size: 1.15rem;
}

.fdt-quote p {
  margin-bottom: 14px;
}

.fdt-quote cite {
  display: block;
  color: var(--fdt-mute);
  font-size: 0.95rem;
  font-style: normal;
  font-weight: 700;
}

.fdt-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 40px;
  margin: 0 0 28px;
}

.fdt-facts dt {
  color: var(--fdt-mute);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.fdt-facts dd {
  margin: 2px 0 0;
  font-size: 1.15rem;
  font-weight: 700;
}

.fdt-lineup {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 28px;
  padding: 0;
  list-style: none;
}

.fdt-lineup li {
  padding: 10px 18px;
  background: var(--fdt-night);
  color: var(--fdt-white);
  border-radius: 999px;
  font-weight: 700;
}

.fdt-source {
  margin: 20px 0 0;
  color: var(--fdt-mute);
  font-size: 0.875rem;
}

.fdt-on-dark .fdt-source {
  color: var(--fdt-mute-on-dark);
}

.fdt-on-dark .fdt-source a {
  color: var(--fdt-white);
}

@media (max-width: 960px) {
  .fdt-people--compact {
    grid-template-columns: repeat(2, 1fr);
  }

  .fdt-tiles {
    grid-template-columns: 1fr;
  }

  .fdt-tile {
    min-height: 0;
  }
}

@media (max-width: 720px) {
  .fdt-datalist__row {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .fdt-cards {
    grid-template-columns: 1fr;
  }

  .fdt-editions,
  .fdt-people,
  .fdt-people--compact,
  .fdt-postgrid {
    grid-template-columns: 1fr;
  }

  .fdt-cards--help .fdt-card__title {
    min-height: 0;
  }

  .fdt-partners__item {
    min-width: calc(50% - 6px);
    flex: 1 1 calc(50% - 6px);
  }
}

.fdt-pit__steps li::marker {
  color: var(--fdt-brand);
  font-weight: 800;
}

/* Akordeon: na komputerze wszystko widoczne (przycisk nieaktywny), na telefonie jedna sekcja otwarta naraz. */
.fdt-acc__head {
  margin: 0;
  font-size: inherit;
  line-height: inherit;
  letter-spacing: 0;
  text-transform: none;
}

.fdt-acc__btn {
  display: flex;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: default;
  pointer-events: none;
}

.fdt-acc__icon {
  display: none;
}

.fdt-acc .fdt-acc__panel[hidden] {
  display: none;
}

.fdt-edition {
  gap: 0;
  padding: 0;
}

.fdt-edition .fdt-acc__btn {
  flex-direction: column;
  gap: 6px;
  padding: 22px 24px 8px;
}

.fdt-edition .fdt-acc__panel {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 6px;
  padding: 0 24px 22px;
}

.fdt-edition .fdt-edition__poster {
  margin: 0 0 8px;
  border-radius: var(--fdt-radius);
}

.fdt-edition__lineup,
.fdt-edition__meta {
  margin: 0;
}

.fdt-edition__link,
.fdt-edition__link:visited,
.fdt-person__more,
.fdt-person__more:visited {
  margin-top: auto;
  padding-top: 6px;
  font-weight: 700;
}

.fdt-person .fdt-acc__btn {
  flex-direction: column;
  gap: 10px;
  align-items: flex-start;
  padding: 24px 24px 8px;
}

.fdt-person .fdt-acc__panel {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 24px 24px;
}

.fdt-person__id {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.fdt-person__short {
  margin: 0;
}

.fdt-person:hover {
  transform: none;
}

@media (max-width: 720px) {
  .fdt-acc__btn {
    align-items: center;
    min-height: 56px;
    cursor: pointer;
    pointer-events: auto;
  }

  .fdt-acc__icon {
    display: block;
    flex-shrink: 0;
    width: 11px;
    height: 11px;
    margin: -4px 4px 0 auto;
    border-right: 2px solid currentcolor;
    border-bottom: 2px solid currentcolor;
    transform: rotate(45deg);
    transition: transform 0.2s ease;
  }

  .fdt-acc.is-open > .fdt-acc__head .fdt-acc__icon {
    margin-top: 4px;
    transform: rotate(-135deg);
  }

  .fdt-editions,
  .fdt-people,
  .fdt-people--compact {
    gap: 8px;
    margin-block: 16px;
  }

  .fdt-edition .fdt-acc__btn {
    display: grid;
    grid-template-columns: 3rem 1fr auto;
    grid-template-areas: "no year icon" "no note icon";
    gap: 0 14px;
    padding: 12px 16px;
  }

  .fdt-edition .fdt-edition__no {
    grid-area: no;
    align-self: center;
    font-size: 1.6rem;
  }

  .fdt-edition .fdt-edition__year {
    grid-area: year;
    font-size: 1rem;
  }

  .fdt-edition .fdt-edition__note {
    grid-area: note;
    font-size: 0.875rem;
  }

  .fdt-edition .fdt-acc__icon {
    grid-area: icon;
  }

  .fdt-edition .fdt-acc__panel {
    padding: 0 16px 16px;
  }

  .fdt-person .fdt-acc__btn {
    flex-direction: row;
    gap: 12px;
    align-items: center;
    padding: 10px 16px;
  }

  .fdt-people--compact .fdt-person:nth-child(n + 4) {
    display: none;
  }

  .fdt-person__photo {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    margin: 0;
    font-size: 1rem;
  }

  .fdt-person__name {
    font-size: 1rem;
  }

  .fdt-person__role {
    font-size: 0.8125rem;
  }

  .fdt-person .fdt-acc__panel {
    padding: 0 16px 16px;
  }

  /* Podstrony zwijane (skrypt tworzy sekcje z nagłówków h2) */
  .fdt-fold__group > .fdt-acc {
    border-top: 1px solid var(--fdt-line-dark);
  }

  .fdt-fold__group > .fdt-acc:last-child {
    border-bottom: 1px solid var(--fdt-line-dark);
  }

  .fdt-fold__group .fdt-acc__btn {
    min-height: 60px;
    padding-block: 12px;
    font-size: 1.2rem;
    font-weight: 800;
    line-height: 1.2;
  }

  .fdt-fold__group .fdt-acc__panel {
    padding-bottom: 12px;
  }

  .fdt-fold__group .fdt-acc__panel > :first-child {
    margin-top: 0;
  }

  /* Kafle akcji: bardziej zwarte (opis w dwóch liniach, cały kafel jest linkiem) */
  .fdt-tile {
    gap: 6px;
    padding: 16px 18px;
  }

  .fdt-tile__text {
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    font-size: 0.9375rem;
  }

  .fdt-tile__more {
    display: none;
  }

  .fdt-tile::after {
    display: none;
  }
}
