/* SimplyIrfan Magazine v2.10.13 — Sliding Card Grid refinements.
   Loaded after the main theme and footer styles so these rules remain authoritative. */

/* Editor's Picks: remove the excerpt from image cards and keep the remaining
   title/metadata together at the bottom of the image. */
.home .editor-grid.si-home-cards--slider > article.editor-card > .editor-copy {
  position: absolute !important;
  z-index: 2 !important;
  top: auto !important;
  right: clamp(16px, 2vw, 30px) !important;
  bottom: 18px !important;
  left: clamp(16px, 2vw, 30px) !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  justify-content: flex-end !important;
  gap: 7px !important;
  width: auto !important;
  max-width: none !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  color: #fff !important;
  text-align: left !important;
}
.home .editor-grid.si-home-cards--slider > article.editor-card > .editor-copy > .traditional-excerpt,
.home .editor-grid.si-home-cards--slider > article.editor-card > .editor-copy > p.traditional-excerpt {
  display: none !important;
}
.home .editor-grid.si-home-cards--slider > article.editor-card > .editor-copy > h3 {
  position: static !important;
  inset: auto !important;
  order: 1 !important;
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  color: #fff !important;
  background: transparent !important;
  font-size: clamp(17px, 1.5vw, 23px) !important;
  font-weight: 800 !important;
  line-height: 1.25 !important;
  letter-spacing: -.25px !important;
  text-align: left !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .45) !important;
}
.home .editor-grid.si-home-cards--slider > article.editor-card > .editor-copy > h3 > a {
  color: #fff !important;
  text-decoration: none !important;
}
.home .editor-grid.si-home-cards--slider > article.editor-card > .editor-copy > .traditional-meta {
  position: static !important;
  order: 2 !important;
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: flex-start !important;
  gap: 5px 8px !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  color: rgba(255, 255, 255, .88) !important;
  font-size: 11px !important;
  line-height: 1.25 !important;
  text-align: left !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .65) !important;
}
.home .editor-grid.si-home-cards--slider > article.editor-card > .editor-copy > .traditional-meta * {
  color: rgba(255, 255, 255, .92) !important;
}

/* Latest Posts: match the Editor's Picks image-overlay title treatment.
   The image link is raised above the card shade so its title remains crisp. */
.home .latest-grid.si-home-cards--slider > article.latest-card > .latest-image {
  z-index: 2 !important;
}
.home .latest-grid.si-home-cards--slider > article.latest-card > .latest-image::after {
  content: "" !important;
  position: absolute !important;
  inset: 30% 0 0 !important;
  z-index: 1 !important;
  background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, .08) 35%, rgba(0, 0, 0, .84) 100%) !important;
  pointer-events: none !important;
}
.home .latest-grid.si-home-cards--slider > article.latest-card > .latest-image > .latest-title {
  position: absolute !important;
  z-index: 3 !important;
  top: auto !important;
  right: clamp(16px, 2vw, 30px) !important;
  bottom: 20px !important;
  left: clamp(16px, 2vw, 30px) !important;
  display: block !important;
  width: auto !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  color: #fff !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  font-size: clamp(17px, 1.5vw, 23px) !important;
  font-weight: 800 !important;
  line-height: 1.25 !important;
  letter-spacing: -.25px !important;
  text-align: left !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .45) !important;
  overflow-wrap: break-word !important;
}

/* Tablet: show two complete cards across all Sliding Card Grid sections.
   Phone widths retain the existing mobile card-count behavior. */
@media (min-width: 481px) and (max-width: 1024px) {
  .home .si-home-cards--slider,
  .home .category-story-grid.si-home-cards--slider {
    column-gap: 12px !important;
    gap: 0 12px !important;
  }
  .home .si-home-cards--slider > article,
  .home .category-story-grid.si-home-cards--slider > .category-story-card {
    flex: 0 0 calc(50% - 6px) !important;
    width: calc(50% - 6px) !important;
    max-width: calc(50% - 6px) !important;
  }
}

@media (max-width: 700px) {
  .home .editor-grid.si-home-cards--slider > article.editor-card > .editor-copy {
    right: 16px !important;
    bottom: 16px !important;
    left: 16px !important;
    gap: 6px !important;
  }
  .home .editor-grid.si-home-cards--slider > article.editor-card > .editor-copy > h3,
  .home .latest-grid.si-home-cards--slider > article.latest-card > .latest-image > .latest-title {
    right: 16px !important;
    left: 16px !important;
    font-size: 17px !important;
    line-height: 1.28 !important;
  }
  .home .latest-grid.si-home-cards--slider > article.latest-card > .latest-image > .latest-title {
    bottom: 20px !important;
  }
}
