/* Interfața desktop pentru lista de evenimente.
   Cardul reutilizează markup-ul 2026 aprobat pe mobil; aici sunt definite
   exclusiv compoziția și densitatea pentru viewporturi >= 992px.

   Desktopul începe la 992px și păstrează aceeași compoziție la toate
   lățimile: un card informațional pe rând și rail sticky în dreapta. */

@media (min-width: 992px) {
  .event-listing-page {
    --evt-grid-gap: 20px;
    --evt-layout-gap: 20px;
    --evt-rail-width: 332px;
    --evt-feed-width: min(600px, calc(100% - var(--evt-rail-width) - var(--evt-layout-gap)));
    --evt-page-background: var(--color-surface-soft, #f8fafc);
    --evt-toolbar-height: 54px;
    --evt-sticky-top-gap: 12px;
    --listing-layout-gap: var(--evt-layout-gap);
    --listing-rail-width: var(--evt-rail-width);
    --listing-feed-width: var(--evt-feed-width);
    --listing-page-background: var(--evt-page-background);
    --listing-toolbar-height: var(--evt-toolbar-height);
    --listing-sticky-top-gap: var(--evt-sticky-top-gap);
    background: var(--evt-page-background);
  }

  .event-listing-page .header-hero-wrapper .container,
  .event-listing-page main.container {
    width: calc(100% - clamp(32px, 4vw, 64px));
    max-width: 1520px !important;
    margin-inline: auto;
  }

  .event-listing-page .header-hero-wrapper {
    position: relative;
    isolation: isolate;
    display: flex;
    align-items: center;
    height: 124px;
    min-height: 124px;
    margin-top: 0;
    padding-top: 0;
    overflow: hidden;
    background:
      radial-gradient(circle at 84% 18%, rgba(173, 112, 255, 0.4), transparent 25%),
      radial-gradient(circle at 61% 130%, rgba(236, 72, 153, 0.19), transparent 34%),
      radial-gradient(circle at 15% -35%, rgba(99, 102, 241, 0.17), transparent 35%),
      linear-gradient(118deg, #171027 0%, #281044 50%, #5625b7 100%) !important;
  }

  .event-listing-page .header-hero-wrapper::after {
    content: "";
    position: absolute;
    z-index: 2;
    right: 0;
    bottom: 0;
    left: 0;
    height: 1px;
    pointer-events: none;
    background: linear-gradient(90deg, transparent 4%, rgba(167, 139, 250, 0.56) 35%, rgba(244, 114, 182, 0.52) 68%, transparent 96%);
    box-shadow: 0 -4px 18px rgba(139, 92, 246, 0.22);
  }

  .event-listing-page .hero-section-wrapper {
    position: relative;
    z-index: 1;
    width: 100%;
    padding: 0;
    text-align: left !important;
  }

  .event-listing-page .hero-tags {
    display: none !important;
  }

  .event-listing-page main.container {
    padding-top: 18px !important;
    padding-bottom: 64px;
  }

  /* Toate cele trei intervale desktop păstrează feed-ul și instrumentele
     auxiliare în aceeași compoziție. Pragurile următoare schimbă densitatea,
     nu disponibilitatea calendarului sau a contribuției. */
  .event-listing-page .places-split-layout.events-split {
    display: grid !important;
    grid-template-columns: minmax(0, var(--evt-feed-width)) minmax(var(--evt-rail-width), 1fr);
    gap: var(--evt-layout-gap);
    align-items: start;
  }

  .event-listing-page .places-split-layout.events-split .feed-column {
    min-width: 0;
  }

  /* Fără `.split-active`: JS-ul de comutare a tab-urilor rescrie className-ul
     containerului și lasă doar `events-split`, deci o regulă care ar cere
     `.split-active` ar fi inertă după prima interacțiune. */
  .event-listing-page .places-split-layout.events-split .calendar-column {
    position: sticky;
    top: 70px;
    display: flex !important;
    flex-direction: column;
    gap: 18px;
    align-self: start;
    min-width: 0;
    min-height: 0;
    height: var(--evt-rail-available-height, calc(100vh - 70px));
    height: var(--evt-rail-available-height, calc(100dvh - 70px));
    max-height: none;
    margin-top: calc(-1 * var(--evt-toolbar-height) - var(--evt-sticky-top-gap));
    border: 0;
    background: var(--evt-page-background);
    box-shadow: none;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior-y: contain;
    touch-action: pan-y;
    /* Nu rezervăm o bandă goală în dreapta: muchia cardurilor trebuie să fie
       aceeași cu cea din listarea Promoții pe orice sistem de operare. */
    scrollbar-gutter: auto;
    scrollbar-width: none;
    scrollbar-color: transparent transparent;
    z-index: 10;
  }

  .event-listing-page .places-split-layout.events-split .calendar-column > * {
    flex: 0 0 auto;
  }

  .event-listing-page .places-split-layout.events-split .calendar-column.is-scrolling {
    scrollbar-color: rgba(99, 102, 241, 0.28) transparent;
  }

  .event-listing-page .places-split-layout.events-split .calendar-column::-webkit-scrollbar {
    width: 0;
  }

  .event-listing-page .places-split-layout.events-split .calendar-column::-webkit-scrollbar-track {
    background: transparent;
  }

  .event-listing-page .places-split-layout.events-split .calendar-column::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: transparent;
    transition: background-color 160ms ease;
  }

  .event-listing-page .places-split-layout.events-split
    .calendar-column.is-scrolling::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.28);
  }

  .event-listing-page .places-split-layout.events-split .mini-calendar-widget {
    box-sizing: border-box;
    width: 100%;
  }

  /* Aceleași două scurtături temporale din sheet-ul mobil/tabletă rămân
     permanent accesibile și lângă calendarul desktop. */
  .event-listing-page .event-calendar-presets {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
  }

  .event-listing-page .event-calendar-preset {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-width: 0;
    min-height: 38px;
    flex: 1 1 0;
    margin: 0;
    padding: 8px 12px;
    border: 1px solid #e2e6ef;
    border-radius: 999px !important;
    background: #f8f9fc;
    color: #5e687a;
    box-shadow: none;
    font-size: 0.76rem;
    font-weight: 750;
  }

  .event-listing-page .event-calendar-preset .lucide {
    width: 15px;
    height: 15px;
    flex: 0 0 auto;
  }

  .event-listing-page .event-calendar-preset:hover,
  .event-listing-page .event-calendar-preset:focus-visible {
    border-color: rgba(99, 102, 241, 0.42);
    background: #f1efff;
    color: #4f46e5;
  }

  .event-listing-page .event-calendar-preset.active {
    border-color: transparent;
    background: linear-gradient(135deg, #6558ee, #4f46e5) !important;
    color: #fff !important;
    box-shadow: 0 7px 17px rgba(79, 70, 229, 0.22) !important;
  }

  .event-listing-page .event-listing-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin: 8px 0 12px;
  }

  .event-listing-page .event-listing-heading h2 {
    margin: 0;
    color: #17142b;
    font-size: 1.3rem;
    font-weight: 820;
    line-height: 1.1;
    letter-spacing: -0.03em;
  }

  .event-listing-page .event-listing-heading span {
    color: #7c778c;
    font-size: 0.76rem;
    font-weight: 650;
  }

  .event-listing-page .places-split-layout.events-split #events-container {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
    gap: var(--evt-grid-gap);
    margin: 0;
  }

  .event-listing-page #events-container > .desktop-event-card-cell {
    width: auto !important;
    min-width: 0;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* Variantele istorice de conținut ocupă acum aceeași singură coloană. */
  .event-listing-page #events-container > .desktop-event-card-cell--wide {
    grid-column: span 1;
  }

  .event-listing-page #events-container > .desktop-event-card-cell--poster {
    grid-column: span 1;
  }

  /* Componenta comună „Nu uita” ocupă întregul feed chiar dacă grila va
     primi din nou mai multe coloane la un breakpoint desktop viitor. */
  .event-listing-page #events-container > .home-personal {
    grid-column: 1 / -1;
  }

  .event-listing-page .mini-calendar-widget,
  .event-listing-page .b2b-organizer-card {
    border-radius: 22px;
    border-color: #e2e6ef;
    box-shadow: 0 13px 34px rgba(31, 29, 69, 0.07);
  }

  .event-listing-page .events-desktop-loadmore-wrap {
    width: 100%;
    padding: 18px 0 4px;
  }

  .event-listing-page .events-desktop-loadmore-wrap .home-feed-loadmore {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 50px;
    border: 1px solid transparent;
    border-radius: 15px;
    background:
      linear-gradient(#fbf7fb, #fbf7fb) padding-box,
      linear-gradient(115deg, rgba(79, 70, 229, 0.48), rgba(236, 72, 153, 0.48)) border-box;
    color: #a21caf;
    font-size: 0.95rem;
    font-weight: 800;
    text-decoration: none;
  }

  .event-listing-page .events-desktop-loadmore-wrap .home-feed-loadmore.is-loading {
    opacity: 0.7;
    pointer-events: none;
  }

  .event-listing-page .calendar-rail-theatre-btn {
    position: relative;
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr) 34px;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: 76px;
    padding: 13px 14px;
    overflow: hidden;
    border: 1px solid rgba(124, 58, 237, 0.2);
    border-radius: 20px;
    background:
      radial-gradient(circle at 4% 0%, rgba(139, 92, 246, 0.13), transparent 42%),
      linear-gradient(135deg, #ffffff 0%, #f8f5ff 100%);
    color: #211a38;
    text-decoration: none;
    box-shadow: 0 8px 24px rgba(67, 45, 112, 0.08);
    transition:
      border-color 180ms ease,
      box-shadow 180ms ease,
      transform 180ms ease;
  }

  .event-listing-page .calendar-rail-theatre-btn .theatre-icon-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 15px;
    background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
    color: #ffffff;
    box-shadow: 0 6px 16px rgba(109, 40, 217, 0.24);
    transition: transform 200ms ease;
  }

  .event-listing-page .calendar-rail-theatre-btn .theatre-icon-badge .lucide {
    width: 22px;
    height: 22px;
  }

  .event-listing-page .calendar-rail-theatre-btn .theatre-shortcut-copy {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 3px;
  }

  .event-listing-page .calendar-rail-theatre-btn .theatre-shortcut-copy strong {
    font-size: 0.9rem;
    font-weight: 820;
    line-height: 1.2;
    letter-spacing: -0.015em;
  }

  .event-listing-page .calendar-rail-theatre-btn .theatre-shortcut-copy small {
    overflow: hidden;
    color: #746d82;
    font-size: 0.7rem;
    font-weight: 560;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .event-listing-page .calendar-rail-theatre-btn .theatre-chevron {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(124, 58, 237, 0.1);
    color: #7c3aed;
    transition: transform 180ms ease, background-color 180ms ease;
  }

  .event-listing-page .calendar-rail-theatre-btn .theatre-chevron .lucide {
    width: 17px;
    height: 17px;
  }

  .event-listing-page .calendar-rail-theatre-btn:hover {
    border-color: rgba(124, 58, 237, 0.38);
    box-shadow: 0 12px 28px rgba(79, 50, 132, 0.14);
    transform: translateY(-2px);
  }

  .event-listing-page .calendar-rail-theatre-btn:hover .theatre-icon-badge {
    transform: scale(1.06);
  }

  .event-listing-page .calendar-rail-theatre-btn:hover .theatre-chevron {
    background: rgba(124, 58, 237, 0.16);
    transform: translateX(3px);
  }

  .event-listing-page .calendar-rail-theatre-btn:focus-visible {
    outline: 3px solid rgba(124, 58, 237, 0.35);
    outline-offset: 3px;
  }

}

