/* Deczno – Kalendarium Imprez
   Kolory zgodne z www.deczno.pl: pomarańczowo-czerwone akcenty, białe tło, ciemny tekst. */
:root {
  --deczno-orange: #F5822B;
  --deczno-red:    #E53935;
  --deczno-grad:   linear-gradient(135deg, #F5A623 0%, #F5822B 45%, #E53935 100%);
  --deczno-ink:    #1a1a1a;
  --deczno-muted:  #6b6b6b;
  --deczno-bg:     #ffffff;
  --deczno-soft:   #fafafa;
  --deczno-line:   #ececec;
  --deczno-radius: 14px;
  --deczno-shadow: 0 8px 30px rgba(0,0,0,.08);
  --deczno-shadow-lg: 0 20px 60px rgba(0,0,0,.25);
}

.deczno-ev-today-module,
.deczno-ev-calendar {
  font-family: inherit;
  color: var(--deczno-ink);
  max-width: 1200px;
  margin: 3rem auto;
  padding: 0 1rem;
}

/* ------- Nagłówki ------- */
.deczno-ev-today-header,
.deczno-ev-calendar-header {
  text-align: center;
  margin-bottom: 2rem;
}
.deczno-ev-today-header h2,
.deczno-ev-calendar-header h2 {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 800;
  margin: 0;
  background: var(--deczno-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  display: inline-block;
}
.deczno-ev-today-header p,
.deczno-ev-calendar-header p {
  color: var(--deczno-muted);
  margin-top: .5rem;
}

/* Pulsujący wskaźnik „na żywo" */
.deczno-ev-pulse {
  display: inline-block;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--deczno-red);
  margin-right: .5rem;
  vertical-align: middle;
  box-shadow: 0 0 0 rgba(229,57,53,.7);
  animation: deczno-pulse 1.8s infinite;
}
@keyframes deczno-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(229,57,53,.6); }
  70%  { box-shadow: 0 0 0 14px rgba(229,57,53,0); }
  100% { box-shadow: 0 0 0 0 rgba(229,57,53,0); }
}

/* ------- Grid ------- */
.deczno-ev-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}
.deczno-ev-grid-today {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

/* ------- Karta ------- */
.deczno-ev-card {
  background: var(--deczno-bg);
  border-radius: var(--deczno-radius);
  overflow: hidden;
  box-shadow: var(--deczno-shadow);
  transition: transform .35s ease, box-shadow .35s ease;
  border: 1px solid var(--deczno-line);
}
.deczno-ev-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0,0,0,.14);
}

.deczno-ev-thumb {
  position: relative;
  aspect-ratio: 1 / 1;
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

.deczno-ev-card.is-today .deczno-ev-thumb::before {
  content: "";
  position: absolute; inset: 0;
  border: 3px solid transparent;
  border-radius: var(--deczno-radius) var(--deczno-radius) 0 0;
  background: var(--deczno-grad) border-box;
  -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
  z-index: 2;
}

.deczno-ev-badge-today {
  position: absolute;
  top: 12px; left: 12px;
  background: var(--deczno-grad);
  color: #fff;
  font-weight: 700;
  font-size: .75rem;
  padding: .4rem .75rem;
  border-radius: 999px;
  letter-spacing: .04em;
  text-transform: uppercase;
  z-index: 3;
  box-shadow: 0 4px 12px rgba(229,57,53,.35);
}

.deczno-ev-date-chip {
  position: absolute;
  top: 12px; right: 12px;
  background: rgba(255,255,255,.95);
  border-radius: 10px;
  padding: .4rem .55rem;
  text-align: center;
  line-height: 1;
  min-width: 46px;
  z-index: 3;
  box-shadow: 0 4px 12px rgba(0,0,0,.12);
}
.deczno-ev-date-chip .d {
  display: block;
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--deczno-red);
}
.deczno-ev-date-chip .m {
  display: block;
  font-size: .65rem;
  letter-spacing: .08em;
  color: var(--deczno-ink);
  margin-top: 2px;
}

