/* ══════════════════════════════════════════════════════════════════════
   Severín — Events section [severin_events]
   Recreates the original Elementor "Čo sa u nás deje" section:
   photo carousel left, list of upcoming events right, plus a modal
   with all upcoming events.
   ══════════════════════════════════════════════════════════════════════ */

.sev-ev,
.sev-ev-modal {
  --sev-gold: #c8a868;
  --sev-gold-deep: #a88848;
  --sev-ink: #1a1612;
  --sev-mute: #8a7e72;
  --sev-line: #d4cec4;
  --sev-sand: #e8e3da;
  --sev-cream: #faf7f1;
  --sev-ease: cubic-bezier(.22, 1, .36, 1);
  --sev-ff-d: 'Cormorant Garamond', Georgia, serif;
  --sev-ff-b: 'Outfit', system-ui, -apple-system, sans-serif;
  font-family: var(--sev-ff-b);
  color: var(--sev-ink);
  -webkit-font-smoothing: antialiased;
}
.sev-ev *, .sev-ev *::before, .sev-ev *::after,
.sev-ev-modal *, .sev-ev-modal *::before, .sev-ev-modal *::after { box-sizing: border-box; }

/* ── Section ─────────────────────────────────────────────────────── */
.sev-ev {
  position: relative;
  background: var(--sev-ev-bg, var(--sev-sand));
  padding: 100px 40px;
}
.sev-ev--fullbleed {             /* same full-width trick as the current HTML block */
  left: 50%;
  right: 50%;
  width: 100vw;
  margin-left: -50vw;
  margin-right: -50vw;
}
.sev-ev-inner {
  max-width: 1300px;
  margin: 0 auto;
}
/* Desktop: heading, photo and button stacked on the left (centred as a
   group against the list via the 1fr spacer rows), events on the right. */
.sev-ev-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-rows: 1fr auto auto auto 1fr;
  grid-template-areas:
    ".     list"
    "head  list"
    "media list"
    "cta   list"
    ".     list";
  column-gap: 50px;
}
.sev-ev-area         { min-width: 0; }
.sev-ev-area--head  { grid-area: head; }
.sev-ev-area--media { grid-area: media; }
.sev-ev-area--list  { grid-area: list; align-self: center; }
.sev-ev-area--cta   { grid-area: cta; }

/* ── Headings ────────────────────────────────────────────────────── */
.sev-ev .sev-ev-eyebrow,
.sev-ev-modal .sev-ev-eyebrow {
  margin: 0 0 16px;
  font-family: var(--sev-ff-b);
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--sev-mute);
}
.sev-ev .sev-ev-heading {
  margin: 0 0 16px;
  padding: 0;
  font-family: var(--sev-ff-d);
  font-size: 48px;
  font-weight: 300;
  line-height: 1.1em;
  letter-spacing: -1px;
  color: var(--sev-ink);
}
.sev-ev .sev-ev-intro {
  margin: 0;
  font-family: var(--sev-ff-b);
  font-size: 16px;
  font-weight: 300;
  line-height: 1.8em;
  color: var(--sev-mute);
}

/* ── Empty state ("Pripravujeme") ────────────────────────────────── */
.sev-ev-empty { text-align: center; }
.sev-ev-empty[hidden] { display: none; }
.sev-ev-empty .sev-ev-intro { max-width: 640px; margin: 0 auto 28px; }
.sev-ev-badge {
  display: inline-block;
  padding: 8px 16px;
  background: rgba(200, 168, 104, 0.08);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--sev-gold-deep);
}

