/* ── WORK PAGE LAYOUT ── */
.work-page {
  max-width: 1112px;
  margin: 0 auto;
  padding: 180px 56px 0;
}

.back-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-bottom: 56px;
  text-decoration: none;
  color: rgba(0, 0, 0, 0.87);
  transition: opacity 0.2s;
}

.back-arrow:hover { opacity: 0.6; }

.back-arrow img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* ── TITLE BLOCK ── */
.work-page-header {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 40px;
}

.work-page-title {
  font-family: 'Lora', serif;
  font-weight: 500;
  font-size: 40px;
  line-height: 140%;
  color: rgba(0, 0, 0, 0.87);
}

.work-page-description {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: 18px;
  line-height: 140%;
  color: rgba(0, 0, 0, 0.65);
}

/* ── PROJECT METADATA ── */
.work-metadata {
  display: flex;
  gap: 24px;
  margin-bottom: 80px;
}

.work-metadata-item {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 200px;
}

.work-metadata-item--wide {
  width: 230px;
}

.work-metadata-label {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: 18px;
  line-height: 140%;
  color: rgba(0, 0, 0, 0.54);
}

.work-metadata-value {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: 18px;
  line-height: 140%;
  color: rgba(0, 0, 0, 0.87);
}

/* ── CONTENT SECTIONS ── */
.work-content {
  display: flex;
  flex-direction: column;
  gap: 80px;
}

.work-section {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.work-section-title {
  font-family: 'Lora', serif;
  font-weight: 500;
  font-size: 32px;
  line-height: 120%;
  color: rgba(0, 0, 0, 0.87);
}

.work-section-body {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: 18px;
  line-height: 140%;
  color: rgba(0, 0, 0, 0.87);
}

.work-section-body strong {
  font-weight: 700;
}

.work-section-body .sub-bullet {
  display: block;
  padding-left: 2em;
  text-indent: -1em;
}

.work-section-body .sub-bullet-first {
  margin-top: 8px;
}


/* ── IMAGE CONTAINERS ── */
.work-img-single {
  width: 100%;
  border-radius: 24px;
  overflow: hidden;
  background: #FAFAFA;
}

.work-img-single img {
  width: 100%;
  height: auto;
  display: block;
  min-height: 400px;
  object-fit: cover;
}

.work-img-with-caption {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.work-img-caption {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 140%;
  color: rgba(0, 0, 0, 0.54);
  text-align: center;
}

/* ── FADE-IN FOR WORK PAGE CONTENT ── */
body.visited .work-fade {
  opacity: 1;
  transform: none;
  transition: none;
}

.work-fade {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.work-fade.visible {
  opacity: 1;
  transform: translateY(0);
}

.work-img-row {
  display: flex;
  gap: 40px;
}

.work-img-row .work-img-single {
  flex: 1;
  min-width: 0;
}

/* ── SCROLL TO TOP ── */
.scroll-top {
  position: fixed;
  bottom: 40px;
  right: 40px;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
  z-index: 50;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.scroll-top.visible {
  opacity: 1;
  pointer-events: auto;
}

.scroll-top:hover { box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18); }

.scroll-top::before {
  content: 'Back to top';
  position: absolute;
  bottom: calc(100% + 8px);
  right: 0;
  background: #333;
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.scroll-top:hover::before { opacity: 1; }

.scroll-top svg {
  width: 24px;
  height: 24px;
  color: rgba(0, 0, 0, 0.87);
}

/* ── RESPONSIVE: TABLET (481px–768px) ── */
@media (max-width: 768px) {
  .work-page { padding: 120px 24px 0; }
  .back-arrow { margin-bottom: 40px; width: 32px; height: 32px; }

  .work-page-title { font-size: 32px; }
  .work-page-description { font-size: 16px; }

  .work-metadata {
    flex-wrap: wrap;
    gap: 24px;
  }

  .work-metadata-item,
  .work-metadata-item--wide {
    width: calc(50% - 12px);
  }

  .work-metadata-label { font-size: 16px; }
  .work-metadata-value { font-size: 16px; }

  .work-section-title { font-size: 28px; }
  .work-section-body { font-size: 16px; }

  .work-content { gap: 64px; }

  .scroll-top { width: 48px; height: 48px; }

  .work-img-row {
    flex-direction: column;
    gap: 24px;
  }

  .work-img-row .work-img-single img {
    min-height: unset;
    object-fit: contain;
  }
}

/* ── RESPONSIVE: MOBILE (<480px) ── */
@media (max-width: 480px) {
  .work-page { padding: 100px 24px 0; }
  .back-arrow { margin-bottom: 32px; width: 24px; height: 24px; }

  .work-page-title { font-size: 28px; }
  .work-page-description { font-size: 16px; }

  .work-metadata {
    flex-wrap: wrap;
    gap: 24px;
  }

  .work-metadata-item,
  .work-metadata-item--wide {
    width: auto;
    min-width: 120px;
    flex: 1 1 calc(50% - 12px);
    gap: 12px;
  }

  .work-metadata-label { font-size: 14px; }
  .work-metadata-value { font-size: 14px; }

  .work-section { gap: 24px; }
  .work-section-title { font-size: 24px; }
  .work-section-body { font-size: 16px; }
  .work-img-caption { font-size: 14px; }

  .work-content { gap: 56px; }
  .work-metadata { margin-bottom: 48px; }

  .scroll-top { bottom: 24px; right: 24px; }
}
