/* =============================================================================
   LFGC EVENTS ARCHIVE
   Actividades y Eventos listing page — matches Figma node 569:21507
   ============================================================================= */

/* ── Page wrapper ─────────────────────────────────────────────────────────── */

.lfgc-progress-bar {
  background: var(--lfgc-ev-magenta);
  height: 3px;
  left: 0;
  opacity: 0;
  pointer-events: none;
  position: absolute;
  right: 0;
  top: 0;
  z-index: 10;
}

.lfgc-events-archive__wrapper {
  transition: opacity 0.2s ease;
}

.lfgc-events-archive__wrapper--hidden {
  opacity: 0;
  pointer-events: none;
}

.lfgc-events-archive {
  background: var(--lfgc-ev-bg);
  padding: 80px 20px 100px;
  position: relative;
  width: 100%;
}

.lfgc-events-archive__inner {
  display: flex;
  flex-direction: column;
  margin: 0 auto;
  max-width: 1552px;
  padding: 0;
  width: 100%;
}

/* ── Section title ────────────────────────────────────────────────────────── */

.lfgc-events-archive__title {
  color: var(--lfgc-ev-charcoal);
  font-family: 'Area_Extended_Black';
  font-size: clamp(28px, 2.5vw, 40px);
  font-weight: 900;
  letter-spacing: 0.26em;
  line-height: 1.17;
  margin: 0 0 40px;
  text-transform: uppercase;
}

/* ── Category filter bar ──────────────────────────────────────────────────── */

.lfgc-events-filter {
  display: flex;
  gap: 40px;
  align-items: center;
  margin-bottom: 80px;
  overflow-x: auto;
}

.lfgc-events-filter__item {
  font-family: 'Area_Extended_Bold', sans-serif;
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0.12em;
  line-height: 0.887;
  color: var(--lfgc-ev-charcoal);
  padding: 17px 0 21px;
  display: inline-block;
  border: none;
  border-bottom: 3px solid transparent;
  background-color: transparent;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
  white-space: nowrap;
}

.lfgc-events-filter__item:hover {
  color: var(--lfgc-ev-magenta);
}

.lfgc-events-filter__item.is-active {
  border-bottom-color: var(--lfgc-ev-magenta);
  color: var(--lfgc-ev-charcoal);
}

/* ── Events grid ──────────────────────────────────────────────────────────── */

.lfgc-events-grid {
  column-gap: var(--lfgc-ev-gap-col);
  display: grid;
  grid-template-columns: 1fr 1fr;
  row-gap: var(--lfgc-ev-gap-row);
}

/* ── Event card ───────────────────────────────────────────────────────────── */

.lfgc-event-card {
  display: flex;
  flex-direction: column;
  gap: 40px;
  margin-top: 14px; /* compensate for badge overflow */
  position: relative;
}

/* ── Hero image ───────────────────────────────────────────────────────────── */

.lfgc-event-card__image {
  /* aspect-ratio: 4 / 5; */
  aspect-ratio: 1; /* 4:5 is not supported in Safari as of this writing, so using the equivalent 1:1.25 to ensure consistent cropping across browsers */
  flex-shrink: 0;
  overflow: hidden;
  position: relative;
  width: 100%;
}