/* ── Photo carousel ──────────────────────────────────────────────── */
.sev-ev-carousel {
  position: relative;
  margin-top: 20px;
}
.sev-ev-viewport {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: #ddd6ca;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}
.sev-ev-track {
  display: flex;
  height: 100%;
  will-change: transform;
}
.sev-ev-slide {
  position: relative;
  flex: 0 0 100%;
  height: 100%;
  overflow: hidden;
}
/* Photo always fills the frame, cropped from the centre. !important beats
   theme/Elementor rules like ".elementor img { height: auto }". */
.sev-ev .sev-ev-slide-img,
.sev-ev-modal .sev-ev-slide-img {
  position: absolute !important;
  inset: 0 !important;
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  margin: 0 !important;
  object-fit: cover !important;
  object-position: center center !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  opacity: 0;
  transition: opacity .6s var(--sev-ease);
  -webkit-user-drag: none;
}
.sev-ev .sev-ev-slide-img.is-loaded,
.sev-ev-modal .sev-ev-slide-img.is-loaded { opacity: 1; }

/* Branded card — shown when no photos are chosen in admin */
.sev-ev-ph {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  text-align: center;
  color: #f0ece4;
  background:
    radial-gradient(ellipse 70% 60% at 30% 20%, rgba(200,168,104,.16) 0%, transparent 70%),
    linear-gradient(160deg, #2a241d 0%, var(--sev-ink) 70%);
}
.sev-ev-ph::before {
  content: '';
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(200,168,104,.22);
  pointer-events: none;
}
.sev-ev-ph-corner { position: absolute; width: 16px; height: 16px; }
.sev-ev-ph-corner::before,
.sev-ev-ph-corner::after { content: ''; position: absolute; background: var(--sev-gold); }
.sev-ev-ph-corner::before { width: 16px; height: 1px; }
.sev-ev-ph-corner::after  { width: 1px; height: 16px; }
.sev-ev-ph-corner--tl { top: 24px; left: 24px; }
.sev-ev-ph-corner--tr { top: 24px; right: 24px; }
.sev-ev-ph-corner--tr::before, .sev-ev-ph-corner--tr::after { right: 0; }
.sev-ev-ph-corner--bl { bottom: 24px; left: 24px; }
.sev-ev-ph-corner--bl::before, .sev-ev-ph-corner--bl::after { bottom: 0; }
.sev-ev-ph-corner--br { bottom: 24px; right: 24px; }
.sev-ev-ph-corner--br::before, .sev-ev-ph-corner--br::after { bottom: 0; right: 0; }
.sev-ev-ph-inner { display: flex; flex-direction: column; align-items: center; max-width: 82%; }
.sev-ev-ph-eyebrow {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--sev-gold);
}
.sev-ev-ph-day {
  margin-top: 14px;
  font-family: var(--sev-ff-d);
  font-size: clamp(72px, 9vw, 128px);
  font-weight: 300;
  line-height: .9;
  color: var(--sev-gold);
}
.sev-ev-ph-month {
  font-family: var(--sev-ff-d);
  font-style: italic;
  font-size: clamp(24px, 2.6vw, 34px);
  font-weight: 400;
  line-height: 1.2;
}
.sev-ev-ph-title {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(200,168,104,.3);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: .02em;
  color: #cfc6b8;
}

/* ── Event list ──────────────────────────────────────────────────── */
.sev-ev .sev-ev-list,
.sev-ev-modal .sev-ev-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.sev-ev-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 24px;
  margin: 0;
  padding: 28px 0;
  border-bottom: 1px solid var(--sev-line);
  transition: transform .45s var(--sev-ease), padding .3s var(--sev-ease), background-color .4s;
}
.sev-ev-item::after {              /* gold line that grows on hover */
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--sev-gold);
  transition: width .45s var(--sev-ease);
}
/* Hover: row slides 6px right + gold line — in the section and the modal,
   on desktop and on phones (tap). The modal list clips sideways overflow. */
.sev-ev-item:hover { transform: translateX(6px); }
.sev-ev-item:hover::after { width: 100%; }

.sev-ev-when {
  flex: 0 0 100px;
  display: flex;
  flex-direction: column;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--sev-gold);
}
.sev-ev-body { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.sev-ev .sev-ev-title,
.sev-ev-modal .sev-ev-title {
  margin: 0 0 4px;
  padding: 0;
  font-family: var(--sev-ff-b);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.7em;
  letter-spacing: 0;
  text-transform: none;
  color: var(--sev-ink);
}
.sev-ev .sev-ev-desc,
.sev-ev-modal .sev-ev-desc {
  margin: 0;
  font-family: var(--sev-ff-b);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.6em;
  color: var(--sev-mute);
}
.sev-ev-loc {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 10px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--sev-gold-deep);
}
.sev-ev-loc svg { flex-shrink: 0; }

