
/* Strict Removal of All Text Overlays and Story Cards Over Images */
.pl-note,
.pl-cap-pill,
.pl-cap,
.pl-title,
.pl-sub,
.pl-count-capsule {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/**
 * Polaroid Line Carousel — Instant photos pegged to a sagging string.
 * Vanilla CSS implementation ported from React/Originkit Architecture.
 * Durga Public School, Pilani, Rajasthan
 */

.pl-root {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 480px;
  overflow: hidden;
  background: var(--pl-bg, #FAF8F4);
  color: var(--pl-ink, #2E0815);
  user-select: none;
  -webkit-user-select: none;
  touch-action: pan-y pinch-zoom;
  outline: none;
  cursor: grab;
  border-radius: inherit;
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}

.pl-root[data-drag='1'] {
  cursor: grabbing;
}

.pl-root:focus-visible {
  box-shadow: inset 0 0 0 2px var(--pl-ink, #2E0815);
}

/* The Sagging String SVG */
.pl-string {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
  z-index: 2;
}

/* Pegged Print Card */
.pl-card {
  position: absolute;
  left: 0;
  top: 0;
  width: var(--pl-cw, 280px);
  transform-origin: 50% 0;
  will-change: transform;
  cursor: inherit;
  transition: opacity 0.3s ease;
  z-index: 50;
}

/* Polaroid White/Cream Paper Mount */
.pl-print {
  margin-top: 10px;
  background: #FCFBF9;
  padding: 12px 12px 0 12px;
  border-radius: 4px;
  border: 1px solid rgba(217, 184, 138, 0.4);
  box-shadow: 0 4px 12px rgba(46, 8, 21, 0.10), 0 20px 34px -16px rgba(46, 8, 21, 0.35);
  transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1),
              filter 0.5s ease,
              box-shadow 0.5s ease,
              border-color 0.5s ease;
}

.pl-card[data-on='0'] .pl-print {
  transform: scale(0.9);
  filter: saturate(0.72) brightness(0.95);
  opacity: 0.92;
}

.pl-card[data-on='1'] .pl-print {
  transform: scale(1);
  filter: none;
  border-color: rgba(217, 184, 138, 0.9);
  box-shadow: 0 8px 20px rgba(46, 8, 21, 0.15), 0 26px 44px -16px rgba(46, 8, 21, 0.42);
}

/* Photo Snapshot Area */
.pl-shot {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background: #EAE6DD;
  border-radius: 2px;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.12);
}

.pl-shot img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  display: block;
  pointer-events: none;
  user-select: none;
}

/* Special containment for newspaper clippings & document archival display */
.pl-shot.pl-shot-contain {
  background: #FAF8F5;
}

.pl-shot.pl-shot-contain img {
  object-fit: contain;
  padding: 6px;
  box-sizing: border-box;
}

/* Handwritten / Serif Polaroid Note */
.pl-note {
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
  font-style: italic;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  color: #3B3833;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
}

/* Wooden Clothespin Peg */
.pl-peg {
  position: absolute;
  left: 50%;
  top: 0;
  width: 11px;
  height: 28px;
  margin-left: -5.5px;
  border-radius: 2px;
  background: linear-gradient(90deg, #C9A67A 0%, #E3C9A1 45%, #B8915F 100%);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.28);
  z-index: 10;
}

/* Peg Metal Spring Notch */
.pl-peg::after {
  content: '';
  position: absolute;
  left: 4.5px;
  top: 9px;
  width: 2px;
  height: 8px;
  background: rgba(80, 60, 30, 0.55);
  border-radius: 1px;
}

/* ==========================================================================
   WINE-TINTED LIQUID GLASS FLOATING CONTROLS DOCK
   Transforms bottom bar into crystalline wine-tinted frosted glass with separated functions
   ========================================================================== */

.pl-dock,
.pl-bar {
  position: absolute;
  left: clamp(14px, 3.5vw, 36px);
  right: clamp(14px, 3.5vw, 36px);
  bottom: clamp(14px, 2.5vh, 26px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  cursor: default;
  z-index: 25 !important; /* Kept lower than cards (50-120) so image overlaps info everywhere! */
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  pointer-events: none;
}

/* 1. Wine-Tinted Liquid Glass Caption Card (Title & Subtitle) */
.pl-cap-pill {
  position: relative;
  z-index: 25 !important;
  pointer-events: auto;
  flex: 1;
  min-width: 0;
  max-width: clamp(280px, 68%, 780px);
  padding: 10px 22px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(64, 12, 32, 0.72) 0%, rgba(30, 6, 16, 0.80) 100%) !important;
  border: 1px solid rgba(217, 184, 138, 0.45) !important;
  backdrop-filter: blur(24px) saturate(190%) !important;
  -webkit-backdrop-filter: blur(24px) saturate(190%) !important;
  box-shadow:
    0 12px 32px -4px rgba(16, 2, 8, 0.45),
    0 4px 12px rgba(16, 2, 8, 0.25),
    inset 0 1px 1.5px rgba(255, 255, 255, 0.22),
    inset 0 -1px 1px rgba(0, 0, 0, 0.35) !important;
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.3s ease;
}

.pl-cap-pill:hover {
  transform: translateY(-2px);
  border-color: rgba(217, 184, 138, 0.75) !important;
  box-shadow:
    0 16px 42px -6px rgba(16, 2, 8, 0.55),
    inset 0 1px 2px rgba(255, 255, 255, 0.35) !important;
}

.pl-cap {
  width: 100%;
  min-width: 0;
  overflow: hidden;
  padding-bottom: 0.1em;
}

.pl-cap > * {
  display: block;
  animation: pl-in 0.55s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.pl-title {
  font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
  font-weight: 700;
  font-size: clamp(15px, 1.7vw, 19px);
  line-height: 1.25;
  color: #FFFFFF !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.pl-sub {
  margin-top: 3px;
  font-size: 13px;
  line-height: 1.35;
  color: rgba(255, 245, 235, 0.88) !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 2. Wine-Tinted Liquid Glass Separated Navigation Pod */
.pl-nav-pod {
  position: relative;
  z-index: 25 !important;
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* 2a. Standalone Wine-Tinted Liquid Glass Counter Capsule */
.pl-count-capsule,
.pl-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(64, 12, 32, 0.72) 0%, rgba(30, 6, 16, 0.80) 100%) !important;
  border: 1px solid rgba(217, 184, 138, 0.45) !important;
  backdrop-filter: blur(24px) saturate(190%) !important;
  -webkit-backdrop-filter: blur(24px) saturate(190%) !important;
  box-shadow:
    0 8px 24px -4px rgba(16, 2, 8, 0.35),
    inset 0 1px 1.5px rgba(255, 255, 255, 0.22) !important;
  font-family: 'JetBrains Mono', SFMono-Regular, Menlo, monospace;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.10em;
  color: rgba(255, 245, 235, 0.92) !important;
  flex-shrink: 0;
}

.pl-count-capsule b,
.pl-count b {
  color: #FBBF24 !important;
  font-weight: 800;
}

/* 2b & 2c. Standalone Wine-Tinted Liquid Glass Circular Navigation Buttons */
.pl-btn {
  appearance: none;
  -webkit-appearance: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(64, 12, 32, 0.72) 0%, rgba(30, 6, 16, 0.80) 100%) !important;
  border: 1px solid rgba(217, 184, 138, 0.45) !important;
  backdrop-filter: blur(24px) saturate(190%) !important;
  -webkit-backdrop-filter: blur(24px) saturate(190%) !important;
  box-shadow:
    0 8px 24px -4px rgba(16, 2, 8, 0.35),
    inset 0 1px 1.5px rgba(255, 255, 255, 0.22) !important;
  color: #FFFFFF !important;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1),
              background 0.25s ease,
              color 0.25s ease,
              border-color 0.25s ease,
              box-shadow 0.25s ease;
  flex-shrink: 0;
}

.pl-btn:hover {
  background: linear-gradient(135deg, rgba(88, 16, 44, 0.90) 0%, rgba(46, 8, 24, 0.95) 100%) !important;
  color: #FFD98A !important;
  border-color: rgba(245, 158, 11, 0.8) !important;
  transform: scale(1.08);
  box-shadow:
    0 12px 30px -4px rgba(16, 2, 8, 0.5),
    0 0 18px rgba(255, 217, 138, 0.45) !important;
}

.pl-btn:active {
  transform: scale(0.96);
}

.pl-btn:focus-visible {
  outline: 2px solid var(--gold-400, #E6C285);
  outline-offset: 2px;
}

/* 3. Floating Wine-Tinted Liquid Glass Stage Flank Paddles (Left & Right) */
.pl-flank-arrow {
  position: absolute;
  top: 48%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(64, 12, 32, 0.72) 0%, rgba(30, 6, 16, 0.80) 100%) !important;
  border: 1px solid rgba(217, 184, 138, 0.45) !important;
  backdrop-filter: blur(24px) saturate(190%) !important;
  -webkit-backdrop-filter: blur(24px) saturate(190%) !important;
  box-shadow:
    0 10px 28px -6px rgba(16, 2, 8, 0.4),
    inset 0 1px 1.5px rgba(255, 255, 255, 0.22) !important;
  color: #FFFFFF !important;
  display: grid;
  place-items: center;
  cursor: pointer;
  z-index: 150 !important;
  transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.pl-flank-arrow:hover {
  background: linear-gradient(135deg, rgba(88, 16, 44, 0.92) 0%, rgba(46, 8, 24, 0.95) 100%) !important;
  color: #FFD98A !important;
  border-color: rgba(245, 158, 11, 0.8) !important;
  transform: translateY(-50%) scale(1.08);
  box-shadow:
    0 12px 32px -4px rgba(16, 2, 8, 0.55),
    0 0 20px rgba(255, 217, 138, 0.45) !important;
}

.pl-flank-arrow.prev {
  left: clamp(10px, 2.2vw, 24px);
}

.pl-flank-arrow.next {
  right: clamp(10px, 2.2vw, 24px);
}

.pl-flank-arrow:hover {
  background: #2E0815;
  color: #FFD98A;
  border-color: #2E0815;
  transform: translateY(-50%) scale(1.12);
  box-shadow: 0 14px 34px -4px rgba(46, 8, 21, 0.35);
}

.pl-flank-arrow:active {
  transform: translateY(-50%) scale(0.96);
}

/* Accessibility screen-reader hidden span */
.pl-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

@keyframes pl-in {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: none;
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pl-cap > * {
    animation: none;
  }
  .pl-print {
    transition: none;
  }
}

/* Mobile & Tablet adjustments */
@media (max-width: 768px) {
  .pl-root {
    min-height: 420px;
  }
  .pl-dock,
  .pl-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    bottom: 12px;
    left: 10px;
    right: 10px;
  }
  .pl-cap-pill {
    max-width: 100%;
    padding: 8px 16px;
    border-radius: 14px;
  }
  .pl-title {
    font-size: 0.92rem;
  }
  .pl-sub {
    font-size: 0.74rem;
  }
  .pl-nav-pod {
    justify-content: space-between;
    width: 100%;
  }
  .pl-count-capsule,
  .pl-count {
    padding: 6px 14px;
    font-size: 11px;
  }
  .pl-btn {
    width: 40px;
    height: 40px;
  }
  .pl-btn svg {
    width: 16px;
    height: 16px;
  }
  .pl-flank-arrow {
    display: none;
  }
}

/* ==========================================================================
   GALLERY POLAROID LINE CAROUSEL THEME INTEGRATION
   Durga Public School - Archival Photo Album Experience
   ========================================================================== */

/* Global Presentation Mode Bar */
.scrapbook-view-mode-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 18px;
  margin: 18px 0 28px 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.92) 0%, rgba(251, 247, 239, 0.95) 100%);
  border: 1px solid rgba(217, 184, 138, 0.55);
  border-radius: 999px;
  box-shadow: 0 4px 18px rgba(46, 8, 21, 0.05);
  flex-wrap: wrap;
}

