/* Circular Timeline v3 - Frontend styles */
/* Transparent background, center dot clickable, connecting lines, responsive, variables */

:root{
  --ct-active-bg: linear-gradient(90deg,#ffefba,#ffd6a5);
  --ct-node-bg: rgba(255,255,255,0.95);
  --ct-node-shadow: 0 6px 18px rgba(0,0,0,0.06);
  --ct-center-size: 14px;
  --ct-radius-offset: 80px; /* subtracted from half-width for radius */
}

.ct-timeline-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 28px;
  max-width: 1100px;
  margin: 36px auto;
  padding: 8px;
  box-sizing: border-box;
  background: transparent;
}

/* Left content area */
.ct-content-area {
  flex: 1 1 46%;
  min-width: 220px;
  max-width: 560px;
  padding: 16px;
  border-radius: 8px;
  background: rgba(255,255,255,0.95);
  box-shadow: 0 6px 18px rgba(0,0,0,0.04);
  text-align: center;
}
.ct-media-inner img,
.ct-media-inner video {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 12px auto;
  border-radius: 6px;
}

/* Captions */
.ct-caption { margin-top: 8px; color:#333; text-align:left; white-space:pre-wrap; }
.ct-caption .ct-translation { display:block; margin-top:6px; font-size:0.95em; color:#666; }

/* Right circular timeline */
.ct-circular-timeline {
  flex: 0 0 420px;
  width: 420px;
  height: 420px;
  position: relative;
  background: transparent;
}

.ct-circle {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  position: relative;
  transition: transform 0.9s cubic-bezier(.2,.9,.2,1);
  will-change: transform;
  background: transparent; /* invisible/transparent outer circle */
}

/* center clickable element */
.ct-center {
  position: absolute;
  top: 50%;
  left: 50%;
  width: var(--ct-center-size);
  height: var(--ct-center-size);
  background: #222;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  z-index: 6;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

/* year nodes */
.ct-circle .ct-year {
  position: absolute;
  top: 50%;
  left: 50%;
  transform-origin: 0 -170px;
  cursor: pointer;
  user-select: none;
  padding: 6px 10px;
  border-radius: 14px;
  white-space: nowrap;
  background: var(--ct-node-bg);
  box-shadow: var(--ct-node-shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
  font-weight: 600;
  z-index: 2;
  text-align: center;
}

/* connecting line to center */
.ct-circle .ct-year::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 2px;
  height: calc(var(--radius, 170px));
  background: rgba(0,0,0,0.12);
  transform-origin: bottom center;
  transform: translate(-50%, calc(-1 * var(--radius, 170px))) rotate(var(--angle, 0deg));
  z-index: 1;
  border-radius: 1px;
}

/* active/highlighted */
.ct-circle .ct-year.ct-active {
  transform: translate(-50%, -50%) scale(1.08) !important;
  background: var(--ct-active-bg);
  box-shadow: 0 8px 22px rgba(0,0,0,0.18);
  z-index: 10;
}

/* responsive */
@media (max-width: 900px) {
  .ct-timeline-wrapper { flex-direction: column-reverse; gap: 18px; padding: 20px; }
  .ct-circular-timeline { width: 340px; height: 340px; }
  .ct-circle .ct-year { transform-origin: 0 -140px; }
  .ct-circle .ct-year::before { height: 140px; }
}

@media (max-width: 480px) {
  .ct-circular-timeline { width: 260px; height: 260px; }
  .ct-circle .ct-year { transform-origin: 0 -100px; padding: 4px 8px; font-size: 13px; }
  .ct-center { width: 10px; height: 10px; }
  .ct-circle .ct-year::before { height: 100px; }
}