/* ── CTA "Všetky nadchádzajúce eventy" ───────────────────────────── */
.sev-ev .sev-ev-cta,
.sev-ev .sev-ev-cta:hover,
.sev-ev .sev-ev-cta:focus,
.sev-ev .sev-ev-cta:active {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-top: 32px;
  padding: 18px 32px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: var(--sev-gold) !important;
  color: var(--sev-ink) !important;
  font-family: var(--sev-ff-b) !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
  letter-spacing: 1px !important;
  text-transform: uppercase !important;
  text-decoration: none !important;
  box-shadow: none !important;
  cursor: pointer;
  transition: background-color .3s var(--sev-ease), color .3s var(--sev-ease), gap .3s var(--sev-ease);
}
.sev-ev .sev-ev-cta:hover {
  background: var(--sev-ink) !important;
  color: var(--sev-gold) !important;
  gap: 20px;
}
.sev-ev .sev-ev-cta:focus-visible { outline: 2px solid var(--sev-ink) !important; outline-offset: 3px; }
.sev-ev-cta svg { flex-shrink: 0; transition: transform .3s var(--sev-ease); }

/* ══════════════════════════════════════════════════════════════════════
   Modal — all upcoming events
   ══════════════════════════════════════════════════════════════════════ */
.sev-ev-modal {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  opacity: 0;
  transition: opacity .35s var(--sev-ease);
}
.sev-ev-modal[hidden] { display: none; }
.sev-ev-modal.is-open { opacity: 1; }
html.sev-ev-lock,
html.sev-ev-lock body { overflow: hidden; }

.sev-ev-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 10, 8, 0.88);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}
.sev-ev-modal-dialog {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  width: min(1300px, calc(100% - 48px));
  height: min(860px, calc(100% - 48px));
  background: var(--sev-sand);
  box-shadow: 0 40px 100px rgba(0, 0, 0, .45);
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .45s var(--sev-ease), transform .45s var(--sev-ease);
}
.sev-ev-modal.is-open .sev-ev-modal-dialog { opacity: 1; transform: none; }
.sev-ev-modal-dialog:focus { outline: none; }

/* Close */
.sev-ev-modal .sev-ev-modal-close,
.sev-ev-modal .sev-ev-modal-close:hover,
.sev-ev-modal .sev-ev-modal-close:focus,
.sev-ev-modal .sev-ev-modal-close:active {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  padding: 0 !important;
  border: 1px solid rgba(26, 22, 18, .18) !important;
  border-radius: 0 !important;
  background: rgba(250, 247, 241, .7) !important;
  color: var(--sev-ink) !important;
  box-shadow: none !important;
  cursor: pointer;
  transition: background-color .25s, border-color .25s, transform .3s var(--sev-ease);
}
.sev-ev-modal .sev-ev-modal-close:hover {
  background: var(--sev-gold) !important;
  border-color: var(--sev-gold) !important;
}
.sev-ev-modal-close svg { transition: transform .3s var(--sev-ease); }
.sev-ev-modal-close:hover svg { transform: rotate(90deg); }
.sev-ev-modal .sev-ev-modal-close:focus-visible { outline: 2px solid var(--sev-gold) !important; outline-offset: 2px; }

