/* Wydarzenia — mobile first, grid, kafelki */

/* Osadzenie w szablonie (np. cassiopeia_test) — komponent com_wydarzenia */
.com-wydarzenia {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, sans-serif;
  color: #1a1a1a;
  line-height: 1.5;
  --wyd-accent: #1f5b42;
  --wyd-accent-strong: #174734;
  --wyd-accent-soft: #edf4f0;
}

.wyd-body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, sans-serif;
  background: #f4f5f7;
  color: #1a1a1a;
  line-height: 1.5;
}

.wyd-wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 1rem 1rem 2rem;
}

.wyd-header {
  margin-bottom: 1.15rem;
}

.wyd-title {
  font-size: 1.9rem;
  margin: 0 0 0.5rem;
}

.wyd-breadcrumb {
  font-size: 0.9rem;
  color: #555;
}

.wyd-breadcrumb a {
  color: var(--wyd-accent);
  text-decoration: none;
}

.wyd-breadcrumb a:hover {
  text-decoration: underline;
}

.wyd-breadcrumb .sep {
  margin: 0 0.35rem;
}

.wyd-h2 {
  font-size: 1.35rem;
  margin: 0 0 1.05rem;
}

.wyd-section {
  margin-bottom: 2.25rem;
}

.wyd-years-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

@media (min-width: 600px) {
  .wyd-years-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.wyd-year-tile {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem 0.5rem;
  background: #fff;
  border-radius: 12px;
  text-decoration: none;
  color: #111;
  font-weight: 700;
  font-size: 1.1rem;
  box-shadow: 0 5px 16px rgba(0, 0, 0, 0.08);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.wyd-year-tile:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.14);
}

.wyd-month {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  margin: 2rem 0 0.75rem;
  color: var(--wyd-accent-strong);
  padding-bottom: 0.35rem;
  border-bottom: 1px solid rgba(31, 91, 66, 0.25);
}

.wyd-cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
}

@media (min-width: 640px) {
  .wyd-cards-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 960px) {
  .wyd-cards-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1280px) {
  .wyd-cards-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.wyd-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.wyd-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.14);
}

.wyd-card-img-wrap {
  position: relative;
  aspect-ratio: 16 / 10;
  background: #e5e7eb;
  overflow: hidden;
}

.wyd-badge-new {
  position: absolute;
  top: 0.55rem;
  left: 0.55rem;
  z-index: 2;
  display: inline-block;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  background: var(--wyd-accent);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.24);
}

.wyd-badge-top {
  position: absolute;
  top: 0.55rem;
  left: 0.55rem;
  z-index: 2;
  display: inline-block;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  background: #b45309;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.24);
}

.wyd-card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.wyd-card-img-placeholder {
  width: 100%;
  height: 100%;
  min-height: 7rem;
  background: linear-gradient(135deg, #e5e7eb, #f3f4f6);
}

.wyd-card-cat {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--wyd-accent);
  margin-bottom: 0.15rem;
  font-weight: 600;
}

.wyd-card-body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  padding: 0.85rem 1rem 1rem;
}

.wyd-card-date {
  font-size: 0.8rem;
  color: #64748b;
  margin-bottom: 0.25rem;
}

.wyd-card-title {
  font-weight: 700;
  font-size: 1.07rem;
  line-height: 1.35;
  margin-bottom: 0.4rem;
  min-height: 2.8em;
}

.wyd-card-excerpt {
  font-size: 0.85rem;
  color: #4b5563;
  margin-bottom: 0.45rem;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 3.9em;
}

.wyd-card-photos {
  font-size: 0.82rem;
  color: #334155;
  font-weight: 600;
  margin-top: auto;
}

.wyd-card-likes {
  font-size: 0.82rem;
  color: #334155;
  font-weight: 600;
  margin-top: 0.15rem;
}

.wyd-card-comments {
  font-size: 0.82rem;
  color: #334155;
  font-weight: 600;
  margin-top: 0.15rem;
}

.wyd-recent-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

.wyd-top-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

@media (min-width: 640px) {
  .wyd-recent-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .wyd-top-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 960px) {
  .wyd-recent-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .wyd-top-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.wyd-card--recent .wyd-card-img-wrap {
  aspect-ratio: 3 / 2;
}

.wyd-feature-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem;
  margin: 0 0 0.9rem;
  border: 1px solid #dbe4ed;
  border-radius: 999px;
  background: #f8faf9;
}

.wyd-feature-tab {
  border: 1px solid transparent;
  background: transparent;
  color: var(--wyd-accent);
  font-size: 0.9rem;
  font-weight: 700;
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  cursor: pointer;
}

