/* =========================================================
   THE ALCHEMIST ARTISTS — PROGRESSIVE PAINTING STUDIO
   Interactive 10-Stage Painting Masterclass Suite
   ========================================================= */

/* Hero Launcher Link */
.progressive-studio-launcher-wrapper {
  margin-top: 18px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.btn-progressive-studio-link {
  background: rgba(229, 185, 95, 0.18);
  border: 1.5px solid rgba(229, 185, 95, 0.55);
  color: #613e10;
  padding: 8px 20px;
  border-radius: 24px;
  font-size: 14.5px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 3px 12px rgba(125, 82, 24, 0.08);
}

.btn-progressive-studio-link:hover {
  background: rgba(229, 185, 95, 0.35);
  border-color: #7d5218;
  color: #3a2b18;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(125, 82, 24, 0.16);
}

.progressive-studio-link-desc {
  font-size: 13.5px;
  color: #6d5b45;
  font-style: italic;
  font-family: 'Playfair Display', Georgia, serif;
  margin: 0;
  line-height: 1.4;
}

/* =========================================================
   COLLAPSIBLE PROGRESSIVE STUDIO CONTAINER (HOMEPAGE)
   ========================================================= */
.progressive-studio-section {
  max-width: 1220px;
  margin: 32px auto 48px;
  padding: 0 20px;
  box-sizing: border-box;
  animation: progStudioFadeIn 0.35s ease-out;
}

@keyframes progStudioFadeIn {
  from { opacity: 0; transform: translateY(-12px); }
  to { opacity: 1; transform: translateY(0); }
}

.progressive-studio-card {
  background: linear-gradient(135deg, #fffdfa 0%, #fff9ee 100%);
  border: 2px solid rgba(229, 185, 95, 0.65);
  border-radius: 24px;
  box-shadow: 0 16px 48px rgba(90, 60, 20, 0.12);
  padding: 32px 32px 36px;
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
}

/* Studio Header */
.prog-studio-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
  border-bottom: 1px solid rgba(229, 185, 95, 0.3);
  padding-bottom: 18px;
  flex-wrap: wrap;
  gap: 16px;
}

.prog-studio-title-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.prog-studio-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 4px 12px;
  border-radius: 20px;
  background: rgba(229, 185, 95, 0.25);
  color: #7d5218;
  border: 1px solid rgba(229, 185, 95, 0.45);
  align-self: flex-start;
  margin-bottom: 4px;
}

.prog-studio-title {
  font-size: 30px;
  color: #2e2010;
  font-weight: 800;
  font-family: 'Playfair Display', Georgia, serif;
  margin: 0;
  line-height: 1.2;
}

.prog-studio-subtitle {
  font-size: 14.5px;
  color: #6d5b45;
  margin: 0;
}