/* ------- Hover overlay ------- */
.deczno-ev-hover {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.35) 0%, rgba(0,0,0,.85) 60%, rgba(0,0,0,.95) 100%);
  color: #fff;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  opacity: 0;
  transition: opacity .35s ease;
  z-index: 2;
}
.deczno-ev-card:hover .deczno-ev-hover,
.deczno-ev-card:focus-within .deczno-ev-hover {
  opacity: 1;
}
.deczno-ev-hover h3 {
  font-size: 1.15rem;
  margin: 0 0 .5rem;
  font-weight: 700;
  line-height: 1.25;
}
.deczno-ev-meta {
  margin: 0 0 .5rem;
}
.deczno-ev-meta p {
  margin: .15rem 0;
  font-size: .85rem;
  opacity: .95;
}
.deczno-ev-desc {
  font-size: .85rem;
  opacity: .85;
  margin: .25rem 0 .85rem;
  line-height: 1.4;
}
.deczno-ev-actions {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
}

/* ------- Przyciski ------- */
.deczno-btn {
  display: inline-block;
  padding: .55rem 1rem;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 0;
  transition: transform .15s ease, box-shadow .15s ease, background .2s;
  font-family: inherit;
}
.deczno-btn:hover { transform: translateY(-1px); }
.deczno-btn-primary {
  background: var(--deczno-grad);
  color: #fff;
  box-shadow: 0 4px 14px rgba(229,57,53,.35);
}
.deczno-btn-outline {
  background: transparent;
  color: #fff;
  border: 1.5px solid #fff;
}
.deczno-btn-outline:hover { background: #fff; color: var(--deczno-ink); }

/* ------- Tytuł pod kartą ------- */
.deczno-ev-title-below {
  padding: .85rem 1rem 1rem;
}
.deczno-ev-title-below h4 {
  margin: 0 0 .25rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--deczno-ink);
  line-height: 1.3;
}
.deczno-ev-title-below span {
  font-size: .8rem;
  color: var(--deczno-muted);
}

/* ------- Pusty stan ------- */
.deczno-ev-today-empty,
.deczno-ev-empty {
  text-align: center;
  padding: 2rem;
  background: var(--deczno-soft);
  border-radius: var(--deczno-radius);
  color: var(--deczno-muted);
  border: 1px dashed var(--deczno-line);
}

/* ------- Modal plakatu ------- */
.deczno-ev-modal {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.9);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  animation: deczno-fade .25s ease;
}
.deczno-ev-modal[hidden] { display: none; }
@keyframes deczno-fade { from {opacity:0;} to {opacity:1;} }
.deczno-ev-modal img {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: var(--deczno-radius);
  box-shadow: var(--deczno-shadow-lg);
}
.deczno-ev-modal-close {
  position: absolute;
  top: 20px; right: 24px;
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 0;
  background: #fff;
  color: var(--deczno-ink);
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  font-weight: 300;
}

/* ------- Mobile: hover -> zawsze widoczne (tap-first) ------- */
@media (hover: none) {
  .deczno-ev-hover {
    position: relative;
    opacity: 1;
    background: var(--deczno-ink);
    padding: 1rem;
  }
  .deczno-ev-thumb {
    aspect-ratio: 4 / 3;
  }
  .deczno-ev-card { display: flex; flex-direction: column; }
}

