/* Greatwall Youth Event Layout v1.5.1 */

#events {
  --gw15-blue: #07368c;
  --gw15-orange: #c5632c;
  --gw15-text: #2d333b;
  --gw15-muted: #6c727b;
  --gw15-line: #ead9cc;

  background: #ffffff !important;
  padding: 64px 0 76px !important;
}

#events .gw15-original-hidden {
  display: none !important;
}

#events > .gw15-shell {
  display: block !important;
  width: min(1120px, calc(100% - 48px)) !important;
  max-width: 1120px !important;
  margin: 0 auto !important;
}

#events .gw15-header {
  max-width: 760px;
  margin: 0 0 34px;
}

#events .gw15-header .elementor-widget {
  margin: 0 0 6px !important;
  max-width: none !important;
}

#events .gw15-header h1,
#events .gw15-header h2,
#events .gw15-header h3 {
  color: var(--gw15-blue) !important;
  line-height: 1.16 !important;
  letter-spacing: -0.025em;
}

#events .gw15-header::after {
  content: "";
  display: block;
  width: 42px;
  height: 3px;
  margin-top: 12px;
  background: var(--gw15-orange);
  border-radius: 999px;
}

#events .gw15-grid {
  display: grid !important;
  grid-template-columns: minmax(0, 1.58fr) minmax(330px, .88fr) !important;
  gap: 48px !important;
  align-items: start !important;
}

#events .gw15-main,
#events .gw15-aside {
  min-width: 0 !important;
}

#events .gw15-section {
  margin: 0 0 30px;
}

#events .gw15-section:last-child {
  margin-bottom: 0;
}

#events .gw15-section h1,
#events .gw15-section h2,
#events .gw15-section h3,
#events .gw15-info h1,
#events .gw15-info h2,
#events .gw15-info h3 {
  color: var(--gw15-blue) !important;
  font-size: 27px !important;
  line-height: 1.2 !important;
  margin: 0 0 12px !important;
  letter-spacing: -0.02em;
}

#events .gw15-section p,
#events .gw15-section li,
#events .gw15-info p,
#events .gw15-info li {
  color: var(--gw15-text) !important;
  font-size: 15px !important;
  line-height: 1.68 !important;
}

#events .gw15-section ul,
#events .gw15-section ol,
#events .gw15-info ul,
#events .gw15-info ol {
  margin: 8px 0 18px !important;
  padding-left: 1.25rem !important;
}

#events .gw15-info-card {
  background: linear-gradient(180deg, #fffaf6 0%, #ffffff 100%);
  border: 1px solid #ecd3c0;
  border-radius: 18px;
  padding: 26px 28px 24px;
  box-shadow: 0 12px 28px rgba(22, 38, 65, .055);
}

#events .gw15-info-card .elementor-widget {
  max-width: none !important;
  width: 100% !important;
  margin: 18px 0 0 !important;
}

#events .gw15-info-card .elementor-button,
#events .gw15-info-card a.elementor-button {
  display: flex !important;
  width: 100% !important;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  padding: 13px 18px !important;
  background: var(--gw15-orange) !important;
  color: #ffffff !important;
  border-radius: 10px !important;
  font-weight: 700 !important;
  box-shadow: 0 8px 20px rgba(197, 99, 44, .18);
}

#events .gw15-poster {
  margin-top: 20px;
}

#events .gw15-poster .elementor-widget {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
}

#events .gw15-poster img {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  margin: 0 !important;
  border-radius: 12px !important;
  box-shadow: 0 12px 26px rgba(20, 35, 60, .075);
  outline: 1px solid rgba(7, 54, 140, .05);
}

@media (max-width: 980px) {
  #events .gw15-grid {
    grid-template-columns: minmax(0, 1.3fr) minmax(300px, .9fr) !important;
    gap: 30px !important;
  }
}