.btn-close-prog-studio {
  background: #fff9f0;
  border: 1px solid rgba(229, 185, 95, 0.5);
  color: #7d5218;
  padding: 7px 16px;
  border-radius: 20px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.btn-close-prog-studio:hover {
  background: #7d5218;
  color: #ffffff;
  border-color: #613e10;
}

/* =========================================================
   SCREEN 1: CHOOSE / GENERATE REFERENCE IMAGE
   ========================================================= */
.prog-setup-container {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.prog-setup-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

@media (max-width: 860px) {
  .prog-setup-grid {
    grid-template-columns: 1fr;
  }
}

.prog-setup-card {
  background: #ffffff;
  border: 1px solid rgba(229, 185, 95, 0.45);
  border-radius: 18px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.03);
}

.prog-setup-card h3 {
  font-size: 18px;
  color: #2e2010;
  font-family: 'Playfair Display', Georgia, serif;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.prog-setup-card p {
  font-size: 13.5px;
  color: #5c4e3c;
  line-height: 1.5;
  margin: 0;
}

/* Upload Dropzone */
.prog-dropzone {
  border: 2px dashed rgba(229, 185, 95, 0.6);
  border-radius: 14px;
  padding: 28px 16px;
  text-align: center;
  background: #fffdf9;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.prog-dropzone:hover, .prog-dropzone.drag-over {
  border-color: #7d5218;
  background: #fff6e0;
  transform: scale(1.01);
}

.prog-dropzone-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(229, 185, 95, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #7d5218;
}

/* Curated Presets Grid */
.prog-presets-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

@media (max-width: 500px) {
  .prog-presets-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.prog-preset-thumb {
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  aspect-ratio: 4 / 3;
  position: relative;
  transition: all 0.2s ease;
  background: #e5dccf;
}

.prog-preset-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.prog-preset-thumb:hover, .prog-preset-thumb.active {
  border-color: #7d5218;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(125, 82, 24, 0.2);
}

.prog-preset-thumb-title {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(35, 25, 15, 0.75);
  color: #fff;
  font-size: 10px;
  padding: 2px 4px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* AI Prompt Field */
.prog-ai-input-group {
  display: flex;
  gap: 8px;
}

.prog-ai-input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid rgba(229, 185, 95, 0.5);
  border-radius: 10px;
  font-size: 13.5px;
  background: #fffdf9;
  color: #2e2010;
}

.prog-ai-input:focus {
  outline: none;
  border-color: #7d5218;
  box-shadow: 0 0 0 3px rgba(229, 185, 95, 0.25);
}

/* Preview & Lock Container */
.prog-preview-banner {
  background: #ffffff;
  border: 2px solid #7d5218;
  border-radius: 18px;
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  box-shadow: 0 8px 24px rgba(125, 82, 24, 0.08);
}

.prog-preview-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.prog-preview-thumb-box {
  width: 90px;
  height: 90px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,0.15);
  background: #231e17;
  flex-shrink: 0;
}

.prog-preview-thumb-box img, .prog-preview-thumb-box canvas {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.btn-start-painting {
  background: linear-gradient(135deg, #7d5218 0%, #a46d20 100%);
  color: #ffffff;
  border: none;
  padding: 14px 32px;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 6px 20px rgba(125, 82, 24, 0.3);
  transition: all 0.2s ease;
}

.btn-start-painting:hover {
  background: linear-gradient(135deg, #613e10 0%, #8c5a15 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 26px rgba(125, 82, 24, 0.4);
}

/* =========================================================
   SCREEN 2: 10-STAGE INTERACTIVE LESSON WORKSTATION
   ========================================================= */

/* Stage Progress Bar / Step Pills */
.prog-stages-timeline {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 4px 2px 14px;
  margin-bottom: 20px;
  scrollbar-width: thin;
  scrollbar-color: #e5b95f transparent;
}

.prog-stage-pill {
  flex: 1;
  min-width: 90px;
  background: #fffdfa;
  border: 1px solid rgba(229, 185, 95, 0.4);
  border-radius: 12px;
  padding: 8px 6px;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.prog-stage-pill:hover {
  background: #faeecf;
  border-color: #7d5218;
}

.prog-stage-pill.active {
  background: #7d5218;
  color: #ffffff;
  border-color: #613e10;
  box-shadow: 0 4px 14px rgba(125, 82, 24, 0.25);
}

.prog-pill-num {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  opacity: 0.85;
}

.prog-pill-name {
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* Stage Header Bar */
.prog-stage-banner {
  background: #ffffff;
  border: 1px solid rgba(229, 185, 95, 0.4);
  border-radius: 16px;
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.prog-stage-heading h2 {
  font-size: 22px;
  color: #2e2010;
  font-weight: 800;
  font-family: 'Playfair Display', Georgia, serif;
  margin: 0;
}

.prog-stage-heading p {
  font-size: 13.5px;
  color: #6d5b45;
  margin: 2px 0 0;
}

.prog-stage-tools {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.btn-prog-tool {
  background: #fff9f0;
  border: 1px solid rgba(229, 185, 95, 0.5);
  color: #613e10;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.btn-prog-tool:hover {
  background: #faeecf;
  border-color: #7d5218;
}

.btn-prog-tool.active {
  background: #62826c;
  color: #ffffff;
  border-color: #44614d;
}

/* View Mode Switcher (Side-by-Side vs Split Slider) */
.prog-view-toggle {
  display: flex;
  background: #f0e6d6;
  border-radius: 20px;
  padding: 3px;
  gap: 2px;
}

.btn-view-mode {
  background: transparent;
  border: none;
  font-size: 11.5px;
  font-weight: 700;
  color: #6d5b45;
  padding: 4px 12px;
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-view-mode.active {
  background: #ffffff;
  color: #2e2010;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

/* Main Visual Workstation */
.prog-canvas-workstation {
  margin-bottom: 24px;
}

/* Mode 1: Dual Canvas Grid (Side-by-Side) */
.prog-dual-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media (max-width: 860px) {
  .prog-dual-grid {
    grid-template-columns: 1fr;
  }
}

.prog-canvas-card {
  background: #ffffff;
  border: 1px solid rgba(229, 185, 95, 0.45);
  border-radius: 18px;
  padding: 16px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
}

.prog-canvas-card-title {
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #7d5218;
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.prog-canvas-frame {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 10px;
  overflow: hidden;
  background: #1d1712;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 12px rgba(0,0,0,0.4);
}

.prog-canvas-frame canvas, .prog-canvas-frame img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

/* Mode 2: Interactive Before-and-After Split Slider */
.prog-split-slider-container {
  width: 100%;
  aspect-ratio: 16 / 10;
  max-height: 540px;
  border-radius: 18px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
  background: #1d1712;
  user-select: none;
  touch-action: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.prog-slider-before, .prog-slider-after {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.prog-slider-before canvas, .prog-slider-before img,
.prog-slider-after canvas, .prog-slider-after img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

.prog-slider-after {
  clip-path: inset(0 50% 0 0);
  z-index: 10;
}

.prog-slider-divider {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 3px;
  background: #e5b95f;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
  z-index: 15;
  pointer-events: none;
  transform: translateX(-50%);
}

.prog-slider-handle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #7d5218;
  border: 3px solid #ffffff;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
  cursor: ew-resize;
  z-index: 20;
  font-size: 14px;
}

.prog-slider-label {
  position: absolute;
  top: 14px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  z-index: 15;
}

.prog-slider-label.before {
  right: 14px;
  background: rgba(35, 25, 15, 0.75);
  color: #ffffff;
}

.prog-slider-label.after {
  left: 14px;
  background: rgba(125, 82, 24, 0.85);
  color: #ffffff;
}

/* Pedagogical Instructions Grid */
.prog-instructions-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 20px;
  margin-bottom: 28px;
}

@media (max-width: 860px) {
  .prog-instructions-grid {
    grid-template-columns: 1fr;
  }
}

.prog-info-card {
  background: #ffffff;
  border: 1px solid rgba(229, 185, 95, 0.4);
  border-radius: 16px;
  padding: 20px;
}

.prog-info-card h4 {
  font-size: 14.5px;
  color: #7d5218;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0 0 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.prog-info-card p, .prog-info-card ul {
  font-size: 14px;
  line-height: 1.65;
  color: #4a3c2c;
  margin: 0;
}

.prog-info-card ul {
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}

/* Master Navigation Footer */
.prog-nav-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid rgba(229, 185, 95, 0.35);
  padding-top: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.btn-prog-nav {
  padding: 12px 26px;
  border-radius: 12px;
  font-size: 14.5px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.15s ease;
}

.btn-prog-nav.secondary {
  background: #fff9f0;
  border: 1px solid rgba(229, 185, 95, 0.5);
  color: #613e10;
}

.btn-prog-nav.secondary:hover:not(:disabled) {
  background: #faeecf;
  border-color: #7d5218;
}

.btn-prog-nav.primary {
  background: linear-gradient(135deg, #7d5218 0%, #a46d20 100%);
  color: #ffffff;
  border: 1px solid #613e10;
  box-shadow: 0 4px 16px rgba(125, 82, 24, 0.25);
}

.btn-prog-nav.primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #613e10 0%, #8c5a15 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(125, 82, 24, 0.35);
}

.btn-prog-nav:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* Modal Lightbox for Enlarge */
.prog-lightbox-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(18, 14, 10, 0.88);
  backdrop-filter: blur(6px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  box-sizing: border-box;
}

.prog-lightbox-window {
  background: #231e17;
  border: 2px solid #e5b95f;
  border-radius: 18px;
  max-width: 1000px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}

.prog-lightbox-header {
  padding: 14px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #f4d38c;
  border-bottom: 1px solid rgba(229, 185, 95, 0.3);
}

.prog-lightbox-body {
  flex: 1;
  overflow: auto;
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.prog-lightbox-body canvas, .prog-lightbox-body img {
  max-width: 100%;
  max-height: 70vh;
  object-fit: contain;
  border-radius: 8px;
}

/* Mobile Responsiveness */
@media (max-width: 640px) {
  .progressive-studio-card {
    padding: 20px 14px;
    border-radius: 16px;
  }
  .prog-studio-title {
    font-size: 22px;
  }
  .prog-stage-heading h2 {
    font-size: 18px;
  }
  .prog-split-slider-container {
    aspect-ratio: 4 / 3;
  }
  .btn-prog-nav {
    width: 100%;
    justify-content: center;
  }
  .prog-nav-footer {
    flex-direction: column-reverse;
  }
}


/* Stage 1 Composition Mode Selector */
.prog-comp-selector {
  display: inline-flex;
  align-items: center;
  background: #fdfaf3;
  border: 1px solid rgba(229, 185, 95, 0.6);
  border-radius: 18px;
  padding: 2px 6px;
  gap: 4px;
}

.btn-comp-mode {
  background: transparent;
  border: none;
  font-size: 11px;
  font-weight: 700;
  color: #7d5218;
  padding: 4px 10px;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-comp-mode:hover {
  background: rgba(229, 185, 95, 0.25);
}

.btn-comp-mode.active {
  background: #7d5218;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(125, 82, 24, 0.2);
}
