/* SCÜ Erasmus+ Events • designed to inherit Blocksy / SCÜ global palette and font */
:root {
  --scue-blue: var(--theme-palette-color-1, #3a5da5);
  --scue-navy: var(--theme-palette-color-4, #102136);
  --scue-royal: #17357f;
  --scue-accent: #ef3e5a;
  --scue-paper: var(--theme-palette-color-7, #f7fafd);
  --scue-ink-soft: #63718a;
  --scue-stroke: rgba(33, 58, 160, .11);
  --scue-shadow: 0 12px 36px rgba(17, 35, 73, .075);
}
.scue-events-widget,
.scue-page {
  font-family: inherit;
  font-size: inherit;
  color: var(--scue-navy);
  box-sizing: border-box;
}
.scue-events-widget *, .scue-page * { box-sizing: border-box; }
.scue-events-widget a, .scue-page a { text-decoration: none; }
.scue-events-widget a:focus-visible, .scue-events-widget button:focus-visible,
.scue-page a:focus-visible, .scue-page button:focus-visible, .scue-page select:focus-visible {
  outline: 3px solid #ffbf36;
  outline-offset: 3px;
}
.scue-events-widget {
  width: 100%; max-width: auto;
  position: static; left: auto; transform: none;
  margin: 20px 0 28px; padding: 28px;
  background: #fff;
  border: 1px solid var(--scue-stroke);
  border-radius: 22px;
  box-shadow: 0 10px 28px rgba(20,38,86,.045);
}
.scue-widget-header { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 18px; margin-bottom: 24px; }
.scue-kicker { display: block; margin: 0 0 7px; color: var(--scue-accent); font-size: 14px; font-weight: 500; letter-spacing: .01em; line-height: 1.5; }
.scue-widget-intro h2, .scue-archive-head h1, .scue-detail-head h1 {
  color: var(--scue-royal); margin: 0; font-weight: 600; letter-spacing: -.02em; line-height: 1.2;
}
.scue-widget-intro h2 { font-size: 26px; }
.scue-widget-intro p { margin: 7px 0 0; font-size: 14px; color: var(--scue-ink-soft); line-height: 1.5; }
.scue-widget-actions { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.scue-see-all { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 42px; padding: 11px 17px; border-radius: 9px; background: #17357f; color: #fff !important; font-size: 14px; font-weight: 500; white-space: nowrap; transition: background .25s ease; }
.scue-see-all:hover { background: #ef3e5a; color: #fff !important; }
.scue-see-all svg { width: 17px; height: 17px; }
.scue-widget-controls { display: flex; align-items: center; gap: 9px; }
.scue-slide-count { font-size: 12px; font-weight: 600; min-width: 50px; color: #7c879c; font-variant-numeric: tabular-nums; }
.scue-nav {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; padding: 0;
  border: 1px solid var(--scue-stroke); border-radius: 11px;
  background: #f6f8fd; color: var(--scue-royal);
  cursor: pointer; transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.scue-nav:hover { background: var(--scue-royal); border-color: var(--scue-royal); color: #fff; }
.scue-nav svg { width: 17px; height: 17px; }
.scue-viewport { overflow-x: auto; overflow-y: hidden; scrollbar-width: none; scroll-snap-type: x mandatory; scroll-behavior: smooth; overscroll-behavior-x: contain; border-radius: 16px; }
.scue-viewport::-webkit-scrollbar { display:none; }
.scue-track { display: flex; align-items: stretch; gap: 18px; }
/* Compact poster sizing: about 205–240px wide, like the university home event cards. */
.scue-events-widget .scue-event-card { flex: 0 0 clamp(205px, calc((100% - 72px)/5), 240px); min-width: 0; scroll-snap-align: start; }
.scue-event-card { margin: 0; padding: 0; min-width: 0; }
.scue-card-link { display: block; color: inherit !important; height: 100%; border-radius: 15px; overflow: hidden; }
.scue-card-image {
  position: relative; isolation: isolate; overflow: hidden;
  aspect-ratio: 210 / 297; width: 100%;
  background: #eef1f7; border: 1px solid var(--scue-stroke);
  border-radius: 15px; box-shadow: 0 5px 18px rgba(16,33,54,.07);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.scue-card-link:hover .scue-card-image { border-color: rgba(58,93,165,.55); box-shadow: 0 12px 32px rgba(16,33,54,.14); }
.scue-poster-img { display: block; height: 100%; width: 100%; max-width: 100%; object-fit: contain; object-position: center; }
.scue-card-category {
  position: absolute; z-index: 3; top: 13px; left: 13px;
  display: inline-block; max-width: calc(100% - 26px);
  padding: 7px 10px 6px; border-radius: 8px; background: rgba(255,255,255,.95);
  color: #17357f; font-size: 11px; font-weight: 600; letter-spacing: .015em;
  line-height: 1.35; overflow-wrap: anywhere; box-shadow: 0 3px 15px rgba(14,29,61,.12);
}
.scue-card-shade {
  position: absolute; inset: 31% 0 0; z-index: 1; pointer-events: none;
  background: linear-gradient(to bottom, transparent 0%, rgba(11,26,53,.10) 18%, rgba(10,24,50,.80) 57%, rgba(10,24,50,.98) 100%);
}
.scue-card-info { position: absolute; z-index: 2; inset: auto 0 0; padding: 42px 13px 13px; color: white; }
.scue-card-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; margin: 0 0 8px; }
.scue-card-meta span { display: inline-flex; align-items: center; gap: 4px; padding: 4px 6px; border: 1px solid rgba(255,255,255,.23); border-radius: 7px; background: rgba(255,255,255,.13); color: #fff; font-size: 10px; font-weight: 600; line-height: 1.3; }
.scue-card-meta svg { width: 13px; height: 13px; }
.scue-event-card .scue-card-info h3 { margin: 0 0 9px !important; padding: 0; color: white !important; font-size: 14px; font-weight: 600; letter-spacing: -.015em; line-height: 1.35; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
.scue-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 8px; border-top: 1px solid rgba(255,255,255,.18); }
.scue-card-footer > span:first-child { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1; overflow: hidden; min-width: 0; font-size: 10px; font-weight: 550; color: #e6edff; line-height: 1.35; }
.scue-card-footer > span:first-child svg { width: 14px; height: 14px; flex: 0 0 14px; }
.scue-card-footer .scue-card-more { flex: 0 0 24px; width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; border-radius: 8px; color: #fff; background: rgba(255,255,255,.15); }
.scue-card-footer .scue-card-more svg { width: 17px; height: 17px; }
.scue-poster-placeholder { width: 100%; height: 100%; padding: 30px; display: flex; flex-direction: column; align-items: center; justify-content: center; background: linear-gradient(155deg,#003399,#214eb5 65%,#0072bc); color: white; text-align: center; }
.scue-poster-placeholder .scue-placeholder-circle { display: flex; justify-content: center; align-items:center; width: 76px; height: 76px; margin-bottom: 17px; border: 1px solid rgba(255,255,255,.45); background: rgba(255,255,255,.12); border-radius: 20px; }
.scue-poster-placeholder .scue-placeholder-circle svg { width: 35px; height: 35px; }
.scue-poster-placeholder strong { font-size: 30px; font-weight: 600; letter-spacing: -.02em; }
.scue-poster-placeholder small { font-size: 12px; letter-spacing: .3em; font-weight: 600; }
.scue-empty { display: flex; align-items: center; gap: 16px; min-height: 108px; padding: 22px; border: 1px dashed #cbd5e6; background: #f7f9fd; border-radius: 15px; }
.scue-empty-icon { display: inline-flex; flex: 0 0 48px; width: 48px; height: 48px; justify-content: center; align-items: center; border-radius: 14px; background: #e8edfa; color: var(--scue-royal); }
.scue-empty strong { display: block; margin: 0 0 5px; color: var(--scue-royal); font-size: 15px; }
.scue-empty p { margin: 0; color: var(--scue-ink-soft); font-size: 13px; line-height: 1.5; }
/* Dedicated pages: Blocksy header/footer are provided by the active theme */
.scue-page { min-height: 65vh; width: 100%; padding: 38px 20px 85px; background: #f3f6fb; }
.scue-page-inner { max-width: 1290px; width: 100%; margin: 0 auto; }
.scue-archive-surface { background: #fff; border: 1px solid rgba(33,58,160,.08); border-radius: 20px; padding: 28px; box-shadow: 0 10px 28px rgba(20,38,86,.045); }
.scue-results { min-height: 110px; transition: opacity .18s ease; }
.scue-is-loading .scue-results { opacity: .42; pointer-events: none; }
.scue-breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; font-size: 12px; color: #8490a3; margin: 0 0 28px; }
.scue-breadcrumb a { color: var(--scue-royal); font-weight: 600; }
.scue-breadcrumb span[aria-current] { max-width: 420px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scue-detail-head { margin: 0 0 30px; max-width: 920px; }
.scue-detail-head h1 { font-size: clamp(26px,3vw,32px); }
.scue-detail-chips { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 8px; }
.scue-detail-chip { display: inline-flex; align-items: center; padding: 7px 12px; border-radius: 8px; background: #e9eefb; color: #17357f; font-weight: 700; font-size: 12px; line-height: 1.3; }
.scue-detail-chip.scue-chip-muted { background: #fff; border: 1px solid #e1e8f1; color: #5c6b83; }
.scue-detail-grid { display: grid; grid-template-columns: minmax(0, 275px) minmax(0, 1fr); gap: 30px; align-items: start; }
.scue-detail-poster { margin: 0; background: #fff; border-radius: 20px; overflow: hidden; border: 1px solid var(--scue-stroke); box-shadow: var(--scue-shadow); }
.scue-detail-poster a { display: block; }
.scue-detail-poster .scue-poster-img, .scue-detail-poster .scue-poster-placeholder { aspect-ratio: 210/297; width: 100%; height: auto; object-fit: contain; background: #eef1f7; }
.scue-poster-hint { margin: 10px 0 0; text-align: center; font-size: 12px; color: #8190a3; }
.scue-detail-main-col { min-width: 0; }
.scue-facts-panel, .scue-description-panel { background: #fff; border: 1px solid var(--scue-stroke); border-radius: 19px; box-shadow: var(--scue-shadow); padding: 28px 30px; margin: 0 0 20px; }
.scue-facts-panel-head { display: flex; gap: 18px; align-items: center; margin-bottom: 16px; }
.scue-facts-panel h2, .scue-description-panel h2 { margin: 0; color: var(--scue-royal); font-size: 20px; line-height: 1.3; font-weight: 600; }
.scue-facts-line { height: 1px; flex: 1; background: #e8edf4; }
.scue-fact-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 16px; }
.scue-fact { display: flex; align-items: flex-start; gap: 12px; padding: 17px 0; border-bottom: 1px solid #edf1f7; min-width: 0; }
.scue-fact-icon { display: flex; align-items: center; justify-content: center; flex: 0 0 39px; width: 39px; height: 39px; border-radius: 11px; color: #3059ad; background: #edf2fd; }
.scue-fact-icon svg { width: 18px; height: 18px; }
.scue-fact div > span:first-child { display: block; margin: 1px 0 4px; font-size: 11px; font-weight: 700; color: #7b879c; }
.scue-fact strong { display: block; color: #17357f; font-size: 13px; line-height: 1.45; font-weight: 600; overflow-wrap: anywhere; }
.scue-fact small { display: block; margin-top: 3px; font-size: 11px; color: #8692a8; line-height: 1.5; overflow-wrap: anywhere; }
.scue-detail-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.scue-action-btn { display: inline-flex; gap: 8px; align-items: center; justify-content: center; min-height: 42px; padding: 11px 13px; border-radius: 10px; font-size: 12.5px; font-weight: 600; line-height: 1.35; transition: transform .2s, background .2s, border-color .2s; }
.scue-action-btn svg { width: 16px; height: 16px; flex: 0 0 16px; }
.scue-action-btn:hover { transform: translateY(-2px); }
.scue-action-primary { background: #3465d4; color: white !important; border: 1px solid #3465d4; }
.scue-action-primary:hover { background: #214cad; color: white !important; }
.scue-action-light { background: #f6f9ff; color: #17357f !important; border: 1px solid #d9e3f6; }
.scue-action-light:hover { background: #eaf0fc; color: #17357f !important; border-color: #adc3eb; }
.scue-description-panel h2 { margin-bottom: 16px; }
.scue-description-body { color: #49566c; font-size: 14px; line-height: 1.85; overflow-wrap: anywhere; }
.scue-description-body > :last-child { margin-bottom: 0; }
.scue-description-body p { margin: 0 0 1em; }
.scue-description-body a { color: #2256b9; text-decoration: underline; }
.scue-description-body ul, .scue-description-body ol { padding-left: 22px; }
.scue-back-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 9px; font-size: 13px; font-weight: 600; color: #17357f !important; }
.scue-back-link svg { width: 17px; height: 17px; }
.scue-archive-head { max-width: 760px; margin-bottom: 22px; }
.scue-archive-head h1 { font-size: 28px; }
.scue-archive-head p { font-size: 15px; line-height: 1.65; color: var(--scue-ink-soft); margin: 12px 0 0; }
.scue-archive-tools { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 25px; }
.scue-archive-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.scue-archive-tabs a { display: inline-block; padding: 11px 15px; background: #fff; border: 1px solid var(--scue-stroke); border-radius: 9px; color: #66758e; font-size: 13px; font-weight: 600; }
.scue-archive-tabs a:hover { border-color: #17357f; color: #17357f; }
.scue-archive-tabs a.is-active, .scue-archive-tabs a.is-active:hover { color: white; background: var(--scue-royal); border-color: var(--scue-royal); }
.scue-filter-form { display: flex; align-items: center; gap: 9px; }
.scue-filter-form label { font-size: 12px; font-weight: 600; color: var(--scue-royal); }
.scue-filter-form select { min-height: 41px; padding: 7px 12px; background: white; border: 1px solid #d7e0ee; border-radius: 9px; color: #17357f; font: inherit; font-size: 13px; }
/* Archive posters stay thumbnail-sized rather than expanding to entire columns. */
.scue-archive-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(195px, 225px)); gap: 18px; }
.scue-pagination { display: flex; flex-wrap: wrap; gap: 7px; justify-content: center; margin: 35px auto 0; }
.scue-pagination .page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 39px; min-height: 39px; padding: 5px 11px; background: white; color: #17357f; border: 1px solid var(--scue-stroke); border-radius: 9px; font-size: 13px; font-weight: 600; }
.scue-pagination .page-numbers.current { background: #17357f; color: white; }
.scue-archive-empty { margin-top: 20px; }
@media(max-width:1024px) {
  .scue-events-widget .scue-event-card { flex-basis: clamp(190px, calc((100% - 54px)/4), 228px); }
  .scue-detail-grid { grid-template-columns: minmax(0, 245px) minmax(0,1fr); gap: 20px; }
  .scue-fact-list { grid-template-columns: 1fr; }
  .scue-archive-grid { grid-template-columns: repeat(auto-fill, minmax(190px, 225px)); }
}
@media(max-width:640px) {
  .scue-events-widget { margin: 24px 0; padding: 22px 17px; border-radius: 18px; }
  .scue-widget-header { align-items: flex-start; gap: 13px; margin-bottom: 18px; }
  .scue-widget-intro h2 { font-size: 23px; }
  .scue-widget-intro p { font-size: 12.5px; }
  .scue-widget-actions { width: 100%; justify-content: space-between; gap: 10px; }
  .scue-see-all { width: 100%; }
  .scue-widget-controls { margin-left: auto; }
  .scue-viewport { border-radius: 13px; }
  .scue-track { gap: 12px; }
  .scue-events-widget .scue-event-card { flex-basis: min(75%, 228px); }
  .scue-event-card .scue-card-info h3 { font-size: 14px; }
  .scue-card-info { padding: 42px 13px 13px; }
  .scue-card-image, .scue-card-link { border-radius: 13px; }
  .scue-page { padding: 24px 12px 60px; }
  .scue-archive-surface { padding: 22px 17px; border-radius: 18px; }
  .scue-archive-head h1 { font-size: 23px; }
  .scue-breadcrumb { margin-bottom: 22px; }
  .scue-detail-head { margin-bottom: 22px; }
  .scue-detail-head h1 { font-size: 27px; }
  .scue-detail-grid { grid-template-columns: 1fr; gap: 21px; }
  .scue-detail-poster-col { max-width: 255px; width: 100%; margin: 0; }
  .scue-detail-poster { border-radius: 15px; }
  .scue-facts-panel, .scue-description-panel { padding: 23px 19px; border-radius: 16px; }
  .scue-fact-list { grid-template-columns: 1fr; }
  .scue-action-btn { flex: 1 1 auto; }
  .scue-archive-grid { grid-template-columns: min(235px, 100%); gap: 15px; max-width: none; margin: 0; }
  .scue-archive-tools { align-items: stretch; }
  .scue-filter-form { width: 100%; justify-content: space-between; }
  .scue-filter-form select { flex: 1; max-width: 75%; }
  .scue-archive-tabs { width: 100%; }
  .scue-archive-tabs a { flex: 1 1 0; padding: 10px 7px; font-size: 11px; text-align: center; }
}
@media(min-width:641px) and (max-width:760px) {
  .scue-archive-grid { grid-template-columns: repeat(2,minmax(0,225px)); }
  .scue-detail-grid { grid-template-columns: 1fr; }
  .scue-detail-poster-col { max-width: 255px; }
}
@media(prefers-reduced-motion:reduce) {
  .scue-viewport { scroll-behavior: auto; }
  .scue-events-widget *, .scue-page * { transition: none !important; animation: none !important; }
}
.scue-widget-controls[hidden] { display: none !important; }

/* Scope all layout overrides to the widget's actual WordPress shortcode block.
   The old 50%-translate centering caused horizontal drift on the live home page. */
body .wp-block-shortcode:has(> .scue-events-widget) {
  max-width: none !important;
  width: 100% !important;
  box-sizing: border-box;
}
body .wp-block-shortcode > .scue-events-widget {
  margin-left: 0 !important;
  margin-right: 0 !important;
}
@media(max-width:640px) {
  .scue-events-widget { margin: 22px 0 28px; }
  .scue-widget-intro h2 { font-size: 22px; }
}


/* v1.5.0: single, centered poster per mobile carousel page. */
@media (max-width:640px) {
  .scue-events-widget .scue-viewport { width:100%; overflow-x:auto; }
  .scue-events-widget .scue-track { gap:0 !important; }
  .scue-events-widget .scue-event-card {
    flex:0 0 100% !important;
    width:100% !important;
    max-width:none !important;
    display:flex;
    justify-content:center;
    scroll-snap-align:start;
  }
  .scue-events-widget .scue-card-link { width:min(100%, 238px); flex:0 1 238px; }
}

/* v1.5.0: uniformly distribute archive columns; center poster(s) even if few records. */
.scue-page .scue-archive-grid {
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  align-items:stretch;
  gap:18px;
  width:100%;
}
.scue-page .scue-archive-grid > .scue-event-card {
  flex:0 1 238px;
  width:min(100%, 238px);
  max-width:238px;
}
@media (max-width:640px) {
  .scue-page .scue-archive-grid { gap:20px; }
  .scue-page .scue-archive-grid > .scue-event-card { margin-inline:auto; }
}

/* v1.5.0: dates/times take priority, while category is secondary. */
.scue-events-widget .scue-card-category,
.scue-page .scue-card-category {
  top:10px; left:10px;
  padding:5px 8px;
  background:rgba(248,250,253,.9);
  color:#53627c;
  border:1px solid rgba(29,53,96,.12);
  box-shadow:none;
  font-size:10px;
  font-weight:500;
  line-height:1.3;
}
.scue-events-widget .scue-card-meta,
.scue-page .scue-card-meta { gap:5px; margin-bottom:9px; }
.scue-events-widget .scue-card-meta span,
.scue-page .scue-card-meta span {
  background:#fff;
  color:#17357f !important;
  border:1px solid rgba(23,53,127,.13);
  box-shadow:0 2px 9px rgba(4,16,40,.23);
  font-size:11px;
  font-weight:750;
  padding:5px 6px;
  line-height:1.3;
  white-space:nowrap;
}
.scue-events-widget .scue-card-meta svg,
.scue-page .scue-card-meta svg { width:13px; height:13px; flex:0 0 13px; }
.scue-page .scue-card-shade,
.scue-events-widget .scue-card-shade {
  background:linear-gradient(to bottom,transparent 0%,rgba(10,24,50,.18) 15%,rgba(10,24,50,.88) 62%,rgba(10,24,50,.98) 100%);
}
.scue-detail-when { display:flex; flex-wrap:wrap; gap:8px; margin-top:17px; }
.scue-detail-when-chip {
  display:inline-flex; align-items:center; gap:8px;
  padding:10px 13px; border-radius:9px;
  background:#17357f; color:#fff;
  font-size:14px; font-weight:700; line-height:1.3;
  font-variant-numeric:tabular-nums;
}
.scue-detail-when-chip svg { width:17px; height:17px; flex:0 0 17px; }
.scue-detail-head .scue-detail-chips { margin-top:11px; gap:6px; }
.scue-detail-head .scue-detail-chip.scue-chip-muted {
  padding:5px 9px; border:1px solid #e1e6ee;
  background:#f7f9fc; color:#68758b;
  font-size:11px; font-weight:500;
}
