.icm-card- {
  display: {% if is_landscape %}flex{% else %}block{% endif %};
  position: relative;
  overflow: hidden;
  width: 100%;
  cursor: pointer;
  border-radius: 16px;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}

.icm-card- .icm-bg {
  position: absolute;
  inset: -10px;
  z-index: 0;
  pointer-events: none;
  transform: scale(1) translateZ(0);
  transition: transform 1.0s cubic-bezier(0.23, 1, 0.32, 1);
  will-change: transform;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.icm-card-:hover .icm-bg {
  transform: scale(1.07) translateZ(0);
}

.icm-card-::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 16px;
  box-shadow: 0 4px 18px rgba(0,0,0,0.22);
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
  z-index: 20;
}
.icm-card-:hover::after {
  opacity: 1;
}

/* Titel åker upp — samma kurva som content */
.icm-title-area- {
  transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}
.icm-card-:hover .icm-title-area- {
  transform: translateY(-100px);
}

/* Content: exakt height-transition (smooth) + fade */
.icm-below- {
  height: 0;
  overflow: hidden;
  opacity: 0;
  transition: height 0.6s cubic-bezier(0.23, 1, 0.32, 1),
              opacity 0.5s ease 0.08s;
}
.icm-card-:hover .icm-below- {
  height: 100px;
  opacity: 1;
}

{% if not is_landscape %}
@media (max-width: 640px) {
  #icm-grid- { gap: 12px !important; }
  .icm-card- { height: 300px !important; }
  .icm-title-area- { transform: translateY(-100px) !important; }
  .icm-below- { height: 100px !important; opacity: 1 !important; }
}
@media (min-width: 641px) and (max-width: 960px) {
  .icm-card- { height: 340px !important; }
}
{% else %}
@media (max-width: 640px) {
  #icm-grid- { gap: 12px !important; }
  .icm-card- { flex-direction: column !important; }
  .icm-img-panel- { width: 100% !important; min-height: 200px !important; }
}
{% endif %}