.svmb-label {
  font-family: var(--font-label, 'Plus Jakarta Sans', sans-serif);
  font-size: 0.82rem;
  font-weight: 700;
  color: #7A263A;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.svmb-btn-group {
  display: inline-flex;
  align-items: center;
  background: rgba(46, 8, 21, 0.06);
  padding: 3px;
  border-radius: 999px;
  border: 1px solid rgba(217, 184, 138, 0.4);
  gap: 2px;
}

.svmb-btn {
  border: none;
  background: transparent;
  padding: 6px 14px;
  border-radius: 999px;
  font-family: var(--font-label, 'Plus Jakarta Sans', sans-serif);
  font-size: 0.78rem;
  font-weight: 700;
  color: #5C4B43;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.svmb-btn:hover {
  color: #2E0815;
}

.svmb-btn.active {
  background: #2E0815;
  color: #FFFFFF;
  box-shadow: 0 2px 8px rgba(46, 8, 21, 0.25);
}

/* Category Chapter Carousel Container */
.gallery-polaroid-line-wrap {
  position: relative;
  margin: 0 0 32px 0;
  border-radius: 20px;
  border: 1.5px solid rgba(217, 184, 138, 0.55);
  background: linear-gradient(180deg, #FDFCF9 0%, #F7F1E4 100%);
  box-shadow: 0 10px 32px -10px rgba(46, 8, 21, 0.09), inset 0 1px 0 rgba(255, 255, 255, 0.95);
  overflow: hidden;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Chapter Carousel Header Bar */
.gallery-polaroid-line-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  border-bottom: 1px solid rgba(217, 184, 138, 0.35);
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  flex-wrap: wrap;
  gap: 10px;
}

.gpl-header-left {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.gpl-pill-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(180, 83, 9, 0.12);
  color: #92400E;
  font-family: var(--font-label, 'Plus Jakarta Sans', sans-serif);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid rgba(180, 83, 9, 0.28);
}

.gpl-peg-mini {
  display: inline-block;
  width: 7px;
  height: 15px;
  border-radius: 1px;
  background: linear-gradient(90deg, #C9A67A 0%, #E3C9A1 45%, #B8915F 100%);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  position: relative;
  flex-shrink: 0;
}

.gpl-peg-mini::after {
  content: '';
  position: absolute;
  top: 4px;
  left: 2px;
  width: 2px;
  height: 5px;
  background: rgba(80, 60, 30, 0.7);
  border-radius: 1px;
}

.gpl-hint {
  font-size: 0.80rem;
  color: #6B5B52;
  font-style: italic;
  font-family: var(--font-body, system-ui, sans-serif);
}

/* Chapter Local View Toggle */
.gpl-view-actions {
  display: inline-flex;
  align-items: center;
  background: rgba(46, 8, 21, 0.06);
  padding: 3px;
  border-radius: 999px;
  border: 1px solid rgba(217, 184, 138, 0.4);
  gap: 2px;
}

.gpl-view-btn {
  border: none;
  background: transparent;
  padding: 4px 11px;
  border-radius: 999px;
  font-family: var(--font-label, 'Plus Jakarta Sans', sans-serif);
  font-size: 0.72rem;
  font-weight: 700;
  color: #5C4B43;
  cursor: pointer;
  transition: all 0.2s ease;
}

.gpl-view-btn:hover {
  color: #2E0815;
}

.gpl-view-btn.active {
  background: #2E0815;
  color: #FFFFFF;
  box-shadow: 0 2px 6px rgba(46, 8, 21, 0.2);
}

/* Carousel Stage */
.gallery-polaroid-stage {
  position: relative;
  width: 100%;
  height: 520px;
  min-height: 480px;
  border-radius: 0 0 20px 20px;
  overflow: hidden;
}

/* View State Toggling */
.gpl-grid-hidden {
  display: none !important;
}

.gpl-stage-hidden {
  display: none !important;
}

/* ==========================================================================
   AUTHENTIC POLAROID PRINT THEME FOR GRID CARDS
   Transforms .scrapbook-frame-card & .scrapbook-photo-card into pegged polaroid prints
   ========================================================================== */

.scrapbook-item {
  perspective: 1000px;
}

.scrapbook-frame-card,
.scrapbook-photo-card {
  position: relative;
  background: #FCFBF9 !important;
  border: 1.5px solid rgba(217, 184, 138, 0.55) !important;
  border-radius: 6px !important;
  padding: 12px 12px 18px 12px !important;
  box-shadow:
    0 4px 14px rgba(46, 8, 21, 0.08),
    0 18px 32px -14px rgba(46, 8, 21, 0.22) !important;
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1),
              box-shadow 0.4s ease,
              border-color 0.4s ease !important;
}

/* Realistic Wooden Clothespin Peg at Top Center */
.scrapbook-frame-card::before,
.scrapbook-photo-card::before {
  content: '';
  position: absolute;
  top: -12px;
  left: 50%;
  width: 12px;
  height: 28px;
  margin-left: -6px;
  border-radius: 2px;
  background: linear-gradient(90deg, #C9A67A 0%, #E3C9A1 45%, #B8915F 100%);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.32);
  z-index: 10;
  pointer-events: none;
}

.scrapbook-frame-card::after,
.scrapbook-photo-card::after {
  content: '';
  position: absolute;
  top: -3px;
  left: 50%;
  width: 2px;
  height: 8px;
  margin-left: -1px;
  background: rgba(80, 60, 30, 0.65);
  border-radius: 1px;
  z-index: 11;
  pointer-events: none;
}

/* Remove legacy tape & brass corner clips */
.scrapbook-frame-card .scrapbook-washi-tape,
.scrapbook-frame-card .scrapbook-corner-clip,
.scrapbook-photo-card .scrapbook-tape-top-center {
  display: none !important;
}

/* Photo Aperture */
.scrapbook-media,
.scrapbook-photo-viewport {
  position: relative;
  border-radius: 3px !important;
  overflow: hidden !important;
  background: #EAE6DD !important;
  box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.15) !important;
}

.scrapbook-photo {
  transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1), filter 0.6s ease;
}

