/* ============================================================
   POSE LIBRARY — pose-lib.css
   Clean 3-column uniform grid (Instagram/portfolio style)
   ============================================================ */

/* ---------- Hero ---------- */
.pose-hero-section {
   padding: 64px 24px 44px;
   text-align: center;
   max-width: 620px;
   margin: 0 auto;
}

.pose-hero-badge {
   display: inline-flex;
   align-items: center;
   gap: 7px;
   border: 1px solid rgba(0, 133, 47, 0.28);
   border-radius: 999px;
   padding: 5px 16px;
   margin-bottom: 20px;
   font-size: 11px;
   font-weight: 700;
   letter-spacing: 0.08em;
   text-transform: uppercase;
   color: #00852f;
   background: rgba(0, 133, 47, 0.07);
   animation: pl-up 0.5s ease both;
}

.pose-hero-badge-dot {
   width: 6px;
   height: 6px;
   border-radius: 50%;
   background: #00852f;
   animation: pl-pulse 2s ease-in-out infinite;
}

.pose-hero-section h1 {
   margin: 0 0 14px;
   font-size: clamp(1.75rem, 4vw, 2.8rem);
   font-weight: 800;
   line-height: 1.18;
   letter-spacing: -0.03em;
   animation: pl-up 0.5s 0.07s ease both;
}

.pose-hero-desc {
   font-size: clamp(0.875rem, 1.8vw, 0.975rem);
   line-height: 1.7;
   opacity: 0.58;
   margin: 0;
   animation: pl-up 0.5s 0.14s ease both;
}

@keyframes pl-up {
   from { opacity: 0; transform: translateY(14px); }
   to   { opacity: 1; transform: translateY(0); }
}

@keyframes pl-pulse {
   0%, 100% { opacity: 1; }
   50%       { opacity: 0.25; }
}

/* ---------- Grid outer ---------- */
.pose-grid-outer {
   padding: 0 12px 80px;
   max-width: 1100px;
   margin: 0 auto;
}

/* ---------- CSS GRID: 3 equal columns ---------- */
.pose-masonry-grid {
   display: grid;
   grid-template-columns: repeat(3, 1fr);
   gap: 5px;
}

/* ---------- Each cell ---------- */
.pose-card-wrapper {
   display: block;
   position: relative;
   overflow: hidden;
   /* 4:3 landscape ratio to keep rows uniform */
   aspect-ratio: 4 / 3;
   background: #ddd;
   border-radius: 0;
   cursor: pointer;
}

/* ---------- Image fills the cell ---------- */
.pose-card {
   display: block;
   width: 100%;
   height: 100%;
   position: relative;
   text-decoration: none;
   color: inherit;
}