@media (max-width: 767px) {
  #events {
    padding: 38px 0 50px !important;
  }

  #events > .gw15-shell {
    width: calc(100% - 28px) !important;
  }

  #events .gw15-header {
    margin-bottom: 26px;
  }

  #events .gw15-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 26px !important;
  }

  #events .gw15-aside {
    order: 1;
  }

  #events .gw15-main {
    order: 2;
  }

  #events .gw15-info-card {
    padding: 21px 18px 19px;
    border-radius: 14px;
  }

  #events .gw15-section h1,
  #events .gw15-section h2,
  #events .gw15-section h3,
  #events .gw15-info h1,
  #events .gw15-info h2,
  #events .gw15-info h3 {
    font-size: 23px !important;
  }

  #events .gw15-section p,
  #events .gw15-section li,
  #events .gw15-info p,
  #events .gw15-info li {
    font-size: 15px !important;
  }
}


/* v1.5.2 — poster click-to-enlarge only */
#events .gw15-poster-zoomable {
  cursor: zoom-in !important;
  transition: transform .18s ease, box-shadow .18s ease;
}

#events .gw15-poster-zoomable:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 32px rgba(20, 35, 60, .12) !important;
}

.gw15-lightbox {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 28px;
  background: rgba(10, 16, 28, .88);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.gw15-lightbox.is-open {
  display: flex;
}

.gw15-lightbox-image {
  display: block;
  max-width: min(94vw, 1200px);
  max-height: 92vh;
  width: auto;
  height: auto;
  object-fit: contain;
  background: #fff;
  box-shadow: 0 24px 70px rgba(0,0,0,.35);
}

.gw15-lightbox-close {
  position: fixed;
  top: 18px;
  right: 24px;
  z-index: 1000000;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  background: rgba(255,255,255,.95);
  color: #1e2630;
  font-size: 34px;
  line-height: 42px;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0,0,0,.2);
}

html.gw15-lightbox-lock,
body.gw15-lightbox-lock {
  overflow: hidden !important;
}

@media (max-width: 767px) {
  .gw15-lightbox {
    padding: 14px;
  }

  .gw15-lightbox-image {
    max-width: 96vw;
    max-height: 90vh;
  }

  .gw15-lightbox-close {
    top: 10px;
    right: 10px;
  }
}


/* v1.5.3 — mobile header spacing/alignment only.
   Reference: match the visual rhythm of the “我们在做什么 · Mitä teemme” section.
   No desktop layout changes. */
@media (max-width: 767px) {
  #events .gw15-header {
    padding-left: 28px !important;
    padding-right: 10px !important;
  }

  /* Eyebrow -> main Chinese title gap */
  #events .gw15-header .elementor-widget:first-child {
    margin-bottom: 16px !important;
  }

  /* Chinese title -> Finnish title gap */
  #events .gw15-header .elementor-widget:nth-child(2) {
    margin-bottom: 14px !important;
  }

  /* Finnish title -> underline / info-card breathing room */
  #events .gw15-header::after {
    margin-top: 14px !important;
  }

  #events .gw15-header {
    margin-bottom: 34px !important;
  }
}


/* v1.5.4 — section top spacing only
   Make the distance from the previous section to
   “近期活动 · Tulevat tapahtumat” match the rhythm of
   “我们在做什么 · Mitä teemme”.
   All other layout stays unchanged. */
#events {
  min-height: 0 !important;
  height: auto !important;
  padding-top: 34px !important;
}

#events > .gw15-shell {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

@media (max-width: 767px) {
  #events {
    min-height: 0 !important;
    height: auto !important;
    padding-top: 34px !important;
  }

  #events > .gw15-shell {
    margin-top: 0 !important;
    padding-top: 0 !important;
  }
}


/* v1.5.5 — fix the actual gap BEFORE #events.
   v1.5.4 changed padding inside #events, but the visible blank space is
   produced by the surrounding Elementor layout before the #events section.
   Pull #events upward so the inter-section spacing matches the "Mitä teemme" section.
   No content or internal layout changes. */
#events {
  margin-top: -92px !important;
}

