{# ============================== #}
{#            CARD BASE           #}
{# ============================== #}

.c-card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  flex-grow: 1;
}

.flexi-card-outer {
  height: 100%;
  display: block;
}

{# ============================== #}
{#           EVENT CARD           #}
{# ============================== #}

.event-card {
  background-color: var(--color-white, #FFFFFF);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  transition: box-shadow 0.3s ease;
  height: 100%;
}

.c-hover-scale:hover .event-card {
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

.event-card {
  position: relative;
  overflow: hidden;
}

.event-past-badge {
  position: absolute;
  top: 30px;
  right: -60px;
  background-color: var(--color-dark-blue, #0C2047);
  color: #ffffff;
  padding: 15px 75px;
  font-family: 'Montserrat', sans-serif;
  font-size: 22px;
  font-weight: 700;
  text-transform: uppercase;
  transform: rotate(30deg);
  z-index: 10;
  box-shadow: 0 5px 15px rgba(0,0,0,0.4);
  letter-spacing: 1.5px;
}

.event-past-img {
  filter: grayscale(100%) brightness(85%);
  transition: filter 0.3s ease;
}

.event-image-wrapper {
  width: 100%;
  position: relative;
  overflow: hidden;
}

.event-card-img {
  width: 100%;
  height: auto;
  display: block;
}

.event-card-content {
  padding: 25px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.event-title {
  font-family: 'Montserrat', sans-serif;
  color: var(--color-dark-blue, #0C2047);
  font-weight: 700;
  margin-top: 0;
  margin-bottom: 20px;
  font-size: 24px;
  line-height: 1.2;
}

.event-details {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.event-detail-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-family: 'Montserrat', sans-serif;
  color: var(--color-dark-blue, #0C2047);
  font-size: 16px;
  line-height: 1.5;
}

.event-icon {
  color: var(--color-red, #D50032);
  font-size: 16px;
  margin-top: 0;
  min-width: 24px;
  text-align: center;
  display: inline-block;
}

.event-presentation {
  background-color: var(--color-light-grey, #F9F9F9);
  padding: 10px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-left: -5px;
  margin-right: -5px;
  margin-top: auto; /* Pushes presentation to the bottom of the card content */
  margin-bottom: 0;
}

.event-presentation + .tags {
  margin-top: 20px;
}

.presentation-speaker {
  font-size: 14px;
  color: var(--color-dark-blue, #0C2047);
  font-family: 'Montserrat', sans-serif;
  opacity: 0.8;
  margin-top: 4px;
}

/* Advanced Speaker Layout */
.presentation-text {
  display: flex;
  flex-direction: column;
  width: 100%;
}

/* Speaker Portrait Photo */
.speaker-photo {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid rgba(12, 32, 71, 0.1);
}

/* Speaker Social Icons (LinkedIn, Email) */
.speaker-social {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

.speaker-social__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #0C2047;
  opacity: 0.5;
  transition: opacity 0.2s ease, color 0.2s ease;
  line-height: 1;
}

.speaker-social__link:hover {
  opacity: 1;
}

.speaker-social__link--linkedin:hover {
  color: #0A66C2;
}

.speaker-social__link--email:hover {
  color: #D50032;
}

.speaker-social__link svg {
  width: 16px;
  height: 16px;
}

.speaker-info {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  text-align: left;
  margin-top: 15px;
  gap: 15px;
  padding: 15px 0;
  border-top: 1px solid rgba(12, 32, 71, 0.1);
}

.speaker-info.mt-top-small {
  margin-top: 0px;
}

.speaker-details {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  flex-grow: 1;
}

.speaker-name {
  font-family: 'Montserrat', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--color-dark-blue, #0C2047);
}

.speaker-role {
  font-family: 'Montserrat', sans-serif;
  font-size: 16px;
  color: var(--color-dark-blue, #0C2047);
  opacity: 0.7;
  margin-top: 4px;
  line-height: 1.5;
}

.speaker-logo {
  max-width: 140px;
  max-height: 55px;
  object-fit: contain;
  margin: 0;
  flex-shrink: 0;
}

@media (max-width: 600px) {
  .speaker-info {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    gap: 10px;
  }
  
  .speaker-logo {
    margin: 10px 0 0 0;
    max-width: 100px;
  }
}

/* Override existing c-card styles from theme if they interfere */
.c-card.event-card {
  padding-bottom: 0 !important;
  padding-top: 0 !important;
}

.c-card-content.event-card-content {
  padding-top: 25px !important;
}

/* Tags styling */
.event-card .tags {
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid rgba(12, 32, 71, 0.1);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.event-card .tag {
  background-color: var(--color-light-grey, #F9F9F9);
  color: var(--color-dark-blue, #0C2047);
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 4px;
  border: 1px solid rgba(12, 32, 71, 0.1);
}

.event-card .tag p {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
}

{# ============================== #}
{#            BUTTONS             #}
{# ============================== #}

.c-card-btn-con {
  padding-top: 30px;
  margin-top: auto;
}

.load-more-row {
  margin-top: 25px;
}

.load-more-btn {
  cursor: pointer;
}

{# ============================== #}
{#         FILTER + SEARCH        #}
{# ============================== #}

.filter-row {
  display: flex;
  flex-wrap: nowrap;
  flex-flow: nowrap !important;
  margin-bottom: 15px;
}

.search-bar {
  margin-left: 15px;
  width: 360px;
}

{# ============================== #}
{#     EVENTS SECTION SEPARATOR   #}
{# ============================== #}

.events-separator {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 30px 15px 10px;
  margin-top: 20px;
}

.events-separator__title {
  font-family: 'Montserrat', sans-serif;
  color: var(--color-dark-blue, #0C2047);
  font-size: 28px;
  font-weight: 700;
  margin: 0;
  white-space: nowrap;
}

.events-separator::after {
  content: '';
  flex: 1;
  height: 2px;
  background: linear-gradient(to right, rgba(12,32,71,0.2), transparent);
}

@media (max-width: 767px) {
  .events-separator__title {
    font-size: 22px;
  }
}

{# ============================== #}
{#      DEEP LINK SHARE BUTTON    #}
{# ============================== #}

.event-deeplink-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 20;
  background: rgba(255,255,255,0.9);
  border: none;
  border-radius: 6px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 6px;
  opacity: 0;
  transition: opacity 0.2s ease, background 0.2s ease;
  color: var(--color-dark-blue, #0C2047);
}

.event-deeplink-btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.event-card:hover .event-deeplink-btn {
  opacity: 1;
}

.event-deeplink-btn:hover {
  background: var(--color-dark-blue, #0C2047);
  color: #fff;
}

.event-deeplink-tooltip {
  position: absolute;
  top: 14px;
  right: 52px;
  z-index: 21;
  background: var(--color-dark-blue, #0C2047);
  color: #fff;
  font-family: 'Montserrat', sans-serif;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 4px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.event-deeplink-tooltip.is-visible {
  opacity: 1;
}

{# ============================== #}
{#        MOBILE RESPONSIVE       #}
{# ============================== #}

@media (max-width: 767px) {
  .event-title {
    font-size: 20px;
  }
  
  .event-detail-item {
    font-size: 15px;
  }

  .event-deeplink-btn {
    opacity: 1;
  }
}

@media (max-width: 575px) {
  .filter-row {
    flex-direction: column;
    flex-flow: wrap !important;
    width: 100%;
    padding-right: 15px;
  }

  .filter-container {
    width: auto !important;
    flex-direction: column;
  }

  .filter-container .select-container {
    width: 100%;
  }

  .search-bar {
    width: auto;
    margin-bottom: 10px;
    margin-left: 0;
  }
}

/* Deep-Link Scroll-Offset für sticky Header */
.filter-card[id^="event-"] {
  scroll-margin-top: 100px;
}