/* 
  ========================================================================
  PEACE WORLD - SHARED CARDS STYLING (cards.css)
  ========================================================================
*/

/* Content Card Primaries */
.card-thumbnail-container {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  background-color: var(--color-sand);
}

.card-thumbnail-container img {
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.card-parchment:hover .card-thumbnail-container img {
  transform: scale(1.06);
}

/* ==========================================================================
   COVER IMAGE ORIENTATION HANDLING
   --------------------------------------------------------------------------
   cover-orientation.js detects each cover image's real dimensions and
   swaps the object-cover/object-contain Tailwind classes directly. This
   block styles the soft backdrop that shows through on the sides when a
   portrait cover is letterboxed inside a wider card frame (or vice versa),
   instead of leaving empty space or letting the image get harshly cropped.
   ========================================================================== */
.cover-letterbox-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, var(--color-sand, #f3ead9) 0%, #e7ddc8 100%);
  z-index: 0;
}

.card-thumbnail-container img.cover-orientation-aware {
  position: relative;
  z-index: 1;
}

/* Card hover zoom looks odd on a letterboxed (non-cropped) portrait cover
   since it would zoom into empty backdrop space rather than the image
   itself — keep those covers static on hover instead. */
.card-parchment:hover .card-thumbnail-container img.cover-portrait {
  transform: none;
}

/* Card Badge overlays */
.card-badge {
  position: absolute;
  top: 12px;
  inset-inline-start: 12px; /* Logical RTL-safe offset */
  z-index: 10;
  backdrop-filter: blur(4px);
}

/* ===== Pagination ===== */
nav[aria-label="Pagination"] a,
nav[aria-label="Pagination"] span {
  font-family: 'Inter', system-ui, sans-serif;
  min-width: 2.5rem;
  text-align: center;
}

nav[aria-label="Pagination"] a:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

nav[aria-label="Pagination"] .bg-peace-600 {
  background-color: var(--color-teal, #427c73);
}

/* RTL support – mirror the arrows if needed, but we use text labels so no arrow symbols */
[dir="rtl"] nav[aria-label="Pagination"] a {
  font-family: 'Vazirmatn', 'Inter', sans-serif;
}