/* SCC Events Slider */
.scc-events {
  padding: 5rem 0 4rem;
  background: transparent;
}
.scc-events__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
  gap: 1.5rem;
}
.scc-events__header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-shrink: 0;
}
.scc-events__notice {
  padding: 2rem;
  background: var(--scc-warm-gray);
  border-radius: 8px;
  color: var(--scc-text-secondary);
  font-size: 0.9rem;
  text-align: center;
}

/* ── Event Card ── */
.scc-events__scroll { gap: 1.5rem; }
.scc-event-card {
  flex: 0 0 280px;
  scroll-snap-align: start;
  border-radius: 10px;
  overflow: hidden;
  background: var(--scc-white);
  border: 1px solid rgba(0,0,0,0.06);
  transition: transform 0.4s var(--scc-ease), box-shadow 0.4s var(--scc-ease);
}
.scc-event-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--scc-shadow-lg);
}
.scc-event-card__image {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--scc-warm-gray);
}
.scc-event-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--scc-ease);
}
.scc-event-card:hover .scc-event-card__image img { transform: scale(1.04); }
.scc-event-card__placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(160deg, var(--scc-teal-light), var(--scc-teal-dark));
}
.scc-event-card__date-badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  background: var(--scc-white);
  padding: 0.45rem 0.6rem;
  border-radius: 6px;
  text-align: center;
  line-height: 1;
  box-shadow: 0 2px 12px rgba(0,0,0,0.1);
}
.scc-event-card__date-month {
  font-size: 0.6rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--scc-magenta);
  display: block;
  font-family: var(--scc-font);
}
.scc-event-card__date-day {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--scc-teal-dark);
  display: block;
  margin-top: 2px;
  font-family: var(--scc-font);
}
.scc-event-card__body { padding: 1.25rem; }
.scc-event-card__category {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--scc-teal-light);
  margin-bottom: 0.4rem;
  font-family: var(--scc-font);
}
/* ── Canceled status badge (image overlay, top-right) ── */
.scc-event-card__status-badge {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: var(--scc-magenta);
  color: #fff;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  padding: 0.35rem 0.65rem;
  border-radius: 4px;
  line-height: 1;
  box-shadow: 0 2px 10px rgba(193, 31, 112, 0.45);
  font-family: var(--scc-font);
  pointer-events: none;
}
/* Slight desaturation on the image to reinforce canceled state */
.scc-event-card--canceled .scc-event-card__image img,
.scc-event-card--canceled .scc-event-card__placeholder {
  filter: saturate(0.55);
}
.scc-event-card__title {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 0.4rem;
  color: var(--scc-text);
  font-family: var(--scc-font);
}
.scc-event-card__title a {
  color: inherit;
  text-decoration: none;
}
.scc-event-card__title a:hover { color: var(--scc-teal); }
.scc-event-card__meta {
  font-size: 0.8rem;
  color: var(--scc-text-light);
  margin-bottom: 0.75rem;
  font-family: var(--scc-font);
}
.scc-event-card__link {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--scc-teal);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  text-decoration: none;
  transition: gap 0.3s ease, color 0.3s ease;
  font-family: var(--scc-font);
}
.scc-event-card__link svg { width: 13px; height: 13px; }
.scc-event-card__link:hover { gap: 0.55rem; color: var(--scc-magenta); }

/* ── Auto-hide actions when no overflow ──────────────────────── */
/* JS adds this class when all cards fit without scrolling.
   visibility: hidden keeps the header layout intact (no reflow). */
.scc-events--no-overflow .scc-events__header-actions {
  visibility: hidden;
  pointer-events: none;
}

/* ── Overflow Right (Full Width) ──────────────────────────────── */
/* Track lives inside .scc-container. The formula extends it to the
   right viewport edge while keeping the left edge at the content
   column — cards stay aligned on the left, flush on the right.    */
.scc-events--overflow-right {
  overflow: hidden; /* fallback for browsers without overflow: clip support */
  overflow-x: clip; /* preferred: clips without creating a new scroll context */
}
.scc-events--overflow-right .scc-events__scroll {
  width: calc(100% + ((100vw - 100%) / 2));
  margin-right: calc((100% - 100vw) / 2);
  max-width: none;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .scc-event-card { flex: 0 0 260px; }
}
@media (max-width: 768px) {
  .scc-events { padding: 3.5rem 0; }
  .scc-events__header,
  .scc-events__header-actions { flex-direction: column; align-items: flex-start; gap: 1rem; }
  .scc-event-card { flex: 0 0 85%; min-width: 0; }
}
@media (max-width: 480px) {
  .scc-event-card { flex: 0 0 88%; }
  .scc-events { padding: 2.5rem 0; }
}

