@import url('https://fonts.googleapis.com/css2?family=Inter:wght@900&display=swap');

/* DCL Timeline – Frontend v1.2.1 – Compact */

:root {
  /* Layout only — colors injected by PHP inline style */
  --dcl-radius: 8px;
  --dcl-line:   2px;
  /* Color fallbacks */
  --dcl-dark:       #0d0d0d;
  --dcl-dark2:      #111317;
  --dcl-card:       #1a1d24;
  --dcl-border:     #2a2d35;
  --dcl-accent:     #e63027;
  --dcl-accent2:    #ff4a42;
  --dcl-text:       #e8e8e8;
  --dcl-muted:      #888ea0;
  --dcl-year-color: #e63027;
  --dcl-year-hover: #e63027;
  --dcl-title:      #e8e8e8;
}

.dcl-timeline-wrapper {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: .75rem 1rem 2rem;
  box-sizing: border-box;
}

.dcl-timeline {
  position: relative;
  display: flex;
  flex-direction: column;
}

/* Center vertical line */
.dcl-timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0; bottom: 0;
  width: var(--dcl-line);
  background: linear-gradient(to bottom, transparent 0%, var(--dcl-accent) 3%, var(--dcl-accent) 97%, transparent 100%);
  transform: translateX(-50%);
  z-index: 0;
}

/* ─── Item: year left, dot center, card right ─── */
.dcl-timeline-item {
  display: grid;
  grid-template-columns: 1fr 44px 1fr;
  align-items: start;
  position: relative;
  margin-bottom: .6rem;
  z-index: 1;
}