/* Keep a comfortable, consistent internal top inset after pulling the section upward. */
#events > .gw15-shell {
  padding-top: 34px !important;
}

/* Mobile Elementor has a larger blank gap, so compensate more there. */
@media (max-width: 767px) {
  #events {
    margin-top: -165px !important;
  }

  #events > .gw15-shell {
    padding-top: 34px !important;
  }
}


/* v1.5.6 — safety fix:
   Undo v1.5.5 negative margins which pulled #events over the previous section.
   Restore the event section to normal document flow so the section above is never clipped. */
#events {
  margin-top: 0 !important;
  transform: none !important;
}

#events > .gw15-shell {
  padding-top: 0 !important;
  margin-top: 0 !important;
}

@media (max-width: 767px) {
  #events {
    margin-top: 0 !important;
    transform: none !important;
  }

  #events > .gw15-shell {
    padding-top: 0 !important;
    margin-top: 0 !important;
  }
}


/* v1.5.7 — header spacing only
   Match the visual rhythm of:
   “我们在做什么 · Mitä teemme” -> “覆盖不同年龄和兴趣的社区活动”
   No change to section-to-section spacing. */

/* The first cloned widget in the event header is the eyebrow:
   “近期活动 · Tulevat tapahtumat”. Give it a larger bottom gap. */
#events .gw15-header > .elementor-widget:first-child {
  margin-bottom: 18px !important;
}

/* Keep the Chinese title and Finnish title comfortably separated. */
#events .gw15-header > .elementor-widget:nth-child(2) {
  margin-bottom: 12px !important;
}

/* Mobile uses the same proportional rhythm, slightly tighter. */
@media (max-width: 767px) {
  #events .gw15-header > .elementor-widget:first-child {
    margin-bottom: 16px !important;
  }

  #events .gw15-header > .elementor-widget:nth-child(2) {
    margin-bottom: 12px !important;
  }
}


/* v1.5.8 — move the whole event content slightly upward only.
   Keep the section itself in normal document flow; do not overlap/crop the previous section. */
#events > .gw15-shell {
  position: relative !important;
  top: -45px !important;
  margin-bottom: -45px !important;
}

/* Mobile: use a slightly smaller shift to avoid crowding the previous section. */
@media (max-width: 767px) {
  #events > .gw15-shell {
    top: -34px !important;
    margin-bottom: -34px !important;
  }
}


/* v1.5.9 — based on v1.5.8, move the event group another 30px upward. */
#events > .gw15-shell {
  top: -75px !important;
  margin-bottom: -75px !important;
}

@media (max-width: 767px) {
  #events > .gw15-shell {
    top: -64px !important;
    margin-bottom: -64px !important;
  }
}


/* =========================================================
   v1.6.2
   Base = v1.5.9 (the visually better spacing baseline).
   Only two improvements:
   1) reduce the large inter-section gaps again
   2) make eyebrow -> Chinese title spacing reliably visible
   ========================================================= */

/* Keep the v1.5.9 upward position, which was visually better. */
#events > .gw15-shell {
  position: relative !important;
  top: -75px !important;
  margin-bottom: -75px !important;
}

/* Robust title spacing using text-marked classes, not nth-child assumptions. */
#events .gw15-header .gw162-eyebrow {
  margin-bottom: 20px !important;
}

#events .gw15-header .gw162-title-cn {
  margin-bottom: 14px !important;
}

#events .gw15-header .gw162-title-fi {
  margin-bottom: 0 !important;
}

/* Slightly shorten the whitespace after the event section before the next homepage block. */
#events {
  padding-bottom: 46px !important;
}

/* Mobile: tighter overall section gap, but a clearer eyebrow -> title gap. */
@media (max-width: 767px) {
  #events {
    padding-top: 24px !important;
    padding-bottom: 34px !important;
  }

  #events > .gw15-shell {
    top: -76px !important;
    margin-bottom: -76px !important;
  }

  #events .gw15-header {
    margin-bottom: 28px !important;
  }

  #events .gw15-header .gw162-eyebrow {
    margin-bottom: 22px !important;
  }

  #events .gw15-header .gw162-title-cn {
    margin-bottom: 16px !important;
  }

  #events .gw15-header .gw162-title-fi {
    margin-bottom: 0 !important;
  }
}