/* Left: photo carousel fills the column */
.sev-ev-modal-media { position: relative; min-height: 0; background: var(--sev-ink); }
.sev-ev-carousel--modal { height: 100%; margin: 0; }
.sev-ev-carousel--modal .sev-ev-viewport { height: 100%; aspect-ratio: auto; background: #2a241d; }

.sev-ev-modal .sev-ev-arrow,
.sev-ev-modal .sev-ev-arrow:hover,
.sev-ev-modal .sev-ev-arrow:focus,
.sev-ev-modal .sev-ev-arrow:active {
  position: absolute;
  top: 50%;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  margin-top: -23px;
  padding: 0 !important;
  border: 1px solid rgba(255, 255, 255, .25) !important;
  border-radius: 0 !important;
  background: rgba(26, 22, 18, .55) !important;
  color: #fff !important;
  box-shadow: none !important;
  cursor: pointer;
  transition: background-color .25s, border-color .25s, color .25s;
}
.sev-ev-modal .sev-ev-arrow--prev { left: 20px; }
.sev-ev-modal .sev-ev-arrow--next { right: 20px; }
.sev-ev-modal .sev-ev-arrow:hover {
  background: var(--sev-gold) !important;
  border-color: var(--sev-gold) !important;
  color: var(--sev-ink) !important;
}
.sev-ev-modal .sev-ev-arrow:focus-visible { outline: 2px solid var(--sev-gold) !important; outline-offset: 2px; }

/* Right: scrollable list */
.sev-ev-modal-content {
  position: relative;
  min-height: 0;
  overflow-x: hidden;               /* never scroll sideways */
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 56px 56px 48px;
  scrollbar-width: thin;
  scrollbar-color: rgba(168, 136, 72, .5) transparent;
}
.sev-ev-modal-head { padding-right: 56px; margin-bottom: 8px; }
.sev-ev-modal .sev-ev-modal-title {
  margin: 0;
  padding: 0;
  font-family: var(--sev-ff-d);
  font-size: 44px;
  font-weight: 300;
  line-height: 1.1em;
  letter-spacing: -1px;
  color: var(--sev-ink);
}
.sev-ev-group { margin-top: 36px; }
.sev-ev-modal .sev-ev-month {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0;
  padding: 0 0 6px;
  font-family: var(--sev-ff-b);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--sev-gold-deep);
}
.sev-ev-month::after { content: ''; flex: 1 1 auto; height: 1px; background: rgba(200, 168, 104, .45); }
.sev-ev-modal .sev-ev-item { align-items: flex-start; padding: 22px 0; }
.sev-ev-modal .sev-ev-when { padding-top: 6px; }   /* line up with the title */
.sev-ev-note {                     /* sits between the modal heading and the events */
  margin: 24px 0 0;
  padding: 20px 24px;
  border-left: 2px solid var(--sev-gold);
  background: rgba(200, 168, 104, .08);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.7;
  color: var(--sev-mute);
}

/* ── Responsive ──────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .sev-ev { padding: 60px 30px; }
  /* Tablet & phone: heading → photo → events → button */
  .sev-ev-layout {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto;
    grid-template-areas: "head" "media" "list" "cta";
  }
  .sev-ev-area--list { align-self: stretch; margin-top: 16px; }
  .sev-ev .sev-ev-heading { font-size: 38px; }
}

@media (max-width: 900px) {
  .sev-ev-modal-dialog {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
    width: 100%;
    height: 100%;
    height: 100dvh;                 /* visible screen height (mobile toolbars) */
    max-height: 100%;
    overflow: hidden;
  }
  .sev-ev-modal-media { height: 34vh; height: 34svh; min-height: 180px; max-height: 340px; }
  .sev-ev-modal-content { padding: 28px 24px calc(32px + env(safe-area-inset-bottom, 0px)); }
  .sev-ev-modal-head { padding-right: 0; }
  .sev-ev-modal .sev-ev-modal-title { font-size: 32px; }
  .sev-ev-modal .sev-ev-modal-close,
  .sev-ev-modal .sev-ev-modal-close:hover,
  .sev-ev-modal .sev-ev-modal-close:focus { top: 12px; right: 12px; background: rgba(250, 247, 241, .9) !important; }
  .sev-ev-modal .sev-ev-arrow { width: 40px; height: 40px; margin-top: -20px; }
  .sev-ev-modal .sev-ev-arrow--prev { left: 12px; }
  .sev-ev-modal .sev-ev-arrow--next { right: 12px; }
}

@media (max-width: 767px) {
  .sev-ev { padding: 48px 20px; }
  .sev-ev-area--list { margin-top: 8px; }
  .sev-ev .sev-ev-heading { font-size: 30px; }
  .sev-ev-item { gap: 16px; align-items: flex-start; }
  .sev-ev-when { flex-basis: 80px; padding-top: 4px; }
  .sev-ev .sev-ev-title, .sev-ev-modal .sev-ev-title { font-size: 17px; line-height: 1.5em; }
  .sev-ev .sev-ev-cta { width: 100%; justify-content: center; }
  .sev-ev-modal .sev-ev-item { gap: 16px; padding: 18px 0; }
  .sev-ev-modal .sev-ev-when { flex-basis: 64px; font-size: 12px; letter-spacing: .8px; }
}

@media (prefers-reduced-motion: reduce) {
  .sev-ev-track,
  .sev-ev-item,
  .sev-ev-modal,
  .sev-ev-modal-dialog,
  .sev-ev-slide-img { transition: none !important; }
}
