/* =========================================
   Timeline Pro — Stylesheet v2.0
   ========================================= */

/* ---- CSS Variables ---- */
:root {
    --tp-accent:        #4db8d4;
    --tp-line-color:    #d0dce8;
    --tp-card-bg:       #ffffff;
    --tp-dot-size:      36px;
    --tp-line-width:    2px;
    --tp-gap:           80px;
    --tp-transition:    0.3s ease;
    --tp-radius:        0px;
}

/* ---- Base Wrapper ---- */
.tp-timeline {
    position: relative;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px 0 40px;
    box-sizing: border-box;
}

/* =========================================
   CONNECTOR LINE  (standard layouts)
   ========================================= */
.tp-line-wrap {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: var(--tp-line-width);
    z-index: 0;
    pointer-events: none;
}

.tp-line {
    position: absolute;
    inset: 0;
    background-color: var(--tp-line-color);
    border-radius: 99px;
}

.tp-line-progress {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 0%;
    background-color: var(--tp-accent);
    border-radius: 99px;
    /* transition set via JS using data-line-speed & data-line-easing */
}

/* Side layouts move line left/right */
.tp-layout-left .tp-line-wrap,
.tp-layout-image-left .tp-line-wrap {
    left: 28px;
    transform: none;
}

.tp-layout-right .tp-line-wrap {
    left: auto;
    right: 28px;
    transform: none;
}

.tp-layout-image-right .tp-line-wrap {
    left: 28px;
    transform: none;
}

/* =========================================
   DOT / CONNECTOR MARKER
   ========================================= */
.tp-dot-wrap {
    position: relative;
    flex-shrink: 0;
    z-index: 2;
}

.tp-dot {
    width:  var(--tp-dot-size);
    height: var(--tp-dot-size);
    border-radius: 50%;
    background-color: var(--tp-accent);
    border: 0px solid transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
    transition: transform var(--tp-transition), box-shadow var(--tp-transition);
    cursor: default;
}

/* Arrow SVG inside dot */
.tp-dot-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    color: #fff;
    font-size: calc(var(--tp-dot-size) * 0.55);
}

.tp-dot-arrow svg {
    width:  1em;
    height: 1em;
    fill: currentColor;
    display: block;
}

/* Icon inside dot */
.tp-dot i,
.tp-dot .eicon,
.tp-dot .fa {
    font-size: calc(var(--tp-dot-size) * 0.45);
    color: #fff;
    line-height: 1;
}

.tp-dot svg:not(.tp-dot-arrow svg) {
    width:  calc(var(--tp-dot-size) * 0.5);
    height: calc(var(--tp-dot-size) * 0.5);
    fill: #fff;
}

/* Image inside dot */
.tp-dot-image {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.tp-dot-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

/* Text/Number inside dot */
.tp-dot-text {
    font-size: calc(var(--tp-dot-size) * 0.38);
    font-weight: 700;
    color: #fff;
    line-height: 1;
}

/* Hover pulse */
.tp-item:hover .tp-dot,
.tp-mag-item:hover .tp-dot {
    transform: scale(1.12);
    box-shadow: 0 0 0 6px rgba(77, 184, 212, 0.2);
}

/* Dot activation pulse (JS-triggered) */
.tp-dot.tp-active {
    animation: tp-pulse 0.7s ease forwards;
}

@keyframes tp-pulse {
    0%   { box-shadow: 0 0 0 0   rgba(77,184,212,0.5); }
    60%  { box-shadow: 0 0 0 14px rgba(77,184,212,0); }
    100% { box-shadow: 0 0 0 0   rgba(77,184,212,0); }
}

/* =========================================
   ITEM BASE
   ========================================= */
.tp-items {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
}

.tp-item {
    position: relative;
    display: flex;
    align-items: flex-start;
    margin-bottom: var(--tp-gap);
    gap: 0;
}

.tp-item:last-child {
    margin-bottom: 0;
}

/* ---- CARD ---- */
.tp-card {
    flex: 1;
    background: var(--tp-card-bg);
    border-radius: var(--tp-radius);
    overflow: hidden;
    transition: transform var(--tp-transition), box-shadow var(--tp-transition);
}

.tp-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

.tp-card-body {
    padding: 20px 24px 24px;
}

.tp-image-wrap {
    overflow: hidden;
}

.tp-image-wrap img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
    transition: transform 0.55s ease;
}