/* v1.6.3 — match eyebrow-to-title spacing to the "Mitä teemme" section.
   Only this local header spacing is changed. */
#events .gw15-header .gw162-eyebrow {
  margin-bottom: 28px !important;
}

@media (max-width: 767px) {
  #events .gw15-header .gw162-eyebrow {
    margin-bottom: 26px !important;
  }
}


/* =========================================================
   v1.6.4 — requested fine tuning based on v1.6.3
   1) Whole event block 20px higher
   2) Eyebrow -> Chinese title gap +10px
   3) Chinese body 16px
   4) Finnish body 15px
   5) Right info card body 15px
   6) Bottom gap to next section shortened by ~20px
   Other layout/title sizes/lightbox unchanged.
   ========================================================= */

/* Top: move the whole event content another 20px upward. */
#events > .gw15-shell {
  top: -95px !important;
  margin-bottom: -95px !important;
}

/* Header: increase “近期活动 · Tulevat tapahtumat” -> Chinese title gap by 10px. */
#events .gw15-header .gw162-eyebrow {
  margin-bottom: 38px !important;
}

/* Main content font sizes by language. */
#events .gw15-main .gw164-cn-body {
  font-size: 16px !important;
}

#events .gw15-main .gw164-fi-body {
  font-size: 15px !important;
}

/* Right information card body: keep at 15px. */
#events .gw15-info p,
#events .gw15-info li {
  font-size: 15px !important;
}

/* Bottom: shorten the whitespace before the following homepage section by ~20px. */
#events {
  padding-bottom: 26px !important;
}

@media (max-width: 767px) {
  /* Same requested direction on mobile, while preserving the existing mobile structure. */
  #events > .gw15-shell {
    top: -96px !important;
    margin-bottom: -96px !important;
  }

  #events .gw15-header .gw162-eyebrow {
    margin-bottom: 36px !important;
  }

  #events .gw15-main .gw164-cn-body {
    font-size: 16px !important;
  }

  #events .gw15-main .gw164-fi-body,
  #events .gw15-info p,
  #events .gw15-info li {
    font-size: 15px !important;
  }

  #events {
    padding-bottom: 14px !important;
  }
}


/* =========================================================
   v1.6.5 — mobile spacing only
   Increase the distance between the poster and “活动简介”
   to match the visual rhythm before “活动内容”.
   Desktop layout is unchanged.
   ========================================================= */
@media (max-width: 767px) {
  #events .gw15-grid {
    gap: 52px !important;
  }
}


/* =========================================================
   v1.6.6 — FINAL mobile poster/introduction spacing
   Based on v1.6.5. Only one change:
   poster bottom -> “活动简介” spacing: 52px -> 72px.
   Desktop and all other layout/typography remain unchanged.
   ========================================================= */
@media (max-width: 767px) {
  #events .gw15-grid {
    gap: 72px !important;
  }
}


/* =========================================================
   v1.6.7 — typography only, based on v1.6.6 Final
   Keep ALL spacing/layout unchanged.
   Requested:
   - Left Chinese body: 18px
   - Left Finnish body: 16px
   - Right info body: 16px
   - Section subheadings (活动简介 / 活动内容 / 活动目标 etc.)
     same size as 活动信息.
   ========================================================= */

/* Left-side section headings: match the right-side “活动信息” heading. */
#events .gw15-main h2,
#events .gw15-main h3 {
  font-size: 28px !important;
  line-height: 1.25 !important;
}

/* Chinese body text. */
#events .gw15-main .gw164-cn-body {
  font-size: 18px !important;
}

/* Finnish body text. */
#events .gw15-main .gw164-fi-body {
  font-size: 16px !important;
}

