:root {
    --primary: #006c70;
    --highlight: #149b9a;
    --black: #000000;
    --white: #ffffff;
    --bg: #f9fafb;
}

/* ===== HERO SECTION ===== */
.tf-hero {
    background: linear-gradient(
        135deg,
        var(--primary) 0%,
        var(--highlight) 100%
    );
    position: relative;
    overflow: hidden;
}

.tf-hero::before {
    content: "";
    position: absolute;
    top: -40%;
    right: -15%;
    width: 600px;
    height: 600px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 50%;
    pointer-events: none;
}

.tf-hero::after {
    content: "";
    position: absolute;
    bottom: -40%;
    left: -10%;
    width: 450px;
    height: 450px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 50%;
    pointer-events: none;
}

.tf-hero-dots {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(
        circle,
        rgba(255, 255, 255, 0.12) 1px,
        transparent 1px
    );
    background-size: 28px 28px;
    opacity: 0.5;
    pointer-events: none;
}

.tf-scroll-indicator {
    animation: tfBounce 2.2s infinite;
}

@keyframes tfBounce {
    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* ===== TIMELINE ===== */
.tf-timeline {
    position: relative;
    padding: 2rem 0;
}

/* Thick gradient vertical line */
.tf-timeline::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 6px;
    background: linear-gradient(
        180deg,
        var(--primary) 0%,
        var(--highlight) 100%
    );
    border-radius: 3px;
    transform: translateX(-50%);
    box-shadow: 0 0 20px rgba(20, 155, 154, 0.3);
}

.tf-timeline-item {
    position: relative;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 2rem;
    margin-bottom: 4rem;
}

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

/* Large numbered badge on timeline */
.tf-badge {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--highlight));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 2rem;
    font-weight: 800;
    box-shadow:
        0 8px 24px rgba(0, 108, 112, 0.35),
        0 0 0 6px var(--bg),
        0 0 0 8px rgba(20, 155, 154, 0.25);
    position: relative;
    z-index: 2;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}

.tf-timeline-item:hover .tf-badge {
    transform: scale(1.08) rotate(-5deg);
}

/* Card placement: left/right alternating */
.tf-timeline-item.left .tf-card-wrap {
    grid-column: 1;
    justify-self: end;
}

.tf-timeline-item.left .tf-spacer {
    grid-column: 3;
}

.tf-timeline-item.right .tf-card-wrap {
    grid-column: 3;
    justify-self: start;
}

.tf-timeline-item.right .tf-spacer {
    grid-column: 1;
}

.tf-timeline-item .tf-badge {
    grid-column: 2;
}

/* Jenjang Card */
.tf-card {
    background: var(--white);
    border-radius: 1rem;
    padding: 1.75rem;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
    position: relative;
    overflow: hidden;
    width: 480px;
    height: 180px;
    transition:
        transform 0.35s ease,
        box-shadow 0.35s ease;
    border: 1px solid rgba(20, 155, 154, 0.08);
}

.tf-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--highlight));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.tf-card:hover::before {
    transform: scaleX(1);
}

.tf-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 36px rgba(0, 108, 112, 0.14);
}

/* Arrow pointer toward timeline */
.tf-card::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 14px;
    height: 14px;
    background: var(--white);
    border: 1px solid rgba(20, 155, 154, 0.08);
    transform: translateY(-50%) rotate(45deg);
}

.tf-timeline-item.left .tf-card::after {
    right: -8px;
    border-left: none;
    border-bottom: none;
}

.tf-timeline-item.right .tf-card::after {
    left: -8px;
    border-right: none;
    border-top: none;
}

.tf-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 0.75rem;
    background: rgba(20, 155, 154, 0.1);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    transition:
        background 0.3s ease,
        color 0.3s ease,
        transform 0.3s ease;
}

.tf-card:hover .tf-card-icon {
    background: linear-gradient(135deg, var(--primary), var(--highlight));
    color: var(--white);
    transform: scale(1.08);
}

.tf-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--black);
    margin-bottom: 0.5rem;
}

.tf-card-subtitle {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--highlight);
    margin-bottom: 0.5rem;
}

.tf-card-desc {
    color: #4b5563;
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.tf-card-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tf-card-list li {
    position: relative;
    padding-left: 1.5rem;
    font-size: 0.875rem;
    color: #374151;
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

.tf-card-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.55rem;
    width: 8px;
    height: 8px;
    background: linear-gradient(135deg, var(--primary), var(--highlight));
    border-radius: 50%;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1023px) {
    .tf-timeline::before {
        left: 2rem;
    }

    .tf-timeline-item {
        grid-template-columns: auto 1fr;
        gap: 1.5rem;
    }

    .tf-timeline-item.left .tf-card-wrap,
    .tf-timeline-item.right .tf-card-wrap {
        grid-column: 2;
        justify-self: stretch;
        width: 100%; /* Memastikan pembungkus memenuhi lebar */
    }

    .tf-timeline-item .tf-badge {
        grid-column: 1;
        width: 64px;
        height: 64px;
        font-size: 1.5rem;
    }

    .tf-spacer {
        display: none;
    }

    /* Memaksa card mengabaikan ukuran kaku desktop */
    .tf-card {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important; /* Agar teks tidak terpotong saat box menyempit */
        min-height: 0 !important;
    }

    .tf-timeline-item.left .tf-card::after,
    .tf-timeline-item.right .tf-card::after {
        left: -8px;
        right: auto;
        border-right: none;
        border-top: none;
        border-left: 1px solid rgba(20, 155, 154, 0.08);
        border-bottom: 1px solid rgba(20, 155, 154, 0.08);
    }
}

@media (max-width: 640px) {
    .tf-pokok-card,
    .tf-hukum-section {
        padding: 1.5rem;
    }

    .tf-card {
        padding: 1.25rem;
    }

    .tf-timeline-item {
        margin-bottom: 2.5rem;
    }

    .tf-timeline::before {
        left: 1.5rem; /* Menyesuaikan dengan pusat badge 48px */
        width: 4px;
    }

    .tf-timeline-item .tf-badge {
        width: 48px;
        height: 48px;
        font-size: 1.1rem;
        box-shadow:
            0 6px 16px rgba(0, 108, 112, 0.3),
            0 0 0 4px var(--bg);
    }
}
