

.container-events {
  display: flex;
  gap:10px
  font-family: 'Inter Tight', sans-serif;
  justify-content: center;
  align-items: center;
  margin: 10vmin;
  overflow: hidden;
  transform: skew(5deg);
  color:white;

  /* ensure no cursive/italic appearance on cards */
  .card,
  .card__head,
  .card__head b,
  .card__desc,
  .card__desc p {
    font-family: 'Inter Tight', sans-serif !important;
    font-style: normal !important;
  }

  /* button inside expanded description */
  .more-details-btn {
    display: inline-block;
    margin-top: 0.5rem;
    padding: 0.4rem 0.8rem;
    background: rgba(255,255,255,0.8);
    color: #000;
    font-size: 0.85rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.3s;
  }
  .more-details-btn:hover {
    background: #ffffff;
  }

  /* make the link act as the flex item so growth works even when card is wrapped */
  .card-link {
    flex: 1;
    display: flex;
    transition: all 1s ease-in-out;
    /* ensure card fills the link */
  }

  .card {
    cursor: pointer;
    width: 100%;
    /* remove flex here; parent link handles it */
    transition: all 1s ease-in-out;
    height: 75vmin;
    position: relative;
    overflow: hidden;
    .card__head {
      position: absolute;
      left: 50%;
      top: 50%;
      transform: translate(-50%, -50%) rotate(-90deg);
      transform-origin: center;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      padding: 0.6em 2.2em;
    
      color: #fff;
      font-size: 2.4rem;
      text-transform: uppercase;
      letter-spacing: 0.08em;
      transition: all 0.35s ease-in-out;
      white-space: nowrap;
      pointer-events: none;
    }

    .card__head b {
      color: transparent;
      -webkit-text-stroke: 2px #ffffff;
      font-weight: 800;
      display: inline-block;
      transform: translateZ(0);
    }

    .card__desc {
      position: absolute;
      bottom: 0;
      left: 0;
      width: 100%;
      height: auto;
      padding: 1.5rem;
      background: rgba(0, 0, 0, 0.7);
      color: #fff;
      font-size: 0.95rem;
      line-height: 1.5;
      transform: translateY(100%);
      transition: all 0.35s ease-in-out;
      pointer-events: none;
    }

    .card__desc p {
      margin: 0;
    }

  }

  /* expansion now triggered on link hover/focus */
  .card-link:hover, .card-link:focus {
    flex-grow: 10;
  }

  .card-link:hover .card, .card-link:focus .card {
      img {
        filter: grayscale(0);
      }
      .card__head {
        font-size: 2.8rem;
        transform: translate(-50%, -50%) rotate(0deg);
        font-style: normal !important;
      }
      .card__head b {
        -webkit-text-stroke-width: 2.5px;
        font-family: 'Inter Tight', sans-serif !important;
        font-style: normal !important;
      }
      .card__desc {
        transform: translateY(0);
      }
  }

    img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      transition: all 1s ease-in-out;
      /* filter: grayscale(100%); */
    }
  }
}


/* Tablet/Phone View - Media Query */
@media (max-width: 1024px) {
  .container-events {
    margin: 5vmin;
  }

  .container-events .card {
    height: 60vmin;
    
    .card__head {
      font-size: 2rem;
    }
  }
}

@media (max-width: 768px) {
  .container-events {
    margin: 3vmin;
    transform: skew(0deg);
    flex-direction: column;
    align-items: stretch;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0;
  }

  .container-events .card-link {
    width: 100%;
    flex: 0 0 auto;
    margin-bottom: 0;
    margin-right: 0;
    position: relative;
    height: 12vmin;
    transition: all 0.5s ease-in-out;
    overflow: hidden;

    .card {
      position: absolute;
      width: 100%;
      height: 100%;
    }

    img {
      position: absolute;
      width: 100%;
      height: 100%;
      object-fit: cover;
      transition: all 0.5s ease-in-out;
      /* filter: grayscale(100%); */
    }

    .card__head {
      position: absolute;
      left: 50%;
      top: 50%;
      transform: translate(-50%, -50%) rotate(0deg);
      font-size: 1.6rem;
      padding: 0.5em 2em;
      z-index: 10;
      transition: all 0.5s ease-in-out;
    }

    .card__head b {
      -webkit-text-stroke: 1.8px #ffffff;
      transition: all 0.5s ease-in-out;
    }

    .card__desc {
      position: absolute;
      top: 100%;
      left: 0;
      width: 100%;
      height: auto;
      font-size: 0.9rem;
      padding: 1.5rem 1rem;
      background: rgba(0, 0, 0, 0.75);
      color: #fff;
      z-index: 5;
      transition: all 0.5s ease-in-out;
      max-height: 0;
      overflow: hidden;
      display: block;
    }

    .card__desc p {
      margin: 0;
      line-height: 1.5;
    }

    /* Expand on active/click (mobile) */
    &:active,
    &:focus {
      height: 28vmin;
      img {
        filter: grayscale(0);
      }

      .card__head {
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease-in-out;
      }

      .card__head b {
        -webkit-text-stroke-width: 2px;
      }

      .card__desc {
        max-height: 100%;
        top: auto;
        bottom: 0;
      }
    }

    /* Ensure link expands too on touch */
    .card-link:active,
    .card-link:focus {
      flex-grow: 10;
    }

    &:hover {
      .card__head {
        font-size: 1.75rem;
      }
    }

    /* Make card focusable */
    outline: none;
    -webkit-user-select: none;
    user-select: none;
  }
}

@media (max-width: 480px) {
  .container-events {
    margin: 2vmin;
    
  }

  .container-events .card-link {
    height: 11vmin;
    margin-bottom: 0.6rem;

    .card__head {
      font-size: 1.4rem;
      padding: 0.4em 1.5em;
    }

    .card__head b {
      -webkit-text-stroke: 1.5px #ffffff;
    }
  }
}

