/* ==========================================================
   bel étage – "Poster" look for all event pages
   (single event, calendar list / month / day, categories)
   Desktop + mobile.
   File: enfold-child/be-events.css – loaded by functions.php
   (functions.php also adds the body class "be-poster", loads the font,
   splits the date line and moves the back link).
   ========================================================== */

body.be-poster {
  --be-cream: #f2ece1;
  --be-cream-2: #e9e1d2;
  --be-green: #042a2d;
  --be-ink:   #0f2522;
  --be-gold:  #c9a45c;
  --be-serif: "Source Serif 4", "Source Serif Pro", Georgia, "Times New Roman", serif;
}

/* ---------- Background: cream paper under the green header ---------- */
body.be-poster #main,
body.be-poster #main > .container_wrap:not(.footer_color),
body.be-poster .tribe-events-pg-template,
body.be-poster .main_color {
  background-color: var(--be-cream) !important;
}
body.be-poster #header_main { border-bottom: 0 !important; }

/* ---------- Fonts: serif everywhere in the event area ---------- */
body.be-poster .tribe-events-pg-template,
body.be-poster .tribe-events-pg-template h1,
body.be-poster .tribe-events-pg-template h2,
body.be-poster .tribe-events-pg-template h3,
body.be-poster .tribe-events-pg-template h4,
body.be-poster .tribe-events-pg-template p,
body.be-poster .tribe-events-pg-template li,
body.be-poster .tribe-events-pg-template a,
body.be-poster .tribe-events-pg-template abbr,
body.be-poster .tribe-events-pg-template address,
body.be-poster .tribe-events-pg-template button,
body.be-poster .tribe-events-pg-template input {
  font-family: var(--be-serif) !important;
}

/* ==========================================================
   SINGLE EVENT
   ========================================================== */
body.be-poster.single-tribe_events .tribe-events-pg-template {
  padding-top: 48px !important;
  padding-bottom: 56px !important;
  border: 0;
}

/* Title */
body.be-poster .tribe-events-single-event-title {
  font-weight: 700 !important;
  font-size: 44px !important;
  line-height: 1.15 !important;
  color: var(--be-ink) !important;
  text-align: center;
  text-transform: none;
  margin: 0 0 14px !important;
}

/* Date + time */
body.be-poster .tribe-events-schedule {
  text-align: center;
  justify-content: center;
  flex-wrap: wrap;
  margin: 0 0 34px !important;
  background: none !important; border: 0 !important; padding: 0 !important;
}
body.be-poster .tribe-events-schedule h3 { width: 100%; text-align: center; }
body.be-poster .tribe-events-schedule h3 {
  font-weight: 400 !important;
  font-size: 38px !important;
  line-height: 1.3 !important;
  color: var(--be-ink) !important;
  margin: 0 !important;
}
body.be-poster .be-time { margin-left: .3em; }

/* Featured image: centered, large */
body.be-poster .tribe-events-event-image {
  text-align: center;
  margin: 0 0 34px;
}
body.be-poster .tribe-events-event-image img {
  display: inline-block;
  width: 100%;
  max-width: 680px;
  height: auto;
  border: 0; box-shadow: none; background: transparent;
}

/* Description (PRACTICA / MILONGA / DJ / host) – all content kept */
body.be-poster .tribe-events-single-event-description {
  text-align: center;
  color: var(--be-ink);
}
body.be-poster .tribe-events-single-event-description h3 {
  font-weight: 700 !important;
  font-size: 28px !important;
  letter-spacing: .06em;
  color: var(--be-ink) !important;
  margin: 26px 0 6px !important;
}
body.be-poster .tribe-events-single-event-description p {
  font-size: 22px;
  line-height: 1.55;
  color: var(--be-ink);
  margin: 0 0 16px;
}
body.be-poster .tribe-events-single-event-description strong { color: var(--be-ink); }
body.be-poster .tribe-events-single-event-description img.emoji {
  margin-right: .35em !important;
  vertical-align: -.1em !important;
}

/* "« Alle Veranstaltungen" – moved (by functions.php) to just above the share buttons */
body.be-poster .tribe-events-back {
  text-align: center;
  margin: 34px 0 0 !important;
  padding-top: 26px;
  border-top: 1px solid rgba(15,37,34,.15);
}
body.be-poster .tribe-events-back a {
  display: inline-block;
  font-size: 17px;
  font-weight: 600;
  color: var(--be-green) !important;
  background: none !important;
  border: 1px solid var(--be-green);
  border-radius: 999px;
  padding: 8px 22px;
  text-decoration: none;
}
body.be-poster .tribe-events-back a:hover { background: var(--be-green) !important; color: var(--be-cream) !important; }

