html {
  scroll-behavior: smooth;
}

/* Base container styles */
.corporate-events-block {
  margin-bottom: 3rem;
}

.corporate-events-block .container {
  margin: 0 auto;
}

/* Base grid layout */
.corporate-events-wrapper {
  display: grid;
  align-items: center;
  grid-template-areas: "title title" "content image";
  grid-template-columns: 5fr 6fr;
  align-items: self-start;
}

.corporate-events-wrapper .section-title-wrapper {
  grid-area: title;
  grid-column: span 2;
}

.corporate-events-wrapper .content-column {
  grid-area: content;
}

.corporate-events-wrapper .content-column:has(.text-section) {
  height: 100%;
}

.corporate-events-wrapper .content-column .text-section {
  text-wrap: balance;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
}

.corporate-events-wrapper .image-column {
  grid-area: image;
}

/* IMAGE LEFT */
.corporate-events-wrapper.image-left {
  grid-template-areas: "title title" "image content";
  grid-template-columns: 6fr 5fr;
}

/* Content styling */
.corporate-events-block .section-title-wrapper {
  margin-bottom: 1.25rem;
}

.corporate-events-block .main-heading {
  font-size: 1.625rem;
  font-weight: 300;
  line-height: 1.2;
  margin: 0;
  text-transform: uppercase;
}

/* Expandable Content Styles */
.corporate-events-block .description {
  position: relative;
  scroll-margin-top: 1.25rem;
}

.corporate-events-block .description-content {
  font-size: 1rem;
  line-height: 1.6;
  color: #cccccc;
  position: relative;
}

.corporate-events-block .description-content.expandable {
  overflow: hidden;
  transition: all 0.5s ease-out;
  max-height: var(--preview-height, 16rem);
  --webkit-mask-image: linear-gradient(#000 35%, rgba(0, 0, 0, 0.25) 90%, transparent);
  mask-image: linear-gradient(#000 35%, rgba(0, 0, 0, 0.25) 90%, transparent);
}

.corporate-events-block .description-content.expandable.expanded {
  max-height: 1000px;
  --webkit-mask-image: none;
  mask-image: none;
}

.corporate-events-block .description-content.expandable p {
  margin-bottom: 20px;
}

/* Toggle Button Styles */
.corporate-events-block .description-toggle {
  position: absolute;
  bottom: -1rem;
  background: transparent;
  border: none;
  width: 100%;
  height: 2rem;
  cursor: pointer;
  transition: transform 0.3s ease;
  margin-top: 1.25rem;
  border-radius: 0;
  scroll-margin-top: 1.25rem;
}

.corporate-events-block .description-toggle svg {
  width: 2rem;
  height: 2rem;
  transition: transform 0.3s ease, stroke 0.3s ease;
  stroke: #ffffff;
  stroke-width: 2;
  fill: none;
}

.corporate-events-block .description-toggle:hover svg {
  stroke: #8f8f8f;
}

.corporate-events-block .description-toggle svg {
  transform: rotate(0deg);
}

.corporate-events-block .description-toggle.expanded svg {
  transform: rotate(180deg);
}

.corporate-events-block .button-wrapper .button-block {
  margin: 0;
  padding-top: 2rem;
}

.corporate-events-block .button-wrapper .button-block a.button {
  padding: 0.3em 2em 0.2em;
}

.corporate-events-block img {
  display: block;
  width: 100%;
  height: 400px;
  object-fit: cover;
  border-radius: 0;
  transition: transform 0.3s ease;
}

.corporate-events-block .image-right img {
  --webkit-mask-image: linear-gradient(270deg, rgba(0, 0, 0, 0.95) 50%, transparent 100%);
  mask-image: linear-gradient(270deg, rgba(0, 0, 0, 0.95) 50%, transparent 100%);
}

.corporate-events-block .image-left img {
  --webkit-mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0.95) 50%, transparent 100%);
  mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0.95) 50%, transparent 100%);
}

.corporate-events-block .image-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 400px;
  background: rgba(255, 255, 255, 0.1);
  border: 2px dashed rgba(255, 255, 255, 0.3);
  border-radius: 0;
}

.corporate-events-block .image-placeholder span {
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.7);
}

/* Theme-specific adjustments */
.corporate-events-block.theme-light .description-content {
  color: #333333;
}

/* Responsive Design */
@media (max-width: 768px) {
  .corporate-events-block {
    margin-bottom: 1rem;
  }

  .corporate-events-block .padding {
    padding: 80px 0 120px 0;
  }

  .corporate-events-block .button-block a.button {
    box-sizing: border-box;
    width: 100%;
  }

  .corporate-events-block .main-heading {
    font-size: 1.125rem;
  }

  .corporate-events-block .section-title-wrapper {
    margin-bottom: 0;
  }

  .corporate-events-wrapper {
    display: flex;
    flex-direction: column;
  }

  .corporate-events-wrapper .content-column {
    order: 2;
  }

  .corporate-events-wrapper .image-column {
    order: 1;
  }

  .corporate-events-block img {
    height: auto;
  }

  .corporate-events-block .image-right img,
  .corporate-events-block .image-left img {
    --webkit-mask-image: linear-gradient(rgba(0, 0, 0, 1) 70%, rgba(0, 0, 0, 0.5) 85%, transparent);
    mask-image: linear-gradient(rgba(0, 0, 0, 1) 70%, rgba(0, 0, 0, 0.5) 85%, transparent);
    aspect-ratio: 16 / 7;
    object-fit: cover;
    object-position: bottom;
  }

  .corporate-events-block .description-toggle {
    margin-top: 0.75rem;
  }

  .corporate-events-block .description-content.expandable {
    max-height: var(--preview-height, 100px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .corporate-events-block .description-content.expandable,
  .corporate-events-block .description-toggle svg,
  .corporate-events-block .description-content.expandable::after {
    transition: none;
  }
}
