/* ═══════════════════════════════════════════
   CLARIX — INSPIRE PAGE CSS
═══════════════════════════════════════════ */

.inspire-page-header {
  padding: 40px 0 24px;
  background: linear-gradient(180deg, rgba(255,112,67,0.05) 0%, transparent 100%);
  border-bottom: 1px solid rgba(255,255,255,0.05);
  margin-bottom: 24px;
}

/* Upload Zone */
.upload-zone {
  display: flex; align-items: center; gap: 16px;
  padding: 18px 24px; border-radius: var(--r-lg);
  border: 2px dashed rgba(255,112,67,0.25);
  background: rgba(255,112,67,0.03); cursor: pointer;
  transition: all var(--t-mid);
}
.upload-zone:hover, .upload-zone.dragover {
  border-color: rgba(255,112,67,0.6);
  background: rgba(255,112,67,0.07);
}
.upload-icon { font-size: 24px; flex-shrink: 0; }
.upload-text { font-size: 14px; color: #666; line-height: 1.5; }
.upload-text strong { color: var(--accent); }

/* Gallery Grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  padding-bottom: 40px;
}
@media (max-width: 600px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
}

/* Card entrance animation */
@keyframes cardIn {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.gallery-card {
  position: relative; border-radius: var(--r-lg); overflow: hidden;
  aspect-ratio: 4/3; cursor: pointer;
  transition: transform 0.4s cubic-bezier(0.25,0.46,0.45,0.94),
              box-shadow 0.4s ease,
              border-color 0.4s ease;
  border: 1px solid rgba(255,255,255,0.06);
  background: #111;
  animation: cardIn 0.5s var(--ease) both;
  will-change: transform;
}
/* Stagger entrance */
.gallery-card:nth-child(1)  { animation-delay: 0.03s }
.gallery-card:nth-child(2)  { animation-delay: 0.06s }
.gallery-card:nth-child(3)  { animation-delay: 0.09s }
.gallery-card:nth-child(4)  { animation-delay: 0.12s }
.gallery-card:nth-child(5)  { animation-delay: 0.15s }
.gallery-card:nth-child(6)  { animation-delay: 0.18s }
.gallery-card:nth-child(n+7) { animation-delay: 0.21s }

.gallery-card:hover {
  transform: scale(1.04) translateY(-4px);
  box-shadow: 0 20px 56px rgba(0,0,0,0.65), 0 0 0 1.5px rgba(255,112,67,0.45);
  border-color: rgba(255,112,67,0.35);
  z-index: 2;
}
.gallery-card:hover .gallery-card-overlay { opacity: 1; }
.gallery-card:hover .gallery-card-img { transform: scale(1.12); }
.gallery-card:active { transform: scale(1.01) translateY(-2px); transition-duration: 0.1s; }

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

/* Gradient overlay */
.gallery-card-overlay {
  position: absolute; inset: 0; opacity: 0;
  background: linear-gradient(to top,
    rgba(0,0,0,0.9) 0%,
    rgba(0,0,0,0.4) 50%,
    rgba(255,112,67,0.06) 100%);
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 16px;
  transition: opacity 0.35s ease;
}

/* Shimmer line at top on hover */
.gallery-card::before {
  content: '';
  position: absolute; top: 0; left: -100%; width: 60%; height: 2px;
  background: linear-gradient(90deg, transparent, rgba(255,112,67,0.8), transparent);
  z-index: 3;
  transition: left 0.6s ease;
}
.gallery-card:hover::before { left: 150%; }

.gallery-card-title {
  font-size: 13px; font-weight: 700; color: #fff;
  margin-bottom: 4px; text-shadow: 0 1px 6px rgba(0,0,0,0.8);
}
.gallery-card-prompt {
  font-size: 11px; color: rgba(255,255,255,0.65); line-height: 1.4;
  overflow: hidden; display: -webkit-box;
  -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical;
}
.gallery-card-cat {
  position: absolute; top: 10px; right: 10px;
  font-size: 10px; font-weight: 700; letter-spacing: 0.06em;
  background: rgba(0,0,0,0.55); color: var(--accent);
  padding: 3px 8px; border-radius: var(--r-full);
  border: 1px solid rgba(255,112,67,0.35);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  transition: background 0.2s, transform 0.2s;
}
.gallery-card:hover .gallery-card-cat { background: rgba(255,112,67,0.2); transform: scale(1.05); }

/* Open button — pops up on hover */
.gallery-card-open-btn {
  display: inline-flex; align-items: center; gap: 5px;
  margin-top: 10px; align-self: flex-start;
  background: var(--accent); color: #fff; border: none;
  padding: 7px 16px; border-radius: var(--r-full);
  font-size: 12px; font-weight: 700; cursor: pointer;
  opacity: 0; transform: translateY(8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  box-shadow: 0 4px 14px rgba(255,112,67,0.4);
}
.gallery-card:hover .gallery-card-open-btn {
  opacity: 1; transform: translateY(0);
}
.gallery-card-open-btn:hover { filter: brightness(1.15); }

/* Lightbox */
.lightbox-overlay {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(0,0,0,0); backdrop-filter: blur(0px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s ease, background 0.3s ease;
}
.lightbox-overlay.open {
  opacity: 1; pointer-events: all;
  background: rgba(0,0,0,0.92);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.lightbox-img-wrap {
  position: relative; max-width: 90vw; max-height: 85vh;
  border-radius: 16px; overflow: hidden;
  box-shadow: 0 40px 100px rgba(0,0,0,0.8), 0 0 0 1px rgba(255,255,255,0.08);
  transform: scale(0.88); transition: transform 0.35s cubic-bezier(0.34,1.56,0.64,1);
}
.lightbox-overlay.open .lightbox-img-wrap { transform: scale(1); }
.lightbox-img-wrap img { display: block; max-width: 90vw; max-height: 80vh; object-fit: contain; }
.lightbox-info {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 16px 20px;
  background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, transparent 100%);
  color: #fff;
}
.lightbox-info-title { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.lightbox-info-cat { font-size: 11px; color: var(--accent); font-weight: 600; }
.lightbox-close {
  position: absolute; top: 14px; right: 14px;
  background: rgba(0,0,0,0.6); border: 1px solid rgba(255,255,255,0.15);
  color: #fff; width: 36px; height: 36px; border-radius: 50%;
  font-size: 18px; cursor: pointer; display: flex; align-items: center; justify-content: center;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  transition: background 0.2s, transform 0.2s;
}
.lightbox-close:hover { background: rgba(255,112,67,0.5); transform: rotate(90deg); }
.lightbox-open-editor {
  position: absolute; bottom: 14px; right: 14px;
  background: var(--accent); color: #fff; border: none;
  padding: 9px 20px; border-radius: var(--r-full);
  font-size: 13px; font-weight: 700; cursor: pointer;
  box-shadow: 0 4px 16px rgba(255,112,67,0.5);
  transition: filter 0.2s, transform 0.2s;
}
.lightbox-open-editor:hover { filter: brightness(1.15); transform: scale(1.04); }



/* ─── EDITOR OVERLAY ──────────────────────────── */
.editor-overlay {
  position: fixed; inset: 0; z-index: var(--z-modal);
  background: rgba(0,0,0,0.95);
  display: flex; align-items: stretch;
  transform: translateX(100%); transition: transform 0.35s var(--ease-out);
}
.editor-overlay.open { transform: translateX(0); }

.editor-panel {
  display: grid; grid-template-columns: 1fr 1fr;
  width: 100%; max-width: 1200px; margin: 0 auto;
}
@media (max-width: 800px) {
  .editor-panel { grid-template-columns: 1fr; grid-template-rows: 40vh 1fr; }
}

.editor-left {
  position: relative; background: #000;
  display: flex; flex-direction: column;
  border-right: 1px solid rgba(255,255,255,0.07);
}
.editor-back {
  position: absolute; top: 16px; left: 16px; z-index: 10;
  background: rgba(0,0,0,0.7); border: 1px solid rgba(255,255,255,0.15);
  color: #fff; padding: 8px 16px; border-radius: var(--r-full);
  font-size: 13px; font-weight: 600; cursor: pointer;
  backdrop-filter: blur(8px); transition: all var(--t-fast);
}
.editor-back:hover { background: rgba(255,255,255,0.12); }
.editor-img {
  width: 100%; height: 100%; object-fit: cover; flex: 1;
  max-height: calc(100vh - 80px);
}
@media (max-width: 800px) { .editor-img { max-height: 100%; } }
.editor-img-meta {
  padding: 12px 16px; font-size: 12px; color: #444;
  border-top: 1px solid rgba(255,255,255,0.05);
}

.editor-right {
  background: #0a0a0a; overflow-y: auto;
}
.editor-right-scroll { padding: 24px; display: flex; flex-direction: column; gap: 12px; }

.editor-section-label {
  font-size: 10px; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: #444; margin-bottom: 8px;
}
.editor-textarea {
  width: 100%; background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08); border-radius: var(--r-md);
  padding: 14px; color: #e0e0e0; font-size: 14px; line-height: 1.7;
  font-family: var(--font-body); resize: vertical; min-height: 120px;
  transition: border-color var(--t-fast);
}
.editor-textarea:focus { border-color: rgba(255,112,67,0.4); outline: none; }
.editor-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.editor-result, .editor-direction {
  background: rgba(255,112,67,0.05); border: 1px solid rgba(255,112,67,0.15);
  border-radius: var(--r-md); padding: 16px;
  animation: fadeUp 0.3s var(--ease);
}
.editor-direction { background: rgba(245,158,11,0.04); border-color: rgba(245,158,11,0.15); }
.editor-result-label { font-size: 11px; font-weight: 700; color: var(--accent); margin-bottom: 10px; letter-spacing: 0.06em; }
.editor-result-text { font-size: 13px; line-height: 1.8; color: #bbb; }
.editor-export { display: flex; gap: 8px; flex-wrap: wrap; padding-top: 4px; }
