/* ==========================================================================
   Big Card Expand Component
   ========================================================================== */

/* Base Styles */
.big-card-expand {
  position: relative;
  cursor: pointer;
  height: auto;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);

  @media (min-width: 1200px) {
    flex: 1 1 220px;
    height: 395px;
  }
}

/* Image Container */
.big-card-expand .image-container {
  border-radius: 16px;
  border: 1px solid #CCC;
  max-height: 214px;
  height: 214px;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  
  @media (max-width: 768px) {
    max-height: 214px;
    height: 214px;
  }
  @media (max-width: 1199px) {
    flex: 0 0 321px;
    max-height: 214px;
    height: 214px;
    width: 321px;
  }
  @media (min-width: 1200px) {
    flex: 0 0 321px;
    max-height: 395px;
    height: 395px;
  }
}

.big-card-expand img {
  height: 214px;
  object-fit: cover;
  
  @media (min-width: 1200px) {
    height: 395px;
  }
}

/* Text Containers */
.big-card-expand .title-container {
  z-index: 5;
  transform: translateY(0) scale(1);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: left top;
  will-change: transform;
}

.big-card-expand .description-container {
  z-index: 5;
}

.big-card-expand .body-container {
  position: relative;
  visibility: visible;
  width: 100%;
  opacity: 1;
  color: #666;
  font-size: 16px;
  
  @media (min-width: 1200px) {
    /* Fixed container that never changes size */
    height: 80px;
    overflow: hidden;
    margin-top: 8px;
    will-change: transform;
  }
}

.big-card-expand .body-container-absolute {
  position: relative;
  
  @media (min-width: 1200px) {
    width: 100%;
    /* Transform-based animation - slide from below */
    transform: translateY(100%);
    opacity: 0;
    transition: 
      transform 0.5s cubic-bezier(0.4, 0, 0.2, 1),
      opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform, opacity;
  }
}

/* Utility Classes */
.big-card-expand.bottom-text-container {
  position: relative;
  margin-bottom: 4px;
}

.big-card-expand.title-and-description-container {
  z-index: 3;
  background-color: white;
}

/* Expanded State (wide-blurred) */
.big-card-expand.wide-blurred {
  @media (min-width: 1200px) {
    flex: 0 0 395px;
  }
}

.big-card-expand.wide-blurred .image-container {
  @media (min-width: 1200px) {
    width: 100%;
    max-height: 264px;
    height: 100%;
  }
}

.big-card-expand.wide-blurred .title-container {
  @media (min-width: 1200px) {
    /* Use scale instead of font-size change to avoid reflow */
    transform: translateY(-2px) scale(1.2);
  }
}

.big-card-expand.wide-blurred .body-container-absolute {
  @media (min-width: 1200px) {
    /* Slide text into view */
    transform: translateY(0);
    opacity: 1;
  }
}

/* Initial State (initial-height-displayed) */
.big-card-expand.initial-height-displayed .body-container-absolute {
  @media (min-width: 1200px) {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Focus States */
.big-card-expand:focus-within .title-container {
  @media (min-width: 1200px) {
    transform: translateY(-2px) scale(1.2);
  }
}

.big-card-expand:focus-within .body-container-absolute {
  @media (min-width: 1200px) {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }
}

/* Hover Effects */
.big-card-expand:hover .text-container {
  background: rgba(255, 255, 255, 0.5);
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  .big-card-expand,
  .big-card-expand .title-container,
  .big-card-expand .body-container,
  .big-card-expand .body-container-absolute,
  .big-card-expand .image-container {
    transition-duration: 0.1s;
  }
}




