/**
 * @file
 * Styles for the multicontent simple card grid layout.
 */

/* Grid container styles - override Stable theme float-based layout */
.views-view-grid.multicontent-grid {
  display: grid !important;
  grid-template-columns: repeat(4, 272px);
  gap: 40px;
  width: 100%;
  float: none;
  clear: none;
}

/* Ensure child articles don't float */
.views-view-grid.multicontent-grid > article,
.views-view-grid.multicontent-grid > .simple_card {
  float: none;
  clear: none;
}

/* Simple card component */
.simple_card {
  display: flex;
  flex-direction: column;
  background: #ffffff;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  width: 100%;
  height: 100%;
  border-bottom: 4px solid #e0e0e0;
}

/* Image wrapper */
.simple_card__image-wrapper {
  position: relative;
  width: 100%;
  height: 340px;
  overflow: hidden;
  background: #f5f5f5;
}

.simple_card__image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.simple_card__image-placeholder {
  aspect-ratio: 3 / 4;
  background: #f5f5f5;
  width: 100%;
}

/* Link and title */
.simple_card__link {
  display: block;
  padding: 1.25rem;
  text-decoration: none;
  color: inherit;
  flex: 1;
}

.simple_card__link:hover,
.simple_card__link:focus {
  text-decoration: none;
}

.simple_card__link:focus {
  outline: 2px solid #4A90E2;
  outline-offset: 2px;
}

.simple_card__title {
  margin: 0;
  font-weight: 700;
  font-size: 24px;
  line-height: 28px;
  letter-spacing: -0.01em;
  color: #1a1a1a;
  overflow-wrap: break-word;
}

.simple_card__link:hover .simple_card__title {
  color: #4A90E2;
}

/* Responsive breakpoints */

/* Tablet: 2 columns */
@media (max-width: 1023px) {
  .views-view-grid.multicontent-grid {
    grid-template-columns: repeat(2, 272px);
    gap: 40px;
  }
}

/* Mobile: 1 column */
@media (max-width: 767px) {
  .views-view-grid.multicontent-grid {
    grid-template-columns: 342px;
    gap: 40px;
  }

  .simple_card__image-wrapper {
    height: 479.5px;
  }

  .simple_card__image-wrapper img {
    height: 100%;
    object-fit: cover;
  }
}

/* Large screens: maintain max width and center */
@media (min-width: 1440px) {
  .views-view-grid.multicontent-grid {
    gap: 40px;
  }
}