/* ── Consecutive stacked blocks (mobile only) ── */
@media (max-width: 768px) {
  .wp-block-scc-events-slider + .wp-block-scc-events-slider .scc-events {
    padding-top: 1rem;
  }
}
@media (hover: none) and (pointer: coarse) {
  .scc-event-card:hover { transform: none; box-shadow: none; }
  .scc-event-card:hover .scc-event-card__image img { transform: none; }
  .scc-event-card:active { transform: scale(0.98); box-shadow: var(--scc-shadow-sm); }
}

/* ══════════════════════════════════════════════════════════════════
   Studio design (design = "studio"). Scoped to .scc-es.
   ══════════════════════════════════════════════════════════════════ */
.scc-es {
  --es-teal: var(--scc-teal, #0e4b64);
  --es-teal-light: var(--scc-teal-light, #1e6685);
  --es-teal-dark: var(--scc-teal-dark, #093a4e);
  --es-magenta: var(--scc-magenta, #c11f70);
  --es-text2: #555;
  --es-font: var(--scc-font, 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif);
  padding: 6rem 0;
  background: var(--scc-off-white, #f8f7f4);
  color: var(--scc-text, #1a1a1a);
  font-family: var(--es-font);
  line-height: 1.6;
  box-sizing: border-box;
}
.scc-es *, .scc-es *::before, .scc-es *::after { box-sizing: border-box; }
.scc-es--bleed { overflow: hidden; overflow-x: clip; }
.scc-es__wrap { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }
.scc-es__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 2rem; }
.scc-es__titles { min-width: 0; }
.scc-es .scc-es__h {
  margin: 0; color: var(--es-teal-dark); font-family: var(--es-font);
  font-size: calc(clamp(1.6rem, 2.4vw, 2rem) * var(--ts, 1));
  font-weight: 700; line-height: 1.15; letter-spacing: -.02em;
  text-wrap: balance; overflow-wrap: anywhere; hyphens: auto;
}
.scc-es .scc-es__lead { margin: 1rem 0 0; max-width: 58ch; color: var(--es-text2); font-size: calc(1.05rem * var(--ts, 1)); line-height: 1.75; text-wrap: pretty; overflow-wrap: anywhere; }
.scc-es__actions { display: flex; align-items: center; gap: 1rem; flex: none; }
.scc-es .scc-es__all {
  display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; padding: .6rem 1.25rem;
  border: 1.5px solid var(--es-teal); border-radius: 5px; color: var(--es-teal); background: transparent;
  font: 600 calc(.95rem * var(--ts, 1))/1.2 var(--es-font); text-decoration: none;
  transition: background-color .25s var(--scc-ease, cubic-bezier(.22, 1, .36, 1));
}
.scc-es .scc-es__all:hover { background: var(--es-teal); color: #fff; }
.scc-es .scc-es__all svg { width: 14px; height: 14px; flex: none; }
.scc-es .scc-es__arr { display: none; gap: .5rem; }
.scc-es .scc-es__arr:not([hidden]) { display: flex; }
.scc-es .scc-es__arr button {
  width: 48px; height: 48px; padding: 0; border-radius: 5px; border: 1.5px solid var(--es-teal);
  background: transparent; color: var(--es-teal); display: grid; place-items: center; cursor: pointer;
  transition: background-color .25s var(--scc-ease, cubic-bezier(.22, 1, .36, 1));
}
.scc-es .scc-es__arr button:hover { background: var(--es-teal); color: #fff; }
.scc-es .scc-es__arr button:disabled { opacity: .45; cursor: default; background: transparent; color: var(--es-teal); }
.scc-es__row {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(16rem, 1fr); gap: 1.25rem;
  margin-top: 2rem; padding-bottom: .5rem; overflow-x: auto; scroll-snap-type: x proximity;
  scrollbar-color: var(--es-teal-light) var(--scc-warm-gray, #f0eeea); scrollbar-width: thin;
}
.scc-es--bleed .scc-es__row { width: calc(100% + ((100vw - 100%) / 2)); margin-right: calc((100% - 100vw) / 2); max-width: none; }
.scc-es .scc-es__row:focus-visible { outline: 3px solid var(--es-teal); outline-offset: 4px; border-radius: 4px; }
.scc-es .scc-es__card { display: block; min-width: 0; scroll-snap-align: start; color: inherit; text-decoration: none; }
.scc-es .scc-es__img { position: relative; display: block; border-radius: 10px; overflow: hidden; aspect-ratio: 4 / 3; background: linear-gradient(160deg, var(--es-teal-light), var(--es-teal-dark)); }
.scc-es .scc-es__img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.scc-es .scc-es__d {
  position: absolute; left: .75rem; top: .75rem; padding: .2rem .6rem; border-radius: 5px; background: #fff;
  text-align: center; font-weight: 700; font-size: calc(1.25rem * var(--ts, 1)); line-height: 1.1; color: var(--es-teal-dark);
}
.scc-es .scc-es__d small { display: block; font-size: calc(.875rem * var(--ts, 1)); letter-spacing: .08em; text-transform: uppercase; color: var(--es-magenta); font-weight: 700; }
.scc-es .scc-es__status {
  position: absolute; right: .75rem; top: .75rem; padding: .25rem .6rem; border-radius: 5px;
  background: var(--es-magenta); color: #fff; font-size: calc(.875rem * var(--ts, 1)); font-weight: 700; line-height: 1.2;
}
.scc-es .scc-es__card.is-canceled .scc-es__img img { filter: saturate(.55); }
.scc-es .scc-es__cat { display: block; margin-top: .9rem; font-size: calc(.9rem * var(--ts, 1)); color: var(--es-text2); overflow-wrap: anywhere; }
.scc-es .scc-es__t { margin: .2rem 0 0; font-family: var(--es-font); font-size: calc(1.2rem * var(--ts, 1)); font-weight: 600; line-height: 1.3; color: var(--es-teal-dark); overflow-wrap: anywhere; }
.scc-es .scc-es__card:hover .scc-es__t { text-decoration: underline; text-underline-offset: .2em; }
.scc-es .scc-es__meta { display: block; margin-top: .3rem; font-size: calc(.95rem * var(--ts, 1)); color: var(--es-text2); overflow-wrap: anywhere; }
.scc-es .scc-es__more {
  display: inline-flex; align-items: center; gap: .4rem; margin-top: .6rem; min-height: 44px;
  font-weight: 600; font-size: calc(1rem * var(--ts, 1)); color: var(--es-teal); text-decoration: underline; text-underline-offset: .3em;
}
.scc-es .scc-es__more svg { width: 14px; height: 14px; flex: none; }
.scc-es .scc-es__card:focus-visible { outline: 3px solid var(--es-teal); outline-offset: 3px; border-radius: 6px; }
.scc-es .scc-es__all:focus-visible, .scc-es .scc-es__arr button:focus-visible { outline: 3px solid var(--es-teal); outline-offset: 3px; }

@media (max-width: 1000px) { .scc-es__head { flex-wrap: wrap; } }
@media (max-width: 700px) {
  .scc-es { padding: 4rem 0; }
  .scc-es__wrap { padding: 0 1.25rem; }
  .scc-es__head { flex-direction: column; align-items: flex-start; gap: 1rem; }
  .scc-es__row { grid-auto-columns: max(14rem, calc(85vw - 3rem)); }
}
@media (hover: none) {
  .scc-es .scc-es__card:hover .scc-es__t { text-decoration: none; }
  .scc-es .scc-es__arr button:hover, .scc-es .scc-es__all:hover { background: transparent; color: var(--es-teal); }
}
@media (pointer: coarse) { .scc-es .scc-es__arr button { width: 52px; height: 52px; } }
@media (prefers-reduced-motion: reduce) { .scc-es * { transition: none !important; scroll-behavior: auto !important; } }
@media (forced-colors: active) {
  .scc-es .scc-es__arr button, .scc-es .scc-es__all { border: 1px solid ButtonText; }
  .scc-es .scc-es__d, .scc-es .scc-es__status { border: 1px solid CanvasText; }
}
@media print {
  .scc-es { padding: 2rem 0; background: #fff; }
  .scc-es .scc-es__arr { display: none; }
  .scc-es__row { display: block; overflow: visible; width: auto; margin-right: 0; }
  .scc-es .scc-es__card { display: inline-block; width: 48%; vertical-align: top; break-inside: avoid; }
  .scc-es .scc-es__card[href^="http"] .scc-es__more::after { content: " (" attr(href) ")"; font-size: .8em; word-break: break-all; }
}