.pose-card-img {
   display: block;
   width: 100%;
   height: 100%;
   object-fit: cover;
   object-position: center;
   transition: transform 0.42s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.pose-card-wrapper:hover .pose-card-img {
   transform: scale(1.06);
}

/* ---------- Hover overlay ---------- */
.pose-card-overlay {
   position: absolute;
   inset: 0;
   background: linear-gradient(
      to top,
      rgba(0, 0, 0, 0.68) 0%,
      rgba(0, 0, 0, 0.2)  40%,
      transparent         72%
   );
   opacity: 0;
   transition: opacity 0.3s ease;
   pointer-events: none;
   z-index: 2;
}

.pose-card-wrapper:hover .pose-card-overlay {
   opacity: 1;
}

/* ---------- Bottom actions (on hover) ---------- */
.pose-card-actions {
   position: absolute;
   bottom: 0;
   left: 0;
   right: 0;
   padding: 10px 10px 12px;
   display: flex;
   align-items: flex-end;
   justify-content: space-between;
   gap: 6px;
   z-index: 3;
   opacity: 0;
   transform: translateY(6px);
   transition: opacity 0.28s ease, transform 0.28s ease;
}

.pose-card-wrapper:hover .pose-card-actions {
   opacity: 1;
   transform: translateY(0);
}

/* ---------- Tag pill ---------- */
.pose-card-tag {
   background: rgba(255, 255, 255, 0.14);
   backdrop-filter: blur(10px);
   -webkit-backdrop-filter: blur(10px);
   border: 1px solid rgba(255, 255, 255, 0.2);
   border-radius: 999px;
   padding: 4px 10px;
   font-size: 10px;
   font-weight: 600;
   color: rgba(255, 255, 255, 0.92);
   letter-spacing: 0.02em;
   white-space: nowrap;
   overflow: hidden;
   text-overflow: ellipsis;
   max-width: 68%;
}

/* ---------- Save button ---------- */
.pose-save-btn {
   width: 32px;
   height: 32px;
   border-radius: 50%;
   background: rgba(255, 255, 255, 0.14);
   backdrop-filter: blur(10px);
   -webkit-backdrop-filter: blur(10px);
   border: 1px solid rgba(255, 255, 255, 0.22);
   display: flex;
   align-items: center;
   justify-content: center;
   cursor: pointer;
   flex-shrink: 0;
   transition:
      background   0.2s ease,
      border-color 0.2s ease,
      transform    0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
   z-index: 10;
}

.pose-save-btn:hover {
   background: rgba(251, 191, 36, 0.25);
   border-color: rgba(251, 191, 36, 0.55);
   transform: scale(1.18);
}

.pose-save-btn.is-saved {
   background: rgba(251, 191, 36, 0.2);
   border-color: rgba(251, 191, 36, 0.5);
}

.pose-save-btn .star-icon {
   width: 15px;
   height: 15px;
   display: block;
   transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.pose-save-btn:hover .star-icon {
   transform: scale(1.2) rotate(-6deg);
}

/* ---------- Saves count badge (always visible, top-right) ---------- */
.pose-saves-badge {
   position: absolute;
   top: 8px;
   right: 8px;
   z-index: 5;
   display: flex;
   align-items: center;
   gap: 3px;
   background: rgba(0, 0, 0, 0.5);
   backdrop-filter: blur(6px);
   -webkit-backdrop-filter: blur(6px);
   border: 1px solid rgba(255, 255, 255, 0.08);
   border-radius: 999px;
   padding: 3px 7px;
   font-size: 10px;
   font-weight: 600;
   color: rgba(255, 255, 255, 0.9);
   transition: opacity 0.2s ease;
   pointer-events: none;
}

.pose-saves-badge svg { width: 10px; height: 10px; flex-shrink: 0; }
.pose-card-wrapper:hover .pose-saves-badge { opacity: 0; }

/* ---------- New-batch entrance animation ---------- */
@keyframes pl-new-in {
   0%   { opacity: 0; transform: scale(0.95); box-shadow: inset 0 0 0 3px rgba(0,133,47,0.7); }
   50%  { opacity: 1; transform: scale(1);    box-shadow: inset 0 0 0 2px rgba(0,133,47,0.3); }
   100% {                                      box-shadow: inset 0 0 0 0px rgba(0,133,47,0);   }
}

.pose-card-wrapper.is-new {
   animation: pl-new-in 0.65s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* Stagger per position in grid */
.pose-card-wrapper.is-new:nth-child(3n+1) { animation-delay: 0ms;   }
.pose-card-wrapper.is-new:nth-child(3n+2) { animation-delay: 60ms;  }
.pose-card-wrapper.is-new:nth-child(3n+3) { animation-delay: 120ms; }

/* ---------- Empty state ---------- */
.pose-empty-state {
   grid-column: 1 / -1;
   text-align: center;
   padding: 80px 24px;
   opacity: 0.5;
}

/* ---------- Load More ---------- */
.pose-load-more-section {
   padding: 32px 0 64px;
   display: flex;
   justify-content: center;
}

.pose-load-more-btn {
   display: inline-flex !important;
   align-items: center;
   gap: 10px;
   padding: 13px 34px;
   background: transparent !important;
   background-color: transparent !important;
   border: 1.5px solid rgba(0, 133, 47, 0.4) !important;
   border-radius: 999px;
   font-size: 0.875rem;
   font-weight: 600;
   color: #00852f !important;
   cursor: pointer;
   letter-spacing: 0.015em;
   -webkit-appearance: none;
   appearance: none;
   box-shadow: none;
   transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
   position: relative;
}

.pose-load-more-btn:hover {
   border-color: rgba(0, 133, 47, 0.7) !important;
   transform: translateY(-2px);
   box-shadow: 0 8px 22px rgba(0, 133, 47, 0.15);
}

.pose-load-more-btn:disabled {
   opacity: 0.45;
   cursor: not-allowed;
   transform: none !important;
   box-shadow: none !important;
}

.pose-load-more-btn .pose-spinner {
   width: 15px;
   height: 15px;
   border: 2px solid rgba(0, 133, 47, 0.25);
   border-top-color: #00852f;
   border-radius: 50%;
   animation: pl-spin 0.7s linear infinite;
   display: none;
   flex-shrink: 0;
}

.pose-load-more-btn.is-loading .pose-spinner  { display: block; }
.pose-load-more-btn.is-loading .pose-btn-label { opacity: 0.5; }

@keyframes pl-spin { to { transform: rotate(360deg); } }

.pose-remaining-pill {
   background: rgba(0, 133, 47, 0.1);
   border-radius: 999px;
   padding: 2px 10px;
   font-size: 11px;
   font-weight: 700;
   color: #00852f !important;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* ≤ 900px: 3 cols tighter */
@media (max-width: 900px) {
   .pose-masonry-grid  { gap: 4px; }
   .pose-grid-outer    { padding: 0 8px 64px; }
   .pose-hero-section  { padding: 52px 20px 36px; }
}

/* ≤ 640px: 2 columns */
@media (max-width: 640px) {
   .pose-masonry-grid  { grid-template-columns: repeat(2, 1fr); gap: 4px; }
   .pose-grid-outer    { padding: 0 6px 56px; }
   .pose-hero-section  { padding: 40px 16px 28px; }
   .pose-hero-section h1 { font-size: 1.5rem; }
}

/* ≤ 400px: 2 columns still, tiny gap */
@media (max-width: 400px) {
   .pose-masonry-grid  { gap: 3px; }
}

/* ============================================================
   LOAD MORE — cta-block integration
   ============================================================ */

/* Remaining count number inside subtitle */
.pose-remaining-count {
   font-weight: 800;
   color: #00852f;
}

/* Inline spinner inside cta button */
.pose-spinner-inner {
   display: none;
   width: 13px;
   height: 13px;
   border: 2px solid rgba(255, 255, 255, 0.35);
   border-top-color: currentColor;
   border-radius: 50%;
   animation: pl-spin 0.7s linear infinite;
   flex-shrink: 0;
   vertical-align: middle;
   margin-right: 6px;
}

/* Show spinner when button is in loading state */
#load-more-btn.is-loading .pose-spinner-inner {
   display: inline-block;
}

/* Dim button while loading */
#load-more-btn.is-loading {
   opacity: 0.7;
   pointer-events: none;
   cursor: not-allowed;
}

/* ============================================================
   CARD BUTTON GROUP (expand + save side-by-side)
   ============================================================ */

.pose-card-btn-group {
   display: flex;
   align-items: center;
   gap: 6px;
   flex-shrink: 0;
}

/* ============================================================
   EXPAND / VIEW FULL IMAGE BUTTON
   ============================================================ */

.pose-view-btn {
   width: 32px;
   height: 32px;
   border-radius: 50%;
   background: rgba(255, 255, 255, 0.14);
   backdrop-filter: blur(10px);
   -webkit-backdrop-filter: blur(10px);
   border: 1px solid rgba(255, 255, 255, 0.22);
   display: flex;
   align-items: center;
   justify-content: center;
   cursor: pointer;
   flex-shrink: 0;
   transition:
      background   0.2s ease,
      border-color 0.2s ease,
      transform    0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
   color: rgba(255, 255, 255, 0.9);
}

.pose-view-btn svg {
   width: 14px;
   height: 14px;
   display: block;
   transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.pose-view-btn:hover {
   background: rgba(255, 255, 255, 0.28);
   border-color: rgba(255, 255, 255, 0.45);
   transform: scale(1.18);
}

.pose-view-btn:hover svg {
   transform: scale(1.15);
}

/* ============================================================
   LIGHTBOX MODAL
   ============================================================ */

/* Prevent body scroll when lightbox is open */
body.pose-lb-open {
   overflow: hidden;
}

/* Full-viewport overlay */
.pose-lightbox {
   position: fixed;
   inset: 0;
   z-index: 9999;
   display: flex;
   align-items: center;
   justify-content: center;
   /* Hidden by default */
   opacity: 0;
   pointer-events: none;
   transition: opacity 0.28s ease;
}

.pose-lightbox.is-open {
   opacity: 1;
   pointer-events: all;
}

/* Dark backdrop */
.pose-lightbox-backdrop {
   position: absolute;
   inset: 0;
   background: rgba(0, 0, 0, 0.88);
   backdrop-filter: blur(6px);
   -webkit-backdrop-filter: blur(6px);
}

/* Centred container */
.pose-lightbox-inner {
   position: relative;
   z-index: 1;
   display: flex;
   align-items: center;
   justify-content: center;
   width: 100%;
   height: 100%;
   padding: 48px 20px 20px;
   box-sizing: border-box;
}

/* Image wrapper: constrains max size */
.pose-lightbox-img-wrap {
   max-width: min(90vw, 960px);
   max-height: 88vh;
   display: flex;
   align-items: center;
   justify-content: center;
   transform: scale(0.94);
   transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.pose-lightbox.is-open .pose-lightbox-img-wrap {
   transform: scale(1);
}

/* The actual image */
.pose-lightbox-img {
   display: block;
   max-width: 100%;
   max-height: 88vh;
   width: auto;
   height: auto;
   object-fit: contain;
   border-radius: 10px;
   box-shadow: 0 32px 80px rgba(0, 0, 0, 0.6);
   user-select: none;
   -webkit-user-drag: none;
}

/* Close (×) button — top-right corner */
.pose-lightbox-close {
   position: fixed;
   top: 18px;
   right: 22px;
   z-index: 2;
   width: 40px;
   height: 40px;
   border-radius: 50%;
   background: rgba(255, 255, 255, 0.1);
   backdrop-filter: blur(8px);
   -webkit-backdrop-filter: blur(8px);
   border: 1px solid rgba(255, 255, 255, 0.18);
   display: flex;
   align-items: center;
   justify-content: center;
   cursor: pointer;
   color: #fff;
   transition:
      background  0.2s ease,
      transform   0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
   -webkit-appearance: none;
   appearance: none;
}

.pose-lightbox-close svg {
   width: 18px;
   height: 18px;
   display: block;
}

.pose-lightbox-close:hover {
   background: rgba(255, 255, 255, 0.22);
   transform: scale(1.12) rotate(90deg);
}

/* Mobile: full-width image, smaller close btn */
@media (max-width: 640px) {
   .pose-lightbox-img-wrap {
      max-width: 96vw;
      max-height: 82vh;
   }
   .pose-lightbox-img {
      max-height: 82vh;
      border-radius: 6px;
   }
   .pose-lightbox-close {
      top: 12px;
      right: 14px;
      width: 36px;
      height: 36px;
   }
}
