/* ==========================================================================
   Company Milestones Timeline CSS
   LƯU Ý: Tuyệt đối KHÔNG sử dụng biến CSS (--variable) theo đúng yêu cầu
   ========================================================================== */

/* Khung bao ngoài */
.company-timeline-container {
    width: 100%;
    max-width: 1200px;
    margin: 30px auto;
    position: relative;
    box-sizing: border-box;
    user-select: none;
    -webkit-user-select: none;
}

.company-timeline-container * {
    box-sizing: border-box;
}

/* Tiêu đề & Nút bấm trên */
.company-timeline-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.company-timeline-title {
    font-size: 24px;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
    line-height: 1.3;
    letter-spacing: -0.5px;
}

.company-timeline-nav-btns {
    display: none;
    align-items: center;
    gap: 10px;
}

.company-timeline-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1.5px solid #cbd5e1;
    background-color: #ffffff;
    color: #334155;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    outline: none;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    padding: 0;
    line-height: 1;
    margin: 0;
}

.company-timeline-btn:hover:not(:disabled) {
    background-color: #0090d9;
    border-color: #0090d9;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0, 144, 217, 0.25);
}

.company-timeline-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    border-color: #e2e8f0;
    color: #94a3b8;
    box-shadow: none;
    transform: none;
    margin: 0;
}

/* Viewport & Track trượt */
.company-timeline-viewport {
    overflow: hidden;
    width: 100%;
    cursor: grab;
    position: relative;
    padding-top: 6px;
    padding-bottom: 6px;
}

.company-timeline-viewport:active {
    cursor: grabbing;
}

.company-timeline-track {
    display: flex;
    transition: transform 0.45s cubic-bezier(0.25, 1, 0.5, 1);
    will-change: transform;
}

/* Cột mốc thời gian */
.company-timeline-col {
    flex: 0 0 25%;
    max-width: 25%;
    padding: 0 16px;
    box-sizing: border-box;
}

/* Năm hiển thị */
.company-timeline-year {
    font-size: 26px;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.2;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
    text-align: left;
}

/* Trục ngang & Chấm tròn */
.company-timeline-axis {
    position: relative;
    height: 24px;
    display: flex;
    align-items: center;
    margin: 0 -16px 24px -16px;
    padding: 0 16px;
}

.company-timeline-axis::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background-color: #72caf5;
    transform: translateY(-50%);
    z-index: 1;
}

.company-timeline-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: #0090d9;
    box-shadow: 0 0 0 4px #ffffff, 0 0 0 5px rgba(0, 144, 217, 0.25);
    position: relative;
    z-index: 2;
    flex-shrink: 0;
    transition: transform 0.25s ease, background-color 0.25s ease;
}

.company-timeline-col:hover .company-timeline-dot {
    transform: scale(1.25);
    background-color: #0077b6;
}

/* Khung hình ảnh CSS */
.company-timeline-media {
    width: 100%;
    aspect-ratio: 16 / 11;
    background-color: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 16px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.company-timeline-col:hover .company-timeline-media {
    border-color: #cbd5e1;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
    transform: translateY(-3px);
}

.company-timeline-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Placeholder khi chưa có hình ảnh */
.company-timeline-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f8fafc 0%, #edf2f7 100%);
    color: #94a3b8;
    padding: 15px;
    text-align: center;
}

.company-timeline-placeholder svg {
    width: 36px;
    height: 36px;
    stroke: #94a3b8;
    fill: none;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.company-timeline-placeholder span {
    font-size: 13px;
    font-weight: 500;
    color: #64748b;
}

/* Phần mô tả */
.company-timeline-content {
    padding-right: 6px;
}

.company-timeline-desc {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.55;
    margin: 0;
    text-align: left;
}

/* Link & tương tác khi có link */
.company-timeline-media-link {
    display: block;
    text-decoration: none;
    color: inherit;
    width: 100%;
    outline: none;
}

.company-timeline-desc-link {
    text-decoration: none;
    color: #1e293b;
    display: inline-block;
    outline: none;
    transition: color 0.2s ease;
}

.company-timeline-col.has-link:hover .company-timeline-desc-link .company-timeline-desc,
.company-timeline-desc-link:hover .company-timeline-desc {
    color: #0090d9;
}

.company-timeline-col.has-link .company-timeline-media {
    cursor: pointer;
}

/* Nút điều hướng & Dots bên dưới */
.company-timeline-bottom-nav {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 32px;
}

.company-timeline-dots {
    display: flex;
    align-items: center;
    gap: 8px;
}

.company-timeline-dot-item {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background-color: #cbd5e1;
    cursor: pointer;
    transition: all 0.25s ease;
}

.company-timeline-dot-item.active {
    width: 26px;
    border-radius: 5px;
    background-color: #0090d9;
}

/* Responsive Breakpoints */
@media (max-width: 1024px) {
    .company-timeline-col {
        flex: 0 0 33.333%;
        max-width: 33.333%;
    }
}

@media (max-width: 768px) {
    .company-timeline-col {
        flex: 0 0 50%;
        max-width: 50%;
    }

    .company-timeline-year {
        font-size: 22px;
    }

    .company-timeline-desc {
        font-size: 13.5px;
    }
}

@media (max-width: 480px) {
    .company-timeline-col {
        flex: 0 0 85%;
        max-width: 85%;
        padding: 0 12px;
    }

    .company-timeline-axis {
        margin: 0 -12px 20px -12px;
        padding: 0 12px;
    }

    .company-timeline-year {
        font-size: 20px;
    }
}