/* ============================================================
   ABOUT PAGE — css/custom/about.css
   Enqueue: is_page('ve-chung-toi') || is_page('about')
   ============================================================ */

/* ============================================================
   === Timeline section (.row.timeline) ===
   HTML: Flatsome Box (box-text-bottom) native
   JS tạo thêm .tl-content-panel ngay sau row để chứa nội dung active
   ============================================================ */

/* --- Row wrapper --- */
.timeline {
    position: relative;
}

/* Đường kẻ ngang màu xanh lá cây nằm bên dưới mốc năm (bắt đầu từ 5% và kéo dài đến 5% để thừa ra 2 đầu) */
.timeline::before {
    content: '' !important;
    position: absolute !important;
    top: 253px !important;
    left: 5% !important;
    right: 5% !important;
    height: 2px !important;
    background: var(--ic-green) !important;
    z-index: 1 !important;
    pointer-events: none;
}

/* Đầu mũi tên chỉ sang phải ở cuối đường kẻ */
.timeline::after {
    content: '';
    position: absolute;
    top: 250px;
    right: calc(5% - 4px);
    width: 8px;
    height: 8px;
    border-top: 2px solid var(--ic-green);
    border-right: 2px solid var(--ic-green);
    transform: rotate(45deg);
    z-index: 2;
    pointer-events: none;
}

/* --- Col: mỗi mốc năm --- */
.timeline .col {
    cursor: pointer;
    z-index: 1;
}

.timeline .col-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative !important;
    padding-bottom: 60px;
}

/* Dot màu xanh lá cây cho mỗi cột, nằm đè lên đường line */
.timeline .col-inner::after {
    content: '';
    position: absolute;
    top: 250px;
    left: 50%;
    transform: translateX(-50%);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--ic-green);
    z-index: 3 !important;
    transition: background 0.2s;
}

/* --- Box wrapper --- */
.timeline .box {
    background: transparent;
    box-shadow: none;
    border: none;
}

/* --- Vùng ảnh --- */
.timeline .box-image {
    position: relative;
    z-index: 2;
    line-height: 0;
}

/* --- Ảnh tròn --- */
.timeline .box-image img {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid transparent;
    display: block;
    margin: 0 auto;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

/* Ẩn bullet dot cũ ở vùng ảnh */
.timeline .box-image::after {
    display: none !important;
}

/* --- Ẩn toàn bộ .box-text (nội dung sẽ hiển thị qua .tl-content-panel) --- */
.timeline .box-text {
    background: transparent !important;
    padding: 0 !important;
}

.timeline .box-text h3 {
    font-size: 18px;
    font-weight: 500;
    color: var(--ic-grey) !important;
    margin: 15px 0 0 !important;
    text-align: center;
    transition: color 0.2s;
}

/* Ẩn p — nội dung này sẽ được clone vào .tl-content-panel bởi JS */
.timeline .box-text p {
    display: none;
}

/* ============================================================
   ACTIVE STATE
   ============================================================ */

.timeline .col.is-active .box-image img {
    width: 160px;
    height: 160px;
    border-color: var(--ic-green);
    box-shadow: none !important;
}

.timeline .col.is-active .box-text h3 {
    color: var(--ic-green) !important;
    font-weight: 700 !important;
}

/* ============================================================
   === Content panel (tạo bởi JS, nằm sau .row.timeline) ===
   ============================================================ */

.tl-content-panel {
    display: none;
    text-align: center;
    max-width: 590px;
    margin: 0 auto;
    animation: tl-fadeIn 0.3s ease;
}

.tl-content-panel.is-visible {
    display: block;
}

/* Ẩn năm h3 thừa để tránh lặp lại tiêu đề */
.tl-content-panel h3 {
    display: none !important;
}

/* p đầu tiên: có <strong> là title */
.tl-content-panel p {
    font-family: 'Public Sans', sans-serif;
    font-size: 15px;
    line-height: 1.65;
    margin: 0;
    color: #464646;
}

.tl-content-panel p strong {
    font-family: var(--font-title);
    font-size: 36px;
    font-weight: 700;
    font-style: normal;
    color: var(--ic-green);
    display: block;
    margin-bottom: 8px;
    letter-spacing: 2px;
}

@keyframes tl-fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 960px) {
    .timeline {
        padding-bottom: 40px !important;
    }
    
    .timeline::before {
        top: 166px !important;
        bottom: auto !important;
    }
    
    .timeline::after {
        top: 163px !important;
        bottom: auto !important;
    }
    
    .timeline .col-inner {
        padding-bottom: 40px !important;
    }
    
    .timeline .col-inner::after {
        top: 126px !important;
        bottom: auto !important;
    }

    .timeline .box-image img {
        width: 80px !important;
        height: 80px !important;
    }

    .timeline .col.is-active .box-image img {
        width: 80px !important;
        height: 80px !important;
    }

    .tl-content-panel h3 {
        font-size: 32px !important;
    }

    .tl-content-panel p strong {
        font-size: 18px;
    }
}

@media (max-width: 767px) {
    .timeline {
        flex-wrap: nowrap !important;
        overflow-x: auto;
        padding-bottom: 40px !important;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .timeline::-webkit-scrollbar {
        display: none;
    }

    .timeline::before {
        top: 146px !important;
        bottom: auto !important;
        left: 20px !important;
        right: 20px !important;
    }
    
    .timeline::after {
        top: 143px !important;
        bottom: auto !important;
        right: calc(20px - 4px) !important;
    }

    .timeline .col {
        flex: 0 0 80px !important;
        width: 80px !important;
        max-width: 80px !important;
    }

    .timeline .col-inner {
        padding-bottom: 40px !important;
    }
    
    .timeline .col-inner::after {
        top: 106px !important;
        bottom: auto !important;
    }

    .timeline .box-image img {
        width: 60px !important;
        height: 60px !important;
    }

    .timeline .col.is-active .box-image img {
        width: 60px !important;
        height: 60px !important;
    }

    .timeline .box-text h3 {
        font-size: 14px !important;
    }

    .tl-content-panel h3 {
        font-size: 28px !important;
    }

    .tl-content-panel p strong {
        font-size: 16px;
    }

    .tl-content-panel {
        padding: 24px 16px 12px;
    }
}