.tp-card:hover .tp-image-wrap img {
    transform: scale(1.05);
}

/* ---- Typography ---- */
.tp-date {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--tp-accent);
    margin-bottom: 6px;
}

.tp-heading {
    margin: 0 0 10px;
    font-size: 19px;
    font-weight: 700;
    line-height: 1.3;
    color: #2c3e50;
}

.tp-description {
    margin: 0;
    font-size: 15px;
    line-height: 1.75;
    color: #555;
}

.tp-description p:last-child { margin-bottom: 0; }

/* =========================================
   LAYOUT: ALTERNATING
   ========================================= */
.tp-layout-alternating .tp-dot-wrap {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 16px;
    z-index: 3;
}

.tp-layout-alternating .tp-item {
    width: 100%;
}

.tp-layout-alternating .tp-item.tp-side-left .tp-card {
    margin-right: calc(50% + 28px);
}

.tp-layout-alternating .tp-item.tp-side-right .tp-card {
    margin-left: calc(50% + 28px);
}

/* =========================================
   LAYOUT: ALL LEFT
   ========================================= */
.tp-layout-left .tp-item {
    padding-left: 64px;
}

.tp-layout-left .tp-dot-wrap {
    position: absolute;
    left: 10px;
    top: 14px;
    z-index: 3;
}

/* =========================================
   LAYOUT: ALL RIGHT
   ========================================= */
.tp-layout-right .tp-item {
    padding-right: 64px;
    flex-direction: row-reverse;
}

.tp-layout-right .tp-dot-wrap {
    position: absolute;
    right: 10px;
    left: auto;
    top: 14px;
    z-index: 3;
}

/* =========================================
   LAYOUT: IMAGE LEFT / TEXT RIGHT
   ========================================= */
.tp-layout-image-left .tp-item,
.tp-layout-image-right .tp-item {
    padding-left: 64px;
    align-items: stretch;
}

.tp-layout-image-left .tp-dot-wrap,
.tp-layout-image-right .tp-dot-wrap {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
}

.tp-layout-image-left .tp-card,
.tp-layout-image-right .tp-card {
    display: flex;
    flex-direction: row;
    align-items: stretch;
}

.tp-layout-image-right .tp-card {
    flex-direction: row-reverse;
}

.tp-layout-image-left .tp-image-wrap,
.tp-layout-image-right .tp-image-wrap {
    width: 40%;
    flex-shrink: 0;
}

.tp-layout-image-left .tp-image-wrap img,
.tp-layout-image-right .tp-image-wrap img {
    height: 100%;
    min-height: 200px;
    width: 100%;
    object-fit: cover;
}

.tp-layout-image-left .tp-card-body,
.tp-layout-image-right .tp-card-body {
    flex: 1;
    padding: 28px;
}

/* =========================================
   LAYOUT: CENTERED COMPACT
   ========================================= */
.tp-layout-centered-compact .tp-items {
    align-items: center;
}

.tp-layout-centered-compact .tp-item {
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
    max-width: 620px;
}

.tp-layout-centered-compact .tp-dot-wrap {
    position: static;
    transform: none;
    margin-bottom: 14px;
}

.tp-layout-centered-compact .tp-line-wrap {
    left: 50%;
    transform: translateX(-50%);
}

/* =========================================
   LAYOUT: HORIZONTAL SCROLL
   ========================================= */
