/* ==========================================================================
   FUNDEDSOURCE — OPPORTUNITIES V4 PAGE STYLES
   Visual balance, Archify exhibit previews, modal lightbox, and media geometry.
   (Does NOT redefine canonical design system cards, borders, buttons, or fonts)
   ========================================================================== */

/* 1. Page-Specific Text Gradients */
.text-emerald-gradient {
  background: linear-gradient(135deg, #ffffff 0%, #a7f3d0 40%, #10b981 75%, #059669 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-teal-gradient {
  background: linear-gradient(135deg, #ffffff 0%, #99f6e4 40%, #14b8a6 75%, #0f766e 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-silver-gradient {
  background: linear-gradient(135deg, #ffffff 0%, #e2e8f0 50%, #94a3b8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* 2. Media Frames (Limited to Hero & Featured Opportunity) */
.opp-media-frame {
  position: relative;
  width: 100%;
  border-radius: var(--card-radius, 16px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(10, 12, 18, 0.9);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.08), 0 20px 48px -12px rgba(0, 0, 0, 0.85);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.opp-media-frame:hover {
  border-color: rgba(16, 185, 129, 0.4);
  box-shadow: inset 0 1px 1px rgba(16, 185, 129, 0.2), 0 24px 60px -10px rgba(16, 185, 129, 0.15), 0 12px 30px rgba(0, 0, 0, 0.9);
}

.opp-media-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* 3. Featured Thumbnail Preview Rail */
.opp-thumb-rail {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.opp-thumb-item {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.6);
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.opp-thumb-item:hover,
.opp-thumb-item.active {
  border-color: var(--source-emerald, #10b981);
  transform: translateY(-2px);
}

.opp-thumb-item img {
  width: 100%;
  height: 56px;
  object-fit: cover;
  opacity: 0.75;
  transition: opacity 0.2s ease;
}

.opp-thumb-item:hover img,
.opp-thumb-item.active img {
  opacity: 1;
}

/* 4. Archify Inline Exhibit Card */
.archify-exhibit-card {
  position: relative;
  border-radius: var(--card-radius-lg, 24px);
  background: rgba(8, 10, 15, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.75);
}

.archify-preview-wrapper {
  position: relative;
  width: 100%;
  cursor: pointer;
  background: #050505;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.archify-preview-wrapper svg,
.archify-preview-wrapper img {
  width: 100%;
  height: auto;
  display: block;
}

.archify-hover-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.archify-preview-wrapper:hover .archify-hover-overlay {
  opacity: 1;
}

/* 5. In-Page Archify Lightbox Modal */
.archify-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.archify-modal-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.archify-modal-dialog {
  width: 95vw;
  height: 92vh;
  max-width: 1600px;
  background: #050505;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.95);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(0.97);
  transition: transform 0.3s ease;
}

.archify-modal-backdrop.active .archify-modal-dialog {
  transform: scale(1);
}

.archify-modal-header {
  padding: 16px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(12, 15, 22, 0.95);
}

.archify-modal-body {
  flex: 1;
  position: relative;
  overflow: hidden;
  background: #050505;
  cursor: grab;
}

.archify-modal-body:active {
  cursor: grabbing;
}

.archify-modal-stage {
  transform-origin: 50% 50%;
  transition: transform 0.05s linear;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.archify-modal-stage svg {
  max-width: 94%;
  max-height: 92%;
}

.archify-modal-footer {
  padding: 16px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(8, 10, 16, 0.95);
  max-height: 180px;
  overflow-y: auto;
}
