/* ===== Pipi Timeline ===== */

.pipi-tl-wrapper {
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px 20px 80px;
}

.pipi-tl-header {
    text-align: center;
    padding: 60px 0 50px;
}

.pipi-tl-header h2 {
    font-size: 46px;
    line-height: 53px;
    color: #404040;
    font-weight: 800;
}

.pipi-tl-header h2 span {
    display: block;
    font-size: 80px;
    color: #fb5353;
    padding-bottom: 15px;
}

.pipi-tl-header p {
    font-size: 20px;
    line-height: 30px;
    color: #454545;
}

/* ── Container ── */
.pipi-tl-container {
    position: relative;
    padding: 10px 0 40px;
}

/* Center vertical line */
.pipi-tl-container::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #fb5353;
    transform: translateX(-50%);
}

/* ── Each item row ── */
.pipi-tl-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 48px;
    position: relative;
}

/* Left-side card (even index) */
.pipi-tl-item.left {
    flex-direction: row;
    justify-content: flex-end;
    padding-right: calc(50% + 44px);
    padding-left: 0;
}

/* Right-side card (odd index) */
.pipi-tl-item.right {
    flex-direction: row;
    justify-content: flex-start;
    padding-left: calc(50% + 44px);
    padding-right: 0;
}

/* Dot on the center line */
.pipi-tl-item::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 22px;
    width: 14px;
    height: 14px;
    background: #fb5353;
    border: 3px solid #fff;
    border-radius: 50%;
    transform: translateX(-50%);
    box-shadow: 0 0 0 2px #fb5353;
    z-index: 1;
}

/* Entrance animation */
.pipi-tl-item {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.pipi-tl-item.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ── Card ── */
.pipi-tl-content {
    width: 100%;
    background: #fff;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.09);
    border-radius: 6px;
    overflow: hidden;
}

/* Date badge */
.pipi-tl-date {
    display: inline-block;
    background: #fb5353;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 5px 12px;
    margin: 14px 14px 0;
    border-radius: 2px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Media */
.pipi-tl-media {
    display: block;
    width: 100%;
    margin-top: 12px;
    overflow: hidden;
}

.pipi-tl-media img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.4s ease, opacity 0.4s ease;
    opacity: 0.92;
}

.pipi-tl-media img:hover {
    transform: scale(1.03);
    opacity: 1;
}

.pipi-tl-media video {
    width: 100%;
    height: auto;
    display: block;
    background: #000;
}

/* Caption */
.pipi-tl-caption {
    padding: 12px 16px 16px;
    font-size: 15px;
    line-height: 24px;
    color: #343434;
    font-weight: 600;
}

/* ── Loading ── */
.pipi-tl-loading {
    text-align: center;
    padding: 30px 0 20px;
    color: #aaa;
    font-size: 14px;
    display: none;
}

.pipi-tl-loading.active {
    display: block;
}

.pipi-tl-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f0f0f0;
    border-top-color: #fb5353;
    border-radius: 50%;
    animation: pipi-spin 0.8s linear infinite;
    vertical-align: middle;
    margin-right: 8px;
}

@keyframes pipi-spin {
    to { transform: rotate(360deg); }
}

.pipi-tl-sentinel {
    height: 1px;
    visibility: hidden;
}

/* ── Responsive ── */
@media (max-width: 767px) {
    .pipi-tl-container::before {
        left: 18px;
        transform: none;
    }

    .pipi-tl-item.left,
    .pipi-tl-item.right {
        justify-content: flex-start;
        padding-left: 52px;
        padding-right: 0;
    }

    .pipi-tl-item::after {
        left: 11px;
        transform: none;
        top: 18px;
    }

    .pipi-tl-header h2 {
        font-size: 32px;
    }

    .pipi-tl-header h2 span {
        font-size: 54px;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .pipi-tl-item.left {
        padding-right: calc(50% + 28px);
    }

    .pipi-tl-item.right {
        padding-left: calc(50% + 28px);
    }
}
