/* ==========================================================================
   Timeline Entries – timeline-entries.css
   Style: Pahls-inspired — green axis, floating outside date labels,
          image + text side-by-side inside card, alternating left/right
   ========================================================================== */

/* --- Wrapper --------------------------------------------------------------- */
.te-timeline {
    position: relative;
    max-width: 900px;
    margin: 40px auto;
    padding: 0 20px;
}

/* Vertical axis */
.te-timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 3px;
    background: #4a7c59;
    transform: translateX(-50%);
}

/* Hide the separate axis div (kept in template for backward compat) */
.te-axis { display: none; }

/* --- Year group ------------------------------------------------------------ */
.te-year-group {
    position: relative;
}

.te-year-badge {
    position: relative;
    z-index: 3;
    display: table;
    margin: 0 auto 28px;
    padding: 4px 18px;
    background: #4a7c59;
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border-radius: 999px;
}

/* --- Entry ----------------------------------------------------------------- */
.te-entry {
    display: flex;
    justify-content: flex-end;
    padding-right: calc(50% + 30px);
    position: relative;

    /* scroll-reveal start state */
    opacity: 0;
    transform: translateY(24px);
    transition: opacity .5s ease, transform .5s ease;
}

.te-entry.te-visible {
    opacity: 1;
    transform: translateY(0);
}

.te-entry--right {
    justify-content: flex-start;
    padding-right: 0;
    padding-left: calc(50% + 30px);
}

/* --- Dot ------------------------------------------------------------------- */
.te-dot {
    position: absolute;
    left: calc(50% - 8px);
    top: 50%;
    width: 16px;
    height: 16px;
    background: #4a7c59;
    border-radius: 50%;
    border: 3px solid #fff;
    box-shadow: 0 0 0 2px #4a7c59;
    z-index: 2;
    transition: transform .25s ease;
	transform: translateY(-50%);
}

.te-entry:hover .te-dot {
    transform: translateY(-50%) scale(1.3);
}

/* --- Floating date label (outside the axis, opposite side to card) --------- */
.te-card__date {
    position: absolute;
    top: 50%;
    font-size: 0.85rem;
    font-weight: 700;
    color: #4a7c59;
    white-space: nowrap;
    font-style: normal;
    display: block;
    margin: 0;
	transform: translateY(-50%);
}

/* Left entries (card on left) → date floats RIGHT of centre */
.te-entry--left .te-card__date {
    left: calc(50% + 30px);
    text-align: left;
}

/* Right entries (card on right) → date floats LEFT of centre */
.te-entry--right .te-card__date {
    right: calc(50% + 30px);
    text-align: right;
}

/* --- Card ------------------------------------------------------------------ */
.te-card {
    background: #f4f4f5;
    border-radius: 8px;
    padding: 20px;
    max-width: 400px;
    width: 100%;
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
    border-top: none;
    transition: transform .25s ease, box-shadow .25s ease;
}

.te-entry:hover .te-card {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,.13);
}

/* Inner: image + text side-by-side */
.te-card__inner {
    display: flex;
    gap: 12px;
}
.te-entry--right .te-card__inner {
    align-items: flex-start;
}
.te-entry--left .te-card__inner {
    align-items: flex-end;
	text-align:end;
}

.te-entry--left  .te-card__inner,
.te-entry--right .te-card__inner { flex-direction: column; }

/* Thumbnail */
.te-card__thumb {
    width: auto;
    height: 250px;
    flex-shrink: 0;
    border-radius: 6px;
    overflow: hidden;
}

.te-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    transition: transform .4s ease;
}

.te-entry:hover .te-card__thumb img {
    transform: scale(1.04);
}

/* Text */
.te-card__body {
    flex: 1;
    padding: 0;
}

.te-card__label {
    display: inline-block;
    margin-bottom: 6px;
    padding: 2px 10px;
    background: rgba(74,124,89,.12);
    color: #4a7c59;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border-radius: 999px;
}

.te-card__title {
    margin: 0 0 6px;
    font-size: 1rem;
    font-weight: 700;
    color: #333;
    line-height: 1.4;
}

.te-card__content {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.65;
    margin: 0;
}

.te-card__content p { margin: 0 0 4px; }
.te-card__content p:last-child { margin-bottom: 0; }

/* --- Empty state ----------------------------------------------------------- */
.te-empty {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 2rem;
}

/* ==========================================================================
   Responsive — single column at ≤ 700px  (matches Pahls breakpoint)
   ========================================================================== */
@media (max-width: 700px) {

    .te-timeline::before { left: 16px; }

    .te-year-badge { margin-left: 50px; }

	article.te-entry { margin-bottom: 30px;}

    .te-entry,
    .te-entry--right {
        justify-content: flex-start;
        padding-left: 50px;
        padding-right: 0;
    }
	.te-card__date{ transform: translateY(0%);}

    .te-dot { left: calc(16px - 8px); }

    /* Date moves above the card, inline */
    .te-card__date,
    .te-entry--left  .te-card__date,
    .te-entry--right .te-card__date {
        position: relative;
        left: auto;
        right: auto;
        top: auto;
        text-align: left;
        display: block;
        margin: auto;
		white-space:initial;
    }

    .te-card { max-width: 100%; }

    .te-entry--left  .te-card__inner,
    .te-entry--right .te-card__inner {
        flex-direction: column;
    }

    .te-card__thumb {
        width: 100%;
        height: 200px;
    }
}
