/* Timeline Container */
.timeline-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 0;
}

/* The vertical line */
.timeline-container::after {
    content: '';
    position: absolute;
    width: 4px;
    background-color: #e5e7eb;
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -2px;
    border-radius: 2px;
}

/* Timeline Item */
.timeline-item {
    padding: 10px 40px;
    position: relative;
    background-color: inherit;
    width: 50%;
    box-sizing: border-box;
}

/* The dots */
.timeline-item::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    right: -10px;
    background-color: #fff;
    border: 4px solid #dc2626;
    top: 20px;
    border-radius: 50%;
    z-index: 1;
    transition: all 0.3s ease;
}

.timeline-item:hover::after {
    background-color: #dc2626;
    transform: scale(1.2);
}

/* Left side */
.left {
    left: 0;
}

.left .timeline-date {
    font-size: 20px;
    margin-left: 60%;
}

/* Arrow pointing left (towards line) for left item's date (which is on right) */
.left .timeline-date::before {
    right: 100%;
    border-right-color: #dc2626;
}

/* Right side */
.right {
    left: 50%;
}

.right .timeline-date {
    right: 50%;
    font-size: 20px;
}

/* Arrow pointing right (towards line) for right item's date (which is on left) */
.right .timeline-date::before {
    left: 100%;
    border-left-color: #dc2626;
}

/* Fix dot position for right side */
.right::after {
    left: -10px;
}

/* Content wrapper (Activity Card) adjustments */
.timeline-content {
    position: relative;
    border-radius: 12px;
}

/* Arrows */
.left::before {
    content: " ";
    height: 0;
    position: absolute;
    top: 22px;
    width: 0;
    z-index: 1;
    right: 30px;
    border: medium solid white;
    border-width: 10px 0 10px 10px;
    border-color: transparent transparent transparent white;
}

.right::before {
    content: " ";
    height: 0;
    position: absolute;
    top: 22px;
    width: 0;
    z-index: 1;
    left: 30px;
    border: medium solid white;
    border-width: 10px 10px 10px 0;
    border-color: transparent white transparent transparent;
}

.activity-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid #f3f4f6;
}

.activity-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    border-color: #e5e7eb;
}

.activity-card-image {
    position: relative;
    padding-top: 56.25%; /* 16:9 aspect ratio */
    overflow: hidden;
    background-color: #f3f4f6;
}

.activity-card-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.activity-card-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.activity-code {
    font-size: 0.75rem;
    font-weight: 600;
    color: #ffffff;
    background-color: #dc2626;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    width: fit-content;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.activity-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 1rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.activity-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

.activity-title a:hover {
    color: #b31f23;
}

.activity-meta {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    font-size: 0.875rem;
    color: #4b5563;
}

.activity-meta-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.activity-meta-item i {
    width: 16px;
    text-align: center;
    color: #9ca3af;
    margin-top: 0.2rem;
}

.activity-status {
    margin-top: 1.25rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-align: center;
    width: fit-content;
}

.activity-status.pendaftaran {
    background-color: #d1fae5;
    color: #065f46;
}

.activity-status.berlangsung {
    background-color: #dbeafe;
    color: #1e40af;
}

.activity-status.selesai {
    background-color: #f3f4f6;
    color: #374151;
}

/* Responsive Timeline */
@media screen and (max-width: 768px) {
    .timeline-date {
        display: none;
    }

    .timeline-container::after {
        left: 31px;
    }

    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 25px;
    }

    .timeline-item::before {
        left: 60px;
        border: medium solid white;
        border-width: 10px 10px 10px 0;
        border-color: transparent white transparent transparent;
    }

    .left::after, .right::after {
        left: 21px;
    }

    .right {
        left: 0%;
    }
}