/* ─── Year ─── */
.dcl-timeline-year {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  padding-right: .9rem;
  padding-top: .6rem;
}
.dcl-timeline-year span {
  font-size: clamp(.9rem, 1.8vw, 1.4rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -.02em;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--dcl-year-color, #e63027);
  text-stroke: 1.5px var(--dcl-year-color, #e63027);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  transition: color .2s ease, -webkit-text-stroke .2s ease;
  user-select: none;
  text-align: right;
  word-break: break-word;
}
.dcl-timeline-item:hover .dcl-timeline-year span {
  color: var(--dcl-year-hover, #e63027);
  -webkit-text-stroke: 1.5px transparent;
}

/* ─── Connector dot ─── */
.dcl-timeline-connector {
  display: flex;
  justify-content: center;
  padding-top: .75rem;
  z-index: 2;
}
.dcl-timeline-dot {
  width: 11px; height: 11px;
  border-radius: 50%;
  background: var(--dcl-accent);
  border: 2px solid var(--dcl-dark2);
  box-shadow: 0 0 0 2px var(--dcl-accent);
  flex-shrink: 0;
  transition: transform .2s ease, box-shadow .2s ease;
}
.dcl-timeline-item:hover .dcl-timeline-dot {
  transform: scale(1.35);
  box-shadow: 0 0 0 3px var(--dcl-accent), 0 0 10px rgba(230,48,39,.45);
}

/* ─── Content Card ─── */
.dcl-timeline-content {
  background: var(--dcl-card);
  border: 1px solid var(--dcl-border);
  border-radius: var(--dcl-radius);
  margin-left: .9rem;
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
/* Arrow */
.dcl-timeline-content::before {
  content: '';
  position: absolute;
  left: -7px; top: .85rem;
  width: 12px; height: 12px;
  background: var(--dcl-card);
  border-left: 1px solid var(--dcl-border);
  border-bottom: 1px solid var(--dcl-border);
  transform: rotate(45deg);
  transition: border-color .2s ease;
  z-index: 1;
}
.dcl-timeline-item:hover .dcl-timeline-content {
  border-color: var(--dcl-accent);
  box-shadow: 0 3px 14px rgba(230,48,39,.12);
  transform: translateY(-1px);
}
.dcl-timeline-item:hover .dcl-timeline-content::before { border-color: var(--dcl-accent); }

/* ─── Right side (alternating) ─── */
.dcl-side-right .dcl-timeline-year { order: 3; justify-content: flex-start; padding-right: 0; padding-left: .9rem; }
.dcl-side-right .dcl-timeline-connector { order: 2; }
.dcl-side-right .dcl-timeline-content {
  order: 1; margin-left: 0; margin-right: .9rem;
}
.dcl-side-right .dcl-timeline-content::before {
  left: auto; right: -7px;
  border-left: none; border-bottom: none;
  border-right: 1px solid var(--dcl-border);
  border-top: 1px solid var(--dcl-border);
}
.dcl-side-right:hover .dcl-timeline-content::before { border-color: var(--dcl-accent); }

/* ─── Card Header ─── */
.dcl-card-header {
  padding: .45rem .85rem .4rem;
  border-bottom: 1px solid var(--dcl-border);
}
.dcl-timeline-title {
  font-size: .85rem;
  font-weight: 700;
  color: var(--dcl-title, #e8e8e8);
  margin: 0;
  line-height: 1.25;
}

/* ─── Card Body ─── */
.dcl-card-body {
  display: flex;
  flex-direction: column;
}

/* ─── Text ─── */
.dcl-timeline-text {
  order: 1;
  padding: .45rem .85rem .5rem;
  color: var(--dcl-muted);
  font-size: .8rem;
  line-height: 1.55;
}
.dcl-timeline-text p           { margin: 0 0 .35rem; }
.dcl-timeline-text p:last-child { margin-bottom: 0; }
.dcl-timeline-text strong      { color: var(--dcl-title, #e8e8e8); }
.dcl-timeline-text a           { color: var(--dcl-accent); text-decoration: none; }
.dcl-timeline-text a:hover     { text-decoration: underline; }
.dcl-timeline-text ul          { padding-left: 1rem; margin: .2rem 0; }
.dcl-timeline-text li          { margin-bottom: .1rem; }

/* ─── Single Image (below text) ─── */
.dcl-img-single {
  order: 2;
  overflow: hidden;
  border-radius: 0 0 var(--dcl-radius) var(--dcl-radius);
  display: block;
  /* Center single image, same width as one tile in 2-col gallery */
  width: 50%;
  margin: 0 auto;
  border-radius: var(--dcl-radius);
  margin-bottom: 0;
}
.dcl-img-single img {
  width: 100%; height: 100px;
  object-fit: cover; display: block;
  transition: transform .35s ease;
  border-radius: 0 0 var(--dcl-radius) var(--dcl-radius);
}
.dcl-timeline-content:hover .dcl-img-single img { transform: scale(1.03); }

/* ─── Gallery (below text) ─── */
.dcl-timeline-gallery {
  order: 2;
  display: grid;
  gap: 3px;
  overflow: hidden;
  border-radius: 0 0 var(--dcl-radius) var(--dcl-radius);
}
.dcl-timeline-gallery.dcl-img-count-1 { grid-template-columns: 1fr; }
.dcl-timeline-gallery.dcl-img-count-2 { grid-template-columns: 1fr 1fr; }
.dcl-timeline-gallery.dcl-img-count-3 { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; }
.dcl-timeline-gallery.dcl-img-count-3 .dcl-gallery-item:first-child { grid-row: 1/3; }
.dcl-timeline-gallery.dcl-img-count-4 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }

.dcl-gallery-item {
  position: relative; overflow: hidden;
  display: block; background: var(--dcl-border);
  height: 100px;
}
.dcl-timeline-gallery.dcl-img-count-1 .dcl-gallery-item { height: 100px; }

.dcl-gallery-item img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
  transition: transform .35s ease;
}
.dcl-gallery-item:hover img { transform: scale(1.05); }

.dcl-gallery-more {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.6);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: .9rem; font-weight: 800;
  font-family: 'Inter', sans-serif; pointer-events: none;
}
.dcl-gallery-hidden { display: none; }

/* ─── Empty ─── */
.dcl-timeline-empty { text-align: center; color: var(--dcl-muted); padding: 2rem; font-style: italic; }

/* ─── Lightbox ─── */
.dcl-lightbox-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.92);
  z-index: 99999; display: flex; align-items: center; justify-content: center;
  cursor: zoom-out; animation: dclFadeIn .2s ease;
}
@keyframes dclFadeIn { from{opacity:0} to{opacity:1} }
.dcl-lightbox-inner {
  position: relative; max-width: 90vw; max-height: 90vh;
  display: flex; flex-direction: column; align-items: center; gap: .65rem; cursor: default;
}
.dcl-lightbox-inner img { max-width: 90vw; max-height: 80vh; object-fit: contain; border-radius: 5px; display: block; box-shadow: 0 16px 50px rgba(0,0,0,.7); }
.dcl-lightbox-close { position: absolute; top: -2.25rem; right: 0; background: none; border: none; color: #fff; font-size: 1.6rem; cursor: pointer; opacity: .7; transition: opacity .2s; }
.dcl-lightbox-close:hover { opacity: 1; }
.dcl-lightbox-nav { display: flex; align-items: center; gap: 1.25rem; }
.dcl-lightbox-prev,.dcl-lightbox-next { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2); color: #fff; border-radius: 50%; width: 40px; height: 40px; font-size: 1.1rem; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background .2s; }
.dcl-lightbox-prev:hover,.dcl-lightbox-next:hover { background: rgba(255,255,255,.2); }
.dcl-lightbox-counter { color: rgba(255,255,255,.6); font-size: .82rem; min-width: 55px; text-align: center; }

/* ─── Responsive ─── */
@media (max-width: 640px) {
  .dcl-timeline::before { left: 22px; }
  .dcl-timeline-item { grid-template-columns: 44px 1fr; grid-template-rows: auto auto; margin-bottom: .75rem; }
  .dcl-timeline-year { grid-column:2; grid-row:1; justify-content:flex-start; padding:0 0 .25rem .7rem; }
  .dcl-timeline-year span { font-size: clamp(.85rem,4vw,1.1rem); }
  .dcl-timeline-connector { grid-column:1; grid-row:1/3; align-items:center; padding-top:.3rem; }
  .dcl-timeline-content { grid-column:2; grid-row:2; margin-left:.7rem; margin-right:0; }
  .dcl-timeline-content::before { left:-6px; right:auto; top:.75rem; border-left:1px solid var(--dcl-border); border-bottom:1px solid var(--dcl-border); border-right:none; border-top:none; }
  .dcl-side-right .dcl-timeline-year { grid-column:2; grid-row:1; order:unset; padding-left:.7rem; padding-right:0; }
  .dcl-side-right .dcl-timeline-connector { grid-column:1; grid-row:1/3; order:unset; }
  .dcl-side-right .dcl-timeline-content { grid-column:2; grid-row:2; order:unset; margin-left:.7rem; margin-right:0; }
  .dcl-side-right .dcl-timeline-content::before { left:-6px; right:auto; border-right:none; border-top:none; border-left:1px solid var(--dcl-border); border-bottom:1px solid var(--dcl-border); }
}