.wyd-feature-tab.is-active {
  background: var(--wyd-accent);
  border-color: var(--wyd-accent);
  color: #fff;
}

.wyd-feature-panel {
  display: none;
}

.wyd-feature-panel.is-active {
  display: block;
}

.wyd-years-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  margin: 0 0 1.1rem;
  padding: 0.7rem 0.85rem;
  border-radius: 12px;
  background: #f8faf9;
  border: 1px solid #dbe4ed;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.wyd-years-nav-list {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  overflow-x: auto;
  scrollbar-width: thin;
  padding: 0.25rem 0.35rem;
  background: #edf3ef;
  border: 1px solid #dbe4ed;
  border-radius: 999px;
}

.wyd-years-nav-year,
.wyd-years-nav-edge {
  color: var(--wyd-accent);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.94rem;
}

.wyd-years-nav-year {
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  line-height: 1;
}

.wyd-years-nav-year:hover,
.wyd-years-nav-edge:hover {
  color: var(--wyd-accent-strong);
  border-color: #94a3b8;
}

.wyd-years-nav-year.is-active {
  background: var(--wyd-accent);
  border-color: var(--wyd-accent);
  color: #fff;
  box-shadow: 0 3px 10px rgba(31, 91, 66, 0.35);
}

.wyd-years-nav-edge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 3.2rem;
  min-height: 2rem;
  padding: 0.2rem 0.45rem;
  border-radius: 999px;
  border: 1px solid #d1d9e3;
  background: #fff;
  line-height: 1;
}

.wyd-years-nav-edge--disabled {
  color: #94a3b8;
  background: #f1f5f9;
  border-color: #dbe3ec;
}

.wyd-event-cat {
  display: inline-flex;
  align-items: center;
  font-size: 0.82rem;
  color: var(--wyd-accent);
  margin: 0 0 0.45rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border: 1px solid rgba(31, 91, 66, 0.22);
  background: #eef5f1;
  border-radius: 999px;
  padding: 0.18rem 0.55rem;
}

.wyd-event-title {
  font-size: clamp(1.45rem, 2.2vw, 1.88rem);
  line-height: 1.2;
  margin: 0 0 0.3rem;
}

.wyd-event-date {
  color: #475569;
  margin: 0 0 0.35rem;
  font-weight: 500;
  font-size: 0.88rem;
}

.wyd-back-link {
  display: inline-block;
  margin-top: 0.6rem;
  color: var(--wyd-accent);
  text-decoration: none;
  font-weight: 600;
}

.wyd-back-link:hover {
  color: var(--wyd-accent-strong);
}

.wyd-event-desc {
  margin-bottom: 0;
}

.wyd-event-desc-box {
  margin: 0 0 1rem;
  padding: 0.8rem 0.9rem;
  border-radius: 10px;
  background: #f8faf9;
  border: 1px solid #e2e8f0;
}

.wyd-like-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0.65rem;
}

.wyd-like-btn {
  border: 0;
  border-radius: 999px;
  background: var(--wyd-accent);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.36rem 0.7rem;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}

.wyd-like-btn:hover {
  background: var(--wyd-accent-strong);
  transform: translateY(-1px);
}

.wyd-like-btn:disabled {
  cursor: default;
  opacity: 0.9;
}

.wyd-like-btn.is-liked {
  background: #64748b;
}

.wyd-like-count {
  font-weight: 700;
  color: #334155;
  min-width: 1.1rem;
  font-size: 0.9rem;
}

.wyd-comments {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid #e2e8f0;
}

.wyd-comments-title {
  margin: 0 0 0.75rem;
  font-size: 1.1rem;
}

.wyd-comments-list {
  display: grid;
  gap: 0.65rem;
  margin-bottom: 0.9rem;
}

.wyd-comment-item {
  background: #f8faf9;
  border: 1px solid #dde6ee;
  border-radius: 12px;
  padding: 0.75rem 0.85rem;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.05);
}

.wyd-comment-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-bottom: 0.35rem;
}

