:root {
  --blue: #0b3a75;
  --blue-2: #0f5da8;
  --bg: #f4f7fb;
  --card: #ffffff;
  --text: #172033;
  --muted: #65758b;
  --border: #dbe4ef;
  --danger: #b42318;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
}

a { color: inherit; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 14px 24px;
  background: rgba(255,255,255,0.94);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(10px);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 800;
  color: var(--blue);
}

.brand-logo {
  width: 72px;
  height: auto;
  display: block;
  flex-shrink: 0;
}
.brand-text {
  display: inline-flex;
  align-items: center;
  line-height: 1.1;
}

.logo {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: var(--blue);
  color: white;
}
nav {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
nav a {
  text-decoration: none;
  padding: 8px 10px;
  border-radius: 999px;
  color: var(--blue);
  font-weight: 650;
}
nav a:hover { background: #e7f0fb; }
.container {
  width: min(1120px, calc(100% - 28px));
  margin: 24px auto;
}

.hero {
    position: relative;

    min-height: 220px;

    display: flex;
    align-items: center;

    padding: 24px;

    border-radius: 16px;
    overflow: hidden;

    background:
        linear-gradient(
            rgba(11,58,117,0.75),
            rgba(11,58,117,0.75)
        ),
        url("../images/hero.jpg");

    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;

    color: white;
}
.hero h1 { font-size: clamp(34px, 8vw, 64px); margin: 8px 0; line-height: 1; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: 13px; font-weight: 800; opacity: .85; }
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin: 18px 0;
}
.grid.two { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 20px;
  box-shadow: 0 10px 28px rgba(23,32,51,.06);
}
.card h2 { margin-top: 0; color: var(--blue); }
.stats .card strong {
  display: block;
  font-size: 42px;
  color: var(--blue);
}
.stats .card span { color: var(--muted); font-weight: 700; }
.list-item {
  padding: 12px 0;
  border-top: 1px solid var(--border);
  display: grid;
  gap: 4px;
}
.list-item:first-of-type { border-top: 0; }
small { color: var(--muted); }
.form {
  display: grid;
  gap: 14px;
  margin-bottom: 20px;
}
label {
  display: grid;
  gap: 6px;
  font-weight: 700;
  color: var(--blue);
}
input, textarea, select {
  width: 100%;
  padding: 12px 13px;
  border: 1px solid var(--border);
  border-radius: 14px;
  font: inherit;
  background: white;
  color: var(--text);
}
textarea { min-height: 110px; resize: vertical; }
button, .button-link {
  appearance: none;
  border: 0;
  border-radius: 14px;
  padding: 12px 16px;
  background: var(--blue);
  color: white;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}
button:hover, .button-link:hover { background: var(--blue-2); }
button.danger {
  background: transparent;
  color: var(--danger);
  border: 1px solid #f0b8b2;
  padding: 8px 12px;
  margin-top: 12px;
}
.flash {
  border-radius: 18px;
  padding: 10px 16px;
  background: #e8f7ee;
  border: 1px solid #bce6ca;
  margin-bottom: 16px;
}
.footer {
  text-align: center;
  color: var(--muted);
  padding: 32px;
}
@media (max-width: 720px) {
  .topbar { align-items: flex-start; flex-direction: column; padding: 12px 14px; }
  nav { width: 100%; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; }
  nav a { white-space: nowrap; background: #eef4fb; }
  .hero { padding: 26px 22px; border-radius: 22px; }
  .container { width: min(100% - 20px, 1120px); margin-top: 16px; }
  .grid.two { grid-template-columns: 1fr; }
}
.muted { color: var(--muted); }
.auth-card {
  max-width: 520px;
  margin: 36px auto;
}
.auth-card h1 {
  color: var(--blue);
  margin-top: 0;
}
.nav-user {
  align-self: center;
  color: var(--muted);
  font-weight: 700;
  padding: 8px 10px;
}
.logout-form {
  margin: 0;
  display: inline;
}
.nav-button {
  padding: 8px 10px;
  border-radius: 999px;
  background: #e7f0fb;
  color: var(--blue);
}
.nav-button:hover {
  background: #d8e9fb;
}
.notes-text {
  white-space: pre-line;
}

.formatted-text{white-space:pre-wrap;line-height:1.5;}

.list-link {
  text-decoration: none;
  color: inherit;
  border-radius: 14px;
  padding: 12px;
  margin-left: -12px;
  margin-right: -12px;
}
.list-link:hover {
  background: #eef4fb;
}
.click-hint {
  color: var(--blue-2);
  font-weight: 700;
}
.back-link {
  display: inline-block;
  margin-bottom: 16px;
  color: var(--blue);
  font-weight: 800;
  text-decoration: none;
}
.back-link:hover {
  text-decoration: underline;
}
.detail-card h1 {
  color: var(--blue);
  margin-bottom: 8px;
}
.details-list {
  display: grid;
  gap: 12px;
  margin: 20px 0;
}
.details-list div {
  border-top: 1px solid var(--border);
  padding-top: 12px;
}
.details-list dt {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.details-list dd {
  margin: 4px 0 0;
  font-weight: 700;
}
.announcement-body {
  margin-top: 18px;
}
.actions-row {
  margin-top: 20px;
}
.button {
  appearance: none;
  border: 0;
  border-radius: 14px;
  padding: 12px 16px;
  background: var(--blue);
  color: white;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}
.button:hover { background: var(--blue-2); }
.button.secondary {
  background: #e7f0fb;
  color: var(--blue);
}
.button.secondary:hover {
  background: #d8e9fb;
}

.quick-links {
  margin: 16px 0 6px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

button,
.button,
.button-link,
.nav-button,
nav a,
.list-link,
.external-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.2;
}

.button,
.button-link,
.external-link {
  min-height: 46px;
}

.list-link {
  align-items: stretch;
  justify-content: flex-start;
  text-align: left;
}

@media (max-width: 720px) {
  button,
  .button,
  .button-link,
  .nav-button,
  nav a,
  .external-link {
    min-height: 44px;
    width: auto;
  }

  .form button,
  .button-link.external-link,
  .actions-row .button {
    width: 100%;
  }
}


.collapsible-form {
  margin-bottom: 20px;
}

.collapsible-form > summary {
  list-style: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 16px;
  border-radius: 14px;
  background: var(--blue);
  color: white;
  font-weight: 800;
  cursor: pointer;
  text-align: center;
  line-height: 1.2;
}

.collapsible-form > summary::-webkit-details-marker {
  display: none;
}

.collapsible-form > summary:hover {
  background: var(--blue-2);
}

.collapsible-form[open] > summary {
  margin-bottom: 16px;
}

.form-inside-details {
  margin-bottom: 0;
}

.maps-link {
  color: var(--blue-2);
  font-weight: 700;
  text-decoration: none;
}

.maps-link:hover {
  text-decoration: underline;
}

@media (max-width: 720px) {
  .collapsible-form > summary {
    width: 100%;
  }
}

.material-title-link {
  display: grid;
  gap: 8px;
  color: inherit;
  text-decoration: none;
  min-height: 100%;
}

.material-title-link:hover h2 {
  text-decoration: underline;
}

.manual-card {
  max-width: 900px;
  margin: 0 auto;
}

.manual-text {
  margin-top: 22px;
  font-size: 1.05rem;
}

.manual-text a {
  color: var(--blue-2);
  font-weight: 700;
}

.manual-text p {
  margin: 0 0 1rem;
}


.chapter-card {
  scroll-margin-top: 90px;
}

.chapter-suggestions {
  margin-top: 16px;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

.chapter-suggestions > summary {
  cursor: pointer;
  font-weight: 800;
  color: var(--blue);
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1.2;
}

.suggestions-list {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.suggestion-item {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #f8fbff;
  padding: 12px;
}

.suggestion-item small {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-weight: 700;
}

.suggestion-form {
  margin-top: 14px;
  margin-bottom: 0;
}

.suggestion-form textarea {
  width: 100%;
}

/* Rozdziały tematu formacyjnego — przyciski i sugestie zawsze w tej samej karcie */
.chapters-grid {
  align-items: start;
}

.chapter-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  scroll-margin-top: 90px;
}

.chapter-card-header h2 {
  margin-bottom: 6px;
}

.chapter-actions {
  display: flex;
  width: 100%;
}

.chapter-read-button {
  width: 100%;
}

.chapter-panel {
  width: 100%;
  margin-top: 0;
}

.chapter-suggestions {
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

.chapter-suggestions > summary,
.suggestion-form > summary {
  width: 100%;
  min-height: 46px;
  border-radius: 14px;
  padding: 12px 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.2;
  cursor: pointer;
}

.chapter-suggestions > summary {
  background: #e7f0fb;
  color: var(--blue);
  font-weight: 800;
}

.chapter-suggestions > summary:hover {
  background: #d8e9fb;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.gallery-photo-card {
  display: block;
  overflow: hidden;
  border-radius: 16px;
  background: #fff;
  border: 1px solid rgba(11, 58, 117, 0.12);
  box-shadow: 0 8px 18px rgba(11, 58, 117, 0.08);
}

.gallery-photo-card img {
  display: block;
  width: 100%;
  height: 190px;
  object-fit: cover;
}

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

  .gallery-photo-card img {
    height: auto;
    max-height: 70vh;
  }
}


.search-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.search-card label {
  font-weight: 700;
}

.search-input {
  width: 100%;
  min-height: 46px;
  padding: 12px 14px;
  border: 1px solid rgba(11, 58, 117, 0.2);
  border-radius: 12px;
  font-size: 1rem;
}

.search-input:focus {
  outline: 2px solid rgba(11, 58, 117, 0.25);
  border-color: #0b3a75;
}

.search-empty {
  margin-top: 16px;
}


.timeline {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 18px;
  padding-left: 22px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 999px;
  background: rgba(11, 58, 117, 0.18);
}

.timeline-item {
  position: relative;
  margin: 0;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -23px;
  top: 22px;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: var(--blue);
  box-shadow: 0 0 0 5px rgba(11, 58, 117, 0.12);
}

.timeline-date {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 6px 12px;
  border-radius: 999px;
  background: #e7f0fb;
  color: var(--blue);
  font-weight: 800;
  margin-bottom: 10px;
}

.timeline-content h2 {
  margin: 0 0 8px;
}

@media (max-width: 600px) {
  .timeline {
    padding-left: 18px;
  }

  .timeline-item::before {
    left: -21px;
  }
}

/* Termin spotkania — miesięczna ankieta dostępności */
.availability-header h1 {
  color: var(--blue);
  margin-bottom: 8px;
}

.month-panel {
  margin-top: 18px;
}

.month-navigation {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.month-heading {
  text-align: center;
}

.month-heading h2 {
  margin: 0 0 4px;
}

.month-nav-button {
  width: 46px;
  min-width: 46px;
  height: 46px;
  padding: 0;
}

.availability-form {
  margin: 0;
}

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

.calendar-weekdays {
  margin-bottom: 7px;
  text-align: center;
  color: var(--muted);
  font-size: .82rem;
  font-weight: 800;
}

.calendar-weekdays > div {
  padding: 5px 2px;
}

.weekend-label {
  color: var(--blue);
}

.calendar-month {
  display: grid;
  gap: 7px;
}

.calendar-day {
  position: relative;
  min-height: 78px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  color: var(--text);
  padding: 9px 7px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  user-select: none;
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
}

.calendar-day:hover:not(.calendar-day-past):not(.calendar-day-empty) {
  border-color: var(--blue-2);
  transform: translateY(-1px);
}

.calendar-day input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.calendar-day-number {
  font-size: 1.05rem;
  font-weight: 850;
}

.calendar-day-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  min-height: 24px;
  padding: 3px 6px;
  border-radius: 999px;
  background: #eef4fb;
  color: var(--blue);
  font-size: .75rem;
  font-weight: 850;
}

.calendar-day-count-empty {
  color: #9aa5b5;
  background: transparent;
}

.calendar-day-weekend {
  background: #f2f7fd;
  border-color: #cbdff4;
}

.calendar-day-selected {
  background: #dff4e8;
  border-color: #62b47d;
  box-shadow: inset 0 0 0 1px #62b47d;
}

.calendar-day-selected .calendar-day-count {
  background: #fff;
}

.calendar-day-past {
  opacity: .4;
  cursor: not-allowed;
  background: #f5f5f5;
}

.calendar-day-empty {
  border-color: transparent;
  background: transparent;
  cursor: default;
}

.calendar-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 16px 0;
  color: var(--muted);
  font-size: .88rem;
}

.calendar-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend-box {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  border: 1px solid var(--border);
  display: inline-block;
}

.legend-box.selected {
  background: #dff4e8;
  border-color: #62b47d;
}

.legend-box.weekend {
  background: #f2f7fd;
  border-color: #cbdff4;
}

.availability-save {
  width: 100%;
  margin-top: 4px;
}

.availability-summary-grid {
  align-items: start;
}

.best-dates-list {
  display: grid;
  gap: 9px;
  margin-top: 14px;
}

.best-date {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 9px;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: #f8fbff;
}

.best-date-all {
  background: #e8f7ee;
  border-color: #bce6ca;
}

.best-date small {
  color: var(--blue-2);
  font-weight: 800;
}

.success-note,
.warning-note {
  padding: 11px 13px;
  border-radius: 12px;
  font-weight: 700;
}

.success-note {
  background: #e8f7ee;
  border: 1px solid #bce6ca;
}

.warning-note {
  background: #fff6df;
  border: 1px solid #eed79b;
}

@media (max-width: 720px) {
  .calendar-grid {
    gap: 4px;
  }

  .calendar-day {
    min-height: 63px;
    border-radius: 10px;
    padding: 6px 3px;
  }

  .calendar-day-number {
    font-size: .95rem;
  }

  .calendar-day-count {
    min-width: 29px;
    min-height: 20px;
    padding: 2px 4px;
    font-size: .66rem;
  }

  .calendar-weekdays {
    font-size: .72rem;
  }

  .month-heading h2 {
    font-size: 1.25rem;
  }

  .best-date {
    grid-template-columns: 1fr auto;
  }

  .best-date small {
    grid-column: 1 / -1;
  }
}

.donation-card{

    margin:25px 0;

}

.account-number{

    font-size:1.25rem;

    font-weight:bold;

    text-align:center;

    background:#eef5ff;

    border-radius:10px;

    padding:14px;

    margin:15px 0;

    letter-spacing:1px;

    color:#0b3a75;

}

.account-title{

    background:#f8f8f8;

    border-left:5px solid #0b3a75;

    padding:12px;

    margin-top:10px;

    white-space:pre-wrap;

}

.mt-1{

    margin-top:10px;

}

.mt-2{

    margin-top:20px;

}