.tp-layout-horizontal .tp-items {
    flex-direction: row;
    overflow-x: auto;
    padding-bottom: 20px;
    scrollbar-width: thin;
    scrollbar-color: var(--tp-accent) var(--tp-line-color);
    -webkit-overflow-scrolling: touch;
    cursor: grab;
}

.tp-layout-horizontal .tp-items:active { cursor: grabbing; }

.tp-layout-horizontal .tp-items::-webkit-scrollbar { height: 4px; }
.tp-layout-horizontal .tp-items::-webkit-scrollbar-track { background: var(--tp-line-color); }
.tp-layout-horizontal .tp-items::-webkit-scrollbar-thumb { background: var(--tp-accent); border-radius: 99px; }

.tp-layout-horizontal .tp-item {
    flex-direction: column;
    align-items: center;
    min-width: 260px;
    flex: 0 0 280px;
    text-align: center;
    position: relative;
    margin-bottom: 0;
    padding-top: 52px;
    margin-right: 0;
}

.tp-layout-horizontal .tp-item::before {
    content: '';
    position: absolute;
    top: calc(var(--tp-dot-size) / 2);
    left: 0;
    right: 0;
    height: var(--tp-line-width, 2px);
    background: var(--tp-line-color);
    z-index: 0;
}

.tp-layout-horizontal .tp-item:first-child::before { left: 50%; }
.tp-layout-horizontal .tp-item:last-child::before  { right: 50%; }

.tp-layout-horizontal .tp-h-dot {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
}

.tp-layout-horizontal .tp-card {
    text-align: left;
    width: 100%;
}

/* =========================================
   LAYOUT: MAGAZINE
   (Image + Text alternating, centred line)
   ========================================= */
.tp-layout-magazine .tp-items {
    position: relative;
}

/* Central vertical line for magazine */
.tp-layout-magazine .tp-items::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: var(--tp-line-width, 2px);
    background-color: var(--tp-line-color);
    z-index: 0;
    border-radius: 99px;
}

/* Magazine item row */
.tp-mag-item {
    position: relative;
    display: flex;
    align-items: center;
    margin-bottom: var(--tp-gap);
    gap: 80px;
    z-index: 1;
}

.tp-mag-item:last-child { margin-bottom: 0; }

/* Image column */
.tp-mag-image {
    flex: 0 0 280px;
    width: 280px;
    position: relative;
    z-index: 2;
}

.tp-mag-image img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    display: block;
    border-radius: 50%;       /* default oval — overridden by Elementor control */
    transition: transform 0.5s ease;
}

.tp-mag-item:hover .tp-mag-image img {
    transform: scale(1.04);
}

/* Content column */
.tp-mag-content {
    flex: 1;
    position: relative;
    z-index: 2;
}

/* Image-right variant: flip the row */
.tp-mag-item.tp-mag-image-right {
    flex-direction: row-reverse;
}

/* Text alignment per side */
.tp-mag-item.tp-mag-image-left  .tp-mag-content { text-align: left; }
.tp-mag-item.tp-mag-image-right .tp-mag-content { text-align: right; }

/* ---- Magazine connector between items ---- */
.tp-mag-connector {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: var(--tp-gap);
    margin-top: calc(var(--tp-gap) * -1); /* overlap with item gap */
    z-index: 2;
    pointer-events: none;
}

/* Short vline segment between items */
.tp-mag-vline-wrap {
    position: relative;
    width: var(--tp-line-width, 2px);
    height: 60px;
    margin-bottom: -2px;
}

.tp-mag-vline {
    position: absolute;
    inset: 0;
    background-color: var(--tp-line-color);
    border-radius: 99px;
}

.tp-mag-vline-progress {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 0%;
    background-color: var(--tp-accent);
    border-radius: 99px;
}

/* The dot/arrow in the connector sits below the vline */
.tp-mag-connector .tp-dot {
    pointer-events: auto;
    position: relative;
    z-index: 3;
}