/* Share buttons: round green icons, centered */
body.be-poster .shariff { margin-top: 18px; }
body.be-poster .shariff ul.shariff-buttons {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 8px;
}
body.be-poster .shariff .shariff-button { margin: 0 !important; width: 42px !important; border-radius: 999px; overflow: hidden; }
body.be-poster .shariff a.shariff-link {
  background: var(--be-green) !important;
  border-radius: 999px !important;
  height: 42px !important;
  display: flex !important; align-items: center; justify-content: center;
}
body.be-poster .shariff .shariff-text { display: none; }

/* Details / Veranstalter / Ort: dark green card (desktop and mobile versions) */
body.be-poster .av-single-event-meta-bar {
  background: var(--be-green) !important;
  border-radius: 12px;
  padding: 26px 30px 12px;
  margin-top: 34px;
  border: 0 !important;
}
body.be-poster .av-single-event-meta-bar .av-single-event-meta-bar-inner,
body.be-poster .av-single-event-meta-bar .tribe-events-single-section {
  border: 0 !important; background: none !important;
}
body.be-poster .av-single-event-meta-bar .tribe-events-single-section-title {
  color: var(--be-gold) !important;
  font-size: 14px !important;
  letter-spacing: .06em;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(201,164,92,.35);
  padding-bottom: 6px; margin-bottom: 10px !important;
}
body.be-poster .av-single-event-meta-bar,
body.be-poster .av-single-event-meta-bar li,
body.be-poster .av-single-event-meta-bar a,
body.be-poster .av-single-event-meta-bar abbr,
body.be-poster .av-single-event-meta-bar div,
body.be-poster .av-single-event-meta-bar span,
body.be-poster .av-single-event-meta-bar address {
  color: #e9e2d2 !important;
  font-size: 16px;
  text-decoration: none;
}
body.be-poster .av-single-event-meta-bar .tribe-events-meta-label { font-weight: 700; }
body.be-poster .tribe-events-venue-map { border-radius: 8px; overflow: hidden; margin-bottom: 14px; }

/* "Zum Kalender hinzufügen" */
body.be-poster .tribe-events-c-subscribe-dropdown__container { text-align: center; margin-top: 26px; }
body.be-poster .tribe-events-c-subscribe-dropdown__button {
  border-color: var(--be-green) !important; border-radius: 999px !important;
}
body.be-poster .tribe-events-c-subscribe-dropdown__button-text {
  color: var(--be-green) !important; font-size: 16px !important;
}

/* ==========================================================
   CALENDAR PAGES (Liste / Monat / Tag, categories)
   The Events Calendar reads its colours & fonts from these variables.
   ========================================================== */
body.be-poster .tribe-common {
  --tec-font-family-sans-serif: var(--be-serif);
  --tec-color-background: var(--be-cream);
  --tec-color-background-events: transparent;
  --tec-color-background-secondary: var(--be-cream-2);
  --tec-color-background-secondary-datepicker: var(--be-cream-2);
  --tec-color-accent-primary: var(--be-green);
  --tec-color-accent-primary-hover: #0a4a4f;
  --tec-color-accent-primary-active: #0a4a4f;
  --tec-color-button-primary: var(--be-green);
  --tec-color-link-accent: var(--be-green);
  --tec-color-text-primary: var(--be-ink);
  --tec-color-text-event-title: var(--be-ink);
  --tec-color-text-events-title: var(--be-ink);
  --tec-color-border-default: rgba(15,37,34,.18);
  --tec-color-border-secondary: rgba(15,37,34,.18);
  --tec-color-background-events-bar: var(--be-cream);
  --tec-color-background-view-selector: var(--be-cream);
  background: var(--be-cream);
}
body.be-poster .tribe-events-view .tribe-events-c-view-selector__content { background: var(--be-cream) !important; }
body.be-poster .tribe-events-view .tribe-events-c-search__input { background: transparent !important; }
body.be-poster .tribe-events-view .tribe-events-calendar-list__event-title,
body.be-poster .tribe-events-view .tribe-events-calendar-list__event-title a,
body.be-poster .tribe-events-view .tribe-events-calendar-day__event-title a,
body.be-poster .tribe-events-view .tribe-events-calendar-month__calendar-event-title a {
  font-weight: 700 !important;
  color: var(--be-ink) !important;
}
body.be-poster .tribe-events-view .tribe-events-calendar-list__event-title { font-size: 28px !important; line-height: 1.2 !important; }
body.be-poster .tribe-events-view .tribe-events-calendar-list__event-datetime,
body.be-poster .tribe-events-view .tribe-events-calendar-list__event-date-tag-weekday,
body.be-poster .tribe-events-view .tribe-events-calendar-list__event-date-tag-daynum {
  color: var(--be-ink) !important;
}
body.be-poster .tribe-events-view .tribe-events-calendar-list__event-datetime { font-size: 17px !important; }
body.be-poster .tribe-events-view .tribe-events-calendar-list__event-description p { font-size: 17px; line-height: 1.55; }
body.be-poster .tribe-events-view .tribe-events-calendar-list__month-separator-text,
body.be-poster .tribe-events-view .tribe-events-c-top-bar__datepicker-desktop { color: var(--be-ink) !important; }
/* Search bar & buttons */
body.be-poster .tribe-events-view .tribe-events-c-events-bar__search-container,
body.be-poster .tribe-events-view .tribe-events-c-events-bar { background: transparent !important; }
body.be-poster .tribe-events-view .tribe-common-c-btn,
body.be-poster .tribe-events-view .tribe-events-c-search__button {
  background: var(--be-green) !important; color: var(--be-cream) !important; border-radius: 999px !important;
}
body.be-poster .tribe-events-view .tribe-events-calendar-list__event-featured-image { border-radius: 6px; }