.wyd-comment-avatar {
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: #e2ebe6;
  color: var(--wyd-accent-strong);
  border: 1px solid #c6d7cd;
  font-size: 0.78rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.wyd-comment-author-wrap {
  display: inline-flex;
  flex-direction: column;
  line-height: 1.2;
}

.wyd-comment-author {
  color: #0f172a;
  font-weight: 700;
  font-size: 0.88rem;
}

.wyd-comment-date {
  font-size: 0.76rem;
  color: #64748b;
}

.wyd-comment-state {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: #92400e;
  background: #fef3c7;
  border: 1px solid #fcd34d;
}

.wyd-comment-content {
  white-space: pre-wrap;
  line-height: 1.45;
}

.wyd-comment-item.is-pending {
  border-color: #fcd34d;
  background: #fffbeb;
}

.wyd-comment-form label {
  display: block;
  margin-bottom: 0.3rem;
  font-weight: 600;
}

.wyd-comment-form textarea {
  width: 100%;
  padding: 0.55rem 0.7rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  resize: vertical;
  min-height: 6rem;
  font-family: inherit;
}

.wyd-comment-actions {
  margin-top: 0.55rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.wyd-comment-feedback {
  font-size: 0.86rem;
  color: #334155;
}

.wyd-comments-login,
.wyd-comments-empty {
  color: #64748b;
  margin: 0;
}

.wyd-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

@media (min-width: 640px) {
  .wyd-gallery {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.65rem;
  }
}

@media (min-width: 960px) {
  .wyd-gallery {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.wyd-g-item {
  display: block;
  border-radius: 12px;
  overflow: hidden;
  background: #e5e7eb;
  border: 1px solid #d7e0e8;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.wyd-g-item:hover {
  transform: translateY(-2px) scale(1.02);
  border-color: #94a3b8;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.16);
}

.wyd-g-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 1;
  display: block;
}

.wyd-gallery-pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 1rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid #dbe4ed;
  border-radius: 12px;
  background: #f8faf9;
}

.wyd-gallery-page-btn {
  color: var(--wyd-accent);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.86rem;
  padding: 0.3rem 0.55rem;
  border-radius: 999px;
  border: 1px solid #d1d9e3;
  background: #fff;
}

.wyd-gallery-page-btn:hover {
  color: var(--wyd-accent-strong);
}

.wyd-gallery-page-btn.is-disabled {
  color: #94a3b8;
  background: #f1f5f9;
  border-color: #dbe3ec;
  pointer-events: none;
}

.wyd-gallery-page-list {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  overflow-x: auto;
}

.wyd-gallery-page-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.1rem;
  height: 2.1rem;
  border-radius: 999px;
  text-decoration: none;
  color: var(--wyd-accent);
  font-weight: 600;
  font-size: 0.84rem;
  border: 1px solid #cbd5e1;
  background: #fff;
}

.wyd-gallery-page-num:hover {
  color: var(--wyd-accent-strong);
  border-color: #94a3b8;
}

.wyd-gallery-page-num.is-active {
  background: var(--wyd-accent);
  border-color: var(--wyd-accent);
  color: #fff;
}

@media (max-width: 640px) {
  .wyd-gallery-pager {
    padding: 0.45rem 0.5rem;
    gap: 0.5rem;
  }

  .wyd-gallery-page-btn {
    font-size: 0.8rem;
    padding: 0.25rem 0.45rem;
  }

  .wyd-gallery-page-list {
    gap: 0.25rem;
  }

  .wyd-gallery-page-num {
    min-width: 1.8rem;
    height: 1.8rem;
    font-size: 0.78rem;
  }

  .wyd-comment-item {
    padding: 0.65rem 0.7rem;
  }

  .wyd-comment-avatar {
    width: 1.75rem;
    height: 1.75rem;
    font-size: 0.72rem;
  }

  .wyd-comment-author {
    font-size: 0.84rem;
  }

  .wyd-comment-date {
    font-size: 0.72rem;
  }

  .wyd-comment-state {
    font-size: 0.68rem;
    padding: 0.12rem 0.45rem;
  }
}

.wyd-nav-events {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.wyd-btn {
  display: inline-block;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  background: var(--wyd-accent);
  color: #fff;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
}

.wyd-btn:hover {
  background: var(--wyd-accent-strong);
}

.wyd-btn--disabled {
  background: #cbd5e1;
  color: #64748b;
  pointer-events: none;
}

.wyd-lb {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 1rem;
}

.wyd-lb[hidden] {
  display: none !important;
}

.wyd-lb img {
  max-width: 100%;
  max-height: calc(100vh - 5rem);
  border-radius: 6px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

.wyd-lb-counter {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  color: #f8fafc;
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  pointer-events: none;
}

.wyd-lb-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}

.wyd-lb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 2.4rem;
  height: 2.4rem;
  border: 0;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.65);
  color: #fff;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.wyd-lb-prev {
  left: 0.8rem;
}

.wyd-lb-next {
  right: 0.8rem;
}

.wyd-lb-nav:hover {
  background: rgba(31, 91, 66, 0.95);
}

.wyd-noscroll {
  overflow: hidden;
}