/* Right-side activity information body text. */
#events .gw15-info p,
#events .gw15-info li {
  font-size: 16px !important;
}

/* Keep the right-side heading at the same reference size. */
#events .gw15-info h2,
#events .gw15-info h3 {
  font-size: 28px !important;
  line-height: 1.25 !important;
}

/* Apply the same requested typography on mobile without touching spacing. */
@media (max-width: 767px) {
  #events .gw15-main h2,
  #events .gw15-main h3,
  #events .gw15-info h2,
  #events .gw15-info h3 {
    font-size: 28px !important;
    line-height: 1.25 !important;
  }

  #events .gw15-main .gw164-cn-body {
    font-size: 18px !important;
  }

  #events .gw15-main .gw164-fi-body,
  #events .gw15-info p,
  #events .gw15-info li {
    font-size: 16px !important;
  }
}


/* v1.6.8 — section heading weight only.
   “活动信息” and left-side section headings use the same normal weight.
   No size, spacing or layout changes. */
#events .gw15-main h2,
#events .gw15-main h3,
#events .gw15-info h2,
#events .gw15-info h3 {
  font-weight: 400 !important;
}


/* v1.6.9 — fix: “活动信息” is actually an H1 in the generated info block.
   Make H1/H2/H3 section headings use the same normal weight.
   No size, spacing or layout changes. */
#events .gw15-main h1,
#events .gw15-main h2,
#events .gw15-main h3,
#events .gw15-info h1,
#events .gw15-info h2,
#events .gw15-info h3 {
  font-weight: 400 !important;
}


/* =========================================================
   v1.6.10 — exact heading selector fix
   The visible “活动信息” heading lives inside .gw15-info-card,
   not .gw15-info. Match it to left section headings.
   No spacing/layout/body-text changes.
   ========================================================= */
#events .gw15-section h1,
#events .gw15-section h2,
#events .gw15-section h3,
#events .gw15-info-card h1,
#events .gw15-info-card h2,
#events .gw15-info-card h3 {
  font-size: 28px !important;
  line-height: 1.25 !important;
  font-weight: 400 !important;
}

@media (max-width: 767px) {
  #events .gw15-section h1,
  #events .gw15-section h2,
  #events .gw15-section h3,
  #events .gw15-info-card h1,
  #events .gw15-info-card h2,
  #events .gw15-info-card h3 {
    font-size: 28px !important;
    line-height: 1.25 !important;
    font-weight: 400 !important;
  }
}


/* =========================================================
   v1.6.11 — heading inline-style override fix
   The “活动信息” source heading contains nested span/strong
   styles copied from Elementor. Earlier rules changed the H tag
   but the child element kept its own font size/weight.
   Force the heading AND its nested inline elements to match
   “活动简介”. No spacing/layout/body changes.
   ========================================================= */
#events .gw15-info h1,
#events .gw15-info h2,
#events .gw15-info h3,
#events .gw15-info h1 *,
#events .gw15-info h2 *,
#events .gw15-info h3 * {
  font-size: 28px !important;
  line-height: 1.25 !important;
  font-weight: 400 !important;
}

/* Same treatment for left section headings, so both sides are identical. */
#events .gw15-section h1,
#events .gw15-section h2,
#events .gw15-section h3,
#events .gw15-section h1 *,
#events .gw15-section h2 *,
#events .gw15-section h3 * {
  font-size: 28px !important;
  line-height: 1.25 !important;
  font-weight: 400 !important;
}

@media (max-width: 767px) {
  #events .gw15-info h1,
  #events .gw15-info h2,
  #events .gw15-info h3,
  #events .gw15-info h1 *,
  #events .gw15-info h2 *,
  #events .gw15-info h3 *,
  #events .gw15-section h1,
  #events .gw15-section h2,
  #events .gw15-section h3,
  #events .gw15-section h1 *,
  #events .gw15-section h2 *,
  #events .gw15-section h3 * {
    font-size: 28px !important;
    line-height: 1.25 !important;
    font-weight: 400 !important;
  }
}
