/* =============================================================================================
   Homepage "Prompts Of The Week" (prompts-of-week.html.twig): a plain CSS grid of 3:4 cards,
   4×2 on desktop, 2×3 on phones. Frame: a gradient ring (violet → cyan → orange) that slowly
   runs around every card and speeds up / glows on hover, plus a glare sweep and a small lift.
   Model badge = the same gradient pill as the Featured Images / Videos captions.
   ============================================================================================= */
@property --pw-angle { syntax: '<angle>'; initial-value: 0deg; inherits: false; }

.prompts-week .pw-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 4px 16px; }   /* like the showcase headings above */
.prompts-week .pw-head a { white-space: nowrap; gap: 4px; }
.prompts-week .pw-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.prompts-week .pw-card { position: relative; display: block; border-radius: 14px; padding: 2px; text-decoration: none; color: #fff; isolation: isolate;
  transition: transform .45s cubic-bezier(.2, .8, .2, 1), box-shadow .45s; box-shadow: 0 10px 28px -14px rgba(0, 0, 0, .7); }
/* the ring: a rotating conic gradient behind the 2px padding */
.prompts-week .pw-card::before { content: ''; position: absolute; inset: 0; z-index: -1; border-radius: inherit;
  background: conic-gradient(from var(--pw-angle), #bf68e6, #29beff, #ff9a2e, #bf68e6 50%, rgba(191, 104, 230, .15) 62%, rgba(41, 190, 255, .15) 88%, #bf68e6);
  opacity: .55; animation: pw-spin 9s linear infinite; animation-delay: calc(var(--i, 0) * -1.1s); transition: opacity .4s, filter .4s; }
/* soft outer glow from the same gradient, only on hover */
.prompts-week .pw-card::after { content: ''; position: absolute; inset: -6px; z-index: -2; border-radius: 18px;
  background: conic-gradient(from var(--pw-angle), #bf68e6, #29beff, #ff9a2e, #bf68e6); filter: blur(16px); opacity: 0;
  animation: pw-spin 9s linear infinite; animation-delay: calc(var(--i, 0) * -1.1s); transition: opacity .45s; }
.prompts-week .pw-frame { position: relative; display: block; aspect-ratio: 3 / 4; overflow: hidden; border-radius: 12px; background: #1a1345; }
.prompts-week .pw-frame img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .7s cubic-bezier(.2, .8, .2, 1), filter .5s; }
/* diagonal glare that sweeps across once per hover */
.prompts-week .pw-glare { position: absolute; inset: 0; pointer-events: none; z-index: 1;
  background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, .28) 46%, rgba(255, 255, 255, .06) 54%, transparent 66%);
  transform: translateX(-120%); }
/* caption: category, then the model badge at the very bottom, on a dark fade */
.prompts-week .pw-meta { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; display: flex; flex-direction: column; align-items: flex-start; gap: 7px;
  padding: 44px 12px 12px; background: linear-gradient(180deg, transparent, rgba(10, 6, 34, .55) 40%, rgba(10, 6, 34, .9)); }
.prompts-week .pw-cat { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; font-size: 15px; line-height: 1.2;
  text-shadow: 0 1px 6px rgba(0, 0, 0, .6); }
.prompts-week .pw-model { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase;
  font-weight: 700; line-height: 1.2; padding: 4px 9px; border-radius: 99px; color: #fff; background: linear-gradient(90deg, rgba(191, 104, 230, .85), rgba(41, 190, 255, .75)); }

.prompts-week .pw-card:is(:hover, :focus-visible) { transform: translateY(-6px); box-shadow: 0 22px 40px -18px rgba(120, 60, 220, .8); }
.prompts-week .pw-card:is(:hover, :focus-visible)::before { opacity: 1; animation-duration: 2.6s; }
.prompts-week .pw-card:is(:hover, :focus-visible)::after { opacity: .55; animation-duration: 2.6s; }
.prompts-week .pw-card:is(:hover, :focus-visible) img { transform: scale(1.06); filter: saturate(1.12) brightness(1.05); }
.prompts-week .pw-card:is(:hover, :focus-visible) .pw-glare { transform: translateX(120%); transition: transform .9s ease; }
.prompts-week .pw-card:focus-visible { outline: none; }

@keyframes pw-spin { to { --pw-angle: 360deg; } }

@media (max-width: 991px) { .prompts-week .pw-grid { gap: 16px; } }
@media (max-width: 767px) {
  .prompts-week .pw-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .prompts-week .pw-card:nth-child(n+7) { display: none; }
  .prompts-week .pw-meta { padding: 34px 9px 9px; gap: 5px; }
  .prompts-week .pw-cat { font-size: 13px; }
  .prompts-week .pw-model { font-size: 9px; letter-spacing: 1px; padding: 3px 7px; }
}
@media (prefers-reduced-motion: reduce) {
  .prompts-week .pw-card::before, .prompts-week .pw-card::after { animation: none; }
  .prompts-week .pw-card, .prompts-week .pw-frame img { transition-duration: .01s; }
  .prompts-week .pw-card:is(:hover, :focus-visible) .pw-glare { transition: none; }
}