/* ===== Kalendarz miesięczny ===== */
.deczno-ev-cal { max-width: 1100px; margin: 32px auto; font-family: inherit; color: #222; }
.deczno-ev-cal-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.deczno-ev-cal-header h2 { margin: 0; font-size: 28px; text-align: center; flex: 1;
  background: linear-gradient(90deg, #F5A623, #E53935); -webkit-background-clip: text; background-clip: text; color: transparent; }
.deczno-ev-cal-nav { display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 50%; background: #fff; color: #E53935;
  font-size: 24px; font-weight: 700; text-decoration: none; border: 2px solid #F5A623;
  transition: all .2s; }
.deczno-ev-cal-nav:hover { background: linear-gradient(135deg, #F5A623, #E53935); color: #fff; }
.deczno-ev-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.deczno-ev-cal-dow { margin-bottom: 6px; }
.deczno-ev-cal-dow-cell { text-align: center; font-weight: 700; color: #E53935;
  padding: 8px 0; font-size: 13px; text-transform: uppercase; letter-spacing: .5px; }
.deczno-ev-cal-cell { background: #fff; border: 1px solid #f0e6dd; border-radius: 10px;
  min-height: 96px; padding: 6px; position: relative; display: flex; flex-direction: column; }
.deczno-ev-cal-cell.is-empty { background: transparent; border: none; }
.deczno-ev-cal-cell.is-today { border-color: #F5A623; box-shadow: 0 0 0 2px rgba(245,166,35,.25); }
.deczno-ev-cal-cell.has-events { background: linear-gradient(180deg, #fff 0%, #fff8f0 100%); }
.deczno-ev-cal-daynum { font-weight: 700; font-size: 14px; color: #666; margin-bottom: 4px; }
.deczno-ev-cal-cell.is-today .deczno-ev-cal-daynum { color: #E53935; }
.deczno-ev-cal-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 3px; }
.deczno-ev-cal-pill { display: block; width: 100%; text-align: left; cursor: pointer;
  background: linear-gradient(135deg, #F5A623, #E53935); color: #fff; border: 0;
  border-radius: 6px; padding: 4px 6px; font-size: 11px; line-height: 1.3;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; transition: transform .15s; }
.deczno-ev-cal-pill:hover { transform: translateY(-1px); }
.deczno-ev-cal-pill .t { font-weight: 700; margin-right: 4px; }
.deczno-ev-cal-more { font-size: 11px; color: #E53935; font-weight: 600; padding: 2px 4px; }

.deczno-ev-cal-detail { position: fixed; inset: 0; background: rgba(0,0,0,.75);
  z-index: 9999; display: flex; align-items: center; justify-content: center; padding: 20px; }
.deczno-ev-cal-detail[hidden] { display: none; }
.deczno-ev-cal-detail-inner { background: #fff; border-radius: 14px; max-width: 900px;
  width: 100%; max-height: 90vh; overflow: auto; display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.deczno-ev-cal-detail-poster { width: 100%; height: 100%; object-fit: cover; display: block;
  border-radius: 14px 0 0 14px; max-height: 90vh; }
.deczno-ev-cal-detail-body { padding: 28px; }
.deczno-ev-cal-detail-body h3 { margin: 0 0 12px; font-size: 24px;
  background: linear-gradient(90deg, #F5A623, #E53935); -webkit-background-clip: text; background-clip: text; color: transparent; }
.deczno-ev-cal-detail-meta { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.deczno-ev-cal-detail-meta span { background: #fff8f0; color: #333; padding: 4px 10px;
  border-radius: 999px; font-size: 13px; border: 1px solid #f0e6dd; }
.deczno-ev-cal-detail-desc { color: #444; line-height: 1.5; margin-bottom: 18px; }
.deczno-ev-cal-detail-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.deczno-ev-cal-detail-close { position: absolute; top: 20px; right: 20px; width: 40px; height: 40px;
  border-radius: 50%; border: 0; background: #fff; color: #E53935; font-size: 24px; cursor: pointer; }
@media (max-width: 720px) {
  .deczno-ev-cal-cell { min-height: 64px; padding: 4px; }
  .deczno-ev-cal-daynum { font-size: 12px; }
  .deczno-ev-cal-pill { font-size: 10px; padding: 2px 4px; }
  .deczno-ev-cal-pill .n { display: none; }
  .deczno-ev-cal-detail-inner { grid-template-columns: 1fr; }
  .deczno-ev-cal-detail-poster { border-radius: 14px 14px 0 0; max-height: 40vh; }
}