/* Italic Serif Polaroid Title */
.scrapbook-frame-card .scrapbook-title,
.scrapbook-photo-card .scrapbook-title {
  font-family: 'Playfair Display', Georgia, 'Times New Roman', serif !important;
  font-style: italic !important;
  font-weight: 700 !important;
  font-size: 1.05rem !important;
  line-height: 1.3 !important;
  color: #2E0815 !important;
  margin-top: 8px !important;
}

/* Badge Row Styling */
.scrapbook-badge-row,
.scrapbook-caption-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.scrapbook-cat-chip,
.scrapbook-print-num {
  font-weight: 700;
  color: #B45309;
}

.scrapbook-date-chip,
.scrapbook-date-stamp {
  color: #7A6B63;
  font-family: var(--font-mono, monospace);
  font-size: 0.68rem;
}

/* Hover Lift with Organic Realism */
.scrapbook-item:hover .scrapbook-frame-card,
.scrapbook-frame-item:hover .scrapbook-photo-card {
  transform: translateY(-9px) scale(1.025) rotate(0deg) !important;
  border-color: rgba(180, 83, 9, 0.75) !important;
  box-shadow:
    0 14px 32px rgba(46, 8, 21, 0.18),
    0 32px 55px -14px rgba(46, 8, 21, 0.35),
    0 0 20px rgba(217, 184, 138, 0.35) !important;
}

.scrapbook-item:hover .scrapbook-photo,
.scrapbook-frame-item:hover .scrapbook-photo {
  transform: scale(1.05);
}

@media (max-width: 768px) {
  .scrapbook-view-mode-bar {
    border-radius: 16px;
    padding: 10px 14px;
  }
  .gallery-polaroid-stage {
    height: 420px;
    min-height: 380px;
  }
  .gallery-polaroid-line-header {
    padding: 10px 14px;
  }
}