.lfgc-event-card__img {
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.lfgc-event-card__img--placeholder {
  background: #c8c8c8;
  height: 100%;
  width: 100%;
}

.lfgc-event-card__overlay {
  background: rgba(0, 0, 0, 0.1);
  inset: 0;
  pointer-events: none;
  position: absolute;
}

/* ── Organizer badge ──────────────────────────────────────────────────────── */

.lfgc-event-card__badge {
  background: var(--lfgc-ev-white);
  height: 87px;
  left: 32px;
  overflow: hidden;
  position: absolute;
  top: -14px; /* relative to card top — floats above the image */
  width: 87px;
  z-index: 2;
}

.lfgc-event-card__badge-img {
  display: block;
  height: 100%;
  object-fit: contain;
  width: 100%;
}

/* ── Card content area ────────────────────────────────────────────────────── */

.lfgc-event-card__content {
  display: flex;
  flex-direction: column;
  gap: 27px;
}

/* ── Header: date + title row ─────────────────────────────────────────────── */

.lfgc-event-card__header {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.lfgc-event-card__date-large {
  color: var(--lfgc-ev-magenta);
  font-size: 22px;
  font-family: 'Area_Extended_Regular', sans-serif;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.17;
  margin: 0;
  padding: 4px 0;
  text-transform: uppercase;
}

.lfgc-event-card__toggle {
  align-items: center;
  background: none;
  border: 0;
  color: var(--lfgc-ev-charcoal);
  cursor: pointer;
  display: flex;
  gap: 20px;
  justify-content: space-between;
  padding: 0;
  text-align: left;
  width: 100%;
}

.lfgc-event-card__toggle:disabled {
  cursor: default;
}

.lfgc-event-card__title {
  color: var(--lfgc-ev-charcoal);
  display: block;
  font-family: 'Area_Extended_SemiBold', sans-serif;
  font-size: clamp(22px, 1.8vw, 30px);
  line-height: 1.17;
  text-transform: uppercase;
}

.lfgc-event-card__arrow {
  color: var(--lfgc-ev-charcoal);
  display: flex;
  flex-shrink: 0;
  height: 47px;
  transition: transform 0.3s ease;
  width: 47px;
}

.lfgc-event-card__toggle[aria-expanded='true'] .lfgc-event-card__arrow {
  transform: rotate(180deg);
}

/* ── Accordion description ────────────────────────────────────────────────── */

.lfgc-event-card__description {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}

/* JS sets max-height to scrollHeight; hidden attribute is toggled via JS */
.lfgc-event-card__description[hidden] {
  display: block; /* override browser default so transition works */
  max-height: 0;
  visibility: hidden;
}

.lfgc-event-card__description.is-open {
  visibility: visible;
}

.lfgc-event-card__description-inner {
  color: var(--lfgc-ev-charcoal);
  font-size: 20px;
  line-height: 1.6;
  padding-bottom: 8px;
}

.lfgc-event-card__description-inner p:last-child {
  margin-bottom: 0;
}

/* ── Metadata pills ───────────────────────────────────────────────────────── */

.lfgc-event-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.lfgc-event-card__pill {
  align-items: center;
  background: var(--lfgc-ev-magenta);
  color: var(--lfgc-ev-white);
  display: inline-flex;
  font-family: 'Area_Extended_Regular', sans-serif;
  font-size: 14px;
  font-weight: 500;
  gap: 8px;
  line-height: 1.53;
  padding: 10px 18px;
}

.lfgc-event-card__pill--location {
  align-items: center;
  display: inline-flex;
  gap: 8px;
}

.lfgc-event-card__pill-icon {
  flex-shrink: 0;
  height: 20px;
  width: 20px;
}

/* ── Organizer line ───────────────────────────────────────────────────────── */

.lfgc-event-card__organizer {
  color: var(--lfgc-ev-charcoal);
  font-family: 'Area_Extended_Regular', sans-serif;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.53;
  margin: 0;
}

/* ── Navigation ───────────────────────────────────────────────────────────── */

.lfgc-events-nav {
  margin-top: 48px;
}

/* Load more */
.lfgc-events-nav--load-more {
  display: flex;
  justify-content: center;
  padding: 19px 0;
}

.lfgc-events-load-more {
  align-items: center;
  border: 1px solid var(--lfgc-ev-charcoal);
  color: var(--lfgc-ev-charcoal);
  display: inline-flex;
  font-family: 'Area_Extended_Bold', sans-serif;
  font-size: 14px;
  font-weight: 400;
  gap: 9px;
  height: 55px;
  justify-content: center;
  letter-spacing: 4.64px;
  min-width: 180px;
  padding: 18px 18px;
  text-decoration: none;
  text-transform: uppercase;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease;
}

.lfgc-events-load-more:hover {
  background: var(--lfgc-ev-charcoal);
  color: var(--lfgc-ev-white);
}

/* Prev / Next */
.lfgc-events-nav--prev-next {
  display: flex;
  gap: 24px;
  justify-content: center;
}

.lfgc-events-nav__btn {
  border-bottom: 1px solid currentColor;
  color: var(--lfgc-ev-charcoal);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding-bottom: 2px;
  text-decoration: none;
  text-transform: uppercase;
  transition: color 0.2s ease;
}

.lfgc-events-nav__btn:hover {
  color: var(--lfgc-ev-magenta);
}

/* Prev / Next — image buttons (matches operator / blog style) */
.lfgc-events-prev-next {
  margin-top: 48px;
}

.lfgc-events-prev-next__inner {
  align-items: center;
  display: flex;
  gap: 20px;
  justify-content: space-between;
}

.lfgc-events-prev-next__button {
  align-items: center;
  cursor: pointer;
  display: inline-flex;
  height: 48px;
  justify-content: center;
  text-decoration: none;
  transition: transform 0.3s ease;
  width: 48px;
}

.lfgc-events-prev-next__button:hover:not(.lfgc-events-prev-next__button--disabled) {
  transform: scale(1.1);
}

.lfgc-events-prev-next__button--disabled {
  cursor: not-allowed;
  opacity: 0.3;
}

.lfgc-events-prev-next__arrow {
  display: block;
  height: 48px;
  object-fit: contain;
  width: 48px;
}

.lfgc-events-prev-next__counter {
  color: var(--lfgc-ev-charcoal);
  font-family:
    'Zalando Sans Expanded',
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    sans-serif;
  font-size: 14px;
  font-weight: 500;
  min-width: 60px;
  text-align: center;
}

/* Pagination */
.lfgc-events-nav--pagination .page-numbers {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: center;
}

.lfgc-events-nav--pagination .page-numbers li a,
.lfgc-events-nav--pagination .page-numbers li span {
  align-items: center;
  border: 1px solid var(--lfgc-ev-charcoal);
  color: var(--lfgc-ev-charcoal);
  display: inline-flex;
  font-size: 13px;
  font-weight: 700;
  height: 40px;
  justify-content: center;
  letter-spacing: 0.04em;
  min-width: 40px;
  padding: 0 8px;
  text-decoration: none;
  text-transform: uppercase;
  transition:
    background 0.2s ease,
    color 0.2s ease;
}

.lfgc-events-nav--pagination .page-numbers li a:hover,
.lfgc-events-nav--pagination .page-numbers li span.current {
  background: var(--lfgc-ev-charcoal);
  color: var(--lfgc-ev-white);
}

/* ── Empty state ──────────────────────────────────────────────────────────── */

.lfgc-events-empty {
  padding: 60px 0;
  text-align: center;
}

.lfgc-events-empty p {
  color: var(--lfgc-ev-charcoal);
  font-size: 16px;
  opacity: 0.6;
}

/* ── Responsive ───────────────────────────────────────────────────────────── */

@media (max-width: 900px) {
  .lfgc-events-archive {
    padding: 60px 15px 80px;
  }

  .lfgc-events-archive__title {
    font-size: clamp(24px, 5vw, 32px);
    letter-spacing: 0.15em;
    margin-bottom: 40px;
  }

  .lfgc-events-filter {
    margin-bottom: 50px;
  }

  .lfgc-events-grid {
    grid-template-columns: 1fr;
    row-gap: 48px;
  }

  .lfgc-event-card__image {
    aspect-ratio: 3 / 2;
  }

  .lfgc-event-card__title {
    font-size: clamp(20px, 4vw, 26px);
  }
}

@media (max-width: 480px) {
  .lfgc-events-archive {
    padding-left: 12px;
    padding-right: 12px;
  }

  .lfgc-event-card__pill {
    font-size: 13px;
    padding: 8px 14px;
  }
}