/* =========================================
   SCROLL ANIMATIONS — Initial States
   (apply to both .tp-item and .tp-mag-item)
   ========================================= */
[data-animation="fade-up"]    .tp-item,
[data-animation="fade-up"]    .tp-mag-item    { opacity: 0; transform: translateY(40px); }

[data-animation="fade-in"]    .tp-item,
[data-animation="fade-in"]    .tp-mag-item    { opacity: 0; }

[data-animation="fade-left"]  .tp-item,
[data-animation="fade-left"]  .tp-mag-item    { opacity: 0; transform: translateX(-40px); }

[data-animation="fade-right"] .tp-item,
[data-animation="fade-right"] .tp-mag-item    { opacity: 0; transform: translateX(40px); }

[data-animation="fade-down"]  .tp-item,
[data-animation="fade-down"]  .tp-mag-item    { opacity: 0; transform: translateY(-40px); }

[data-animation="zoom-in"]    .tp-item,
[data-animation="zoom-in"]    .tp-mag-item    { opacity: 0; transform: scale(0.85); }

[data-animation="flip-up"]    .tp-item,
[data-animation="flip-up"]    .tp-mag-item    {
    opacity: 0;
    transform: perspective(700px) rotateX(25deg);
    transform-origin: bottom center;
}

[data-animation="slide-in"]   .tp-item,
[data-animation="slide-in"]   .tp-mag-item              { opacity: 0; transform: translateX(-60px); }
[data-animation="slide-in"]   .tp-item.tp-side-right,
[data-animation="slide-in"]   .tp-mag-item.tp-mag-image-right { transform: translateX(60px); }

/* Magazine connector segments also animate */
[data-animation]:not([data-animation="none"]) .tp-mag-connector {
    opacity: 0;
    transform: scaleY(0);
    transform-origin: top center;
}

/* Animated (visible) states */
.tp-item.tp-animated,
.tp-mag-item.tp-animated {
    opacity: 1 !important;
    transform: none !important;
}

.tp-mag-connector.tp-animated {
    opacity: 1 !important;
    transform: none !important;
}

/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 860px) {

    /* Magazine: stack vertically */
    .tp-layout-magazine .tp-items::before { display: none; }

    .tp-mag-item,
    .tp-mag-item.tp-mag-image-right {
        flex-direction: column;
        gap: 24px;
        text-align: center;
    }

    .tp-mag-item.tp-mag-image-left  .tp-mag-content,
    .tp-mag-item.tp-mag-image-right .tp-mag-content { text-align: center; }

    .tp-mag-image { width: 100% !important; flex: unset; }

    .tp-mag-connector { display: none; }

    /* Alternating → single left column */
    .tp-layout-alternating .tp-dot-wrap {
        position: absolute !important;
        left: 8px !important;
        top: 14px !important;
        transform: none !important;
    }

    .tp-layout-alternating .tp-line-wrap {
        left: calc(8px + var(--tp-dot-size) / 2);
        transform: translateX(-50%);
    }

    .tp-layout-alternating .tp-item.tp-side-left .tp-card,
    .tp-layout-alternating .tp-item.tp-side-right .tp-card {
        margin-left: calc(var(--tp-dot-size) + 18px) !important;
        margin-right: 0 !important;
    }

    /* Image layouts → stack */
    .tp-layout-image-left .tp-card,
    .tp-layout-image-right .tp-card { flex-direction: column !important; }

    .tp-layout-image-left .tp-image-wrap,
    .tp-layout-image-right .tp-image-wrap { width: 100%; }

    .tp-layout-image-left .tp-image-wrap img,
    .tp-layout-image-right .tp-image-wrap img { height: 200px; }

    .tp-heading { font-size: 17px; }
}

@media (max-width: 480px) {
    .tp-layout-horizontal .tp-item { min-width: 220px; flex: 0 0 220px; }
    .tp-card-body { padding: 16px 18px 20px; }
}
