/* PhilCorley Gridzy skin - Fine art portfolio with hover captions
   Place this at: public/vendor/gridzy/skins/gridzySkinPhilCorley/style.css
*/

:root {
  --pc-gap: 22px;
  --pc-mat: 20px;
  --pc-border: rgba(0, 0, 0, 0.18);
  --pc-shadow: 0 10px 28px rgba(0, 0, 0, 0.10);
}

/* Grid container spacing */
.pc-gridzy {
  margin-top: 2.5rem;
}

/* Card frame */
.pc-gridzy > a.pc-card {
  display: block;
  box-sizing: border-box;
  background: #fff;
  border: 1px solid var(--pc-border);
  box-shadow: var(--pc-shadow);
  border-radius: 2px;
  overflow: hidden;
  text-decoration: none;
}

/* Image mat (padding around image - larger bottom for fine art look) */
.pc-card .pc-mat {
  padding: var(--pc-mat);
  padding-bottom: calc(var(--pc-mat) * 2); /* 2x bottom padding for fine art mat effect */
  box-sizing: border-box;
  position: relative; /* anchor hover caption */
}

.pc-card img {
  display: block;
  width: 100%;
  height: auto;
  /* Ensure high-quality image rendering - prevent blur from CSS scaling */
  image-rendering: auto; /* Let browser choose best interpolation method for photos */
  /* Use high-quality interpolation for older browsers */
  -ms-interpolation-mode: bicubic; /* IE */
}

/* Header row */
.pc-genre-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
}

.pc-genre-count {
  font-size: 0.875rem;
  opacity: 0.7;
  white-space: nowrap;
}

/* ============================= */
/* Hover caption (positioned below magnifier icon) */
/* ============================= */

.pc-hovercap {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease;
  z-index: 50;
  transform: translateZ(0); /* Promote to GPU layer for smooth fade */

  display: flex;
  justify-content: center;
  align-items: center;
}

/* Trigger on gridzyItem hover (same as Magnifier overlay) to avoid offset/snap */
.pc-gridzy .gridzyItem:hover .pc-hovercap,
.pc-gridzy .gridzyItem:focus-within .pc-hovercap {
  opacity: 1;
}

/* Position caption below center (where magnifier icon is) */
.pc-hovercap-inner {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, 20%); /* 20% down from center puts it below the icon */
  text-align: center;
  padding: 0 12px;
  max-width: min(90%, 520px);
  width: 100%;
}

.pc-hovercap-title {
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.2;
  color: #fff;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.55);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pc-hovercap-place {
  margin-top: 6px;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.2;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.55);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Darken Magnifier overlay (::after) for better text readability */
.gridzySkinMagnifier .gridzyItem:hover::after,
.gridzySkinMagnifier .gridzyItem:focus-within::after {
  background: rgba(0, 0, 0, 0.62) !important;
}

/* Magnifier icon (::before): always white so it shows on dark hover overlay */
.gridzySkinMagnifier .gridzyItem::before {
  background-color: #fff !important;
}

/* Match Magnifier overlay transition to our hovercap for smooth, unified UX */
.gridzySkinMagnifier .gridzyItem::before,
.gridzySkinMagnifier .gridzyItem::after {
  transition: opacity 0.25s ease !important;
}

/* ============================= */
/* PhotoSwipe Custom Styling */
/* ============================= */

/* Dark grey background */
.pswp {
  --pswp-bg: #2a2a2a !important;
}

/* Disable all animations completely */
.pswp,
.pswp * {
  transition: none !important;
  animation: none !important;
}

/* Remove any PhotoSwipe default styling on images */
.pswp__img {
  padding: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  outline: none !important;
}

/* Hide the default image that PhotoSwipe tries to show */
.pswp__zoom-wrap > img.pswp__img {
  display: none !important;
}

/* Custom lightbox wrapper: PhotoSwipe sets width/height on this; img inside keeps aspect ratio */
.pswp-mat-wrapper {
  z-index: 10 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: hidden;
}

.pswp-mat-wrapper img {
  width: auto !important;
  height: auto !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: contain !important;
}

/* Custom caption styling */
.pswp__custom-caption-title {
  font-family: "Caveat", ui-sans-serif, system-ui, sans-serif;
  font-size: 1.5rem;
  line-height: 1.2;
  color: rgba(0, 0, 0, 0.85);
  text-align: left;
  flex-shrink: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pswp__custom-caption-place {
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 1rem;
  line-height: 1.2;
  color: rgba(0, 0, 0, 0.55);
  text-align: right;
  flex-shrink: 0;
  white-space: nowrap;
}

/* Hide default caption */
.pswp__caption {
  display: none !important;
}

/* UI controls */
.pswp__button {
  background-color: rgba(255, 255, 255, 0.1) !important;
}

.pswp__button:hover {
  background-color: rgba(255, 255, 255, 0.2) !important;
}

/* Ensure content is centered */
.pswp__zoom-wrap {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}