/* =========================
   PROJECTS (ReCyprus style)
   Variant A (smooth): rAF + CSS var + clip-path
   ========================= */

.projects {
  padding: 72px 0;
}

.projects-inner {
  max-width: 1280px;
  padding: 0 24px;
  margin: 0 auto;
}

.projects-head {
  max-width: 760px;
  margin-bottom: 28px;
}

.projects-eyebrow {
  display: inline-block;
  font-family: 'Comfortaa', system-ui, -apple-system, Segoe UI, Roboto, Arial,
    sans-serif;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 12px;
  color: #b56e13;
  margin-bottom: 10px;
}

.projects-title {
  font-family: 'Comfortaa', system-ui, -apple-system, Segoe UI, Roboto, Arial,
    sans-serif;
  letter-spacing: 0.03em;
  font-weight: 600;
  font-size: clamp(28px, 3.2vw, 42px);
  line-height: 1.15;
  color: #4e5b30;
  margin: 0 0 12px;
}

.projects-text {
  font-family: 'Comfortaa', system-ui, -apple-system, Segoe UI, Roboto, Arial,
    sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: rgba(0, 0, 0, 0.75);
  margin: 0;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 26px;
}

.project-card {
  background: #fbf4ec;
  border-radius: 22px;
  padding: 18px;
  border: #4e5b30 2px solid;
  display: grid;
  gap: 14px;
  overflow: hidden;
}

.project-card__top {
  display: grid;
  gap: 10px;
}

.project-card__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.project-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(78, 91, 48, 0.12);
  color: #4e5b30;
  font-family: 'Comfortaa', system-ui, -apple-system, Segoe UI, Roboto, Arial,
    sans-serif;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 600;
}

.project-tag--alt {
  background: rgba(196, 0, 20, 0.1);
  color: #7c000c;
}

.project-date {
  font-family: 'Comfortaa', system-ui, -apple-system, Segoe UI, Roboto, Arial,
    sans-serif;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(0, 0, 0, 0.55);
}

.project-card__title {
  font-family: 'Comfortaa', system-ui, -apple-system, Segoe UI, Roboto, Arial,
    sans-serif;
  letter-spacing: 0.03em;
  font-weight: 600;
  font-size: 18px;
  color: #4e5b30;
  margin: 0;
}

.project-card__desc {
  font-family: 'Comfortaa', system-ui, -apple-system, Segoe UI, Roboto, Arial,
    sans-serif;
  font-size: 14px;
  line-height: 1.6;
  color: rgba(0, 0, 0, 0.72);
  margin: 0;
}

/* --- Before/After block (Variant A) --- */
.ba {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.04);
  aspect-ratio: 16 / 10;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.06);

  /* driven by JS */
  --ba: 55%;
}

.ba__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  user-select: none;
  pointer-events: none;
}

.ba__img--after {
  clip-path: inset(0 0 0 var(--ba));
  will-change: clip-path;
}

.ba__labels {
  position: absolute;
  inset: 12px 12px auto 12px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  pointer-events: none;
}

.ba__label {
  font-family: 'Comfortaa', system-ui, -apple-system, Segoe UI, Roboto, Arial,
    sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 11px;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(251, 244, 236, 0.88);
  color: rgba(0, 0, 0, 0.75);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

.ba__label--after {
  background: #fff;
  color: #000;
}

.ba__divider {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--ba);
  width: 2px;
  background: rgba(196, 0, 20, 0.65);
  box-shadow: 0 0 0 1px rgba(251, 244, 236, 0.35);
  pointer-events: none;
  will-change: left;
}

.ba__range {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: ew-resize;

  /* helps touch dragging avoid scroll jitter */
  touch-action: none;
}

.ba__handle {
  position: absolute;
  top: 50%;
  left: var(--ba);
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 0;
  background: rgba(251, 244, 236, 0.92);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.14);
  pointer-events: none;
  will-change: left;
}

.ba__handle-dot {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #c40014;
  box-shadow: 0 0 0 6px rgba(196, 0, 20, 0.12);
}

/* Bottom area */
.project-card__bottom {
  display: grid;
  gap: 14px;
}

.project-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.project-stat {
  background: rgba(255, 255, 255, 0.6);
  border-radius: 16px;
  padding: 10px 12px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.05);
}

.project-stat__num {
  display: block;
  font-family: 'Comfortaa', system-ui, -apple-system, Segoe UI, Roboto, Arial,
    sans-serif;
  letter-spacing: 0.03em;
  font-weight: 600;
  font-size: 18px;
  color: #4e5b30;
  line-height: 1.2;
}

.project-stat__lbl {
  display: block;
  margin-top: 4px;
  font-family: 'Comfortaa', system-ui, -apple-system, Segoe UI, Roboto, Arial,
    sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 11px;
  color: rgba(0, 0, 0, 0.55);
}

.project-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.project-link {
  font-family: 'Comfortaa', system-ui, -apple-system, Segoe UI, Roboto, Arial,
    sans-serif;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 12px;
  color: #c40014;
  text-decoration: none;
  border-bottom: 1px dashed rgba(196, 0, 20, 0.45);
  padding-bottom: 2px;
}

.project-link:hover {
  border-bottom-style: solid;
}

/* Mobile */
@media (max-width: 900px) {
  .projects {
    padding: 54px 0;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .project-stats {
    grid-template-columns: 1fr;
  }
}