/* Desktop: componenta rămâne cardul orizontal aprobat pentru tabletă.
   Posterul are o lățime fixă apropiată de raportul clasic, iar informațiile
   folosesc restul spațiului fără să împingă rail-ul calendarului. */
@media (min-width: 992px) {
  .event-listing-page .header-hero-wrapper .container,
  .event-listing-page main.container {
    max-width: 1100px !important;
  }

  .event-listing-page #events-container > .desktop-event-card-cell {
    grid-column: span 1;
  }

}


@media (min-width: 992px) {
  /* Rail-ul este un container scrollabil și ar tăia umbrele exterioare la
     marginea viewportului. Cardurile păstrează bordurile, dar nu proiectează
     umbre în afara propriului contur. */
  .event-listing-page .places-split-layout.events-split .calendar-column > *,
  .event-listing-page .places-split-layout.events-split .calendar-column .newsletter-promo-card {
    box-shadow: none !important;
  }
}

@media (min-width: 992px) and (max-width: 1099.98px) {
  .event-listing-page .event-toolbar-trigger {
    padding-inline: 12px;
  }
}

@media (min-width: 992px) and (prefers-reduced-motion: reduce) {
  .event-listing-page .event-card--2026,
  .event-listing-page .event-card--2026 * {
    transition-duration: 0.01ms !important;
  }

}