/* ==========================================================
   MOBILE (phones)
   ========================================================== */
@media only screen and (max-width: 767px) {
  body.be-poster.single-tribe_events .tribe-events-pg-template {
    padding: 28px 18px 40px !important;
  }
  body.be-poster .tribe-events-single-event-title { font-size: 30px !important; line-height: 1.2 !important; }
  body.be-poster .tribe-events-schedule { margin-bottom: 26px !important; }
  body.be-poster .tribe-events-schedule h3 { font-size: 30px !important; }
  /* Date and time on two lines, like the poster */
  body.be-poster .be-date, body.be-poster .be-time { display: block; margin-left: 0; }

  body.be-poster .tribe-events-event-image { margin: 0 -18px 26px; }
  body.be-poster .tribe-events-event-image img { max-width: none; }

  body.be-poster .tribe-events-single-event-description h3 { font-size: 24px !important; margin-top: 18px !important; }
  body.be-poster .tribe-events-single-event-description p { font-size: 20px; }

  body.be-poster .av-single-event-meta-bar { padding: 18px 20px 6px; border-radius: 10px; }
  body.be-poster .av-single-event-meta-bar .tribe-events-meta-group {
    width: 100% !important; float: none !important; padding: 0 0 12px !important;
  }

  body.be-poster .tribe-events-view .tribe-events-calendar-list__event-title { font-size: 24px !important; }
}

/* ---------- "Casa de Tango" heart in the green header (event pages) ----------
   Image: enfold-child/images/heart-casa-de-tango.png
   Anchored to the menu (search icon + burger), so it always sits just left of
   the search icon – on phones and on desktop. */
body.be-poster #header_main .main_menu::before {
  content: "";
  position: absolute;
  right: calc(100% + 14px);
  top: 50%;
  width: 64px;
  height: 59px;
  transform: translateY(-50%);
  background: url("images/heart-casa-de-tango.png") center / contain no-repeat;
  pointer-events: none;
  z-index: 5;
}
@media only screen and (max-width: 400px) {
  body.be-poster #header_main .main_menu::before { width: 48px; height: 44px; right: calc(100% + 6px); }
}

/* ---------- Details / Veranstalter / Veranstaltungsort on desktop ----------
   Three equal columns, map full width underneath (Enfold's default columns
   were only 168px wide, which broke "VERANSTALTUNGSORT" in the middle). */
@media only screen and (min-width: 768px) {
  body.be-poster .av-single-event-meta-bar-desktop .av-single-event-meta-bar-inner {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: 32px;
    row-gap: 8px;
  }
  body.be-poster .av-single-event-meta-bar-desktop .tribe-events-single-section { display: contents !important; }
  body.be-poster .av-single-event-meta-bar-desktop .tribe-events-meta-group {
    width: auto !important; float: none !important; padding: 0 0 14px !important; margin: 0 !important;
  }
  body.be-poster .av-single-event-meta-bar-desktop .tribe-events-venue-map {
    grid-column: 1 / -1;
    width: auto !important; float: none !important;
    margin: 6px 0 14px !important;
    height: 280px;
  }
  body.be-poster .av-single-event-meta-bar-desktop .tribe-events-venue-map iframe { width: 100% !important; height: 100% !important; }
}
/* Never break headings inside a word */
body.be-poster .av-single-event-meta-bar .tribe-events-single-section-title {
  overflow-wrap: normal !important;
  word-break: normal !important;
}
/* "Google Karte anzeigen" on its own line */
body.be-poster .av-single-event-meta-bar .tribe-events-gmap {
  display: block;
  margin-top: 6px;
  color: var(--be-gold) !important;
  text-decoration: underline !important;
}

/* ---------- Calendar list teasers ("Weiterlesen →") on cream background ---------- */
body.be-poster .tribe-events-calendar-list__event-description::after {
  background: linear-gradient(to bottom, rgba(242,236,225,0), var(--be-cream)) !important;
}
body.be-poster .read-more-link {
  color: var(--be-green) !important;
  font-family: var(--be-serif);
}
